Merge #11067: SmartOS updates

I amended some commits slightly.
This commit is contained in:
Vladimír Čunát 2015-11-23 14:45:44 +01:00
commit 13eca6f79a
31 changed files with 103 additions and 48 deletions

View File

@ -8,8 +8,9 @@ rec {
openbsd = ["i686-openbsd" "x86_64-openbsd"];
netbsd = ["i686-netbsd" "x86_64-netbsd"];
cygwin = ["i686-cygwin" "x86_64-cygwin"];
unix = linux ++ darwin ++ freebsd ++ openbsd;
all = linux ++ darwin ++ cygwin ++ freebsd ++ openbsd;
illumos = ["x86_64-solaris"];
unix = linux ++ darwin ++ freebsd ++ openbsd ++ netbsd ++ illumos;
all = linux ++ darwin ++ cygwin ++ freebsd ++ openbsd ++ netbsd ++ illumos;
none = [];
allBut = platforms: lists.filter (x: !(builtins.elem x platforms)) all;
mesaPlatforms = ["i686-linux" "x86_64-linux" "x86_64-darwin" "armv5tel-linux" "armv6l-linux"];

View File

@ -19,6 +19,8 @@ stdenv.mkDerivation rec {
sha256 = "1qx9f0kprf92r1wxl3sacykla0g04qsi0idypzz24b7xy9ix5579";
};
NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isSunOS "-lsocket -lnsl";
patches = [ ./glibc214.patch ]
# Patch for the newer unstable boehm-gc 7.2alpha. Not all platforms use that
# alpha. At the time of writing this, boehm-gc-7.1 is the last stable.

View File

@ -145,7 +145,7 @@ stdenv.mkDerivation {
+ optionalString (stdenv.isSunOS && nativePrefix != "") ''
# Solaris needs an additional ld wrapper.
ldPath="${nativePrefix}/bin"
ld="$out/bin/ld-solaris"
exec="$ldPath/ld"
wrap ld-solaris ${./ld-solaris-wrapper.sh}
'')

View File

@ -6,7 +6,7 @@ set -u
# I've also tried adding -z direct and -z lazyload, but it gave too many problems with C++ exceptions :'(
# Also made sure libgcc would not be lazy-loaded, as suggested here: https://www.illumos.org/issues/2534#note-3
# but still no success.
cmd="@prog@ -z ignore"
cmd="@ld@ -z ignore"
args=("$@");

View File

@ -6,7 +6,7 @@ source $stdenv/setup
header "exporting $url (rev $rev) into $out"
$fetcher --builder --url "$url" --out "$out" --rev "$rev" \
$SHELL $fetcher --builder --url "$url" --out "$out" --rev "$rev" \
${leaveDotGit:+--leave-dotGit} \
${deepClone:+--deepClone} \
${fetchSubmodules:+--fetch-submodules} \

View File

@ -14,6 +14,8 @@ badPath() {
# the temporary build directory).
if test "${p:0:1}" != "/"; then return 1; fi
@extraPathTests@
# Otherwise, the path should refer to the store or some temporary
# directory (including the build directory).
test \

View File

@ -19,12 +19,12 @@ patchShebangs() {
local newInterpreterLine
find "$dir" -type f -perm -0100 | while read f; do
if [ "$(head -1 "$f" | head -c +2)" != '#!' ]; then
if [ "$(head -1 "$f" | head -c+2)" != '#!' ]; then
# missing shebang => not a script
continue
fi
oldInterpreterLine=$(head -1 "$f" | tail -c +3)
oldInterpreterLine=$(head -1 "$f" | tail -c+3)
read -r oldPath arg0 args <<< "$oldInterpreterLine"
if $(echo "$oldPath" | grep -q "/bin/env$"); then

View File

@ -294,7 +294,6 @@ stdenv.mkDerivation ({
++ (optional stdenv.isDarwin gnused)
;
NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isSunOS "-lm -ldl";
preConfigure = stdenv.lib.optionalString (stdenv.isSunOS && stdenv.is64bit) ''
export NIX_LDFLAGS=`echo $NIX_LDFLAGS | sed -e s~$prefix/lib~$prefix/lib/amd64~g`
@ -519,6 +518,7 @@ stdenv.mkDerivation ({
platforms =
stdenv.lib.platforms.linux ++
stdenv.lib.platforms.freebsd ++
stdenv.lib.platforms.illumos ++
optionals (langAda == false) stdenv.lib.platforms.darwin;
};
}

View File

@ -293,9 +293,8 @@ stdenv.mkDerivation ({
++ (optional stdenv.isDarwin gnused)
;
NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isSunOS "-lm -ldl";
preConfigure = stdenv.lib.optionalString (stdenv.isSunOS && stdenv.is64bit) ''
sed -i -e "s/-lrt//g" libstdc++-v3/configure
export NIX_LDFLAGS=`echo $NIX_LDFLAGS | sed -e s~$prefix/lib~$prefix/lib/amd64~g`
export LDFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $LDFLAGS_FOR_TARGET"
export CXXFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $CXXFLAGS_FOR_TARGET"
@ -518,6 +517,7 @@ stdenv.mkDerivation ({
platforms =
stdenv.lib.platforms.linux ++
stdenv.lib.platforms.freebsd ++
stdenv.lib.platforms.illumos ++
optionals (langAda == false) stdenv.lib.platforms.darwin;
};
}

View File

@ -23,6 +23,7 @@ let
sha256 = "0sp5445rbvms6qvzhld0kwwvydw51vq5iaf4kdqsf2d9jvaz3yx5";
};
armv6l-linux = armv7l-linux;
x86_64-solaris = x86_64-linux;
};
cfg = options.${stdenv.system};
in

View File

@ -66,6 +66,7 @@ stdenv.mkDerivation rec {
"-Dlocincpth=${libc}/include"
"-Dloclibpth=${libc}/lib"
]
++ optional stdenv.isSunOS "-Dcc=gcc"
++ optional enableThreading "-Dusethreads";
configureScript = "${stdenv.shell} ./Configure";

View File

@ -1,11 +1,24 @@
--- perl-5.16.2/hints/solaris_2.sh.orig 2013-02-14 19:29:49.453988140 +0000
+++ perl-5.16.2/hints/solaris_2.sh 2013-02-14 19:30:31.681631019 +0000
@@ -568,7 +568,7 @@
# ccflags="$ccflags -Wa,`getconf XBS5_LP64_OFF64_CFLAGS 2>/dev/null`"
# fi
ldflags="$ldflags -m64"
- lddlflags="$lddlflags -G -m64"
+ lddlflags="$lddlflags -shared -m64"
$NetBSD: patch-hints_solaris__2.sh,v 1.2 2015/10/27 09:10:44 jperkin Exp $
Redo PR pkg/44999.
--- perl-5.20.2/hints/solaris_2.sh.orig 2015-05-13 20:19:29.000000000 +0000
+++ perl-5.20.2/hints/solaris_2.sh
@@ -585,7 +585,7 @@ EOM
fi
fi
case "${cc:-cc} -v 2>/dev/null" in
- *gcc*)
+ *gcc*|clang*)
echo 'int main() { return 0; }' > try.c
case "`${cc:-cc} $ccflags -mcpu=v9 -m64 -S try.c 2>&1 | grep 'm64 is not supported by this configuration'`" in
*"m64 is not supported"*)
@@ -622,7 +622,7 @@ EOM
# use that with Solaris 11 and later, but keep
# the old behavior for older Solaris versions.
case "$osvers" in
- 2.?|2.10) lddlflags="$lddlflags -G -m64" ;;
+ 2.?|2.10) lddlflags="$lddlflags -shared -m64" ;;
*) lddlflags="$lddlflags -shared -m64" ;;
esac
;;
*)
getconfccflags="`getconf XBS5_LP64_OFF64_CFLAGS 2>/dev/null`"

View File

@ -51,6 +51,7 @@ stdenv.mkDerivation rec {
"-Dlocincpth=${libc}/include"
"-Dloclibpth=${libc}/lib"
]
++ optional stdenv.isSunOS "-Dcc=gcc"
++ optional enableThreading "-Dusethreads";
configureScript = "${stdenv.shell} ./Configure";

View File

@ -1,11 +1,24 @@
--- perl-5.16.2/hints/solaris_2.sh.orig 2013-02-14 19:29:49.453988140 +0000
+++ perl-5.16.2/hints/solaris_2.sh 2013-02-14 19:30:31.681631019 +0000
@@ -568,7 +568,7 @@
# ccflags="$ccflags -Wa,`getconf XBS5_LP64_OFF64_CFLAGS 2>/dev/null`"
# fi
ldflags="$ldflags -m64"
- lddlflags="$lddlflags -G -m64"
+ lddlflags="$lddlflags -shared -m64"
$NetBSD: patch-hints_solaris__2.sh,v 1.2 2015/10/27 09:10:44 jperkin Exp $
Redo PR pkg/44999.
--- perl-5.22.0/hints/solaris_2.sh.orig 2015-05-13 20:19:29.000000000 +0000
+++ perl-5.22.0/hints/solaris_2.sh
@@ -585,7 +585,7 @@ EOM
fi
fi
case "${cc:-cc} -v 2>/dev/null" in
- *gcc*)
+ *gcc*|clang*)
echo 'int main() { return 0; }' > try.c
case "`${cc:-cc} $ccflags -mcpu=v9 -m64 -S try.c 2>&1 | grep 'm64 is not supported by this configuration'`" in
*"m64 is not supported"*)
@@ -622,7 +622,7 @@ EOM
# use that with Solaris 11 and later, but keep
# the old behavior for older Solaris versions.
case "$osvers" in
- 2.?|2.10) lddlflags="$lddlflags -G -m64" ;;
+ 2.?|2.10) lddlflags="$lddlflags -shared -m64" ;;
*) lddlflags="$lddlflags -shared -m64" ;;
esac
;;
*)
getconfccflags="`getconf XBS5_LP64_OFF64_CFLAGS 2>/dev/null`"

View File

@ -93,7 +93,7 @@ let
preBuild = makeInternalLib;
buildInputs = buildInputsX ++ systemdOrEmpty ++ [ libs ];
NIX_CFLAGS_LINK =
stdenv.lib.optionalString (!stdenv.isDarwin) "-Wl,--as-needed "
stdenv.lib.optionalString (!stdenv.isDarwin && !stdenv.isSunOS) "-Wl,--as-needed "
+ "-ldbus-1";
# don't provide another dbus-1.pc (with incorrect include and link dirs),

View File

@ -65,7 +65,7 @@ stdenv.mkDerivation rec {
configureFlags =
optional stdenv.isDarwin "--disable-compile-warnings"
++ optional stdenv.isSunOS "--disable-modular-tests";
++ optional stdenv.isSunOS ["--disable-modular-tests" "--with-libiconv"];
NIX_CFLAGS_COMPILE = optionalString stdenv.isDarwin " -lintl"
+ optionalString stdenv.isSunOS " -DBSD_COMP";

View File

@ -15,6 +15,8 @@ stdenv.mkDerivation (rec {
nativeBuildInputs = [ glibc ];
};
buildInputs = [ gettext ];
meta = {
description = "ELF object file access library";

View File

@ -14,6 +14,7 @@ stdenv.mkDerivation rec {
propagatedBuildInputs = [ gmp ];
configureFlags =
stdenv.lib.optional stdenv.isSunOS "--disable-thread-safe" ++
stdenv.lib.optional stdenv.is64bit "--with-pic";
doCheck = true;

View File

@ -27,12 +27,21 @@ stdenv.mkDerivation rec {
"--enable-symlinks"
] ++ lib.optional unicode "--enable-widec";
# Only the C compiler, and explicitly not C++ compiler needs this flag on solaris:
CFLAGS = lib.optionalString stdenv.isSunOS "-D_XOPEN_SOURCE_EXTENDED";
buildInputs = lib.optional (mouseSupport && stdenv.isLinux) gpm;
preConfigure = ''
configureFlagsArray+=("--includedir=$out/include")
export PKG_CONFIG_LIBDIR="$out/lib/pkgconfig"
mkdir -p "$PKG_CONFIG_LIBDIR"
''
+ lib.optionalString stdenv.isSunOS ''
sed -i -e '/-D__EXTENSIONS__/ s/-D_XOPEN_SOURCE=\$cf_XOPEN_SOURCE//' \
-e '/CPPFLAGS="$CPPFLAGS/s/ -D_XOPEN_SOURCE_EXTENDED//' \
configure
CFLAGS=-D_XOPEN_SOURCE_EXTENDED
'' + lib.optionalString stdenv.isCygwin ''
sed -i -e 's,LIB_SUFFIX="t,LIB_SUFFIX=",' configure
'';

View File

@ -20,12 +20,14 @@ stdenv.mkDerivation {
buildInputs =
[ perl python flex bison ]
++ stdenv.lib.optional (qt4 != null) qt4
++ stdenv.lib.optional stdenv.isSunOS libiconv
++ stdenv.lib.optionals stdenv.isDarwin [ CoreServices libiconv ];
prefixKey = "--prefix ";
configureFlags =
[ "--dot dot" ]
++ stdenv.lib.optional stdenv.isSunOS "--install install"
++ stdenv.lib.optional (qt4 != null) "--with-doxywizard";
preConfigure =

View File

@ -10,9 +10,10 @@ stdenv.mkDerivation (rec {
sha256 = "0sq09a39wj4cxf8l2jvkq067g08ywfma4v6nhprnf351s82pfl68";
};
buildInputs = stdenv.lib.optional (stdenv.isCygwin || stdenv.isDarwin) libiconv;
buildInputs = stdenv.lib.optional (stdenv.isCygwin || stdenv.isDarwin || stdenv.isSunOS) libiconv;
configureFlags = [ "--with-internal-glib" ];
configureFlags = [ "--with-internal-glib" ]
++ stdenv.lib.optional (stdenv.isSunOS) [ "--with-libiconv=gnu" "--with-system-library-path" "--with-system-include-path" "CFLAGS=-DENABLE_NLS" ];
patches = (if vanilla then [] else [
# Process Requires.private properly, see

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, ncurses, perl, xz, interactive ? false }:
{ stdenv, fetchurl, ncurses, perl, xz, libiconv, gawk, interactive ? false }:
stdenv.mkDerivation rec {
name = "texinfo-6.0";
@ -9,14 +9,17 @@ stdenv.mkDerivation rec {
};
buildInputs = [ perl xz ]
++ stdenv.lib.optionals stdenv.isSunOS [ libiconv gawk ]
++ stdenv.lib.optional interactive ncurses;
configureFlags = stdenv.lib.optionalString stdenv.isSunOS "AWK=${gawk}/bin/awk";
preInstall = ''
installFlags="TEXMF=$out/texmf-dist";
installTargets="install install-tex";
'';
doCheck = !stdenv.isDarwin && !interactive;
doCheck = !stdenv.isDarwin && !interactive && !stdenv.isSunOS/*flaky*/;
meta = {
homepage = "http://www.gnu.org/software/texinfo/";

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, m4, perl }:
{ stdenv, fetchurl, m4, perl, help2man }:
stdenv.mkDerivation rec {
name = "bison-3.0.4";
@ -8,7 +8,7 @@ stdenv.mkDerivation rec {
sha256 = "b67fd2daae7a64b5ba862c66c07c1addb9e6b1b05c5f2049392cfd8a2172952e";
};
nativeBuildInputs = [ m4 perl ];
nativeBuildInputs = [ m4 perl ] ++ stdenv.lib.optional stdenv.isSunOS help2man;
propagatedBuildInputs = [ m4 ];
meta = {

View File

@ -36,6 +36,8 @@ let
touch -r src/stat.c src/tail.c
'';
configureFlags = optionalString stdenv.isSunOS "ac_cv_func_inotify_init=no";
nativeBuildInputs = [ perl ];
buildInputs = [ gmp ]
++ optional aclSupport acl
@ -80,6 +82,7 @@ let
enableParallelBuilding = false;
NIX_LDFLAGS = optionalString selinuxSupport "-lsepol";
FORCE_UNSAFE_CONFIGURE = stdenv.lib.optionalString (stdenv.system == "armv7l-linux" || stdenv.isSunOS) "1";
makeFlags = optionalString stdenv.isDarwin "CFLAGS=-D_FORTIFY_SOURCE=0";
@ -103,6 +106,3 @@ let
};
in
self
// stdenv.lib.optionalAttrs (stdenv.system == "armv7l-linux" || stdenv.isSunOS) {
FORCE_UNSAFE_CONFIGURE = 1;
}

View File

@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
meta = {
homepage = http://www.greenwoodsoftware.com/less/;
description = "A more advanced file pager than more";
platforms = stdenv.lib.platforms.linux ++ stdenv.lib.platforms.darwin;
platforms = stdenv.lib.platforms.unix;
maintainers = [ stdenv.lib.maintainers.eelco ];
};
}

View File

@ -47,6 +47,7 @@ stdenv.mkDerivation rec {
'';
configureFlags = [
"--disable-manual"
( if sslSupport then "--with-ssl=${openssl}" else "--without-ssl" )
( if scpSupport then "--with-libssh2=${libssh2}" else "--without-libssh2" )
( if ldapSupport then "--enable-ldap" else "--disable-ldap" )

View File

@ -1,4 +1,4 @@
{ stdenv, pkgs, fetchurl, openssl }:
{ stdenv, pkgs, fetchurl, openssl, zlib }:
stdenv.mkDerivation rec {
majorVersion = "1.5";
@ -10,11 +10,11 @@ stdenv.mkDerivation rec {
sha256 = "16cg1jmy2d8mq2ypwifsvhbyp4pyrj0zm0r818sx0r4hchwdsrcm";
};
buildInputs = [ openssl ];
buildInputs = [ openssl zlib ];
# TODO: make it work on darwin/bsd as well
preConfigure = ''
export makeFlags="TARGET=linux2628 PREFIX=$out USE_OPENSSL=yes"
export makeFlags="TARGET=${if stdenv.isSunOS then "solaris" else "linux2628"} PREFIX=$out USE_OPENSSL=yes USE_ZLIB=yes"
'';
meta = {

View File

@ -12,6 +12,7 @@ stdenv.mkDerivation rec {
doCheck = !(
stdenv.isCygwin # XXX: `test-dup2' segfaults on Cygwin 6.1
|| stdenv.isDarwin # XXX: `locale' segfaults
|| stdenv.isSunOS # XXX: `_backsmalls1' fails, locale stuff?
);
buildInputs = stdenv.lib.optional (stdenv.system != "x86_64-cygwin") libsigsegv

View File

@ -15,7 +15,7 @@ stdenv.mkDerivation {
buildInputs = [ pcre libiconv ];
# cygwin: FAIL: multibyte-white-space
doCheck = !stdenv.isDarwin && !stdenv.isCygwin;
doCheck = !stdenv.isDarwin && !stdenv.isSunOS && !stdenv.isCygwin;
# On Mac OS X, force use of mkdir -p, since Grep's fallback
# (./install-sh) is broken.

View File

@ -16,6 +16,7 @@
# outside of the store. Thus, GCC, GFortran, & co. must always look for
# files in standard system directories (/usr/include, etc.)
noSysDirs ? (system != "x86_64-freebsd" && system != "i686-freebsd"
&& system != "x86_64-solaris"
&& system != "x86_64-kfreebsd-gnu")
# More flags for the bootstrapping of stdenv.
@ -3905,7 +3906,7 @@ let
inherit noSysDirs;
# PGO seems to speed up compilation by gcc by ~10%, see #445 discussion
profiledCompiler = with stdenv; (!isDarwin && (isi686 || isx86_64));
profiledCompiler = with stdenv; (!isSunOS && !isDarwin && (isi686 || isx86_64));
# When building `gcc.crossDrv' (a "Canadian cross", with host == target
# and host != build), `cross' must be null but the cross-libc must still

View File

@ -6501,7 +6501,7 @@ let self = _self // overrides; _self = with self; {
meta = {
description = "The World-Wide Web library for Perl";
license = with stdenv.lib.licenses; [ artistic1 gpl1Plus ];
platforms = stdenv.lib.platforms.linux ++ stdenv.lib.platforms.darwin;
platforms = stdenv.lib.platforms.linux ++ stdenv.lib.platforms.darwin ++ stdenv.lib.platforms.illumos;
};
};