diff options
Diffstat (limited to 'nixpkgs/pkgs/development/tools/misc/automake')
8 files changed, 253 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/tools/misc/automake/automake-1.11.x.nix b/nixpkgs/pkgs/development/tools/misc/automake/automake-1.11.x.nix new file mode 100644 index 000000000000..5e3167d182dc --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/automake/automake-1.11.x.nix @@ -0,0 +1,49 @@ +{ lib, stdenv, fetchurl, perl, autoconf }: + +stdenv.mkDerivation rec { + name = "automake-1.11.6"; + + # TODO: Remove the `aclocal' wrapper when $ACLOCAL_PATH support is + # available upstream; see + # <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=9026>. + builder = ./builder.sh; + + setupHook = ./setup-hook.sh; + + src = fetchurl { + url = "mirror://gnu/automake/${name}.tar.xz"; + sha256 = "1ffbc6cc41f0ea6c864fbe9485b981679dc5e350f6c4bc6c3512f5a4226936b5"; + }; + + patches = [ ./fix-test-autoconf-2.69.patch ./fix-perl-5.26.patch ]; + + buildInputs = [ perl autoconf ]; + + # Disable indented log output from Make, otherwise "make.test" will + # fail. + preCheck = "unset NIX_INDENT_MAKE"; + doCheck = false; # takes _a lot_ of time, fails 11 of 782 tests + + # Don't fixup "#! /bin/sh" in Libtool, otherwise it will use the + # "fixed" path in generated files! + dontPatchShebangs = true; + + # Run the test suite in parallel. + enableParallelBuilding = true; + + meta = { + branch = "1.11"; + homepage = "https://www.gnu.org/software/automake/"; + description = "GNU standard-compliant makefile generator"; + + longDescription = '' + GNU Automake is a tool for automatically generating + `Makefile.in' files compliant with the GNU Coding + Standards. Automake requires the use of Autoconf. + ''; + + license = lib.licenses.gpl2Plus; + + platforms = lib.platforms.all; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/automake/automake-1.15.x.nix b/nixpkgs/pkgs/development/tools/misc/automake/automake-1.15.x.nix new file mode 100644 index 000000000000..0088eb74cc48 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/automake/automake-1.15.x.nix @@ -0,0 +1,45 @@ +{ lib, stdenv, fetchurl, perl, autoconf }: + +stdenv.mkDerivation rec { + name = "automake-1.15.1"; + + src = fetchurl { + url = "mirror://gnu/automake/${name}.tar.xz"; + sha256 = "1bzd9g32dfm4rsbw93ld9x7b5nc1y6i4m6zp032qf1i28a8s6sxg"; + }; + + nativeBuildInputs = [ autoconf perl ]; + buildInputs = [ autoconf ]; + + setupHook = ./setup-hook.sh; + + patches = [ ./help2man-SOURCE_DATE_EPOCH-support.patch ]; + + # Disable indented log output from Make, otherwise "make.test" will + # fail. + preCheck = "unset NIX_INDENT_MAKE"; + doCheck = false; # takes _a lot_ of time, fails 3 out of 2698 tests, all seem to be related to paths + doInstallCheck = false; # runs the same thing, fails the same tests + + # The test suite can run in parallel. + enableParallelBuilding = true; + + # Don't fixup "#! /bin/sh" in Libtool, otherwise it will use the + # "fixed" path in generated files! + dontPatchShebangs = true; + + meta = { + branch = "1.15"; + homepage = "https://www.gnu.org/software/automake/"; + description = "GNU standard-compliant makefile generator"; + license = lib.licenses.gpl2Plus; + + longDescription = '' + GNU Automake is a tool for automatically generating + `Makefile.in' files compliant with the GNU Coding + Standards. Automake requires the use of Autoconf. + ''; + + platforms = lib.platforms.all; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/automake/automake-1.16.x.nix b/nixpkgs/pkgs/development/tools/misc/automake/automake-1.16.x.nix new file mode 100644 index 000000000000..48f01f8d0f67 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/automake/automake-1.16.x.nix @@ -0,0 +1,43 @@ +{ lib, stdenv, fetchurl, perl, autoconf }: + +stdenv.mkDerivation rec { + name = "automake-1.16.3"; + + src = fetchurl { + url = "mirror://gnu/automake/${name}.tar.xz"; + sha256 = "0fmz2fhmzcpacnprl5msphvaflwiy0hvpgmqlgfny72ddijzfazz"; + }; + + nativeBuildInputs = [ autoconf perl ]; + buildInputs = [ autoconf ]; + + setupHook = ./setup-hook.sh; + + # Disable indented log output from Make, otherwise "make.test" will + # fail. + preCheck = "unset NIX_INDENT_MAKE"; + doCheck = false; # takes _a lot_ of time, fails 3 out of 2698 tests, all seem to be related to paths + doInstallCheck = false; # runs the same thing, fails the same tests + + # The test suite can run in parallel. + enableParallelBuilding = true; + + # Don't fixup "#! /bin/sh" in Libtool, otherwise it will use the + # "fixed" path in generated files! + dontPatchShebangs = true; + + meta = { + branch = "1.16"; + homepage = "https://www.gnu.org/software/automake/"; + description = "GNU standard-compliant makefile generator"; + license = lib.licenses.gpl2Plus; + + longDescription = '' + GNU Automake is a tool for automatically generating + `Makefile.in' files compliant with the GNU Coding + Standards. Automake requires the use of Autoconf. + ''; + + platforms = lib.platforms.all; + }; +} diff --git a/nixpkgs/pkgs/development/tools/misc/automake/builder.sh b/nixpkgs/pkgs/development/tools/misc/automake/builder.sh new file mode 100644 index 000000000000..e54a2acca67e --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/automake/builder.sh @@ -0,0 +1,47 @@ +source $stdenv/setup + +# Wrap the given `aclocal' program, appending extra `-I' flags +# corresponding to the directories listed in $ACLOCAL_PATH. (Note +# that `wrapProgram' can't be used for that purpose since it can only +# prepend flags, not append them.) +wrapAclocal() { + local program="$1" + local wrapped="$(dirname $program)/.$(basename $program)-wrapped" + + mv "$program" "$wrapped" + cat > "$program"<<EOF +#! $SHELL -e + +unset extraFlagsArray +declare -a extraFlagsArray + +oldIFS=\$IFS +IFS=: +for dir in \$ACLOCAL_PATH; do + if test -n "\$dir" -a -d "\$dir"; then + extraFlagsArray=("\${extraFlagsArray[@]}" "-I" "\$dir") + fi +done +IFS=\$oldIFS + +exec "$wrapped" "\$@" "\${extraFlagsArray[@]}" +EOF + chmod +x "$program" +} + +postInstall() { + # Create a wrapper around `aclocal' that converts every element in + # `ACLOCAL_PATH' into a `-I dir' option. This way `aclocal' + # becomes modular; M4 macros do not need to be stored in a single + # global directory, while callers of `aclocal' do not need to pass + # `-I' options explicitly. + + for prog in $out/bin/aclocal*; do + wrapAclocal "$prog" + done + + ln -s aclocal-1.11 $out/share/aclocal + ln -s automake-1.11 $out/share/automake +} + +genericBuild diff --git a/nixpkgs/pkgs/development/tools/misc/automake/fix-perl-5.26.patch b/nixpkgs/pkgs/development/tools/misc/automake/fix-perl-5.26.patch new file mode 100644 index 000000000000..fb2d08de6d81 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/automake/fix-perl-5.26.patch @@ -0,0 +1,10 @@ +--- automake-1.11.2/automake.in ++++ automake-1.11.2/automake.in +@@ -4156,7 +4156,7 @@ sub substitute_ac_subst_variables_worker($) + sub substitute_ac_subst_variables ($) + { + my ($text) = @_; +- $text =~ s/\${([^ \t=:+{}]+)}/&substitute_ac_subst_variables_worker ($1)/ge; ++ $text =~ s/\$\{([^ \t=:+{}]+)}/&substitute_ac_subst_variables_worker ($1)/ge; + return $text; + } diff --git a/nixpkgs/pkgs/development/tools/misc/automake/fix-test-autoconf-2.69.patch b/nixpkgs/pkgs/development/tools/misc/automake/fix-test-autoconf-2.69.patch new file mode 100644 index 000000000000..2ffa91f24eda --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/automake/fix-test-autoconf-2.69.patch @@ -0,0 +1,13 @@ +With Autoconf 2.69 (instead of 2.68), config.{guess,sub} are needed. + +--- automake-1.11.2/tests/compile_f90_c_cxx.test 2011-12-20 21:56:29.000000000 +0100 ++++ automake-1.11.2/tests/compile_f90_c_cxx.test 2012-07-07 13:35:58.000000000 +0200 +@@ -41,7 +41,7 @@ END + : > baz.cc + + $ACLOCAL +-$AUTOMAKE ++$AUTOMAKE --add-missing + + # Look for the macros at the beginning of rules. Be careful, as there + # are literal tabs at the beginning of the search strings. diff --git a/nixpkgs/pkgs/development/tools/misc/automake/help2man-SOURCE_DATE_EPOCH-support.patch b/nixpkgs/pkgs/development/tools/misc/automake/help2man-SOURCE_DATE_EPOCH-support.patch new file mode 100644 index 000000000000..048f75e63343 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/automake/help2man-SOURCE_DATE_EPOCH-support.patch @@ -0,0 +1,41 @@ +From 2e3357d7f0d63f1caeb40d9644c2436a5cd0da5f Mon Sep 17 00:00:00 2001 +From: David Terry <me@xwvvvvwx.com> +Date: Fri, 18 Oct 2019 10:23:11 +0200 +Subject: [PATCH] help2man: add support for SOURCE_DATE_EPOCH + +--- + doc/help2man | 14 +++++++++++++- + 1 file changed, 13 insertions(+), 1 deletion(-) + +diff --git a/doc/help2man b/doc/help2man +index af4306f..4a64167 100755 +--- a/doc/help2man ++++ b/doc/help2man +@@ -213,11 +213,23 @@ sub get_option_value; + my $help_text = get_option_value $ARGV[0], $help_option; + $version_text ||= get_option_value $ARGV[0], $version_option; + ++# By default the generated manual pages will include the current date. This may ++# however be overriden by setting the environment variable $SOURCE_DATE_EPOCH ++# to an integer value of the seconds since the UNIX epoch. This is primarily ++# intended to support reproducible builds (wiki.debian.org/ReproducibleBuilds) ++# and will additionally ensure that the output date string is UTC. ++my $epoch_secs = time; ++if (exists $ENV{SOURCE_DATE_EPOCH} and $ENV{SOURCE_DATE_EPOCH} =~ /^(\d+)$/) ++{ ++ $epoch_secs = $1; ++ $ENV{TZ} = 'UTC'; ++} ++ + # Translators: the following message is a strftime(3) format string, which in + # the English version expands to the month as a word and the full year. It + # is used on the footer of the generated manual pages. If in doubt, you may + # just use %x as the value (which should be the full locale-specific date). +-my $date = enc strftime _("%B %Y"), localtime; ++my $date = enc strftime _("%B %Y"), localtime $epoch_secs; + (my $program = $ARGV[0]) =~ s!.*/!!; + my $package = $program; + my $version; +-- +2.23.0 + diff --git a/nixpkgs/pkgs/development/tools/misc/automake/setup-hook.sh b/nixpkgs/pkgs/development/tools/misc/automake/setup-hook.sh new file mode 100644 index 000000000000..292632b7cbce --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/automake/setup-hook.sh @@ -0,0 +1,5 @@ +addAclocals () { + addToSearchPathWithCustomDelimiter : ACLOCAL_PATH $1/share/aclocal +} + +addEnvHooks "$hostOffset" addAclocals |