diff options
author | janus <janus@xn--kn-1ia.guru> | 2015-11-26 17:33:58 +0000 |
---|---|---|
committer | janus <janus@xn--kn-1ia.guru> | 2016-01-01 17:01:13 +0000 |
commit | 9897b356612c4bb06a9c9d688da52134dfe8fb95 (patch) | |
tree | d4a41b097c29781ba05d8635d0296f94cc95a9c4 /pkgs | |
parent | f351aaaf85c6b6323660db6ce638f057947a333f (diff) |
FreeBSD: patch expat, kerberos, libedit, ossp-uuid, lz4, sharutils, add libelf-freebsd
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/development/libraries/expat/default.nix | 3 | ||||
-rw-r--r-- | pkgs/development/libraries/kerberos/krb5.nix | 10 | ||||
-rw-r--r-- | pkgs/development/libraries/libedit/default.nix | 2 | ||||
-rw-r--r-- | pkgs/development/libraries/libedit/freebsd-wchar.patch | 13 | ||||
-rw-r--r-- | pkgs/development/libraries/libelf-freebsd/default.nix | 28 | ||||
-rw-r--r-- | pkgs/development/libraries/libossp-uuid/default.nix | 2 | ||||
-rw-r--r-- | pkgs/stdenv/freebsd/default.nix | 4 | ||||
-rw-r--r-- | pkgs/tools/archivers/sharutils/default.nix | 2 | ||||
-rw-r--r-- | pkgs/tools/compression/lz4/default.nix | 2 | ||||
-rw-r--r-- | pkgs/tools/compression/lz4/install-on-freebsd.patch | 54 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 4 | ||||
-rw-r--r-- | pkgs/top-level/perl-packages.nix | 4 |
12 files changed, 117 insertions, 11 deletions
diff --git a/pkgs/development/libraries/expat/default.nix b/pkgs/development/libraries/expat/default.nix index 05cfeaee4232..78e2da3ffdbb 100644 --- a/pkgs/development/libraries/expat/default.nix +++ b/pkgs/development/libraries/expat/default.nix @@ -10,6 +10,9 @@ stdenv.mkDerivation rec { patches = [ ./CVE-2015-1283.patch ]; + configureFlags = stdenv.lib.optionalString stdenv.isFreeBSD "--with-pic"; + # NIX_CFLAGS_COMPILE = stdenv.lib.optionalString (stdenv.isFreeBSD) "-fPIC"; + meta = with stdenv.lib; { homepage = http://www.libexpat.org/; description = "A stream-oriented XML parser library written in C"; diff --git a/pkgs/development/libraries/kerberos/krb5.nix b/pkgs/development/libraries/kerberos/krb5.nix index 2e5e48891b82..b263a4ef06ce 100644 --- a/pkgs/development/libraries/kerberos/krb5.nix +++ b/pkgs/development/libraries/kerberos/krb5.nix @@ -11,13 +11,15 @@ in with stdenv.lib; stdenv.mkDerivation rec { name = "${type}krb5-${version}"; - version = "1.13.2"; + version = "1.14"; src = fetchurl { - url = "${meta.homepage}dist/krb5/1.13/krb5-${version}-signed.tar"; - sha256 = "1qbdzyrws7d0q4filsibh28z54pd5l987jr0ygv43iq9085w6a75"; + url = "${meta.homepage}dist/krb5/1.14/krb5-${version}.tar.gz"; + sha256 = "1sgr61cnkgc5xazijaww6wpn5fnxl9vyj9ixk3r3y7ikv3x0gnyf"; }; + configureFlags = stdenv.lib.optionalString stdenv.isFreeBSD ''WARN_CFLAGS=""''; + nativeBuildInputs = [ pkgconfig perl yacc ] # Provides the mig command used by the build scripts ++ stdenv.lib.optional stdenv.isDarwin bootstrap_cmds; @@ -26,7 +28,7 @@ stdenv.mkDerivation rec { unpackPhase = '' tar -xf $src - tar -xzf krb5-${version}.tar.gz + #tar -xzf krb5-${version}.tar.gz cd krb5-${version}/src ''; diff --git a/pkgs/development/libraries/libedit/default.nix b/pkgs/development/libraries/libedit/default.nix index dc8ecf7e95d8..5234c16e1354 100644 --- a/pkgs/development/libraries/libedit/default.nix +++ b/pkgs/development/libraries/libedit/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { patches = if stdenv.isCygwin then [ ./01-cygwin.patch - ] else null; + ] else [ ] ++ [ ./freebsd-wchar.patch ]; postInstall = '' find $out/lib -type f | grep '\.\(la\|pc\)''$' | xargs sed -i \ diff --git a/pkgs/development/libraries/libedit/freebsd-wchar.patch b/pkgs/development/libraries/libedit/freebsd-wchar.patch new file mode 100644 index 000000000000..6bf7fb0ef69a --- /dev/null +++ b/pkgs/development/libraries/libedit/freebsd-wchar.patch @@ -0,0 +1,13 @@ +diff --git a/src/chartype.h b/src/chartype.h +index 0beee17..4ac86f3 100644 +--- a/src/chartype.h ++++ b/src/chartype.h +@@ -44,7 +44,7 @@ + * supports non-BMP code points without requiring UTF-16, but nothing + * seems to actually advertise this properly, despite Unicode 3.1 having + * been around since 2001... */ +-#if !defined(__NetBSD__) && !defined(__sun) && !(defined(__APPLE__) && defined(__MACH__)) && !defined(__OpenBSD__) ++#if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__sun) && !(defined(__APPLE__) && defined(__MACH__)) && !defined(__OpenBSD__) + #ifndef __STDC_ISO_10646__ + /* In many places it is assumed that the first 127 code points are ASCII + * compatible, so ensure wchar_t indeed does ISO 10646 and not some other diff --git a/pkgs/development/libraries/libelf-freebsd/default.nix b/pkgs/development/libraries/libelf-freebsd/default.nix new file mode 100644 index 000000000000..ee0b6d50408f --- /dev/null +++ b/pkgs/development/libraries/libelf-freebsd/default.nix @@ -0,0 +1,28 @@ +{ fetchsvn, stdenv }: + +stdenv.mkDerivation (rec { + version = "3258"; + name = "libelf-freebsd-${version}"; + + #src = fetchurl { + # url = "http://sourceforge.net/code-snapshots/svn/e/el/elftoolchain/code/elftoolchain-code-${version}-trunk.zip"; + # sha256 = "0vf7s9dwk2xkmhb79aigqm0x0yfbw1j0b9ksm51207qwr179n6jr"; + #}; + src = fetchsvn { + url = svn://svn.code.sf.net/p/elftoolchain/code/trunk ; + rev = 3258; + }; + + doCheck = true; + + meta = { + description = "Essential compilation tools and libraries for building and analyzing ELF based program images"; + + homepage = https://sourceforge.net/p/elftoolchain/wiki/Home/; + + license = stdenv.lib.licenses.bsd2; + + platforms = stdenv.lib.platforms.freebsd; + maintainers = [ ]; + }; +}) diff --git a/pkgs/development/libraries/libossp-uuid/default.nix b/pkgs/development/libraries/libossp-uuid/default.nix index 119f41116668..ddfc2a5132c7 100644 --- a/pkgs/development/libraries/libossp-uuid/default.nix +++ b/pkgs/development/libraries/libossp-uuid/default.nix @@ -10,6 +10,8 @@ stdenv.mkDerivation { sha256= "11a615225baa5f8bb686824423f50e4427acd3f70d394765bdff32801f0fd5b0"; }; + configureFlags = stdenv.lib.optional stdenv.isFreeBSD "--with-pic"; + meta = with stdenv.lib; { homepage = http://www.ossp.org/pkg/lib/uuid/; description = "OSSP uuid ISO-C and C++ shared library"; diff --git a/pkgs/stdenv/freebsd/default.nix b/pkgs/stdenv/freebsd/default.nix index de39e79102f9..fcc3a14d4873 100644 --- a/pkgs/stdenv/freebsd/default.nix +++ b/pkgs/stdenv/freebsd/default.nix @@ -43,7 +43,7 @@ rec { preHook = '' export NIX_IGNORE_LD_THROUGH_GCC=1 - export NIX_DONT_SET_RPATH=1 + # export NIX_DONT_SET_RPATH=1 export NIX_NO_SELF_RPATH=1 dontFixLibtool=1 stripAllFlags=" " # the Darwin "strip" command doesn't know "-s" @@ -118,7 +118,7 @@ rec { cc = import ../../build-support/cc-wrapper { inherit stdenv; nativeTools = true; - nativePrefix = "/usr/local/bin"; + nativePrefix = "/usr/local"; nativeLibc = true; cc = stage2.stdenv.cc; #pkgs.llvmPackages.clang-unwrapped; isClang = true; diff --git a/pkgs/tools/archivers/sharutils/default.nix b/pkgs/tools/archivers/sharutils/default.nix index a7135346d2fc..e806a962eabb 100644 --- a/pkgs/tools/archivers/sharutils/default.nix +++ b/pkgs/tools/archivers/sharutils/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { preConfigure = '' # Fix for building on Glibc 2.16. Won't be needed once the # gnulib in sharutils is updated. - sed -i ${stdenv.lib.optionalString ((stdenv.isFreeBSD || stdenv.isOpenBSD) && stdenv.cc.nativeTools) "''"} '/gets is a security hole/d' lib/stdio.in.h + sed -i ${stdenv.lib.optionalString (stdenv.isOpenBSD && stdenv.cc.nativeTools) "''"} '/gets is a security hole/d' lib/stdio.in.h ''; # GNU Gettext is needed on non-GNU platforms. diff --git a/pkgs/tools/compression/lz4/default.nix b/pkgs/tools/compression/lz4/default.nix index 6c5d28d6bcc2..13236da5ab44 100644 --- a/pkgs/tools/compression/lz4/default.nix +++ b/pkgs/tools/compression/lz4/default.nix @@ -20,6 +20,8 @@ stdenv.mkDerivation rec { doCheck = false; # tests take a very long time checkTarget = "test"; + patches = [ ./install-on-freebsd.patch ] ; + meta = with stdenv.lib; { inherit version; description = "Extremely fast compression algorithm"; diff --git a/pkgs/tools/compression/lz4/install-on-freebsd.patch b/pkgs/tools/compression/lz4/install-on-freebsd.patch new file mode 100644 index 000000000000..12a2bf72f4ed --- /dev/null +++ b/pkgs/tools/compression/lz4/install-on-freebsd.patch @@ -0,0 +1,54 @@ +diff --git a/Makefile b/Makefile +index d1b0d0c..f8d6a2d 100644 +--- a/Makefile ++++ b/Makefile +@@ -80,8 +80,6 @@ clean: + + + #------------------------------------------------------------------------ +-#make install is validated only for Linux, OSX, kFreeBSD and Hurd targets +-ifneq (,$(filter $(shell uname),Linux Darwin GNU/kFreeBSD GNU)) + + install: + @cd $(LZ4DIR); $(MAKE) -e install +@@ -129,4 +127,3 @@ examples: + prg-travis: + @cd $(PRGDIR); $(MAKE) -e test-travis + +-endif +diff --git a/lib/Makefile b/lib/Makefile +index 02ddd3b..26ed18f 100644 +--- a/lib/Makefile ++++ b/lib/Makefile +@@ -80,8 +80,6 @@ clean: + + + #------------------------------------------------------------------------ +-#make install is validated only for Linux, OSX, kFreeBSD and Hurd targets +-ifneq (,$(filter $(shell uname),Linux Darwin GNU/kFreeBSD GNU)) + + liblz4.pc: liblz4.pc.in Makefile + @echo creating pkgconfig +@@ -114,4 +112,3 @@ uninstall: + @[ -f $(DESTDIR)$(INCLUDEDIR)/lz4frame.h ] && rm -f $(DESTDIR)$(INCLUDEDIR)/lz4frame.h + @echo lz4 libraries successfully uninstalled + +-endif +diff --git a/programs/Makefile b/programs/Makefile +index f422902..6943363 100644 +--- a/programs/Makefile ++++ b/programs/Makefile +@@ -113,8 +113,6 @@ clean: + + + #------------------------------------------------------------------------ +-#make install is validated only for Linux, OSX, kFreeBSD and Hurd targets +-ifneq (,$(filter $(shell uname),Linux Darwin GNU/kFreeBSD GNU)) + + install: lz4 lz4c + @echo Installing binaries +@@ -307,4 +305,3 @@ test-mem: lz4 datagen fuzzer frametest fullbench + test-mem32: lz4c32 datagen + # unfortunately, valgrind doesn't seem to work with non-native binary. If someone knows how to do a valgrind-test on a 32-bits exe with a 64-bits system... + +-endif diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 992719704608..fe9d9eccaee0 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7109,7 +7109,9 @@ let libedit = callPackage ../development/libraries/libedit { }; - libelf = callPackage ../development/libraries/libelf { }; + libelf = if stdenv.isFreeBSD + then callPackage ../development/libraries/libelf-freebsd { } + else callPackage ../development/libraries/libelf { }; libetpan = callPackage ../development/libraries/libetpan { }; diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix index 1d9211fae2f1..e03634c72030 100644 --- a/pkgs/top-level/perl-packages.nix +++ b/pkgs/top-level/perl-packages.nix @@ -6338,8 +6338,8 @@ let self = _self // overrides; _self = with self; { LocaleGettext = buildPerlPackage { name = "LocaleGettext-1.05"; - buildInputs = stdenv.lib.optional (stdenv.isDarwin || stdenv.isCygwin) pkgs.gettext; - NIX_CFLAGS_LINK = if (stdenv.isDarwin || stdenv.isCygwin) then "-lintl" else null; + buildInputs = stdenv.lib.optional (stdenv.isFreeBSD || stdenv.isDarwin || stdenv.isCygwin) pkgs.gettext; + NIX_CFLAGS_LINK = if (stdenv.isFreeBSD || stdenv.isDarwin || stdenv.isCygwin) then "-lintl" else null; src = fetchurl { url = mirror://cpan/authors/id/P/PV/PVANDRY/gettext-1.05.tar.gz; sha256 = "15262a00vx714szpx8p2z52wxkz46xp7acl72znwjydyq4ypydi7"; |