Skip to content

Commit

Permalink
(#6699) gobject-introspection/all: Fix hardcoded 'share' directory path.
Browse files Browse the repository at this point in the history
The 'g-ir-scanner' tool contains hardcoded path to 'share' folder
specified during compile time. This is used to access files such as
'gobject-introspection-1.0/gdump.c' later on.

Previously the hardcoded 'share' folder was renamed to 'res' in packing
stage. This made those files inaccessible to tools. We now specify
'datadir' argument to hardcode a correct path.

The remaining 'share' folder contains only documentation so we delete that.

Also bump glib dependency version to 2.69.0.
  • Loading branch information
sh0 authored Aug 6, 2021
1 parent ba89836 commit 2e53a79
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions recipes/gobject-introspection/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def build_requirements(self):
self.build_requires("bison/3.7.1")

def requirements(self):
self.requires("glib/2.68.2")
self.requires("glib/2.69.0")

def source(self):
tools.get(**self.conan_data["sources"][self.version], strip_root=True, destination=self._source_subfolder)
Expand All @@ -55,6 +55,7 @@ def _configure_meson(self):
meson = Meson(self)
defs = dict()
defs["build_introspection_data"] = self.options["glib"].shared
defs["datadir"] = os.path.join(self.package_folder, "res")

meson.configure(
source_folder=self._source_subfolder,
Expand Down Expand Up @@ -92,10 +93,7 @@ def package(self):
meson = self._configure_meson()
meson.install()
tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig"))
shutil.move(
os.path.join(self.package_folder, "share"),
os.path.join(self.package_folder, "res"),
)
tools.rmdir(os.path.join(self.package_folder, "share"))
for pdb_file in glob.glob(os.path.join(self.package_folder, "bin", "*.pdb")):
os.unlink(pdb_file)

Expand Down

0 comments on commit 2e53a79

Please sign in to comment.