2018-07-21 02:44:44 +02:00
|
|
|
{ stdenv, buildPackages, fetchurl, which, pkgconfig, perl, guile, libxml2 }:
|
2015-08-13 02:01:29 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "autogen";
|
2017-03-19 20:41:19 +01:00
|
|
|
version = "5.18.12";
|
2015-08-13 02:01:29 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2017-03-19 20:41:19 +01:00
|
|
|
url = "mirror://gnu/autogen/rel${version}/autogen-${version}.tar.xz";
|
|
|
|
sha256 = "1n5zq4872sakvz9c7ncsdcfp0z8rsybsxvbmhkpbd19ii0pacfxy";
|
2015-08-13 02:01:29 +02:00
|
|
|
};
|
|
|
|
|
2016-08-29 02:30:01 +02:00
|
|
|
outputs = [ "bin" "dev" "lib" "out" "man" "info" ];
|
2015-08-24 00:29:08 +02:00
|
|
|
|
2017-10-25 21:44:19 +02:00
|
|
|
nativeBuildInputs = [ which pkgconfig perl ]
|
|
|
|
# autogen needs a build autogen when cross-compiling
|
|
|
|
++ stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
|
2018-02-26 02:37:08 +01:00
|
|
|
buildPackages.buildPackages.autogen buildPackages.texinfo ];
|
2017-10-25 21:44:19 +02:00
|
|
|
buildInputs = [
|
|
|
|
guile libxml2
|
|
|
|
];
|
|
|
|
|
|
|
|
configureFlags = stdenv.lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
|
|
|
|
"--with-libxml2=${libxml2.dev}"
|
|
|
|
"--with-libxml2-cflags=-I${libxml2.dev}/include/libxml2"
|
|
|
|
# the configure check for regcomp wants to run a host program
|
|
|
|
"libopts_cv_with_libregex=yes"
|
|
|
|
#"MAKEINFO=${buildPackages.texinfo}/bin/makeinfo"
|
|
|
|
];
|
2015-08-13 02:01:29 +02:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
# Fix a broken sed expression used for detecting the minor
|
|
|
|
# version of guile we are using
|
|
|
|
sed -i "s,sed '.*-I.*',sed 's/\\\(^\\\| \\\)-I/\\\1/g',g" configure
|
2015-08-20 20:42:41 +02:00
|
|
|
|
|
|
|
substituteInPlace pkg/libopts/mklibsrc.sh --replace /tmp $TMPDIR
|
2015-08-13 02:01:29 +02:00
|
|
|
'';
|
|
|
|
|
2015-08-24 00:29:08 +02:00
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $dev/bin
|
|
|
|
mv $bin/bin/autoopts-config $dev/bin
|
|
|
|
|
|
|
|
for f in $lib/lib/autogen/tpl-config.tlib $out/share/autogen/tpl-config.tlib; do
|
|
|
|
sed -e "s|$dev/include|/no-such-autogen-include-path|" -i $f
|
|
|
|
sed -e "s|$bin/bin|/no-such-autogen-bin-path|" -i $f
|
|
|
|
sed -e "s|$lib/lib|/no-such-autogen-lib-path|" -i $f
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
2015-08-13 02:01:29 +02:00
|
|
|
#doCheck = true; # 2 tests fail because of missing /dev/tty
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Automated text and program generation tool";
|
|
|
|
license = with licenses; [ gpl3Plus lgpl3Plus ];
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://www.gnu.org/software/autogen/";
|
2015-08-13 02:01:29 +02:00
|
|
|
platforms = platforms.all;
|
|
|
|
maintainers = [ ];
|
|
|
|
};
|
|
|
|
}
|