gettext: 0.19.6 -> 0.19.7

expat is replaced by a bundled version of libxml2
This commit is contained in:
zimbatm 2016-02-21 13:22:44 +00:00
parent 05d4959251
commit f05bc0444a
3 changed files with 20 additions and 36 deletions

View File

@ -1,11 +1,12 @@
{ stdenv, fetchurl, libiconv, xz }: { stdenv, lib, fetchurl, libiconv, xz }:
stdenv.mkDerivation (rec { stdenv.mkDerivation rec {
name = "gettext-0.19.6"; name = "gettext-${version}";
version = "0.19.7";
src = fetchurl { src = fetchurl {
url = "mirror://gnu/gettext/${name}.tar.gz"; url = "mirror://gnu/gettext/${name}.tar.gz";
sha256 = "0pb9vp4ifymvdmc31ks3xxcnfqgzj8shll39czmk8c1splclqjzd"; sha256 = "0gy2b2aydj8r0sapadnjw8cmb8j2rynj28d5qs1mfa800njd51jk";
}; };
patches = [ ./absolute-paths.diff ]; patches = [ ./absolute-paths.diff ];
@ -14,20 +15,20 @@ stdenv.mkDerivation (rec {
LDFLAGS = if stdenv.isSunOS then "-lm -lmd -lmp -luutil -lnvpair -lnsl -lidmap -lavl -lsec" else ""; LDFLAGS = if stdenv.isSunOS then "-lm -lmd -lmp -luutil -lnvpair -lnsl -lidmap -lavl -lsec" else "";
configureFlags = [ "--disable-csharp" "--with-xz" ] configureFlags = [ "--disable-csharp" "--with-xz" ]
++ (stdenv.lib.optionals stdenv.isCygwin ++ lib.optionals stdenv.isCygwin [
[ "--disable-java" "--disable-java"
"--disable-native-java" "--disable-native-java"
# Share the cache among the various `configure' runs. # Share the cache among the various `configure' runs.
"--config-cache" "--config-cache"
"--with-included-gettext" "--with-included-gettext"
"--with-included-glib" "--with-included-glib"
"--with-included-libcroco" "--with-included-libcroco"
]) ]
# avoid retaining reference to CF during stdenv bootstrap # avoid retaining reference to CF during stdenv bootstrap
++ (stdenv.lib.optionals stdenv.isDarwin [ ++ lib.optionals stdenv.isDarwin [
"gt_cv_func_CFPreferencesCopyAppValue=no" "gt_cv_func_CFPreferencesCopyAppValue=no"
"gt_cv_func_CFLocaleCopyCurrent=no" "gt_cv_func_CFLocaleCopyCurrent=no"
]); ];
postPatch = '' postPatch = ''
substituteAllInPlace gettext-runtime/src/gettext.sh.in substituteAllInPlace gettext-runtime/src/gettext.sh.in
@ -45,16 +46,16 @@ stdenv.mkDerivation (rec {
echo gl_cv_func_wcwidth_works=yes > cachefile echo gl_cv_func_wcwidth_works=yes > cachefile
configureFlags="$configureFlags --cache-file=`pwd`/cachefile" configureFlags="$configureFlags --cache-file=`pwd`/cachefile"
fi fi
'' + stdenv.lib.optionalString stdenv.isCygwin '' '' + lib.optionalString stdenv.isCygwin ''
sed -i -e "s/\(am_libgettextlib_la_OBJECTS = \)error.lo/\\1/" gettext-tools/gnulib-lib/Makefile.in sed -i -e "s/\(am_libgettextlib_la_OBJECTS = \)error.lo/\\1/" gettext-tools/gnulib-lib/Makefile.in
''; '';
buildInputs = [ xz ] ++ stdenv.lib.optional (!stdenv.isLinux) libiconv; buildInputs = [ xz ] ++ lib.optional (!stdenv.isLinux) libiconv;
enableParallelBuilding = true; enableParallelBuilding = true;
crossAttrs = { crossAttrs = {
buildInputs = stdenv.lib.optional (stdenv ? ccCross && stdenv.ccCross.libc ? libiconv) buildInputs = lib.optional (stdenv ? ccCross && stdenv.ccCross.libc ? libiconv)
stdenv.ccCross.libc.libiconv.crossDrv; stdenv.ccCross.libc.libiconv.crossDrv;
# Gettext fails to guess the cross compiler # Gettext fails to guess the cross compiler
configureFlags = "CXX=${stdenv.cross.config}-g++"; configureFlags = "CXX=${stdenv.cross.config}-g++";
@ -84,8 +85,8 @@ stdenv.mkDerivation (rec {
homepage = http://www.gnu.org/software/gettext/; homepage = http://www.gnu.org/software/gettext/;
maintainers = [ ]; maintainers = with lib.maintainers; [ zimbatm ];
platforms = stdenv.lib.platforms.all; platforms = lib.platforms.all;
}; };
} }
@ -102,4 +103,4 @@ stdenv.mkDerivation (rec {
sed -i gettext-tools/gnulib-lib/Makefile.in \ sed -i gettext-tools/gnulib-lib/Makefile.in \
-e 's/am_libgettextlib_la_OBJECTS =/am_libgettextlib_la_OBJECTS = error.lo/g' -e 's/am_libgettextlib_la_OBJECTS =/am_libgettextlib_la_OBJECTS = error.lo/g'
''; '';
}) }

View File

@ -1,10 +0,0 @@
{ runCommand, gettext, expat, makeWrapper }:
runCommand "gettext-expat-${gettext.name}" { buildInputs = [ makeWrapper ]; } ''
mkdir $out
cp -rf ${gettext}/* $out/
chmod a+w $out/bin
for p in $out/bin/*; do
wrapProgram $p --prefix LD_LIBRARY_PATH : ${expat}/lib
done
''

View File

@ -6675,12 +6675,6 @@ let
gettext = callPackage ../development/libraries/gettext { }; gettext = callPackage ../development/libraries/gettext { };
gettextWithExpat = if stdenv.isDarwin
then gettext.overrideDerivation (drv: {
configureFlags = drv.configureFlags ++ [ "--with-libexpat-prefix=${expat}" ];
})
else callPackage ../development/libraries/gettext/expat.nix { };
gd = callPackage ../development/libraries/gd { }; gd = callPackage ../development/libraries/gd { };
gdal = callPackage ../development/libraries/gdal { }; gdal = callPackage ../development/libraries/gdal { };
@ -6913,9 +6907,7 @@ let
cupsSupport = config.gtk2.cups or stdenv.isLinux; cupsSupport = config.gtk2.cups or stdenv.isLinux;
}; };
gtk3 = callPackage ../development/libraries/gtk+/3.x.nix { gtk3 = callPackage ../development/libraries/gtk+/3.x.nix { };
gettext = gettextWithExpat;
};
gtk = pkgs.gtk2; gtk = pkgs.gtk2;
@ -16065,6 +16057,7 @@ aliases = with self; rec {
firefox-wrapper = firefox; # 2016-01 firefox-wrapper = firefox; # 2016-01
firefox-esr-wrapper = firefox-esr; # 2016-01 firefox-esr-wrapper = firefox-esr; # 2016-01
fuse_exfat = exfat; # 2015-09-11 fuse_exfat = exfat; # 2015-09-11
gettextWithExpat = gettext; # 2016-02-19
grantlee5 = qt5.grantlee; # added 2015-12-19 grantlee5 = qt5.grantlee; # added 2015-12-19
gupnptools = gupnp-tools; # added 2015-12-19 gupnptools = gupnp-tools; # added 2015-12-19
htmlTidy = html-tidy; # added 2014-12-06 htmlTidy = html-tidy; # added 2014-12-06