diff options
author | Vladimír Čunát <vcunat@gmail.com> | 2016-03-08 09:57:58 +0100 |
---|---|---|
committer | Vladimír Čunát <vcunat@gmail.com> | 2016-03-08 09:58:19 +0100 |
commit | 09af15654f0c8091f1b9e0bbb2e523cdee194442 (patch) | |
tree | e648edef1ce4c64c533f2593aa22b8015cf0e506 /pkgs/development/libraries/gettext | |
parent | f306e67e15bdbe9a8358c9f81319fc4fcbadc2eb (diff) | |
parent | 0ee75214f336474e127c2e3546c0406a0c4d5fa7 (diff) |
Merge master into closure-size
The kde-5 stuff still didn't merge well. I hand-fixed what I saw, but there may be more problems.
Diffstat (limited to 'pkgs/development/libraries/gettext')
-rw-r--r-- | pkgs/development/libraries/gettext/absolute-paths.diff | 21 | ||||
-rw-r--r-- | pkgs/development/libraries/gettext/default.nix | 39 | ||||
-rw-r--r-- | pkgs/development/libraries/gettext/expat.nix | 10 |
3 files changed, 42 insertions, 28 deletions
diff --git a/pkgs/development/libraries/gettext/absolute-paths.diff b/pkgs/development/libraries/gettext/absolute-paths.diff new file mode 100644 index 0000000000000..af37f61a9a41d --- /dev/null +++ b/pkgs/development/libraries/gettext/absolute-paths.diff @@ -0,0 +1,21 @@ +diff --git a/gettext-runtime/src/gettext.sh.in b/gettext-runtime/src/gettext.sh.in +index 1dfa3bb..d6ef8a8 100644 +--- a/gettext-runtime/src/gettext.sh.in ++++ b/gettext-runtime/src/gettext.sh.in +@@ -86,14 +86,14 @@ fi + # looks up the translation of MSGID and substitutes shell variables in the + # result. + eval_gettext () { +- gettext "$1" | (export PATH `envsubst --variables "$1"`; envsubst "$1") ++ @out@/bin/gettext "$1" | (export PATH `@out@/bin/envsubst --variables "$1"`; @out@/bin/envsubst "$1") + } + + # eval_ngettext MSGID MSGID-PLURAL COUNT + # looks up the translation of MSGID / MSGID-PLURAL for COUNT and substitutes + # shell variables in the result. + eval_ngettext () { +- ngettext "$1" "$2" "$3" | (export PATH `envsubst --variables "$1 $2"`; envsubst "$1 $2") ++ @out@/bin/ngettext "$1" "$2" "$3" | (export PATH `@out@/bin/envsubst --variables "$1 $2"`; @out@/bin/envsubst "$1 $2") + } + + # Note: This use of envsubst is much safer than using the shell built-in 'eval' diff --git a/pkgs/development/libraries/gettext/default.nix b/pkgs/development/libraries/gettext/default.nix index cebcf4e014b5f..940df56c03c37 100644 --- a/pkgs/development/libraries/gettext/default.nix +++ b/pkgs/development/libraries/gettext/default.nix @@ -1,34 +1,37 @@ -{ stdenv, fetchurl, libiconv, xz }: +{ stdenv, lib, fetchurl, libiconv, xz }: -stdenv.mkDerivation (rec { - name = "gettext-0.19.6"; +stdenv.mkDerivation rec { + name = "gettext-${version}"; + version = "0.19.7"; src = fetchurl { url = "mirror://gnu/gettext/${name}.tar.gz"; - sha256 = "0pb9vp4ifymvdmc31ks3xxcnfqgzj8shll39czmk8c1splclqjzd"; + sha256 = "0gy2b2aydj8r0sapadnjw8cmb8j2rynj28d5qs1mfa800njd51jk"; }; + patches = [ ./absolute-paths.diff ]; outputs = [ "out" "doc" ]; LDFLAGS = if stdenv.isSunOS then "-lm -lmd -lmp -luutil -lnvpair -lnsl -lidmap -lavl -lsec" else ""; configureFlags = [ "--disable-csharp" "--with-xz" ] - ++ (stdenv.lib.optionals stdenv.isCygwin - [ "--disable-java" + ++ lib.optionals stdenv.isCygwin [ + "--disable-java" "--disable-native-java" # Share the cache among the various `configure' runs. "--config-cache" "--with-included-gettext" "--with-included-glib" "--with-included-libcroco" - ]) + ] # avoid retaining reference to CF during stdenv bootstrap - ++ (stdenv.lib.optionals stdenv.isDarwin [ - "gt_cv_func_CFPreferencesCopyAppValue=no" - "gt_cv_func_CFLocaleCopyCurrent=no" - ]); + ++ lib.optionals stdenv.isDarwin [ + "gt_cv_func_CFPreferencesCopyAppValue=no" + "gt_cv_func_CFLocaleCopyCurrent=no" + ]; - patchPhase = '' + postPatch = '' + substituteAllInPlace gettext-runtime/src/gettext.sh.in substituteInPlace gettext-tools/projects/KDE/trigger --replace "/bin/pwd" pwd substituteInPlace gettext-tools/projects/GNOME/trigger --replace "/bin/pwd" pwd substituteInPlace gettext-tools/src/project-id --replace "/bin/pwd" pwd @@ -43,16 +46,16 @@ stdenv.mkDerivation (rec { echo gl_cv_func_wcwidth_works=yes > cachefile configureFlags="$configureFlags --cache-file=`pwd`/cachefile" 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 ''; - buildInputs = [ xz xz.bin ] ++ stdenv.lib.optional (!stdenv.isLinux) libiconv; + buildInputs = [ xz xz.bin libiconv ]; enableParallelBuilding = true; 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; # Gettext fails to guess the cross compiler configureFlags = "CXX=${stdenv.cross.config}-g++"; @@ -82,8 +85,8 @@ stdenv.mkDerivation (rec { homepage = http://www.gnu.org/software/gettext/; - maintainers = [ ]; - platforms = stdenv.lib.platforms.all; + maintainers = with lib.maintainers; [ zimbatm ]; + platforms = lib.platforms.all; }; } @@ -100,4 +103,4 @@ stdenv.mkDerivation (rec { sed -i gettext-tools/gnulib-lib/Makefile.in \ -e 's/am_libgettextlib_la_OBJECTS =/am_libgettextlib_la_OBJECTS = error.lo/g' ''; -}) +} diff --git a/pkgs/development/libraries/gettext/expat.nix b/pkgs/development/libraries/gettext/expat.nix deleted file mode 100644 index 35d2e1a0950f2..0000000000000 --- a/pkgs/development/libraries/gettext/expat.nix +++ /dev/null @@ -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.out}/lib - done -'' |