-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cura 9575 automake conan v2 #5
base: cura-dev
Are you sure you want to change the base?
Changes from 16 commits
c21d14b
bdde7ec
c4aacc9
a345c53
78ae835
03246e9
847b782
debec9e
8157c44
56f9cdc
47bac9d
9cd0fcb
22d8d24
3180533
ae6f8ce
cb835ef
2b07729
fb53808
4bb5388
54a05ea
278e7aa
f47ff29
d77b5cd
4bf114e
6b771d6
367027d
f28fd51
123ee20
46780ac
f947a5d
75962ea
65825f5
3a4a0ea
64f422e
a86301c
f5ffb92
de87dc9
431d1f9
07c8af0
9c9dfca
65a681f
8445a7b
8e8536d
e4b2df4
954ccbb
5e0941c
757999d
4d974c4
eb56cb7
1583d53
feb510e
558efd7
1d887da
0d1f263
e124e9d
3e29edf
2681fc5
1690229
683391e
9af05be
41e6e9d
b0d3b06
78c7b40
4e0e814
78adc3d
aa071a6
e610d70
5f7d027
17d5fb9
eb76524
0321acd
525cb30
701efb0
2aa6ade
a955211
15bf556
f513109
44dc411
05366f2
1ba694f
399efd2
46194a6
d55b66e
43736c6
0cdd4db
df7efc1
bc13057
489c55e
0acba59
79e0679
76f7604
e126415
7f9fdc9
1c28d5c
2cdd95a
966c99a
05a2fa8
d5bb680
b535c15
5a52fa1
dbf9f46
6d5250d
66b2cc0
9611eed
ab18bcf
90dff75
5a274d8
6829fcd
0abf603
7a780b2
bdfa9ad
51ca852
b1bfcc0
db07471
fbd4d02
bd0f087
e5fba9e
57f3015
aeb40c6
d83019d
0426ea1
8c9e633
63292eb
e236d41
c6b5db7
3e2db9b
126c82e
936eef0
7c9b065
dac3d78
c6aba06
24ea2b4
1678062
64732d6
0f355ca
21fc6a1
4a24d76
5f0b933
e6f38f5
f38adf2
2296ee1
6d2a713
fafe0cd
0742f46
962095c
9cbc92f
ecdf7fa
b596851
2017422
5d957b4
9520538
5dd60f9
c6d36e2
41737f9
5ac7587
1a17b4c
7920782
901aebb
03118e8
2af0b4f
d78fefe
42faf2b
71f7dfb
dfd7ddc
0bb4601
f9ac9d9
72c8359
4abc68a
2fb7710
5336e48
50945a3
583751d
20fd806
07419eb
f6be60d
b6f44a4
a3b6451
356dc04
ad92cda
7eafaf9
23b6941
2ad024b
c4f45d4
fcb0b18
42393a6
85be44d
f39baf7
843317a
e18b9c9
aa8b85a
d30e231
ce26ee8
64298d8
ca6b7e7
5253b77
5c33ec9
ba36805
fdba199
c7c4025
842c55b
3d29d5d
1bf681d
a0cdbcb
46a73a7
39f4ce8
60a4b62
3906097
111b041
7154dbe
a85bc26
caff0f9
c7c1d8f
9c774bf
1739efa
c2c60d9
c50e33c
7c6b9e4
f0cdd76
86de5ed
26482f9
ee8874d
4b20708
5d069ec
5170e61
f862a06
0274209
0852a31
9ac069d
f2a80c1
a7ee4fb
4924cfd
18dda6c
4bff4d2
5dad5f6
dd9380f
60b30ab
010c142
923318d
abf39ae
b4c7827
b485b94
a3d69d4
9fb6fea
4e412b1
075c614
03c3802
b5d8452
7fcccd1
303355e
070119f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -1,140 +1,181 @@ | ||||||||||||||||||||||||||||||||||||||
from conans import AutoToolsBuildEnvironment, ConanFile, tools | ||||||||||||||||||||||||||||||||||||||
import os | ||||||||||||||||||||||||||||||||||||||
from conan import ConanFile | ||||||||||||||||||||||||||||||||||||||
from conan.tools.env import VirtualBuildEnv | ||||||||||||||||||||||||||||||||||||||
from conan.tools.files import apply_conandata_patches, copy, get, replace_in_file, rmdir | ||||||||||||||||||||||||||||||||||||||
from conan.tools.gnu import Autotools, AutotoolsDeps, AutotoolsToolchain | ||||||||||||||||||||||||||||||||||||||
from conan.tools.layout import basic_layout | ||||||||||||||||||||||||||||||||||||||
from conan.tools.microsoft import is_msvc, unix_path | ||||||||||||||||||||||||||||||||||||||
from conan.tools.scm import Version | ||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||
required_conan_version = ">=1.33.0" | ||||||||||||||||||||||||||||||||||||||
required_conan_version = ">=1.51.3" | ||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||
class AutomakeConan(ConanFile): | ||||||||||||||||||||||||||||||||||||||
name = "automake" | ||||||||||||||||||||||||||||||||||||||
description = "Automake is a tool for automatically generating Makefile.in files compliant with the GNU Coding Standards." | ||||||||||||||||||||||||||||||||||||||
license = ("GPL-2.0-or-later", "GPL-3.0-or-later") | ||||||||||||||||||||||||||||||||||||||
url = "https://github.com/conan-io/conan-center-index" | ||||||||||||||||||||||||||||||||||||||
homepage = "https://www.gnu.org/software/automake/" | ||||||||||||||||||||||||||||||||||||||
description = "Automake is a tool for automatically generating Makefile.in files compliant with the GNU Coding Standards." | ||||||||||||||||||||||||||||||||||||||
topics = ("conan", "automake", "configure", "build") | ||||||||||||||||||||||||||||||||||||||
license = ("GPL-2.0-or-later", "GPL-3.0-or-later") | ||||||||||||||||||||||||||||||||||||||
settings = "os", "arch", "compiler", "build_type" | ||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||
exports_sources = "patches/*" | ||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||
_autotools = None | ||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||
@property | ||||||||||||||||||||||||||||||||||||||
def _source_subfolder(self): | ||||||||||||||||||||||||||||||||||||||
return os.path.join(self.source_folder, "source_subfolder") | ||||||||||||||||||||||||||||||||||||||
def _settings_build(self): | ||||||||||||||||||||||||||||||||||||||
# TODO: Remove for Conan v2 | ||||||||||||||||||||||||||||||||||||||
return getattr(self, "settings_build", self.settings) | ||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||
@property | ||||||||||||||||||||||||||||||||||||||
def _version_major_minor(self): | ||||||||||||||||||||||||||||||||||||||
[major, minor, _] = self.version.split(".", 2) | ||||||||||||||||||||||||||||||||||||||
return '{}.{}'.format(major, minor) | ||||||||||||||||||||||||||||||||||||||
def win_bash(self): | ||||||||||||||||||||||||||||||||||||||
return self._settings_build.os == "Windows" | ||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||
@property | ||||||||||||||||||||||||||||||||||||||
def _settings_build(self): | ||||||||||||||||||||||||||||||||||||||
return getattr(self, "settings_build", self.settings) | ||||||||||||||||||||||||||||||||||||||
def export_sources(self): | ||||||||||||||||||||||||||||||||||||||
for p in self.conan_data.get("patches", {}).get(self.version, []): | ||||||||||||||||||||||||||||||||||||||
copy(self, p["patch_file"], self.recipe_folder, self.export_sources_folder) | ||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||
def configure(self): | ||||||||||||||||||||||||||||||||||||||
del self.settings.compiler.cppstd | ||||||||||||||||||||||||||||||||||||||
del self.settings.compiler.libcxx | ||||||||||||||||||||||||||||||||||||||
try: | ||||||||||||||||||||||||||||||||||||||
del self.settings.compiler.libcxx # for plain C projects only | ||||||||||||||||||||||||||||||||||||||
except ValueError: | ||||||||||||||||||||||||||||||||||||||
pass | ||||||||||||||||||||||||||||||||||||||
try: | ||||||||||||||||||||||||||||||||||||||
del self.settings.compiler.cppstd # for plain C projects only | ||||||||||||||||||||||||||||||||||||||
except ValueError: | ||||||||||||||||||||||||||||||||||||||
pass | ||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||
def layout(self): | ||||||||||||||||||||||||||||||||||||||
basic_layout(self, src_folder="automake") | ||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||
def requirements(self): | ||||||||||||||||||||||||||||||||||||||
self.requires("autoconf/2.71") | ||||||||||||||||||||||||||||||||||||||
# automake requires perl-Thread-Queue package | ||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||
def build_requirements(self): | ||||||||||||||||||||||||||||||||||||||
if hasattr(self, "settings_build"): | ||||||||||||||||||||||||||||||||||||||
self.build_requires("autoconf/2.71") | ||||||||||||||||||||||||||||||||||||||
if self._settings_build.os == "Windows" and not tools.get_env("CONAN_BASH_PATH"): | ||||||||||||||||||||||||||||||||||||||
self.build_requires("msys2/cci.latest") | ||||||||||||||||||||||||||||||||||||||
self.requires("m4/1.4.19") | ||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||
def package_id(self): | ||||||||||||||||||||||||||||||||||||||
del self.info.settings.arch | ||||||||||||||||||||||||||||||||||||||
del self.info.settings.compiler | ||||||||||||||||||||||||||||||||||||||
del self.info.settings.build_type | ||||||||||||||||||||||||||||||||||||||
try: | ||||||||||||||||||||||||||||||||||||||
del self.info.settings.arch | ||||||||||||||||||||||||||||||||||||||
except ValueError: | ||||||||||||||||||||||||||||||||||||||
pass | ||||||||||||||||||||||||||||||||||||||
try: | ||||||||||||||||||||||||||||||||||||||
del self.info.settings.compiler | ||||||||||||||||||||||||||||||||||||||
except ValueError: | ||||||||||||||||||||||||||||||||||||||
pass | ||||||||||||||||||||||||||||||||||||||
try: | ||||||||||||||||||||||||||||||||||||||
del self.info.settings.build_type | ||||||||||||||||||||||||||||||||||||||
except ValueError: | ||||||||||||||||||||||||||||||||||||||
pass | ||||||||||||||||||||||||||||||||||||||
jellespijker marked this conversation as resolved.
Show resolved
Hide resolved
Comment on lines
+50
to
+61
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See above |
||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||
def source(self): | ||||||||||||||||||||||||||||||||||||||
tools.get(**self.conan_data["sources"][self.version], | ||||||||||||||||||||||||||||||||||||||
destination=self._source_subfolder, strip_root=True) | ||||||||||||||||||||||||||||||||||||||
def build_requirements(self): | ||||||||||||||||||||||||||||||||||||||
if self._settings_build.os == "Windows" and not self.conf.get("tools.microsoft.bash:path", default=False, check_type=bool): | ||||||||||||||||||||||||||||||||||||||
self.tool_requires("msys2/cci.latest") | ||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||
@property | ||||||||||||||||||||||||||||||||||||||
def _datarootdir(self): | ||||||||||||||||||||||||||||||||||||||
return os.path.join(self.package_folder, "res") | ||||||||||||||||||||||||||||||||||||||
def source(self): | ||||||||||||||||||||||||||||||||||||||
get(self, **self.conan_data["sources"][self.version], | ||||||||||||||||||||||||||||||||||||||
destination=self.source_folder, strip_root=True) | ||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||
def generate(self): | ||||||||||||||||||||||||||||||||||||||
tc = AutotoolsToolchain(self) | ||||||||||||||||||||||||||||||||||||||
tc.configure_args.extend([ | ||||||||||||||||||||||||||||||||||||||
"--datarootdir=${prefix}/res", | ||||||||||||||||||||||||||||||||||||||
]) | ||||||||||||||||||||||||||||||||||||||
jellespijker marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||
if is_msvc(self): | ||||||||||||||||||||||||||||||||||||||
build = "{}-{}-{}".format( | ||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I like the mix of .format and string interpolation. This code is really clear. |
||||||||||||||||||||||||||||||||||||||
"x86_64" if self._settings_build.arch == "x86_64" else "i686", | ||||||||||||||||||||||||||||||||||||||
"pc" if self._settings_build.arch == "x86" else "win64", | ||||||||||||||||||||||||||||||||||||||
"mingw32") | ||||||||||||||||||||||||||||||||||||||
host = "{}-{}-{}".format( | ||||||||||||||||||||||||||||||||||||||
"x86_64" if self.settings.arch == "x86_64" else "i686", | ||||||||||||||||||||||||||||||||||||||
"pc" if self.settings.arch == "x86" else "win64", | ||||||||||||||||||||||||||||||||||||||
"mingw32") | ||||||||||||||||||||||||||||||||||||||
tc.configure_args.append(f"--build={build}") | ||||||||||||||||||||||||||||||||||||||
tc.configure_args.append(f"--host={host}") | ||||||||||||||||||||||||||||||||||||||
tc.generate() | ||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||
deps = AutotoolsDeps(self) | ||||||||||||||||||||||||||||||||||||||
deps.generate() | ||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||
ms = VirtualBuildEnv(self) | ||||||||||||||||||||||||||||||||||||||
ms.generate(scope="build") | ||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||
@property | ||||||||||||||||||||||||||||||||||||||
def _automake_libdir(self): | ||||||||||||||||||||||||||||||||||||||
return os.path.join(self._datarootdir, "automake-{}".format(self._version_major_minor)) | ||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||
def _configure_autotools(self): | ||||||||||||||||||||||||||||||||||||||
if self._autotools: | ||||||||||||||||||||||||||||||||||||||
return self._autotools | ||||||||||||||||||||||||||||||||||||||
self._autotools = AutoToolsBuildEnvironment(self, win_bash=tools.os_info.is_windows) | ||||||||||||||||||||||||||||||||||||||
conf_args = [ | ||||||||||||||||||||||||||||||||||||||
"--datarootdir={}".format(tools.unix_path(self._datarootdir)), | ||||||||||||||||||||||||||||||||||||||
"--prefix={}".format(tools.unix_path(self.package_folder)), | ||||||||||||||||||||||||||||||||||||||
] | ||||||||||||||||||||||||||||||||||||||
self._autotools.configure(args=conf_args, configure_dir=self._source_subfolder) | ||||||||||||||||||||||||||||||||||||||
return self._autotools | ||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||
def _patch_files(self): | ||||||||||||||||||||||||||||||||||||||
for patch in self.conan_data["patches"][self.version]: | ||||||||||||||||||||||||||||||||||||||
tools.patch(**patch) | ||||||||||||||||||||||||||||||||||||||
def build(self): | ||||||||||||||||||||||||||||||||||||||
apply_conandata_patches(self) | ||||||||||||||||||||||||||||||||||||||
if self.settings.os == "Windows": | ||||||||||||||||||||||||||||||||||||||
# tracing using m4 on Windows returns Windows paths => use cygpath to convert to unix paths | ||||||||||||||||||||||||||||||||||||||
tools.replace_in_file(os.path.join(self._source_subfolder, "bin", "aclocal.in"), | ||||||||||||||||||||||||||||||||||||||
" $map_traced_defs{$arg1} = $file;", | ||||||||||||||||||||||||||||||||||||||
" $file = `cygpath -u $file`;\n" | ||||||||||||||||||||||||||||||||||||||
" $file =~ s/^\\s+|\\s+$//g;\n" | ||||||||||||||||||||||||||||||||||||||
" $map_traced_defs{$arg1} = $file;") | ||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||
def build(self): | ||||||||||||||||||||||||||||||||||||||
self._patch_files() | ||||||||||||||||||||||||||||||||||||||
autotools = self._configure_autotools() | ||||||||||||||||||||||||||||||||||||||
replace_in_file(self, self.source_path.joinpath("bin", "aclocal.in"), | ||||||||||||||||||||||||||||||||||||||
" $map_traced_defs{$arg1} = $file;", | ||||||||||||||||||||||||||||||||||||||
" $file = `cygpath -u $file`;\n" | ||||||||||||||||||||||||||||||||||||||
" $file =~ s/^\\s+|\\s+$//g;\n" | ||||||||||||||||||||||||||||||||||||||
" $map_traced_defs{$arg1} = $file;") | ||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||
autotools = Autotools(self) | ||||||||||||||||||||||||||||||||||||||
autotools.configure() | ||||||||||||||||||||||||||||||||||||||
autotools.make() | ||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||
def package(self): | ||||||||||||||||||||||||||||||||||||||
self.copy("COPYING*", src=self._source_subfolder, dst="licenses") | ||||||||||||||||||||||||||||||||||||||
autotools = self._configure_autotools() | ||||||||||||||||||||||||||||||||||||||
autotools.install() | ||||||||||||||||||||||||||||||||||||||
tools.rmdir(os.path.join(self._datarootdir, "info")) | ||||||||||||||||||||||||||||||||||||||
tools.rmdir(os.path.join(self._datarootdir, "man")) | ||||||||||||||||||||||||||||||||||||||
tools.rmdir(os.path.join(self._datarootdir, "doc")) | ||||||||||||||||||||||||||||||||||||||
autotools = Autotools(self) | ||||||||||||||||||||||||||||||||||||||
autotools.install(args=[f"DESTDIR={unix_path(self, self.package_folder)}"]) # Need to specify the `DESTDIR` as a Unix path, aware of the subsystem | ||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||
if self.settings.os == "Windows": | ||||||||||||||||||||||||||||||||||||||
binpath = os.path.join(self.package_folder, "bin") | ||||||||||||||||||||||||||||||||||||||
for filename in os.listdir(binpath): | ||||||||||||||||||||||||||||||||||||||
fullpath = os.path.join(binpath, filename) | ||||||||||||||||||||||||||||||||||||||
if not os.path.isfile(fullpath): | ||||||||||||||||||||||||||||||||||||||
continue | ||||||||||||||||||||||||||||||||||||||
os.rename(fullpath, fullpath + ".exe") | ||||||||||||||||||||||||||||||||||||||
copy(self, "COPYING*", src=self.source_folder, dst=self.package_path.joinpath("licenses")) | ||||||||||||||||||||||||||||||||||||||
rmdir(self, self.package_path.joinpath("res", "info")) | ||||||||||||||||||||||||||||||||||||||
rmdir(self, self.package_path.joinpath("res", "man")) | ||||||||||||||||||||||||||||||||||||||
rmdir(self, self.package_path.joinpath("res", "doc")) | ||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||
def package_info(self): | ||||||||||||||||||||||||||||||||||||||
self.cpp_info.libdirs = [] | ||||||||||||||||||||||||||||||||||||||
self.cpp_info.includedirs = [] | ||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||
bin_path = os.path.join(self.package_folder, "bin") | ||||||||||||||||||||||||||||||||||||||
self.output.info("Appending PATH environment variable:: {}".format(bin_path)) | ||||||||||||||||||||||||||||||||||||||
self.env_info.PATH.append(bin_path) | ||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||
bin_ext = ".exe" if self.settings.os == "Windows" else "" | ||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||
aclocal = tools.unix_path(os.path.join(self.package_folder, "bin", "aclocal" + bin_ext)) | ||||||||||||||||||||||||||||||||||||||
self.output.info("Appending ACLOCAL environment variable with: {}".format(aclocal)) | ||||||||||||||||||||||||||||||||||||||
self.env_info.ACLOCAL.append(aclocal) | ||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||
automake_datadir = tools.unix_path(self._datarootdir) | ||||||||||||||||||||||||||||||||||||||
self.output.info("Setting AUTOMAKE_DATADIR to {}".format(automake_datadir)) | ||||||||||||||||||||||||||||||||||||||
self.env_info.AUTOMAKE_DATADIR = automake_datadir | ||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||
automake_libdir = tools.unix_path(self._automake_libdir) | ||||||||||||||||||||||||||||||||||||||
self.output.info("Setting AUTOMAKE_LIBDIR to {}".format(automake_libdir)) | ||||||||||||||||||||||||||||||||||||||
self.env_info.AUTOMAKE_LIBDIR = automake_libdir | ||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||
automake_perllibdir = tools.unix_path(self._automake_libdir) | ||||||||||||||||||||||||||||||||||||||
self.output.info("Setting AUTOMAKE_PERLLIBDIR to {}".format(automake_perllibdir)) | ||||||||||||||||||||||||||||||||||||||
self.env_info.AUTOMAKE_PERLLIBDIR = automake_perllibdir | ||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||
automake = tools.unix_path(os.path.join(self.package_folder, "bin", "automake" + bin_ext)) | ||||||||||||||||||||||||||||||||||||||
self.output.info("Setting AUTOMAKE to {}".format(automake)) | ||||||||||||||||||||||||||||||||||||||
self.env_info.AUTOMAKE = automake | ||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||
self.output.info("Append M4 include directories to AUTOMAKE_CONAN_INCLUDES environment variable") | ||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||
self.user_info.compile = os.path.join(self._automake_libdir, "compile") | ||||||||||||||||||||||||||||||||||||||
self.user_info.ar_lib = os.path.join(self._automake_libdir, "ar-lib") | ||||||||||||||||||||||||||||||||||||||
bin_path = self.package_path.joinpath("bin") | ||||||||||||||||||||||||||||||||||||||
self.output.info(f"Appending PATH environment variable: {bin_path}") | ||||||||||||||||||||||||||||||||||||||
self.env_info.PATH.append(str(bin_path)) | ||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||
dataroot_path = self.package_path.joinpath("res") | ||||||||||||||||||||||||||||||||||||||
self.output.info(f"Defining AUTOMAKE_DATADIR environment variable: {dataroot_path}") | ||||||||||||||||||||||||||||||||||||||
self.env_info.AUTOMAKE_DATADIR = str(dataroot_path) | ||||||||||||||||||||||||||||||||||||||
self.buildenv_info.define_path("AUTOMAKE_DATADIR", str(dataroot_path)) | ||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||
version = Version(self.version) | ||||||||||||||||||||||||||||||||||||||
automake_dataroot_path = dataroot_path.joinpath(f"automake-{version.major}.{version.minor}") | ||||||||||||||||||||||||||||||||||||||
self.output.info(f"Defining AUTOMAKE_LIBDIR environment variable: {automake_dataroot_path}") | ||||||||||||||||||||||||||||||||||||||
self.env_info.AUTOMAKE_LIBDIR = str(automake_dataroot_path) | ||||||||||||||||||||||||||||||||||||||
self.buildenv_info.define_path("AUTOMAKE_LIBDIR", str(automake_dataroot_path)) | ||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||
self.output.info(f"Defining AUTOMAKE_PERLLIBDIR environment variable: {automake_dataroot_path}") | ||||||||||||||||||||||||||||||||||||||
self.env_info.AUTOMAKE_PERLLIBDIR = str(automake_dataroot_path) | ||||||||||||||||||||||||||||||||||||||
self.buildenv_info.define_path("AUTOMAKE_PERLLIBDIR", str(automake_dataroot_path)) | ||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||
aclocal_bin = bin_path.joinpath("aclocal") | ||||||||||||||||||||||||||||||||||||||
self.output.info(f"Defining ACLOCAL environment variable: {aclocal_bin}") | ||||||||||||||||||||||||||||||||||||||
self.env_info.ACLOCAL = str(aclocal_bin) | ||||||||||||||||||||||||||||||||||||||
self.buildenv_info.define_path("ACLOCAL", str(aclocal_bin)) | ||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||
aclocal_bin_conf_key = "tools.automake:aclocal" | ||||||||||||||||||||||||||||||||||||||
self.output.info(f"Defining path to aclocal binary in configuration as `{aclocal_bin_conf_key}` with value: {aclocal_bin}") | ||||||||||||||||||||||||||||||||||||||
self.conf_info.define(aclocal_bin_conf_key, str(aclocal_bin)) | ||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||
automake_bin = bin_path.joinpath("automake") | ||||||||||||||||||||||||||||||||||||||
self.output.info(f"Defining AUTOMAKE environment variable: {automake_bin}") | ||||||||||||||||||||||||||||||||||||||
self.env_info.AUTOMAKE = str(automake_bin) | ||||||||||||||||||||||||||||||||||||||
self.buildenv_info.define_path("AUTOMAKE", str(automake_bin)) | ||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||
automake_bin_conf_key = "tools.automake:automake" | ||||||||||||||||||||||||||||||||||||||
self.output.info(f"Defining path to automake binary in configuration as `{automake_bin_conf_key}` with value: {automake_bin}") | ||||||||||||||||||||||||||||||||||||||
self.conf_info.define(automake_bin_conf_key, str(automake_bin)) | ||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||
compile_bin = automake_dataroot_path.joinpath("compile") | ||||||||||||||||||||||||||||||||||||||
self.output.info(f"Define path to `compile` binary in user_info as: {compile_bin}") | ||||||||||||||||||||||||||||||||||||||
self.user_info.compile = str(compile_bin) | ||||||||||||||||||||||||||||||||||||||
compile_conf_key = "tools.automake:compile" | ||||||||||||||||||||||||||||||||||||||
self.output.info(f"Defining path to `compile` binary in configuration as `{compile_conf_key}` with value: {compile_bin}") | ||||||||||||||||||||||||||||||||||||||
self.conf_info.define(compile_conf_key, str(compile_bin)) | ||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||
ar_lib_bin = automake_dataroot_path.joinpath("ar-lib") | ||||||||||||||||||||||||||||||||||||||
self.output.info(f"Define path to ar_lib binary in user_info as: {ar_lib_bin}") | ||||||||||||||||||||||||||||||||||||||
self.user_info.ar_lib = str(ar_lib_bin) | ||||||||||||||||||||||||||||||||||||||
ar_lib_conf_key = "tools.automake:ar-lib" | ||||||||||||||||||||||||||||||||||||||
self.output.info(f"Defining path to ar-lib binary in configuration as `{ar_lib_conf_key}` with value: {ar_lib_bin}") | ||||||||||||||||||||||||||||||||||||||
self.conf_info.define(ar_lib_conf_key, str(ar_lib_bin)) | ||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||
install_sh_bin = automake_dataroot_path.joinpath("install-sh") | ||||||||||||||||||||||||||||||||||||||
self.output.info(f"Define path to install_sh binary in user_info as: {install_sh_bin}") | ||||||||||||||||||||||||||||||||||||||
self.user_info.install_sh = str(install_sh_bin) | ||||||||||||||||||||||||||||||||||||||
install_sh_conf_key = "tools.automake:install-sh" | ||||||||||||||||||||||||||||||||||||||
self.output.info(f"Defining path to install_sh binary in configuration as `{install_sh_conf_key}` with value: {install_sh_bin}") | ||||||||||||||||||||||||||||||||||||||
self.conf_info.define(install_sh_conf_key, str(install_sh_bin)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then the second won't be deleted if the first fails. That would mess with the hash for the package.