Merge branch 'staging'

Comparison looks OK; I'll try some fixes on master directly.
http://hydra.nixos.org/eval/1372577?compare=1372497
This commit is contained in:
Vladimír Čunát
2017-07-05 08:55:26 +02:00
80 changed files with 1344 additions and 3860 deletions

View File

@@ -8,10 +8,13 @@ let
version = "2.28";
basename = "binutils-${version}";
inherit (stdenv.lib) optional optionals optionalString;
# The prefix prepended to binary names to allow multiple binuntils on the
# PATH to both be usable.
prefix = optionalString (targetPlatform != hostPlatform) "${targetPlatform.config}-";
in
stdenv.mkDerivation rec {
name = optionalString (targetPlatform != hostPlatform) "${targetPlatform.config}-" + basename;
name = prefix + basename;
src = fetchurl {
url = "mirror://gnu/binutils/${basename}.tar.bz2";
@@ -78,15 +81,20 @@ stdenv.mkDerivation rec {
then "-Wno-string-plus-int -Wno-deprecated-declarations"
else "-static-libgcc";
# TODO(@Ericson2314): Always pass "--target" and always prefix.
configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
configureFlags =
[ "--enable-shared" "--enable-deterministic-archives" "--disable-werror" ]
++ optional (stdenv.system == "mips64el-linux") "--enable-fix-loongson2f-nop"
++ optional (targetPlatform != hostPlatform) "--target=${targetPlatform.config}" # TODO: make this unconditional
++ optionals gold [ "--enable-gold" "--enable-plugins" ]
++ optional (stdenv.system == "i686-linux") "--enable-targets=x86_64-linux-gnu";
enableParallelBuilding = true;
passthru = {
inherit prefix;
};
meta = with stdenv.lib; {
description = "Tools for manipulating binaries (linker, assembler, etc.)";
longDescription = ''

View File

@@ -48,6 +48,9 @@ stdenv.mkDerivation rec {
NIX_CFLAGS_COMPILE = "-Wno-format-nonliteral";
# TODO(@Ericson2314): Always pass "--target" and always prefix.
configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
configureFlags = with stdenv.lib; [
"--with-gmp=${gmp.dev}" "--with-mpfr=${mpfr.dev}" "--with-system-readline"
"--with-system-zlib" "--with-expat" "--with-libexpat-prefix=${expat.dev}"
@@ -55,8 +58,6 @@ stdenv.mkDerivation rec {
# TODO(@Ericson2314): make this conditional on whether host platform is NixOS
"--with-separate-debug-dir=/run/current-system/sw/lib/debug"
++ stdenv.lib.optional (!pythonSupport) "--without-python"
# TODO(@Ericson2314): This should be done in stdenv, not per-package
++ stdenv.lib.optional (targetPlatform != hostPlatform) "--target=${targetPlatform.config}"
++ stdenv.lib.optional multitarget "--enable-targets=all";
postInstall =

View File

@@ -16,8 +16,8 @@ that we're trying to help2man).
install_preload: install_dirs preload
- $(INSTALL_PROGRAM) $(preload).so $(DESTDIR)$(pkglibdir)
+ $(INSTALL_PROGRAM) lib/cygintl-8.dll $(DESTDIR)$(pkglibdir)
+ ln -sf cygintl-8.dll $(DESTDIR)$(pkglibdir)/$(preload).so
+ $(INSTALL_PROGRAM) lib/cygintl-9.dll $(DESTDIR)$(pkglibdir)
+ ln -sf cygintl-9.dll $(DESTDIR)$(pkglibdir)/$(preload).so
install_l10n: install_dirs msg_l10n man_l10n info_l10n
set -e; \
@@ -27,8 +27,8 @@ that we're trying to help2man).
$(preload).so: $(srcdir)/$(preload).c
- $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ -fPIC -shared $? $(LIBS)
+ mkdir -p lib
+ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o lib/cygintl-8.dll -shared $? $(LIBS)
+ ln -sf lib/cygintl-8.dll $@
+ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o lib/cygintl-9.dll -shared $? $(LIBS)
+ ln -sf lib/cygintl-9.dll $@
man: $(target).1
$(target).1: $(srcdir)/$(target).PL $(srcdir)/$(target).h2m.PL
@@ -62,7 +62,7 @@ that we're trying to help2man).
return;
+#ifdef __CYGWIN__
+ if (!(RTLD_NEXT = dlopen("/usr/bin/cygintl-8.dll", RTLD_LAZY)))
+ if (!(RTLD_NEXT = dlopen("/usr/bin/cygintl-9.dll", RTLD_LAZY)))
+ die("libintl8 not found");
+#endif
+

View File

@@ -1,4 +1,4 @@
{ stdenv, fetchurl, perl, gettext, LocaleGettext, makeWrapper }:
{ stdenv, hostPlatform, fetchurl, perl, gettext, LocaleGettext, makeWrapper }:
stdenv.mkDerivation rec {
name = "help2man-1.47.4";
@@ -12,11 +12,12 @@ stdenv.mkDerivation rec {
doCheck = false; # target `check' is missing
patches = if stdenv.isCygwin then [ ./1.40.4-cygwin-nls.patch ] else null;
patches = if hostPlatform.isCygwin then [ ./1.40.4-cygwin-nls.patch ] else null;
postInstall =
'' wrapProgram "$out/bin/help2man" \
--prefix PERL5LIB : "$(echo ${LocaleGettext}/lib/perl*/site_perl)"
--prefix PERL5LIB : "$(echo ${LocaleGettext}/lib/perl*/site_perl)" \
${stdenv.lib.optionalString hostPlatform.isCygwin "--prefix PATH : ${gettext}/bin"}
'';

View File

@@ -309,3 +309,16 @@
# else
/* On old systems which lack it, use setlocale or getenv. */
diff --git a/glib/gtypes.h b/glib/gtypes.h
index c18e0bf..816685a 100644
--- a/glib/glib/gtypes.h
+++ b/glib/glib/gtypes.h
@@ -462,7 +462,7 @@ G_END_DECLS
* properly get exported in Windows DLLs.
*/
#ifndef GLIB_VAR
-# ifdef G_PLATFORM_WIN32
+# ifdef G_OS_WIN32
# ifdef GLIB_STATIC_COMPILATION
# define GLIB_VAR extern
# else /* !GLIB_STATIC_COMPILATION */

View File

@@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
configureFlags = [ "--with-internal-glib" ]
++ optional (stdenv.isSunOS) [ "--with-libiconv=gnu" "--with-system-library-path" "--with-system-include-path" "CFLAGS=-DENABLE_NLS" ];
postInstall = ''rm "$out"/bin/*-pkg-config''; # clean the duplicate file
postInstall = ''rm -f "$out"/bin/*-pkg-config''; # clean the duplicate file
meta = {
description = "A tool that allows packages to find out information about other packages";