Skip to content

Commit

Permalink
remove dependence on which command
Browse files Browse the repository at this point in the history
point GTKDOCIZE environment variable to arbitrary command


add _settings_build property
  • Loading branch information
Renari committed Sep 27, 2021
1 parent 9cb36e9 commit 23faf10
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions recipes/cairo/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ class CairoConan(ConanFile):
_source_subfolder = "source_subfolder"
_build_subfolder = "build_subfolder"

@property
def _settings_build(self):
return getattr(self, "settings_build", self.settings)

_env_build = None

def config_options(self):
Expand Down Expand Up @@ -74,8 +78,8 @@ def requirements(self):
self.requires("libpng/1.6.37")

def build_requirements(self):
if tools.os_info.is_windows and not tools.get_env("CONAN_BASH_PATH"):
self.build_requires('msys2/cci.latest')
if self._settings_build.os and not tools.get_env("CONAN_BASH_PATH"):
self.build_requires("msys2/cci.latest")
if not self._is_msvc:
self.build_requires("libtool/2.4.6")
self.build_requires("pkgconf/1.7.4")
Expand Down Expand Up @@ -160,9 +164,17 @@ def _build_configure(self):
tools.replace_in_file(os.path.join(self.source_folder, self._source_subfolder, "src", "cairo-ft-font.c"),
'#if HAVE_UNISTD_H', '#ifdef HAVE_UNISTD_H')

with tools.environment_append({"NOCONFIGURE": "1"}):
self.run("./autogen.sh", win_bash=tools.os_info.is_windows, run_environment=True)
env_build = self._get_env_build()
tools.touch(os.path.join("boilerplate", "Makefile.am.features"))
tools.touch(os.path.join("src", "Makefile.am.features"))
tools.touch("ChangeLog")

with tools.environment_append({"GTKDOCIZE": "echo"}):
self.run(
"{} -fiv".format(tools.get_env("AUTORECONF")),
run_environment=True,
win_bash=tools.os_info.is_windows,
)
env_build = self._get_env_build()
env_build.make()

def package(self):
Expand Down

0 comments on commit 23faf10

Please sign in to comment.