Skip to content

Commit

Permalink
(#3662) wayland: bump expat
Browse files Browse the repository at this point in the history
* wayland: bump expat

* add components

* keep data in res folder
  • Loading branch information
ericLemanissier authored Nov 26, 2020
1 parent 14e036f commit 2b4c889
Showing 1 changed file with 35 additions and 6 deletions.
41 changes: 35 additions & 6 deletions recipes/wayland/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,21 @@ class WaylandConan(ConanFile):
"enable_dtd_validation": True,
}

_source_subfolder = "source_subfolder"
_build_subfolder = "build_subfolder"
@property
def _source_subfolder(self):
return "source_subfolder"

@property
def _build_subfolder(self):
return "build_subfolder"
_meson = None

def requirements(self):
if self.options.enable_libraries:
self.requires("libffi/3.3")
if self.options.enable_dtd_validation:
self.requires("libxml2/2.9.10")
self.requires("expat/2.2.9")
self.requires("expat/2.2.10")

def build_requirements(self):
self.build_requires('meson/0.54.2')
Expand All @@ -59,7 +64,8 @@ def _configure_meson(self):
'libraries': 'true' if self.options.enable_libraries else 'false',
'dtd_validation': 'true' if self.options.enable_dtd_validation else 'false',
'documentation': 'false',
})
},
args=['--datadir=%s' % os.path.join(self.package_folder, "res")])
return self._meson

def build(self):
Expand All @@ -71,8 +77,31 @@ def package(self):
meson = self._configure_meson()
meson.install()
tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig"))
tools.rmdir(os.path.join(self.package_folder, "share"))

def package_info(self):
self.cpp_info.libs = tools.collect_libs(self)
self.cpp_info.components["wayland-scanner"].names["pkg_config"] = "wayland-scanner"
self.cpp_info.components["wayland-scanner"].requires = ["expat::expat"]
if self.options.enable_dtd_validation:
self.cpp_info.components["wayland-scanner"].requires.append("libxml2::libxml2")

if self.options.enable_libraries:
self.cpp_info.components["wayland-server"].libs = ["wayland-server"]
self.cpp_info.components["wayland-server"].names["pkg_config"] = "wayland-server"
self.cpp_info.components["wayland-server"].requires = ["libffi::libffi"]
self.cpp_info.components["wayland-server"].system_libs = ["pthread", "m"]

self.cpp_info.components["wayland-client"].libs = ["wayland-client"]
self.cpp_info.components["wayland-client"].names["pkg_config"] = "wayland-client"
self.cpp_info.components["wayland-client"].requires = ["libffi::libffi"]
self.cpp_info.components["wayland-client"].system_libs = ["pthread", "m"]

self.cpp_info.components["wayland-cursor"].libs = ["wayland-cursor"]
self.cpp_info.components["wayland-cursor"].names["pkg_config"] = "wayland-cursor"
self.cpp_info.components["wayland-cursor"].requires = ["wayland-client"]

self.cpp_info.components["wayland-egl"].libs = ["wayland-egl"]
self.cpp_info.components["wayland-egl"].names["pkg_config"] = "wayland-egl"
self.cpp_info.components["wayland-egl"].requires = ["wayland-client"]

self.cpp_info.components["wayland-egl-backend"].names["pkg_config"] = "wayland-egl-backend"
self.cpp_info.components["wayland-egl-backend"].version = "3"

0 comments on commit 2b4c889

Please sign in to comment.