3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/tools/misc/autoconf/default.nix
Sergei Trofimovich 70f8d78dcc autoconf: pull upstream fix for autoreconf race
Before this change `xfce.garcon` did not always compile successfully:

    $ c=1; while nix build --rebuild -f. xfce.garcon --cores 1; do (( c+=1 )); echo again with $c; done
    ...
    again with 4
    garcon-gtk/Makefile.am: installing './depcomp'
    .../am/depend2.am: error: am__fastdepCC does not appear in AM_CONDITIONAL
    .../am/depend2.am:   The usual way to define 'am__fastdepCC' is to add 'AC_PROG_CC'

This happens due to an autoconf bug when m4 is called within 1 second:
    Upstream report and fix: https://savannah.gnu.org/support/index.php?110521

The change allows `xfce.garcon` to rebuild 60 times in a row without failures.
2021-11-09 18:02:06 +00:00

61 lines
1.9 KiB
Nix

{ lib, stdenv, fetchurl, m4, perl }:
# Note: this package is used for bootstrapping fetchurl, and thus
# cannot use fetchpatch! All mutable patches (generated by GitHub or
# cgit) that are needed here should be included directly in Nixpkgs as
# files.
stdenv.mkDerivation rec {
pname = "autoconf";
version = "2.71";
src = fetchurl {
url = "mirror://gnu/autoconf/autoconf-${version}.tar.xz";
sha256 = "197sl23irn6s9pd54rxj5vcp5y8dv65jb9yfqgr2g56cxg7q6k7i";
};
patches = [
# fix stale autom4te cache race condition:
# https://savannah.gnu.org/support/index.php?110521
./2.71-fix-race.patch
];
nativeBuildInputs = [ m4 perl ];
buildInputs = [ m4 ];
# Work around a known issue in Cygwin. See
# http://thread.gmane.org/gmane.comp.sysutils.autoconf.bugs/6822 for
# details.
# There are many test failures on `i386-pc-solaris2.11'.
doCheck = ((!stdenv.isCygwin) && (!stdenv.isSunOS));
# Don't fixup "#! /bin/sh" in Autoconf, otherwise it will use the
# "fixed" path in generated files!
dontPatchShebangs = true;
enableParallelBuilding = true;
# Make the Autotest test suite run in parallel.
preCheck =''
export TESTSUITEFLAGS="-j$NIX_BUILD_CORES"
'';
meta = {
homepage = "https://www.gnu.org/software/autoconf/";
description = "Part of the GNU Build System";
longDescription = ''
GNU Autoconf is an extensible package of M4 macros that produce
shell scripts to automatically configure software source code
packages. These scripts can adapt the packages to many kinds of
UNIX-like systems without manual user intervention. Autoconf
creates a configuration script for a package from a template
file that lists the operating system features that the package
can use, in the form of M4 macro calls.
'';
license = lib.licenses.gpl3Plus;
platforms = lib.platforms.all;
};
}