Skip to content

Commit

Permalink
update gobject-introspection for cairo~shared case
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderRichert-NOAA committed Oct 21, 2023
1 parent 5b1b2ad commit fb74248
Showing 1 changed file with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,6 @@ def setup_build_environment(self, env):
if self.spec.satisfies("@:1.60"):
env.set("SPACK_SBANG", sbang.sbang_install_path())

if self.spec.satisfies("^cairo ~shared"):
pkgconfig = which("pkg-config")
cairo_libs = pkgconfig("cairo", "--static", "--libs", output=str).strip()
env.set("CFLAGS", cairo_libs)

def setup_run_environment(self, env):
env.prepend_path("GI_TYPELIB_PATH", join_path(self.prefix.lib, "girepository-1.0"))

Expand All @@ -114,3 +109,11 @@ class AutotoolsBuilderPackage(spack.build_systems.autotools.AutotoolsBuilder):
def filter_file_to_avoid_overly_long_shebangs(self):
# we need to filter this file to avoid an overly long hashbang line
filter_file("#!/usr/bin/env @PYTHON@", "#!@PYTHON@", "tools/g-ir-tool-template.in")


class MesonBuilder(spack.build_systems.meson.MesonBuilder):
def meson_args(self):
if self.spec.satisfies("^cairo ~shared"):
pkgconfig = which("pkg-config")
cairo_libs = pkgconfig("cairo", "--static", "--libs", output=str).strip()
return [f"-Dc_link_args={cairo_libs}"]

0 comments on commit fb74248

Please sign in to comment.