From 98d00ceac190d6069299c1ea7dfb1d2e3872fc85 Mon Sep 17 00:00:00 2001 From: System-Arch <33330183+System-Arch@users.noreply.github.com> Date: Wed, 25 Jan 2023 15:07:50 -0500 Subject: [PATCH] (#15023) Automake: drop old version and recipe fixes * Automake Conan 2.0 compatibility * Fixed lint and v1 issues * Need autoconf for autoreconf * Annotate patches per lint * Deleted spurious blank line at EOF * Try working around v1 quirks * Removed redundant setting of win_bash * Don't specify env in call to self.run() * See if reordering build requirements appeases Conan 1.x * Try adding VirtualBuildEnv to appease Conan 1.x * Bump required_conan_version to trigger rebuild now that autoconf has been updated * Removed environment variables per discussion in conan-io/conan:#12812 * Still need automake_dataroot_path * Fixed definition of automake_dataroot_path * Replaced env. vars. with script-based paths * Removed extra blank line at EOF * Merge in changes from mainline * Remove obsolete patch files * Bump required_conan_version * Fixed lint warning * Tweak required_conan_version() to restart CI after merge * Removed autoconf as a build_requirement * Update recipes/automake/all/conanfile.py Co-authored-by: Chris Mc --- recipes/automake/all/conandata.yml | 31 +++-- ...01-help2man-no-discard-stderr-1.16.1.patch | 13 --- .../0002-no-perl-path-in-shebang-1.16.1.patch | 56 --------- .../0003-relocatable-automake-1.16.1.patch | 106 ------------------ .../automake/all/test_package/conanfile.py | 2 +- recipes/automake/config.yml | 2 - 6 files changed, 25 insertions(+), 185 deletions(-) delete mode 100644 recipes/automake/all/patches/0001-help2man-no-discard-stderr-1.16.1.patch delete mode 100644 recipes/automake/all/patches/0002-no-perl-path-in-shebang-1.16.1.patch delete mode 100644 recipes/automake/all/patches/0003-relocatable-automake-1.16.1.patch diff --git a/recipes/automake/all/conandata.yml b/recipes/automake/all/conandata.yml index 058a6cc80e230..19afbb0666855 100644 --- a/recipes/automake/all/conandata.yml +++ b/recipes/automake/all/conandata.yml @@ -11,27 +11,44 @@ sources: "1.16.2": url: "https://ftp.gnu.org/gnu/automake/automake-1.16.2.tar.gz" sha256: "b2f361094b410b4acbf4efba7337bdb786335ca09eb2518635a09fb7319ca5c1" - "1.16.1": - url: "https://ftp.gnu.org/gnu/automake/automake-1.16.1.tar.gz" - sha256: "608a97523f97db32f1f5d5615c98ca69326ced2054c9f82e65bade7fc4c9dea8" patches: "1.16.5": - patch_file: "patches/0001-help2man-no-discard-stderr-1.16.5.patch" + patch_description: "help2man no discard stderr" + patch_type: "portability" - patch_file: "patches/0002-no-perl-path-in-shebang-1.16.5.patch" + patch_description: "no perl path in shebang" + patch_type: "portability" - patch_file: "patches/0003-relocatable-automake-1.16.5.patch" + patch_description: "relocatable automake" + patch_type: "portability" "1.16.4": - patch_file: "patches/0001-help2man-no-discard-stderr-1.16.4.patch" + patch_description: "help2man no discard stderr" + patch_type: "portability" - patch_file: "patches/0002-no-perl-path-in-shebang-1.16.4.patch" + patch_description: "no perl path in shebang" + patch_type: "portability" - patch_file: "patches/0003-relocatable-automake-1.16.4.patch" + patch_description: "relocatable automake" + patch_type: "portability" "1.16.3": - patch_file: "patches/0001-help2man-no-discard-stderr-1.16.3.patch" + patch_description: "help2man no discard stderr" + patch_type: "portability" - patch_file: "patches/0002-no-perl-path-in-shebang-1.16.3.patch" + patch_description: "no perl path in shebang" + patch_type: "portability" - patch_file: "patches/0003-relocatable-automake-1.16.3.patch" + patch_description: "relocatable automake" + patch_type: "portability" "1.16.2": - patch_file: "patches/0001-help2man-no-discard-stderr-1.16.2.patch" + patch_description: "help2man no discard stderr" + patch_type: "portability" - patch_file: "patches/0002-no-perl-path-in-shebang-1.16.2.patch" + patch_description: "no perl path in shebang" + patch_type: "portability" - patch_file: "patches/0003-relocatable-automake-1.16.2.patch" - "1.16.1": - - patch_file: "patches/0001-help2man-no-discard-stderr-1.16.1.patch" - - patch_file: "patches/0002-no-perl-path-in-shebang-1.16.1.patch" - - patch_file: "patches/0003-relocatable-automake-1.16.1.patch" + patch_description: "relocatable automake" + patch_type: "portability" diff --git a/recipes/automake/all/patches/0001-help2man-no-discard-stderr-1.16.1.patch b/recipes/automake/all/patches/0001-help2man-no-discard-stderr-1.16.1.patch deleted file mode 100644 index 4472414040ceb..0000000000000 --- a/recipes/automake/all/patches/0001-help2man-no-discard-stderr-1.16.1.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/Makefile.in b/Makefile.in -index c3e934c..b96e108 100644 ---- a/Makefile.in -+++ b/Makefile.in -@@ -706,7 +706,7 @@ man1_MANS = \ - update_mans = \ - $(AM_V_GEN): \ - && $(MKDIR_P) doc \ -- && ./pre-inst-env $(PERL) $(srcdir)/doc/help2man --output=$@ -+ && ./pre-inst-env $(PERL) $(srcdir)/doc/help2man --no-discard-stderr --output=$@ - - amhello_sources = \ - doc/amhello/configure.ac \ diff --git a/recipes/automake/all/patches/0002-no-perl-path-in-shebang-1.16.1.patch b/recipes/automake/all/patches/0002-no-perl-path-in-shebang-1.16.1.patch deleted file mode 100644 index 54ba3ebcf4d59..0000000000000 --- a/recipes/automake/all/patches/0002-no-perl-path-in-shebang-1.16.1.patch +++ /dev/null @@ -1,56 +0,0 @@ -diff --git a/Makefile.in b/Makefile.in -index b96e108..dd05843 100644 ---- a/Makefile.in -+++ b/Makefile.in -@@ -532,7 +532,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ - PACKAGE_URL = @PACKAGE_URL@ - PACKAGE_VERSION = @PACKAGE_VERSION@ - PATH_SEPARATOR = @PATH_SEPARATOR@ --PERL = @PERL@ -+PERL = /usr/bin/env perl - RELEASE_YEAR = @RELEASE_YEAR@ - SET_MAKE = @SET_MAKE@ - SHELL = @SHELL@ -diff --git a/bin/aclocal.in b/bin/aclocal.in -index b3715d9..acf4792 100644 ---- a/bin/aclocal.in -+++ b/bin/aclocal.in -@@ -1,8 +1,8 @@ --#!@PERL@ -w -+#!/usr/bin/env perl - # -*- perl -*- - # @configure_input@ - --eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac' -+eval 'case $# in 0) exec /usr/bin/env perl -S "$0";; *) exec /usr/bin/env perl -S "$0" "$@";; esac' - if 0; - - # aclocal - create aclocal.m4 by scanning configure.ac -diff --git a/bin/automake.in b/bin/automake.in -index a52a489..0abd5f6 100644 ---- a/bin/automake.in -+++ b/bin/automake.in -@@ -1,8 +1,8 @@ --#!@PERL@ -w -+#!/usr/bin/env perl - # -*- perl -*- - # @configure_input@ - --eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac' -+eval 'case $# in 0) exec /usr/bin/env perl -S "$0";; *) exec /usr/bin/env perl -S "$0" "$@";; esac' - if 0; - - # automake - create Makefile.in from Makefile.am -diff --git a/t/ax/test-defs.in b/t/ax/test-defs.in -index 5dc2a61..3f53902 100644 ---- a/t/ax/test-defs.in -+++ b/t/ax/test-defs.in -@@ -97,7 +97,7 @@ SHELL=${AM_TESTSUITE_SHELL-'@SHELL@'}; export SHELL - # User can override various tools used. Prefer overriding specific for - # that automake testsuite, if they are available. - AWK=${AM_TESTSUITE_AWK-${AWK-'@AWK@'}} --PERL=${AM_TESTSUITE_PERL-${PERL-'@PERL@'}} -+PERL=${AM_TESTSUITE_PERL-${PERL-'/usr/bin/env perl'}} - MAKE=${AM_TESTSUITE_MAKE-${MAKE-'make'}} - YACC=${AM_TESTSUITE_YACC-${YACC-'@YACC@'}} - LEX=${AM_TESTSUITE_LEX-${LEX-'@LEX@'}} diff --git a/recipes/automake/all/patches/0003-relocatable-automake-1.16.1.patch b/recipes/automake/all/patches/0003-relocatable-automake-1.16.1.patch deleted file mode 100644 index a302e89e70767..0000000000000 --- a/recipes/automake/all/patches/0003-relocatable-automake-1.16.1.patch +++ /dev/null @@ -1,106 +0,0 @@ -diff --git a/bin/aclocal.in b/bin/aclocal.in -index acf4792..e0b64de 100644 ---- a/bin/aclocal.in -+++ b/bin/aclocal.in -@@ -24,10 +24,13 @@ eval 'case $# in 0) exec /usr/bin/env perl -S "$0";; *) exec /usr/bin/env perl - - - # Written by Tom Tromey , and - # Alexandre Duret-Lutz . -+use Cwd 'abs_path'; -+use File::Basename; - - BEGIN - { -- unshift (@INC, '@datadir@/@PACKAGE@-@APIVERSION@') -+ my $scriptpath = abs_path(dirname(__FILE__)); -+ unshift (@INC, "$scriptpath/../res/@PACKAGE@-@APIVERSION@") - unless $ENV{AUTOMAKE_UNINSTALLED}; - } - -@@ -67,9 +70,16 @@ $perl_threads = 0; - # @system_includes can be augmented with the 'dirlist' file or the - # ACLOCAL_PATH environment variable, and reset with the '--system-acdir' - # option. -+my $scriptpath = abs_path(dirname(__FILE__)); - my @user_includes = (); --my @automake_includes = ('@datadir@/aclocal-' . $APIVERSION); --my @system_includes = ('@datadir@/aclocal'); -+my @automake_includes = ("$scriptpath/../res/aclocal-" . $APIVERSION); -+my @system_includes = ("$scriptpath/../res/aclocal"); -+my @conan_includes; -+foreach my $conandir (uniq(split(/[:;]/, $ENV{'AUTOMAKE_CONAN_INCLUDES'} || ""))) -+{ -+ push (@conan_includes, $conandir) if $conandir ne '' && -d $conandir; -+ -+} - - # Whether we should copy M4 file in $user_includes[0]. - my $install = 0; -@@ -451,6 +461,7 @@ sub scan_m4_files () - } - scan_m4_dirs (FT_AUTOMAKE, SCAN_M4_DIRS_ERROR, @automake_includes); - scan_m4_dirs (FT_SYSTEM, SCAN_M4_DIRS_ERROR, @system_includes); -+ scan_m4_dirs (FT_SYSTEM, SCAN_M4_DIRS_ERROR, @conan_includes); - - # Construct a new function that does the searching. We use a - # function (instead of just evaluating $search in the loop) so that -@@ -773,7 +784,7 @@ sub trace_used_macros () - # to silence m4_require warnings". - my $early_m4_code .= "m4_define([m4_require_silent_probe], [-])"; - -- my $traces = ($ENV{AUTOM4TE} || '@am_AUTOM4TE@'); -+ my $traces = ($ENV{AUTOM4TE} || '/usr/bin/env autom4te'); - $traces .= " --language Autoconf-without-aclocal-m4 "; - $traces = "echo '$early_m4_code' | $traces - "; - -diff --git a/bin/automake.in b/bin/automake.in -index 0abd5f6..055c078 100644 ---- a/bin/automake.in -+++ b/bin/automake.in -@@ -28,10 +28,13 @@ eval 'case $# in 0) exec /usr/bin/env perl -S "$0";; *) exec /usr/bin/env perl - - package Automake; - - use strict; -+use Cwd 'abs_path'; -+use File::Basename; - - BEGIN - { -- unshift (@INC, '@datadir@/@PACKAGE@-@APIVERSION@') -+ my $scriptpath = abs_path(dirname(__FILE__)); -+ unshift (@INC, "$scriptpath/../res/@PACKAGE@-@APIVERSION@") - unless $ENV{AUTOMAKE_UNINSTALLED}; - - # Override SHELL. This is required on DJGPP so that system() uses -@@ -5246,7 +5249,7 @@ sub scan_autoconf_traces - sinclude => 1, - ); - -- my $traces = ($ENV{AUTOCONF} || '@am_AUTOCONF@') . " "; -+ my $traces = ($ENV{AUTOCONF} || '/usr/bin/env autoconf') . " "; - - # Use a separator unlikely to be used, not ':', the default, which - # has a precise meaning for AC_CONFIG_FILES and so on. -diff --git a/lib/Automake/Config.in b/lib/Automake/Config.in -index 6edac11..3adeed1 100644 ---- a/lib/Automake/Config.in -+++ b/lib/Automake/Config.in -@@ -20,6 +20,8 @@ use strict; - - use 5.006; - require Exporter; -+use Cwd 'abs_path'; -+use File::Basename; - - our @ISA = qw (Exporter); - our @EXPORT = qw ($APIVERSION $PACKAGE $PACKAGE_BUGREPORT $VERSION -@@ -32,7 +34,8 @@ our $PACKAGE = '@PACKAGE@'; - our $PACKAGE_BUGREPORT = '@PACKAGE_BUGREPORT@'; - our $VERSION = '@VERSION@'; - our $RELEASE_YEAR = '@RELEASE_YEAR@'; --our $libdir = $ENV{"AUTOMAKE_LIBDIR"} || '@datadir@/@PACKAGE@-@APIVERSION@'; -+my $scriptpath = abs_path(dirname(__FILE__)); -+our $libdir = $ENV{"AUTOMAKE_LIBDIR"} || "$scriptpath/../../@PACKAGE@-@APIVERSION@"; - - our $perl_threads = 0; - # We need at least this version for CLONE support. diff --git a/recipes/automake/all/test_package/conanfile.py b/recipes/automake/all/test_package/conanfile.py index 32063f5e9afe2..a8b0427416846 100644 --- a/recipes/automake/all/test_package/conanfile.py +++ b/recipes/automake/all/test_package/conanfile.py @@ -6,7 +6,7 @@ from conan.tools.files import chdir from conan.tools.gnu import Autotools, AutotoolsToolchain from conan.tools.layout import basic_layout -from conan.tools.microsoft import is_msvc, unix_path +from conan.tools.microsoft import unix_path required_conan_version = ">=1.53.0" diff --git a/recipes/automake/config.yml b/recipes/automake/config.yml index fd370ec1de9eb..020d6b55dbfab 100644 --- a/recipes/automake/config.yml +++ b/recipes/automake/config.yml @@ -7,5 +7,3 @@ versions: folder: all "1.16.2": folder: all - "1.16.1": - folder: all