mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-27 14:34:33 +00:00
Merge pull request #345 from vizanto/illumos
Illumos compatible stdenv-updates
This commit is contained in:
commit
230b59469e
@ -35,7 +35,8 @@ stdenv.mkDerivation {
|
||||
NIX_LDFLAGS = stdenv.lib.optionalString (!stdenv.isDarwin) "-lgcc_s";
|
||||
|
||||
makeFlags = "prefix=\${out} PERL_PATH=${perl}/bin/perl SHELL_PATH=${stdenv.shell} "
|
||||
+ (if pythonSupport then "PYTHON_PATH=${python}/bin/python" else "NO_PYTHON=1");
|
||||
+ (if pythonSupport then "PYTHON_PATH=${python}/bin/python" else "NO_PYTHON=1")
|
||||
+ (if stdenv.isSunOS then " INSTALL=install NO_INET_NTOP= NO_INET_PTON=" else "");
|
||||
|
||||
# FIXME: "make check" requires Sparse; the Makefile must be tweaked
|
||||
# so that `SPARSE_FLAGS' corresponds to the current architecture...
|
||||
|
@ -66,13 +66,23 @@ else
|
||||
echo "$gccCFlags" > $out/nix-support/gcc-cflags
|
||||
|
||||
gccPath="$gcc/bin"
|
||||
ldPath="$binutils/bin"
|
||||
# On Illumos/Solaris we might prefer native ld
|
||||
if test -n "$nativePrefix"; then
|
||||
ldPath="$nativePrefix/bin"
|
||||
else
|
||||
ldPath="$binutils/bin"
|
||||
fi;
|
||||
fi
|
||||
|
||||
|
||||
doSubstitute() {
|
||||
local src=$1
|
||||
local dst=$2
|
||||
local ld="$ldPath/ld"
|
||||
if $ld -V 2>&1 |grep Solaris; then
|
||||
# Use Solaris specific linker wrapper
|
||||
ld="$out/bin/ld-solaris"
|
||||
fi
|
||||
# Can't use substitute() here, because replace may not have been
|
||||
# built yet (in the bootstrap).
|
||||
sed \
|
||||
@ -85,7 +95,7 @@ doSubstitute() {
|
||||
-e "s^@binutils@^$binutils^g" \
|
||||
-e "s^@coreutils@^$coreutils^g" \
|
||||
-e "s^@libc@^$libc^g" \
|
||||
-e "s^@ld@^$ldPath/ld^g" \
|
||||
-e "s^@ld@^$ld^g" \
|
||||
< "$src" > "$dst"
|
||||
}
|
||||
|
||||
@ -174,6 +184,13 @@ ln -s $ldPath/as $out/bin/as
|
||||
doSubstitute "$ldWrapper" "$out/bin/ld"
|
||||
chmod +x "$out/bin/ld"
|
||||
|
||||
# Copy solaris ld wrapper if needed
|
||||
if $ldPath/ld -V 2>&1 |grep Solaris; then
|
||||
# Use Solaris specific linker wrapper
|
||||
sed -e "s^@ld@^$ldPath/ld^g" < "$ldSolarisWrapper" > "$out/bin/ld-solaris"
|
||||
chmod +x "$out/bin/ld-solaris"
|
||||
fi
|
||||
|
||||
|
||||
# Emit a setup hook. Also store the path to the original GCC and
|
||||
# Glibc.
|
||||
|
@ -36,6 +36,7 @@ stdenv.mkDerivation {
|
||||
gnatWrapper = ./gnat-wrapper.sh;
|
||||
gnatlinkWrapper = ./gnatlink-wrapper.sh;
|
||||
ldWrapper = ./ld-wrapper.sh;
|
||||
ldSolarisWrapper = ./ld-solaris-wrapper.sh;
|
||||
utils = ./utils.sh;
|
||||
addFlags = ./add-flags;
|
||||
|
||||
|
40
pkgs/build-support/gcc-wrapper/ld-solaris-wrapper.sh
Normal file
40
pkgs/build-support/gcc-wrapper/ld-solaris-wrapper.sh
Normal file
@ -0,0 +1,40 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
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="@ld@ -z ignore"
|
||||
|
||||
args=("$@");
|
||||
|
||||
# This loop makes sure all -L arguments are before -l arguments, or ld may complain it cannot find a library.
|
||||
# GNU binutils does not have this problem:
|
||||
# http://stackoverflow.com/questions/5817269/does-the-order-of-l-and-l-options-in-the-gnu-linker-matter
|
||||
i=0;
|
||||
while [[ $i -lt $# ]]; do
|
||||
case "${args[$i]}" in
|
||||
-L) cmd="$cmd ${args[$i]} ${args[($i+1)]}"; i=($i+1); ;;
|
||||
-L*) cmd="$cmd ${args[$i]}" ;;
|
||||
*) ;;
|
||||
esac
|
||||
i=($i+1);
|
||||
done
|
||||
|
||||
i=0;
|
||||
while [[ $i -lt $# ]]; do
|
||||
case "${args[$i]}" in
|
||||
-L) i=($i+1); ;;
|
||||
-L*) ;;
|
||||
*) cmd="$cmd ${args[$i]}" ;;
|
||||
esac
|
||||
i=($i+1);
|
||||
done
|
||||
|
||||
# Trace:
|
||||
set -x
|
||||
exec $cmd
|
||||
|
||||
exit 0
|
@ -155,7 +155,7 @@ if test -n "$targetConfig"; then
|
||||
dontStrip=1
|
||||
fi
|
||||
|
||||
|
||||
providedPreConfigure="$preConfigure";
|
||||
preConfigure() {
|
||||
if test -n "$newlibSrc"; then
|
||||
tar xvf "$newlibSrc" -C ..
|
||||
@ -188,6 +188,9 @@ preConfigure() {
|
||||
configureFlags="$configureFlags --with-build-sysroot=`pwd`/.."
|
||||
fi
|
||||
|
||||
# Eval the preConfigure script from nix expression.
|
||||
eval $providedPreConfigure;
|
||||
env;
|
||||
# Perform the build in a different directory.
|
||||
mkdir ../build
|
||||
cd ../build
|
||||
|
@ -277,21 +277,42 @@ stdenv.mkDerivation ({
|
||||
++ (optional stdenv.isDarwin gnused)
|
||||
;
|
||||
|
||||
configureFlagsArray = stdenv.lib.optionals
|
||||
(ppl != null && ppl ? dontDisableStatic && ppl.dontDisableStatic)
|
||||
[ "--with-host-libstdcxx=-lstdc++ -lgcc_s" ];
|
||||
NIX_LDFLAGS = stdenv.lib.optionalString stdenv.isSunOS "-lm -ldl";
|
||||
|
||||
preConfigure = ''
|
||||
configureFlagsArray=(
|
||||
${stdenv.lib.optionalString (ppl != null && ppl ? dontDisableStatic && ppl.dontDisableStatic)
|
||||
"'--with-host-libstdcxx=-lstdc++ -lgcc_s'"}
|
||||
${stdenv.lib.optionalString (ppl != null && stdenv.isSunOS)
|
||||
"\"--with-host-libstdcxx=-Wl,-rpath,\$prefix/lib/amd64 -lstdc++\"
|
||||
\"--with-boot-ldflags=-L../prev-x86_64-pc-solaris2.11/libstdc++-v3/src/.libs\""}
|
||||
);
|
||||
${stdenv.lib.optionalString (stdenv.isSunOS && stdenv.is64bit)
|
||||
''
|
||||
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"
|
||||
export CFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $CFLAGS_FOR_TARGET"
|
||||
''}
|
||||
'';
|
||||
|
||||
# 'iant' at #go-nuts@freenode, gccgo maintainer, said that
|
||||
# they have a bug in 4.7.1 if adding "--disable-static"
|
||||
dontDisableStatic = langGo;
|
||||
dontDisableStatic = langGo || staticCompiler;
|
||||
|
||||
configureFlags = "
|
||||
${if stdenv.isSunOS then
|
||||
" --enable-long-long --enable-libssp --enable-threads=posix --disable-nls --enable-__cxa_atexit " +
|
||||
# On Illumos/Solaris GNU as is preferred
|
||||
" --with-gnu-as --without-gnu-ld "
|
||||
else ""}
|
||||
--enable-lto
|
||||
${if enableMultilib then "" else "--disable-multilib"}
|
||||
${if enableShared then "" else "--disable-shared"}
|
||||
${if enablePlugin then "--enable-plugin" else ""}
|
||||
${if ppl != null then "--with-ppl=${ppl}" else ""}
|
||||
${if enablePlugin then "--enable-plugin" else "--disable-plugin"}
|
||||
${if ppl != null then "--with-ppl=${ppl} --disable-ppl-version-check" else ""}
|
||||
${if cloog != null then
|
||||
"--with-cloog=${cloog} --enable-cloog-backend=isl"
|
||||
"--with-cloog=${cloog} --disable-cloog-version-check --enable-cloog-backend=isl"
|
||||
else ""}
|
||||
${if langJava then
|
||||
"--with-ecj-jar=${javaEcj} " +
|
||||
@ -406,7 +427,9 @@ stdenv.mkDerivation ({
|
||||
# Needed for the cross compilation to work
|
||||
AR = "ar";
|
||||
LD = "ld";
|
||||
CC = "gcc";
|
||||
# http://gcc.gnu.org/install/specific.html#x86-64-x-solaris210
|
||||
CC = if stdenv.system == "x86_64-solaris" then "gcc -m64"
|
||||
else "gcc";
|
||||
|
||||
# Setting $CPATH and $LIBRARY_PATH to make sure both `gcc' and `xgcc' find
|
||||
# the library headers and binaries, regarless of the language being
|
||||
@ -496,6 +519,7 @@ stdenv.mkDerivation ({
|
||||
installTargets = "install-gcc install-target-libgcc";
|
||||
}
|
||||
|
||||
|
||||
# Strip kills static libs of other archs (hence cross != null)
|
||||
// optionalAttrs (!stripped || cross != null) { dontStrip = true; NIX_STRIP_DEBUG = 0; }
|
||||
)
|
||||
|
@ -17,7 +17,8 @@ stdenv.mkDerivation rec {
|
||||
patches =
|
||||
[ # Do not look in /usr etc. for dependencies.
|
||||
./no-sys-dirs.patch
|
||||
]
|
||||
]
|
||||
++ stdenv.lib.optional stdenv.isSunOS ./ld-shared.patch
|
||||
++ stdenv.lib.optional stdenv.isDarwin ./no-libutil.patch;
|
||||
|
||||
# Build a thread-safe Perl with a dynamic libperls.o. We need the
|
||||
|
11
pkgs/development/interpreters/perl/5.14/ld-shared.patch
Normal file
11
pkgs/development/interpreters/perl/5.14/ld-shared.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- perl-5.14.2/hints/solaris_2.sh.orig 2013-02-14 19:29:49.453988140 +0000
|
||||
+++ perl-5.14.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"
|
||||
;;
|
||||
*)
|
||||
getconfccflags="`getconf XBS5_LP64_OFF64_CFLAGS 2>/dev/null`"
|
@ -18,6 +18,7 @@ stdenv.mkDerivation rec {
|
||||
[ # Do not look in /usr etc. for dependencies.
|
||||
./no-sys-dirs.patch
|
||||
]
|
||||
++ stdenv.lib.optional stdenv.isSunOS ./ld-shared.patch
|
||||
++ stdenv.lib.optional stdenv.isDarwin ./no-libutil.patch;
|
||||
|
||||
# Build a thread-safe Perl with a dynamic libperls.o. We need the
|
||||
|
11
pkgs/development/interpreters/perl/5.16/ld-shared.patch
Normal file
11
pkgs/development/interpreters/perl/5.16/ld-shared.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- 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"
|
||||
;;
|
||||
*)
|
||||
getconfccflags="`getconf XBS5_LP64_OFF64_CFLAGS 2>/dev/null`"
|
@ -1,11 +1,11 @@
|
||||
{ fetchurl, stdenv, gmp, isl }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "cloog-0.16.3";
|
||||
name = "cloog-0.18.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://www.bastoul.net/cloog/pages/download/count.php3?url=./${name}.tar.gz";
|
||||
sha256 = "0lzbsszfzsr0jfwkccfbsvx913d2yc45dqwa472plmxkhbwykmc9";
|
||||
sha256 = "1c4aa8dde7886be9cbe0f9069c334843b21028f61d344a2d685f88cb1dcf2228";
|
||||
};
|
||||
|
||||
buildInputs = [ gmp ];
|
||||
|
@ -1,16 +1,16 @@
|
||||
{ stdenv, fetchurl, pkgconfig, expat, libX11, libICE, libSM, useX11 ? true }:
|
||||
|
||||
let
|
||||
version = "1.6.4";
|
||||
version = "1.6.8";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://dbus.freedesktop.org/releases/dbus/dbus-${version}.tar.gz";
|
||||
sha256 = "1wacqyfkcpayg7f8rvx9awqg275n5pksxq5q7y21lxjx85x6pfjz";
|
||||
sha256 = "fc1370ef38abeeb13f55c905ec002e60705fb0bfde3b8d21c8d6eb8056c11bac";
|
||||
};
|
||||
|
||||
patches = [ ./ignore-missing-includedirs.patch ];
|
||||
patches = [ ./ignore-missing-includedirs.patch ./implement-getgrouplist.patch ];
|
||||
|
||||
configureFlags = "--localstatedir=/var --sysconfdir=/etc --with-session-socket-dir=/tmp";
|
||||
configureFlags = "--enable-embedded-tests --localstatedir=/var --sysconfdir=/etc --with-session-socket-dir=/tmp";
|
||||
|
||||
in rec {
|
||||
|
||||
|
108
pkgs/development/libraries/dbus/implement-getgrouplist.patch
Normal file
108
pkgs/development/libraries/dbus/implement-getgrouplist.patch
Normal file
@ -0,0 +1,108 @@
|
||||
Compatibility patch for Illumos/Solaris and possibly other platforms.
|
||||
Implements getgrouplist when not provided by OS.
|
||||
Without it, only the user's primary group is used in authentication!
|
||||
--- 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ dbus-1.6.8/dbus/getgrouplist.c 2013-02-28 13:10:51.081792722 +0000
|
||||
@@ -0,0 +1,89 @@
|
||||
+/* $OpenBSD: getgrouplist.c,v 1.12 2005/08/08 08:05:34 espie Exp $ */
|
||||
+/*
|
||||
+ * Copyright (c) 1991, 1993
|
||||
+ * The Regents of the University of California. All rights reserved.
|
||||
+ *
|
||||
+ * Redistribution and use in source and binary forms, with or without
|
||||
+ * modification, are permitted provided that the following conditions
|
||||
+ * are met:
|
||||
+ * 1. Redistributions of source code must retain the above copyright
|
||||
+ * notice, this list of conditions and the following disclaimer.
|
||||
+ * 2. Redistributions in binary form must reproduce the above copyright
|
||||
+ * notice, this list of conditions and the following disclaimer in the
|
||||
+ * documentation and/or other materials provided with the distribution.
|
||||
+ * 3. Neither the name of the University nor the names of its contributors
|
||||
+ * may be used to endorse or promote products derived from this software
|
||||
+ * without specific prior written permission.
|
||||
+ *
|
||||
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
+ * SUCH DAMAGE.
|
||||
+ */
|
||||
+
|
||||
+/* OPENBSD ORIGINAL: lib/libc/gen/getgrouplist.c */
|
||||
+
|
||||
+/*
|
||||
+ * get credential
|
||||
+ */
|
||||
+#include <sys/types.h>
|
||||
+#include <string.h>
|
||||
+#include <unistd.h>
|
||||
+#include <grp.h>
|
||||
+
|
||||
+int
|
||||
+getgrouplist(const char *uname, gid_t agroup, gid_t *groups, int *grpcnt)
|
||||
+{
|
||||
+ struct group *grp;
|
||||
+ int i, ngroups;
|
||||
+ int ret, maxgroups;
|
||||
+ int bail;
|
||||
+
|
||||
+ ret = 0;
|
||||
+ ngroups = 0;
|
||||
+ maxgroups = *grpcnt;
|
||||
+
|
||||
+ /*
|
||||
+ * install primary group
|
||||
+ */
|
||||
+ if (ngroups >= maxgroups) {
|
||||
+ *grpcnt = ngroups;
|
||||
+ return (-1);
|
||||
+ }
|
||||
+ groups[ngroups++] = agroup;
|
||||
+
|
||||
+ /*
|
||||
+ * Scan the group file to find additional groups.
|
||||
+ */
|
||||
+ setgrent();
|
||||
+ while ((grp = getgrent())) {
|
||||
+ if (grp->gr_gid == agroup)
|
||||
+ continue;
|
||||
+ for (bail = 0, i = 0; bail == 0 && i < ngroups; i++)
|
||||
+ if (groups[i] == grp->gr_gid)
|
||||
+ bail = 1;
|
||||
+ if (bail)
|
||||
+ continue;
|
||||
+ for (i = 0; grp->gr_mem[i]; i++) {
|
||||
+ if (!strcmp(grp->gr_mem[i], uname)) {
|
||||
+ if (ngroups >= maxgroups) {
|
||||
+ ret = -1;
|
||||
+ goto out;
|
||||
+ }
|
||||
+ groups[ngroups++] = grp->gr_gid;
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+out:
|
||||
+ endgrent();
|
||||
+ *grpcnt = ngroups;
|
||||
+ return (ret);
|
||||
+}
|
||||
--- dbus-1.6.8/dbus/dbus-sysdeps-unix.c.orig 2013-02-28 13:08:52.171215237 +0000
|
||||
+++ dbus-1.6.8/dbus/dbus-sysdeps-unix.c 2013-02-28 13:13:52.224615146 +0000
|
||||
@@ -21,6 +21,10 @@
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
+#ifndef HAVE_GETGROUPLIST
|
||||
+#include "getgrouplist.c"
|
||||
+#define HAVE_GETGROUPLIST
|
||||
+#endif
|
||||
|
||||
#include <config.h>
|
||||
|
@ -1,16 +1,16 @@
|
||||
{ stdenv, fetchurl, libiconv }:
|
||||
{ stdenv, fetchurl, libiconv, xz }:
|
||||
|
||||
stdenv.mkDerivation (rec {
|
||||
name = "gettext-0.18.1.1";
|
||||
name = "gettext-0.18.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnu/gettext/${name}.tar.gz";
|
||||
sha256 = "1sa3ch12qxa4h3ya6hkz119yclcccmincl9j20dhrdx5mykp3b4k";
|
||||
sha256 = "516a6370b3b3f46e2fc5a5e222ff5ecd76f3089bc956a7587a6e4f89de17714c";
|
||||
};
|
||||
|
||||
patches = [ ./no-gets.patch ];
|
||||
LDFLAGS = if stdenv.isSunOS then "-lm -lmd -lmp -luutil -lnvpair -lnsl -lidmap -lavl -lsec" else "";
|
||||
|
||||
configureFlags = [ "--disable-csharp" ]
|
||||
configureFlags = [ "--disable-csharp" "--with-xz" ]
|
||||
++ (stdenv.lib.optionals stdenv.isCygwin
|
||||
[ # We have a static libiconv, so we can only build the static lib.
|
||||
"--disable-shared" "--enable-static"
|
||||
@ -30,7 +30,7 @@ stdenv.mkDerivation (rec {
|
||||
fi
|
||||
'';
|
||||
|
||||
buildInputs = stdenv.lib.optional (!stdenv.isLinux) libiconv;
|
||||
buildInputs = [ xz ] ++ stdenv.lib.optional (!stdenv.isLinux) libiconv;
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
|
@ -1,42 +0,0 @@
|
||||
hack until gzip pulls a newer gnulib version
|
||||
|
||||
From 66712c23388e93e5c518ebc8515140fa0c807348 Mon Sep 17 00:00:00 2001
|
||||
From: Eric Blake <eblake@redhat.com>
|
||||
Date: Thu, 29 Mar 2012 13:30:41 -0600
|
||||
Subject: [PATCH] stdio: don't assume gets any more
|
||||
|
||||
Gnulib intentionally does not have a gets module, and now that C11
|
||||
and glibc have dropped it, we should be more proactive about warning
|
||||
any user on a platform that still has a declaration of this dangerous
|
||||
interface.
|
||||
|
||||
--- a/gettext-tools/libgettextpo/stdio.in.h
|
||||
+++ b/gettext-tools/libgettextpo/stdio.in.h
|
||||
@@ -125,7 +125,6 @@
|
||||
so any use of gets warrants an unconditional warning. Assume it is
|
||||
always declared, since it is required by C89. */
|
||||
#undef gets
|
||||
-_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
|
||||
|
||||
#if @GNULIB_FOPEN@
|
||||
# if @REPLACE_FOPEN@
|
||||
--- a/gettext-tools/gnulib-lib/stdio.in.h
|
||||
+++ b/gettext-tools/gnulib-lib/stdio.in.h
|
||||
@@ -125,7 +125,6 @@
|
||||
so any use of gets warrants an unconditional warning. Assume it is
|
||||
always declared, since it is required by C89. */
|
||||
#undef gets
|
||||
-_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
|
||||
|
||||
#if @GNULIB_FOPEN@
|
||||
# if @REPLACE_FOPEN@
|
||||
--- a/gettext-runtime/gnulib-lib/stdio.in.h
|
||||
+++ b/gettext-runtime/gnulib-lib/stdio.in.h
|
||||
@@ -125,7 +125,6 @@
|
||||
so any use of gets warrants an unconditional warning. Assume it is
|
||||
always declared, since it is required by C89. */
|
||||
#undef gets
|
||||
-_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
|
||||
|
||||
#if @GNULIB_FOPEN@
|
||||
# if @REPLACE_FOPEN@
|
@ -12,11 +12,11 @@
|
||||
# $out/bin/gtester-report' to postInstall if this is solved
|
||||
|
||||
stdenv.mkDerivation (rec {
|
||||
name = "glib-2.34.0";
|
||||
name = "glib-2.34.3";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnome/sources/glib/2.34/${name}.tar.xz";
|
||||
sha256 = "f69b112f8848be35139d9099b62bc81649241f78f6a775516f0d4c9b47f65144";
|
||||
sha256 = "855fcbf87cb93065b488358e351774d8a39177281023bae58c286f41612658a7";
|
||||
};
|
||||
|
||||
# configure script looks for d-bus but it is only needed for tests
|
||||
@ -26,7 +26,11 @@ stdenv.mkDerivation (rec {
|
||||
|
||||
propagatedBuildInputs = [ pcre zlib libffi ];
|
||||
|
||||
configureFlags = "--with-pcre=system --disable-fam";
|
||||
configureFlags = "--with-pcre=system --disable-fam" +
|
||||
(stdenv.lib.optionalString (libiconvOrNull != null) " --with-libiconv=gnu") +
|
||||
(stdenv.lib.optionalString stdenv.isSunOS " --disable-modular-tests");
|
||||
|
||||
CPPFLAGS = stdenv.lib.optionalString stdenv.isSunOS "-DBSD_COMP";
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
|
@ -4,9 +4,8 @@ stdenv.mkDerivation rec {
|
||||
name = "gmp-5.1.1";
|
||||
|
||||
src = fetchurl {
|
||||
urls = [ "mirror://gnu/gmp/${name}.tar.bz2"
|
||||
"ftp://ftp.gmplib.org/pub/${name}/${name}.tar.bz2" ];
|
||||
sha256 = "1bdgf04k2i12pfivxgjq68iarz3ngix9hpzbmkgijrdk92gpgm50";
|
||||
urls = [ "mirror://gnu/gmp/${name}.tar.xz" "ftp://ftp.gmplib.org/pub/${name}/${name}.tar.xz" ];
|
||||
sha256 = "1hili06lcf0clg5qfvz7knm6pmj6ab54yhsvskp1mdny5xw4vmjb";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ m4 ];
|
||||
@ -16,7 +15,8 @@ stdenv.mkDerivation rec {
|
||||
# (x86), except on Solaris where some tests crash with "Memory fault".
|
||||
# See <http://hydra.nixos.org/build/2760931>, for instance.
|
||||
(stdenv.lib.optional (!stdenv.isSunOS) "--enable-fat")
|
||||
++ (if cxx then [ "--enable-cxx" ] else [ "--disable-cxx" ]);
|
||||
++ (if cxx then [ "--enable-cxx" ] else [ "--disable-cxx" ])
|
||||
++ (if stdenv.is64bit then [ "--with-pic" ] else []);
|
||||
|
||||
doCheck = true;
|
||||
|
||||
|
@ -1,14 +1,14 @@
|
||||
{ stdenv, fetchurl, gmp }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "isl-0.07"; # CLooG 0.16.3 fails to build with ISL 0.08.
|
||||
name = "isl-0.11.1"; # CLooG 0.16.3 fails to build with ISL 0.08.
|
||||
|
||||
src = fetchurl {
|
||||
urls = [
|
||||
"http://www.kotnet.org/~skimo/isl/${name}.tar.bz2"
|
||||
"ftp://ftp.linux.student.kuleuven.be/pub/people/skimo/isl/${name}.tar.bz2"
|
||||
];
|
||||
sha256 = "0kpxmvhrwwdygqqafqzjf9xiksq7paac2x24g9jhr3f9ajj3zkyx";
|
||||
sha256 = "095f4b54c88ca13a80d2b025d9c551f89ea7ba6f6201d701960bfe5c1466a98d";
|
||||
};
|
||||
|
||||
buildInputs = [ gmp ];
|
||||
|
@ -1,15 +1,17 @@
|
||||
{ stdenv, fetchurl, libxml2 }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "libxslt-1.1.27";
|
||||
name = "libxslt-1.1.28";
|
||||
|
||||
src = fetchurl {
|
||||
url = "ftp://xmlsoft.org/libxml2/${name}.tar.gz";
|
||||
sha256 = "09ky3vhlaahvsb0q9gp6h3as53pfj70gincirachjqzj46jdka5n";
|
||||
sha256 = "5fc7151a57b89c03d7b825df5a0fae0a8d5f05674c0e7cf2937ecec4d54a028c";
|
||||
};
|
||||
|
||||
buildInputs = [ libxml2 ];
|
||||
|
||||
patches = stdenv.lib.optionals stdenv.isSunOS [ ./patch-ah.patch ];
|
||||
|
||||
postInstall = ''
|
||||
mkdir -p $out/nix-support
|
||||
ln -s ${libxml2}/nix-support/setup-hook $out/nix-support/
|
||||
|
69
pkgs/development/libraries/libxslt/patch-ah.patch
Normal file
69
pkgs/development/libraries/libxslt/patch-ah.patch
Normal file
@ -0,0 +1,69 @@
|
||||
$NetBSD: patch-ah,v 1.3 2012/11/27 12:17:51 adam Exp $
|
||||
|
||||
Fix syms file for stricter solaris ld
|
||||
|
||||
--- libxslt-1.1.28/libxslt/libxslt.syms.orig 2012-11-27 12:04:43.000000000 +0000
|
||||
+++ libxslt-1.1.28/libxslt/libxslt.syms
|
||||
@@ -107,7 +107,7 @@ LIBXML2_1.0.11 {
|
||||
xsltFreeCompMatchList;
|
||||
xsltFreeTemplateHashes;
|
||||
xsltGetTemplate;
|
||||
- xsltMatchPattern;
|
||||
+# xsltMatchPattern;
|
||||
xsltTestCompMatchList;
|
||||
|
||||
# preproc
|
||||
@@ -407,7 +407,7 @@ LIBXML2_1.1.18 {
|
||||
global:
|
||||
|
||||
# xsltInternals
|
||||
- xsltConstNamespaceNameXSLT; # variable
|
||||
+# xsltConstNamespaceNameXSLT; # variable
|
||||
xsltExtensionInstructionResultFinalize;
|
||||
xsltExtensionInstructionResultRegister;
|
||||
xsltInitCtxtKey;
|
||||
@@ -416,24 +416,24 @@ LIBXML2_1.1.18 {
|
||||
xsltInit;
|
||||
|
||||
# xsltInternals
|
||||
- xsltParseAnyXSLTElem;
|
||||
- xsltParseSequenceConstructor;
|
||||
- xsltPointerListAddSize;
|
||||
- xsltPointerListClear;
|
||||
- xsltPointerListCreate;
|
||||
- xsltPointerListFree;
|
||||
+# xsltParseAnyXSLTElem;
|
||||
+# xsltParseSequenceConstructor;
|
||||
+# xsltPointerListAddSize;
|
||||
+# xsltPointerListClear;
|
||||
+# xsltPointerListCreate;
|
||||
+# xsltPointerListFree;
|
||||
xsltRegisterLocalRVT;
|
||||
xsltReleaseRVT;
|
||||
- xsltRestoreDocumentNamespaces;
|
||||
+# xsltRestoreDocumentNamespaces;
|
||||
|
||||
# extensions
|
||||
- xsltStyleStylesheetLevelGetExtData;
|
||||
+# xsltStyleStylesheetLevelGetExtData;
|
||||
|
||||
# xsltInternals
|
||||
# xsltTransStorageAdd; removed in 1.1.28
|
||||
# xsltTransStorageRemove; removed in 1.1.28
|
||||
xsltUninit;
|
||||
- xsltXSLTAttrMarker; # variable
|
||||
+# xsltXSLTAttrMarker; # variable
|
||||
} LIBXML2_1.1.9;
|
||||
|
||||
LIBXML2_1.1.20 {
|
||||
@@ -476,6 +476,10 @@ LIBXML2_1.1.26 {
|
||||
|
||||
# transform
|
||||
xsltProcessOneNode;
|
||||
+
|
||||
+# Solaris ld needs explicit auto-reduction (or, alternatively, "-B local")
|
||||
+ local:
|
||||
+ *;
|
||||
} LIBXML2_1.1.25;
|
||||
|
||||
LIBXML2_1.1.27 {
|
@ -1,6 +1,6 @@
|
||||
{stdenv, fetchurl, gmp}:
|
||||
|
||||
stdenv.mkDerivation (rec {
|
||||
stdenv.mkDerivation rec {
|
||||
name = "mpfr-3.1.1";
|
||||
|
||||
src = fetchurl {
|
||||
@ -35,16 +35,14 @@ stdenv.mkDerivation (rec {
|
||||
maintainers = [ stdenv.lib.maintainers.ludo ];
|
||||
platforms = stdenv.lib.platforms.all;
|
||||
};
|
||||
|
||||
configureFlags =
|
||||
/* Work around a FreeBSD bug that otherwise leads to segfaults in
|
||||
the test suite:
|
||||
http://hydra.bordeaux.inria.fr/build/34862
|
||||
http://websympa.loria.fr/wwsympa/arc/mpfr/2011-10/msg00015.html
|
||||
http://www.freebsd.org/cgi/query-pr.cgi?pr=161344
|
||||
*/
|
||||
stdenv.lib.optional (stdenv.isSunOS or stdenv.isFreeBSD) "--disable-thread-safe" ++
|
||||
stdenv.lib.optional stdenv.is64bit "--with-pic";
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
(stdenv.lib.optionalAttrs stdenv.isFreeBSD {
|
||||
/* Work around a FreeBSD bug that otherwise leads to segfaults in
|
||||
the test suite:
|
||||
http://hydra.bordeaux.inria.fr/build/34862
|
||||
http://websympa.loria.fr/wwsympa/arc/mpfr/2011-10/msg00015.html
|
||||
http://www.freebsd.org/cgi/query-pr.cgi?pr=161344
|
||||
*/
|
||||
configureFlags = [ "--disable-thread-safe" ];
|
||||
}))
|
||||
|
@ -8,7 +8,7 @@ let
|
||||
<http://mail.python.org/pipermail/python-bugs-list/2006-September/035362.html>,
|
||||
but this is left as an exercise to the reader.
|
||||
So disable them for now. */
|
||||
cxx = stdenv.system != "i686-solaris";
|
||||
cxx = !stdenv.isSunOS;
|
||||
in
|
||||
stdenv.mkDerivation (rec {
|
||||
name = "ncurses-5.9";
|
||||
@ -23,6 +23,8 @@ stdenv.mkDerivation (rec {
|
||||
${if unicode then "--enable-widec" else ""}${if cxx then "" else "--without-cxx-binding"}
|
||||
'';
|
||||
|
||||
patches = [ ./patch-ac ];
|
||||
|
||||
selfNativeBuildInput = true;
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
40
pkgs/development/libraries/ncurses/patch-ac
Normal file
40
pkgs/development/libraries/ncurses/patch-ac
Normal file
@ -0,0 +1,40 @@
|
||||
$NetBSD: patch-ac,v 1.18 2011/11/01 14:47:46 hans Exp $
|
||||
|
||||
--- ncurses-5.9/configure.orig 2011-02-21 01:40:36.000000000 +0000
|
||||
+++ ncurses-5.9/configure
|
||||
@@ -7096,6 +7096,13 @@ sco*) #(vi
|
||||
# setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
|
||||
;;
|
||||
solaris2.1[0-9]) #(vi
|
||||
+ case "$GCC_VERSION" in
|
||||
+ 4.[67].*)
|
||||
+ cf_XOPEN_SOURCE=600
|
||||
+ cf_add_cflags=-std=c99
|
||||
+ CPPFLAGS="$CPPFLAGS -std=c99"
|
||||
+ ;;
|
||||
+ esac
|
||||
cf_xopen_source="-D__EXTENSIONS__ -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
|
||||
;;
|
||||
solaris2.[1-9]) #(vi
|
||||
@@ -9640,12 +9647,7 @@ case ".$MANPAGE_RENAMES" in #(vi
|
||||
.no) #(vi
|
||||
;;
|
||||
.|.yes)
|
||||
- # Debian 'man' program?
|
||||
- if test -f /etc/debian_version ; then
|
||||
- MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
|
||||
- else
|
||||
MANPAGE_RENAMES=no
|
||||
- fi
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -18449,7 +18444,7 @@ echo "${ECHO_T}$LIB_SUBSETS" >&6
|
||||
|
||||
### Construct the list of include-directories to be generated
|
||||
|
||||
-CPPFLAGS="$CPPFLAGS -I. -I../include"
|
||||
+CPPFLAGS="-I. -I../include $CPPFLAGS"
|
||||
if test "$srcdir" != "."; then
|
||||
CPPFLAGS="$CPPFLAGS -I\${srcdir}/../include"
|
||||
fi
|
@ -53,7 +53,9 @@ stdenv.mkDerivation {
|
||||
# On x86_64-darwin, "./config" misdetects the system as
|
||||
# "darwin-i386-cc". So specify the system type explicitly.
|
||||
configureScript =
|
||||
if stdenv.system == "x86_64-darwin" then "./Configure darwin64-x86_64-cc" else "./config";
|
||||
if stdenv.system == "x86_64-darwin" then "./Configure darwin64-x86_64-cc"
|
||||
else if stdenv.system == "x86_64-solaris" then "./Configure solaris64-x86_64-gcc"
|
||||
else "./config";
|
||||
|
||||
configureFlags = "shared --libdir=lib --openssldir=etc/ssl" +
|
||||
stdenv.lib.optionalString withCryptodev " -DHAVE_CRYPTODEV -DUSE_CRYPTODEV_DIGESTS";
|
||||
|
@ -1,11 +1,11 @@
|
||||
{ stdenv, fetchurl, unicodeSupport ? true, cplusplusSupport ? true }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "pcre-8.31";
|
||||
name = "pcre-8.32";
|
||||
|
||||
src = fetchurl {
|
||||
url = "ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/${name}.tar.bz2";
|
||||
sha256 = "5778a02535473c7ee7838ea598c19f451e63cf5eec0bf0307a688301c9078c3c";
|
||||
sha256 = "a913fb9bd058ef380a2d91847c3c23fcf98e92dc3b47cd08a53c021c5cde0f55";
|
||||
};
|
||||
|
||||
# The compiler on Darwin crashes with an internal error while building the
|
||||
@ -13,6 +13,7 @@ stdenv.mkDerivation rec {
|
||||
# problem. In case we ever update the Darwin GCC version, the exception for
|
||||
# that platform ought to be removed.
|
||||
configureFlags = ''
|
||||
--enable-jit
|
||||
${if unicodeSupport then "--enable-unicode-properties" else ""}
|
||||
${if !cplusplusSupport then "--disable-cpp" else ""}
|
||||
'' + stdenv.lib.optionalString stdenv.isDarwin "CXXFLAGS=-O0";
|
||||
|
@ -1,13 +1,13 @@
|
||||
{ fetchurl, stdenv, gmpxx, perl, gnum4 }:
|
||||
|
||||
let version = "0.12.1"; in
|
||||
let version = "1.0"; in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "ppl-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://bugseng.com/products/ppl/download/ftp/releases/${version}/ppl-${version}.tar.bz2";
|
||||
sha256 = "165iy8bmkgszs0v8lkb1mzwp53x4vkcc7m1xdpv8w77qf93ya8j0";
|
||||
sha256 = "0m0b6dzablci8mlavpsmn5w1v3r46li0wpjwvsybgxx0p1ifjsf1";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ perl gnum4 ];
|
||||
@ -15,6 +15,8 @@ stdenv.mkDerivation rec {
|
||||
|
||||
configureFlags = "--disable-watchdog";
|
||||
|
||||
patches = [ ./upstream-based.patch ];
|
||||
|
||||
# Beware! It took ~6 hours to compile PPL and run its tests on a 1.2 GHz
|
||||
# x86_64 box. Nevertheless, being a dependency of GCC, it probably ought
|
||||
# to be tested.
|
||||
@ -23,9 +25,7 @@ stdenv.mkDerivation rec {
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = {
|
||||
homepage = "http://www.cs.unipr.it/ppl/";
|
||||
description = "PPL: The Parma Polyhedra Library";
|
||||
license = "GPLv3+";
|
||||
|
||||
longDescription = ''
|
||||
The Parma Polyhedra Library (PPL) provides numerical abstractions
|
||||
@ -42,6 +42,10 @@ stdenv.mkDerivation rec {
|
||||
version of the simplex algorithm.
|
||||
'';
|
||||
|
||||
homepage = http://bugseng.com/products/ppl/;
|
||||
|
||||
license = "GPLv3+";
|
||||
|
||||
maintainers = [ stdenv.lib.maintainers.ludo ];
|
||||
};
|
||||
}
|
||||
|
42
pkgs/development/libraries/ppl/upstream-based.patch
Normal file
42
pkgs/development/libraries/ppl/upstream-based.patch
Normal file
@ -0,0 +1,42 @@
|
||||
https://bugs.gentoo.org/show_bug.cgi?id=447928
|
||||
--- ppl-1.0/src/p_std_bits.cc.org 2012-12-30 00:37:03.033948083 +0100
|
||||
+++ ppl-1.0/src/mp_std_bits.cc 2012-12-30 00:44:12.893019313 +0100
|
||||
@@ -25,6 +25,9 @@
|
||||
#include "ppl-config.h"
|
||||
#include "mp_std_bits.defs.hh"
|
||||
|
||||
+#if __GNU_MP_VERSION < 5 \
|
||||
+ || (__GNU_MP_VERSION == 5 && __GNU_MP_VERSION_MINOR < 1)
|
||||
+
|
||||
const bool std::numeric_limits<mpz_class>::is_specialized;
|
||||
const int std::numeric_limits<mpz_class>::digits;
|
||||
const int std::numeric_limits<mpz_class>::digits10;
|
||||
@@ -70,3 +73,6 @@
|
||||
const bool std::numeric_limits<mpq_class>::traps;
|
||||
const bool std::numeric_limits<mpq_class>::tininess_before;
|
||||
const std::float_round_style std::numeric_limits<mpq_class>::round_style;
|
||||
+
|
||||
+#endif // __GNU_MP_VERSION < 5
|
||||
+ // || (__GNU_MP_VERSION == 5 && __GNU_MP_VERSION_MINOR < 1)
|
||||
--- ppl-1.0/src/mp_std_bits.defs.hh.org 2012-12-30 00:37:03.037948187 +0100
|
||||
+++ ppl-1.0/src/mp_std_bits.defs.hh 2012-12-30 00:42:32.002424189 +0100
|
||||
@@ -38,6 +38,9 @@
|
||||
#endif // defined(PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS)
|
||||
void swap(mpq_class& x, mpq_class& y);
|
||||
|
||||
+#if __GNU_MP_VERSION < 5 \
|
||||
+ || (__GNU_MP_VERSION == 5 && __GNU_MP_VERSION_MINOR < 1)
|
||||
+
|
||||
namespace std {
|
||||
|
||||
#ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
|
||||
@@ -164,6 +167,9 @@
|
||||
|
||||
} // namespace std
|
||||
|
||||
+#endif // __GNU_MP_VERSION < 5
|
||||
+ // || (__GNU_MP_VERSION == 5 && __GNU_MP_VERSION_MINOR < 1)
|
||||
+
|
||||
#include "mp_std_bits.inlines.hh"
|
||||
|
||||
#endif // !defined(PPL_mp_std_bits_defs_hh)
|
@ -1,11 +1,11 @@
|
||||
{ stdenv, fetchurl, m4, perl }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "bison-2.6.5";
|
||||
name = "bison-2.7";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnu/bison/${name}.tar.xz";
|
||||
sha256 = "8640d5b51aad462db6863711f333a9159836853e0b1e79fdef708c6efb5cd52b";
|
||||
sha256 = "1zd77ilmpv5mi3kr55jrj6ncqlcnyhpianhrwzak2q28cv2cbn23";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ m4 ] ++ stdenv.lib.optional doCheck perl;
|
||||
|
@ -62,5 +62,6 @@ rec {
|
||||
if stdenvType == "powerpc-linux" then /* stdenvLinux */ stdenvNative else
|
||||
if stdenvType == "i686-mingw" then stdenvMinGW else
|
||||
if stdenvType == "x86_64-darwin" then stdenvNix else
|
||||
if stdenvType == "x86_64-solaris" then stdenvNix else
|
||||
stdenvNative;
|
||||
}
|
||||
|
@ -138,11 +138,13 @@ let
|
||||
isx86_64 = result.system == "x86_64-linux"
|
||||
|| result.system == "x86_64-darwin"
|
||||
|| result.system == "x86_64-freebsd"
|
||||
|| result.system == "x86_64-openbsd";
|
||||
|| result.system == "x86_64-openbsd"
|
||||
|| result.system == "x86_64-solaris";
|
||||
is64bit = result.system == "x86_64-linux"
|
||||
|| result.system == "x86_64-darwin"
|
||||
|| result.system == "x86_64-freebsd"
|
||||
|| result.system == "x86_64-openbsd";
|
||||
|| result.system == "x86_64-openbsd"
|
||||
|| result.system == "x86_64-solaris";
|
||||
isMips = result.system == "mips-linux"
|
||||
|| result.system == "mips64el-linux";
|
||||
isArm = result.system == "armv5tel-linux"
|
||||
|
@ -9,6 +9,7 @@ rec {
|
||||
path =
|
||||
(if system == "i686-solaris" then [ "/usr/gnu" ] else []) ++
|
||||
(if system == "i686-netbsd" then [ "/usr/pkg" ] else []) ++
|
||||
(if system == "x86_64-solaris" then [ "/opt/local/gnu" ] else []) ++
|
||||
["/" "/usr" "/usr/local"];
|
||||
|
||||
prehookBase = ''
|
||||
@ -112,7 +113,7 @@ rec {
|
||||
name = "gcc-native";
|
||||
nativeTools = true;
|
||||
nativeLibc = true;
|
||||
nativePrefix = if system == "i686-solaris" then "/usr/gnu" else "/usr";
|
||||
nativePrefix = if system == "i686-solaris" then "/usr/gnu" else if system == "x86_64-solaris" then "/opt/local/gcc47" else "/usr";
|
||||
stdenv = stdenvBoot0;
|
||||
};
|
||||
|
||||
|
@ -23,6 +23,7 @@ import ../generic rec {
|
||||
|
||||
gcc = import ../../build-support/gcc-wrapper {
|
||||
nativeTools = false;
|
||||
nativePrefix = stdenv.lib.optionalString stdenv.isSunOS "/usr";
|
||||
nativeLibc = true;
|
||||
inherit stdenv;
|
||||
binutils =
|
||||
|
@ -1,22 +1,13 @@
|
||||
{stdenv, fetchurl}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "cpio-2.9";
|
||||
name = "cpio-2.11";
|
||||
|
||||
src = fetchurl {
|
||||
url = mirror://gnu/cpio/cpio-2.9.tar.bz2;
|
||||
sha256 = "01s7f9hg8kgpis96j99hgkiqgdy53pm7qi7bhm3fzx58jfk5z6mv";
|
||||
url = mirror://gnu/cpio/cpio-2.11.tar.bz2;
|
||||
sha256 = "bb820bfd96e74fc6ce43104f06fe733178517e7f5d1cdee553773e8eff7d5bbd";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Make it compile on GCC 4.3.
|
||||
(fetchurl {
|
||||
name = "cpio-2.9-gnu-inline.patch";
|
||||
url = "http://sources.gentoo.org/viewcvs.py/*checkout*/gentoo-x86/app-arch/cpio/files/cpio-2.9-gnu-inline.patch?rev=1.1";
|
||||
sha256 = "1167hrq64h9lh3qhgasm2rivfzkkgx6fik92b017qfa0q61ff8c3";
|
||||
})
|
||||
];
|
||||
|
||||
meta = {
|
||||
homepage = http://www.gnu.org/software/cpio/;
|
||||
description = "A program to create or extract from cpio archives";
|
||||
|
@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
# May have some issues with root compilation because the bootstrap tool
|
||||
# cannot be used as a login shell for now.
|
||||
FORCE_UNSAFE_CONFIGURE = stdenv.lib.optionalString (stdenv.system == "armv7l-linux") "1";
|
||||
FORCE_UNSAFE_CONFIGURE = stdenv.lib.optionalString (stdenv.system == "armv7l-linux" || stdenv.isSunOS) "1";
|
||||
|
||||
meta = {
|
||||
homepage = http://www.gnu.org/software/tar/;
|
||||
|
@ -8,6 +8,10 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "0wx1nqk709kx75cwp2axachnbxryp4gyl06qxn5nl95184w0mhls";
|
||||
};
|
||||
|
||||
doCheck = true;
|
||||
|
||||
patches = [ ./skip-some-tests.patch ];
|
||||
|
||||
meta = {
|
||||
homepage = http://www.gnu.org/software/gzip/;
|
||||
description = "Gzip, the GNU zip compression program";
|
||||
|
21
pkgs/tools/compression/gzip/skip-some-tests.patch
Normal file
21
pkgs/tools/compression/gzip/skip-some-tests.patch
Normal file
@ -0,0 +1,21 @@
|
||||
Skip tests requiring Perl and less (more).
|
||||
Also zgrep-signal skipping fails with weird Bad file number error on illumos.
|
||||
--- gzip-1.5/tests/Makefile.in.orig 2013-02-23 15:15:08.017048868 +0000
|
||||
+++ gzip-1.5/tests/Makefile.in 2013-02-23 15:15:32.756197039 +0000
|
||||
@@ -1421,7 +1421,6 @@
|
||||
trailing-nul \
|
||||
zdiff \
|
||||
zgrep-f \
|
||||
- zgrep-signal \
|
||||
znew-k
|
||||
|
||||
EXTRA_DIST = \
|
||||
@@ -1441,8 +1440,6 @@
|
||||
zfgrep \
|
||||
zforce \
|
||||
zgrep \
|
||||
- zless \
|
||||
- zmore \
|
||||
znew
|
||||
|
||||
TESTS_ENVIRONMENT = \
|
@ -6,7 +6,7 @@
|
||||
assert aclSupport -> acl != null;
|
||||
assert selinuxSupport -> libselinux != null && libsepol != null;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (rec {
|
||||
name = "coreutils-8.21";
|
||||
|
||||
src = fetchurl {
|
||||
@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
|
||||
++ stdenv.lib.optional selinuxSupport libselinux
|
||||
++ stdenv.lib.optional selinuxSupport libsepol;
|
||||
|
||||
crossAttrs = {
|
||||
crossAttrs = ({
|
||||
buildInputs = [ gmp ]
|
||||
++ stdenv.lib.optional aclSupport acl.crossDrv
|
||||
++ stdenv.lib.optional selinuxSupport libselinux.crossDrv
|
||||
@ -32,7 +32,14 @@ stdenv.mkDerivation rec {
|
||||
# I don't know why it is not properly detected cross building with glibc.
|
||||
configureFlags = [ "fu_cv_sys_stat_statfs2_bsize=yes" ];
|
||||
doCheck = false;
|
||||
};
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
# XXX: Temporary workaround to allow GNU/Hurd builds with newer libcs.
|
||||
(stdenv.lib.optionalAttrs (stdenv.cross.config == "i586-pc-gnu") {
|
||||
patches = [ ./gets-undeclared.patch ];
|
||||
}));
|
||||
|
||||
# The tests are known broken on Cygwin
|
||||
# (http://thread.gmane.org/gmane.comp.gnu.core-utils.bugs/19025),
|
||||
@ -42,7 +49,8 @@ stdenv.mkDerivation rec {
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
NIX_LDFLAGS = stdenv.lib.optionalString selinuxSupport "-lsepol";
|
||||
NIX_LDFLAGS = stdenv.lib.optionalString selinuxSupport "-lsepol" +
|
||||
stdenv.lib.optionalString stdenv.isSunOS "-lmp -lmd -lnsl -lsocket -lresolv -luutil -lnvpair -lidmap -lavl -lsec";
|
||||
|
||||
meta = {
|
||||
homepage = http://www.gnu.org/software/coreutils/;
|
||||
@ -60,3 +68,8 @@ stdenv.mkDerivation rec {
|
||||
maintainers = [ stdenv.lib.maintainers.ludo ];
|
||||
};
|
||||
}
|
||||
# May have some issues with root compilation because the bootstrap tool
|
||||
# cannot be used as a login shell for now.
|
||||
// stdenv.lib.optionalAttrs (stdenv.system == "armv7l-linux" || stdenv.isSunOS) {
|
||||
FORCE_UNSAFE_CONFIGURE = 1;
|
||||
})
|
||||
|
@ -1,11 +1,11 @@
|
||||
{stdenv, fetchurl, ncurses}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "less-436";
|
||||
name = "less-451";
|
||||
|
||||
src = fetchurl {
|
||||
url = http://www.greenwoodsoftware.com/less/less-436.tar.gz;
|
||||
sha256 = "1lilcx6qrfr2dqahv7r10j9h2v86w5sb7m8wrx2sza9ifkq6z8ap";
|
||||
url = http://www.greenwoodsoftware.com/less/less-451.tar.gz;
|
||||
sha256 = "9fe8287c647afeafb4149c5dedaeacfd20971ed7c26c7553794bb750536b5f57";
|
||||
};
|
||||
|
||||
buildInputs = [ncurses];
|
||||
|
@ -1,11 +1,11 @@
|
||||
{ stdenv, fetchurl, pkgconfig, dbus_glib, libxml2, libxslt, getopt, nixUnstable, gettext, libiconv }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "disnix-0.3pre32254";
|
||||
name = "disnix-0.3pre34664";
|
||||
|
||||
src = fetchurl {
|
||||
url = http://hydra.nixos.org/build/2368541/download/4/disnix-0.3pre32254.tar.gz;
|
||||
sha256 = "1jznx4mb6vwpzzpbk4c16j73hjgng7v1nraq8yya7f7m1s2gyhcw";
|
||||
url = http://hydra.nixos.org/build/4072223/download/4/disnix-0.3pre34664.tar.gz;
|
||||
sha256 = "4e20a73c17061428ea66abd6004aaaa71b273ac88fca8e569a2262ae1f246c52";
|
||||
};
|
||||
|
||||
buildInputs = [ pkgconfig dbus_glib libxml2 libxslt getopt nixUnstable ]
|
||||
|
@ -13,6 +13,8 @@ stdenv.mkDerivation {
|
||||
buildInputs = [ pcre ]
|
||||
++ stdenv.lib.optional (libiconv != null) libiconv;
|
||||
|
||||
patches = [ ./test-localeconv.patch ];
|
||||
|
||||
NIX_LDFLAGS = stdenv.lib.optionalString (libiconv != null) "-L${libiconv}/lib -liconv";
|
||||
|
||||
doCheck = !stdenv.isDarwin;
|
||||
|
18
pkgs/tools/text/gnugrep/test-localeconv.patch
Normal file
18
pkgs/tools/text/gnugrep/test-localeconv.patch
Normal file
@ -0,0 +1,18 @@
|
||||
--- grep-2.14/gnulib-tests/test-localeconv.c.orig 2013-02-15 18:41:50.213433059 +0000
|
||||
+++ grep-2.14/gnulib-tests/test-localeconv.c 2013-02-15 18:50:33.964751303 +0000
|
||||
@@ -37,13 +37,13 @@
|
||||
|
||||
ASSERT (STREQ (l->decimal_point, "."));
|
||||
ASSERT (STREQ (l->thousands_sep, ""));
|
||||
-#if !defined __FreeBSD__
|
||||
+#if !(defined __FreeBSD__ || defined __sun)
|
||||
ASSERT (STREQ (l->grouping, ""));
|
||||
#endif
|
||||
|
||||
ASSERT (STREQ (l->mon_decimal_point, ""));
|
||||
ASSERT (STREQ (l->mon_thousands_sep, ""));
|
||||
-#if !defined __FreeBSD__
|
||||
+#if !(defined __FreeBSD__ || defined __sun)
|
||||
ASSERT (STREQ (l->mon_grouping, ""));
|
||||
#endif
|
||||
ASSERT (STREQ (l->positive_sign, ""));
|
67
pkgs/tools/text/gnupatch/bashishms.patch
Normal file
67
pkgs/tools/text/gnupatch/bashishms.patch
Normal file
@ -0,0 +1,67 @@
|
||||
http://lists.gnu.org/archive/html/bug-patch/2012-11/msg00001.html
|
||||
Tested on Illumos, where ksh is /bin/sh.
|
||||
|
||||
--- patch-2.7.1/tests/test-lib.sh
|
||||
+++ patch-2.7.1/tests/test-lib.sh
|
||||
@@ -118,7 +118,7 @@
|
||||
}
|
||||
|
||||
if test -z "`echo -n`"; then
|
||||
- if eval 'test -n "${BASH_LINENO[0]}" 2>/dev/null'; then
|
||||
+ if (eval 'test -n "${BASH_LINENO[0]}"') 2>/dev/null; then
|
||||
eval '
|
||||
_start_test() {
|
||||
echo -n "[${BASH_LINENO[2]}] $* -- "
|
||||
|
||||
--- patch-2.7.1/tests/crlf-handling
|
||||
+++ patch-2.7.1/tests/crlf-handling
|
||||
@@ -14,7 +14,7 @@
|
||||
use_tmpdir
|
||||
|
||||
lf2crlf() {
|
||||
- while read l; do echo -e "$l\r"; done
|
||||
+ while read l; do printf "%s\r\n" "$l"; done
|
||||
}
|
||||
|
||||
echo 1 > a
|
||||
|
||||
--- patch-2.7.1/tests/merge
|
||||
+++ patch-2.7.1/tests/merge
|
||||
@@ -32,18 +32,20 @@
|
||||
shift
|
||||
done > a.sed
|
||||
echo "$body" | sed -f a.sed > b
|
||||
- shift
|
||||
- while test $# -gt 0 ; do
|
||||
- echo "$1"
|
||||
+ if test $# -gt 0 ; then
|
||||
shift
|
||||
- done > b.sed
|
||||
+ while test $# -gt 0 ; do
|
||||
+ echo "$1"
|
||||
+ shift
|
||||
+ done
|
||||
+ fi > b.sed
|
||||
echo "$body" | sed -f b.sed > c
|
||||
rm -f a.sed b.sed
|
||||
output=`diff -u a b | patch $ARGS -f c`
|
||||
status=$?
|
||||
echo "$output" | sed -e '/^$/d' -e '/^patching file c$/d'
|
||||
cat c
|
||||
- test $status == 0 || echo "Status: $status"
|
||||
+ test $status = 0 || echo "Status: $status"
|
||||
}
|
||||
|
||||
x() {
|
||||
|
||||
--- patch-2.7.1/tests/read-only-files
|
||||
+++ patch-2.7.1/tests/read-only-files
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
: > read-only
|
||||
chmod a-w read-only
|
||||
-if : 2> /dev/null > read-only; then
|
||||
+if (: > read-only) 2> /dev/null; then
|
||||
echo "Files with read-only permissions are writable" \
|
||||
"(probably running as superuser)" >&2
|
||||
exit 77
|
@ -14,8 +14,9 @@ stdenv.mkDerivation rec {
|
||||
configureFlags = [ "ac_cv_func_strnlen_working=yes" ];
|
||||
};
|
||||
|
||||
# Tests fail on FreeBSD due to a Bashism in the tests.
|
||||
doCheck = !stdenv.isFreeBSD;
|
||||
patches = [ ./bashishms.patch ];
|
||||
|
||||
doCheck = true;
|
||||
|
||||
meta = {
|
||||
description = "GNU Patch, a program to apply differences to files";
|
||||
|
@ -1,11 +1,11 @@
|
||||
{stdenv, fetchurl}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "gnused-4.2.1";
|
||||
name = "gnused-4.2.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = mirror://gnu/sed/sed-4.2.1.tar.gz;
|
||||
sha256 = "0q1hzjvr6pzhaagidg7pj76k1fzz5nl15np7p72w9zcpw0f58ww7";
|
||||
url = mirror://gnu/sed/sed-4.2.2.tar.bz2;
|
||||
sha256 = "f048d1838da284c8bc9753e4506b85a1e0cc1ea8999d36f6995bcb9460cddbd7";
|
||||
};
|
||||
|
||||
meta = {
|
||||
|
@ -3794,7 +3794,7 @@ let
|
||||
# The GHC bootstrap binaries link against libgmp.so.3, which is in GMP 4.x.
|
||||
gmp4 = callPackage ../development/libraries/gmp/4.3.2.nix { };
|
||||
|
||||
gmp5 = callPackage ../development/libraries/gmp/5.0.5.nix { };
|
||||
gmp5 = callPackage ../development/libraries/gmp/5.1.1.nix { };
|
||||
|
||||
gmp51 = callPackage ../development/libraries/gmp/5.1.1.nix { };
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user