diff options
author | janus <janus@xn--kn-1ia.guru> | 2015-11-28 00:46:00 +0000 |
---|---|---|
committer | janus <janus@xn--kn-1ia.guru> | 2016-01-01 17:01:13 +0000 |
commit | a472d836f674fe388018aaee75983e3400a77db4 (patch) | |
tree | 5ee0c10f33ad74f04d5d3785de81fbb04b4e57f2 | |
parent | 9897b356612c4bb06a9c9d688da52134dfe8fb95 (diff) | |
download | nixpkgs-a472d836f674fe388018aaee75983e3400a77db4.tar nixpkgs-a472d836f674fe388018aaee75983e3400a77db4.tar.gz nixpkgs-a472d836f674fe388018aaee75983e3400a77db4.tar.bz2 nixpkgs-a472d836f674fe388018aaee75983e3400a77db4.tar.lz nixpkgs-a472d836f674fe388018aaee75983e3400a77db4.tar.xz nixpkgs-a472d836f674fe388018aaee75983e3400a77db4.tar.zst nixpkgs-a472d836f674fe388018aaee75983e3400a77db4.zip |
FreeBSD: apr-util, cyrus-sasl, berkeley db, glib, gnutls, kerberos, libelf-freebsd, openldap, serf, guile, tet, shishi, gawk, gnugrep
21 files changed, 141 insertions, 33 deletions
diff --git a/pkgs/applications/version-management/git-and-tools/git/default.nix b/pkgs/applications/version-management/git-and-tools/git/default.nix index 84b033f981f..089b605563f 100644 --- a/pkgs/applications/version-management/git-and-tools/git/default.nix +++ b/pkgs/applications/version-management/git-and-tools/git/default.nix @@ -34,7 +34,8 @@ stdenv.mkDerivation { ++ stdenv.lib.optionals guiSupport [tcl tk]; # required to support pthread_cancel() - NIX_LDFLAGS = stdenv.lib.optionalString (!stdenv.isDarwin) "-lgcc_s"; + NIX_LDFLAGS = stdenv.lib.optionalString (!stdenv.cc.isClang) "-lgcc_s" + + stdenv.lib.optionalString (stdenv.isFreeBSD) "-lthr"; # without this, git fails when trying to check for /etc/gitconfig existence propagatedSandboxProfile = stdenv.lib.sandbox.allowDirectoryList "/etc"; diff --git a/pkgs/development/libraries/apr-util/default.nix b/pkgs/development/libraries/apr-util/default.nix index c35520f22fd..e0b2832f6e4 100644 --- a/pkgs/development/libraries/apr-util/default.nix +++ b/pkgs/development/libraries/apr-util/default.nix @@ -3,6 +3,7 @@ , bdbSupport ? false, db , ldapSupport ? !stdenv.isCygwin, openldap , libiconv +, cyrus_sasl, autoreconfHook }: assert sslSupport -> openssl != null; @@ -19,19 +20,24 @@ stdenv.mkDerivation rec { sha256 = "0bn81pfscy9yjvbmyx442svf43s6dhrdfcsnkpxz43fai5qk5kx6"; }; + patches = stdenv.lib.optionals stdenv.isFreeBSD [ ./include-static-dependencies.patch ]; + + buildInputs = stdenv.lib.optionals stdenv.isFreeBSD [ autoreconfHook ]; + configureFlags = '' --with-apr=${apr} --with-expat=${expat} ${optionalString (!stdenv.isCygwin) "--with-crypto"} ${stdenv.lib.optionalString sslSupport "--with-openssl=${openssl}"} ${stdenv.lib.optionalString bdbSupport "--with-berkeley-db=${db}"} - ${stdenv.lib.optionalString ldapSupport "--with-ldap"}${ + ${stdenv.lib.optionalString ldapSupport "--with-ldap=ldap"}${ optionalString stdenv.isCygwin "--without-pgsql --without-sqlite2 --without-sqlite3 --without-freetds --without-berkeley-db --without-crypto"} ''; propagatedBuildInputs = [ makeWrapper apr expat libiconv ] ++ optional sslSupport openssl ++ optional bdbSupport db - ++ optional ldapSupport openldap; + ++ optional ldapSupport openldap + ++ optional stdenv.isFreeBSD cyrus_sasl; # Give apr1 access to sed for runtime invocations postInstall = '' diff --git a/pkgs/development/libraries/apr-util/include-static-dependencies.patch b/pkgs/development/libraries/apr-util/include-static-dependencies.patch new file mode 100644 index 00000000000..1813c721781 --- /dev/null +++ b/pkgs/development/libraries/apr-util/include-static-dependencies.patch @@ -0,0 +1,12 @@ +diff --git a/build/apu-conf.m4 b/build/apu-conf.m4 +index 8943f10..aa44305 100644 +--- a/build/apu-conf.m4 ++++ b/build/apu-conf.m4 +@@ -279,6 +279,7 @@ AC_ARG_WITH(ldap,[ --with-ldap=library ldap library to use], + APU_FIND_LDAPLIB("ldap", "-llber -lresolv -lsocket -lnsl") + APU_FIND_LDAPLIB("ldap", "-ldl -lpthread") + else ++ APU_FIND_LDAPLIB($LIBLDAP, "-llber -lcrypto -lssl -lsasl2") + APU_FIND_LDAPLIB($LIBLDAP) + APU_FIND_LDAPLIB($LIBLDAP, "-lresolv") + APU_FIND_LDAPLIB($LIBLDAP, "-lresolv -lsocket -lnsl") diff --git a/pkgs/development/libraries/cyrus-sasl/default.nix b/pkgs/development/libraries/cyrus-sasl/default.nix index 2be98f3d5e8..71cfc626bac 100644 --- a/pkgs/development/libraries/cyrus-sasl/default.nix +++ b/pkgs/development/libraries/cyrus-sasl/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, openssl, kerberos, db, gettext, pam, fixDarwinDylibNames }: +{ lib, stdenv, fetchurl, openssl, kerberos, db, gettext, pam, fixDarwinDylibNames, autoreconfHook }: with stdenv.lib; stdenv.mkDerivation rec { @@ -10,12 +10,19 @@ stdenv.mkDerivation rec { }; buildInputs = - [ openssl db gettext kerberos ] + [ openssl db gettext kerberos autoreconfHook ] ++ lib.optional stdenv.isLinux pam ++ lib.optional stdenv.isDarwin fixDarwinDylibNames; - patches = [ ./missing-size_t.patch ]; # https://bugzilla.redhat.com/show_bug.cgi?id=906519 - patchFlags = "-p0"; + patches = [ + ./missing-size_t.patch # https://bugzilla.redhat.com/show_bug.cgi?id=906519 + ( + fetchurl { + url = "http://www.linuxfromscratch.org/patches/blfs/svn/cyrus-sasl-2.1.26-fixes-3.patch"; + sha256 = "1vh4pc2rxxm6yvykx0b7kg09jbcwcxwv5rs6yq2ag3y8p6a9x86w"; + } + ) + ]; configureFlags = [ "--with-openssl=${openssl}" diff --git a/pkgs/development/libraries/cyrus-sasl/missing-size_t.patch b/pkgs/development/libraries/cyrus-sasl/missing-size_t.patch index 42f20fb8096..da96818ca26 100644 --- a/pkgs/development/libraries/cyrus-sasl/missing-size_t.patch +++ b/pkgs/development/libraries/cyrus-sasl/missing-size_t.patch @@ -1,6 +1,6 @@ Gentoo bug #458790 ---- include/sasl.h 2012-10-12 17:05:48.000000000 +0300 -+++ include/sasl.h 2013-02-23 16:56:44.648786268 +0200 +--- a/include/sasl.h 2012-10-12 17:05:48.000000000 +0300 ++++ b/include/sasl.h 2013-02-23 16:56:44.648786268 +0200 @@ -121,6 +121,9 @@ #ifndef SASL_H #define SASL_H 1 diff --git a/pkgs/development/libraries/db/generic.nix b/pkgs/development/libraries/db/generic.nix index 077bd4e03a3..f5ee4e440ff 100644 --- a/pkgs/development/libraries/db/generic.nix +++ b/pkgs/development/libraries/db/generic.nix @@ -23,6 +23,7 @@ stdenv.mkDerivation rec { (if cxxSupport then "--enable-cxx" else "--disable-cxx") (if compat185 then "--enable-compat185" else "--disable-compat185") "--enable-dbm" + (stdenv.lib.optionalString stdenv.isFreeBSD "--with-pic") ]; preConfigure = '' diff --git a/pkgs/development/libraries/glib/default.nix b/pkgs/development/libraries/glib/default.nix index 07e1f1243ec..538a40615f1 100644 --- a/pkgs/development/libraries/glib/default.nix +++ b/pkgs/development/libraries/glib/default.nix @@ -63,8 +63,12 @@ stdenv.mkDerivation rec { propagatedBuildInputs = [ pcre zlib libffi libiconv ] ++ libintlOrEmpty; + LIBELF_CFLAGS = optional stdenv.isFreeBSD "-I${libelf}"; + LIBELF_LIBS = optional stdenv.isFreeBSD "-L${libelf} -lelf"; + configureFlags = optional stdenv.isDarwin "--disable-compile-warnings" + ++ optional stdenv.isFreeBSD "--with-libiconv=gnu" ++ optional stdenv.isSunOS ["--disable-modular-tests" "--with-libiconv"]; NIX_CFLAGS_COMPILE = optionalString stdenv.isDarwin " -lintl" diff --git a/pkgs/development/libraries/gnutls/generic.nix b/pkgs/development/libraries/gnutls/generic.nix index f1eb62e0083..ebaef47ca14 100644 --- a/pkgs/development/libraries/gnutls/generic.nix +++ b/pkgs/development/libraries/gnutls/generic.nix @@ -30,7 +30,7 @@ stdenv.mkDerivation { enableParallelBuilding = !guileBindings; buildInputs = [ lzo lzip nettle libtasn1 libidn p11_kit zlib gmp autogen ] - ++ lib.optional (stdenv.isDarwin) libiconv + ++ lib.optional (stdenv.isFreeBSD || stdenv.isDarwin) libiconv ++ lib.optional (tpmSupport && stdenv.isLinux) trousers ++ [ unbound ] ++ lib.optional guileBindings guile; diff --git a/pkgs/development/libraries/kerberos/heimdal.nix b/pkgs/development/libraries/kerberos/heimdal.nix index 0569c0bf5b3..3f8ed7c9de4 100644 --- a/pkgs/development/libraries/kerberos/heimdal.nix +++ b/pkgs/development/libraries/kerberos/heimdal.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoreconfHook pkgconfig python perl yacc flex ] ++ (with perlPackages; [ JSON ]) ++ optional (!libOnly) texinfo; - buildInputs = [ libcap_ng sqlite openssl db libedit ] + buildInputs = (if (!stdenv.isFreeBSD) then [ libcap_ng db ] else []) ++ [ sqlite openssl libedit ] ++ optionals (!libOnly) [ openldap pam ]; ## ugly, X should be made an option @@ -31,14 +31,15 @@ stdenv.mkDerivation rec { "--sysconfdir=/etc" "--localstatedir=/var" "--enable-hdb-openldap-module" - "--with-capng" "--with-sqlite3=${sqlite}" - "--with-berkeley-db=${db}" "--with-libedit=${libedit}" "--with-openssl=${openssl}" "--without-x" ] ++ optionals (!libOnly) [ "--with-openldap=${openldap}" + ] ++ optionals (!stdenv.isFreeBSD) [ + "--with-berkeley-db=${db}" + "--with-capng" ]; buildPhase = optionalString libOnly '' @@ -83,7 +84,7 @@ stdenv.mkDerivation rec { meta = { description = "An implementation of Kerberos 5 (and some more stuff)"; license = licenses.bsd3; - platforms = platforms.linux; + platforms = platforms.linux ++ platforms.freebsd; maintainers = with maintainers; [ wkennington ]; }; diff --git a/pkgs/development/libraries/libelf-freebsd/default.nix b/pkgs/development/libraries/libelf-freebsd/default.nix index ee0b6d50408..3e09d4c6cd4 100644 --- a/pkgs/development/libraries/libelf-freebsd/default.nix +++ b/pkgs/development/libraries/libelf-freebsd/default.nix @@ -1,20 +1,28 @@ -{ fetchsvn, stdenv }: +{ fetchsvn, stdenv, gnum4, tet }: 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; + url = svn://svn.code.sf.net/p/elftoolchain/code/trunk; + rev = (stdenv.lib.strings.toInt version); }; - doCheck = true; - + buildInputs = [ gnum4 tet ]; + + buildPhase = '' + PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:$PATH # use BSD install(1) instead of coreutils and make(1) instead of GNU Make + cp -vr ${tet} test/tet/tet3.8 + chmod -R a+w test/tet/tet3.8 + make libelf + ''; + + installPhase = '' + cp -vr libelf $out + cp -vr common/. $out/ + ''; + meta = { description = "Essential compilation tools and libraries for building and analyzing ELF based program images"; diff --git a/pkgs/development/libraries/openldap/default.nix b/pkgs/development/libraries/openldap/default.nix index 253f74ecc6a..7d836cd5a0d 100644 --- a/pkgs/development/libraries/openldap/default.nix +++ b/pkgs/development/libraries/openldap/default.nix @@ -9,7 +9,16 @@ stdenv.mkDerivation rec { }; # Should be removed with >=2.4.43 - patches = [ ./CVE-2015-6908.patch ]; + patches = [ + ./CVE-2015-6908.patch + ( + fetchurl { + sha256 = "5bcb3f9fb7186b380efa0a1c2d31ad755e190134b5c4dac07c65bbf7c0b6b3b3"; + url = "https://github.com/LMDB/lmdb/commit/3360cbad668f678fb23c064ca4efcc5c9ae95d10.patch"; + name = "openldap-clang-compilation.patch"; + } + ) + ]; outputs = [ "out" "man" ]; @@ -19,7 +28,8 @@ stdenv.mkDerivation rec { [ "--enable-overlays" "--disable-dependency-tracking" # speeds up one-time build ] ++ stdenv.lib.optional (openssl == null) "--without-tls" - ++ stdenv.lib.optional (cyrus_sasl == null) "--without-cyrus-sasl"; + ++ stdenv.lib.optional (cyrus_sasl == null) "--without-cyrus-sasl" + ++ stdenv.lib.optional stdenv.isFreeBSD "--with-pic"; dontPatchELF = 1; # !!! diff --git a/pkgs/development/libraries/serf/default.nix b/pkgs/development/libraries/serf/default.nix index 580460d5fc0..20ce1dabf9a 100644 --- a/pkgs/development/libraries/serf/default.nix +++ b/pkgs/development/libraries/serf/default.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { buildPhase = '' scons PREFIX="$out" OPENSSL="${openssl}" ZLIB="${zlib}" APR="$(echo "${apr}"/bin/*-config)" \ APU="$(echo "${aprutil}"/bin/*-config)" CC="${ - if stdenv.isDarwin then "clang" else "${stdenv.cc}/bin/gcc" + if stdenv.cc.isClang then "clang" else "${stdenv.cc}/bin/gcc" }" ${ if (stdenv.isDarwin || stdenv.isCygwin) then "" else "GSSAPI=\"${kerberos}\"" } diff --git a/pkgs/development/tools/guile/g-wrap/default.nix b/pkgs/development/tools/guile/g-wrap/default.nix index ed492a0b82d..14777b95b85 100644 --- a/pkgs/development/tools/guile/g-wrap/default.nix +++ b/pkgs/development/tools/guile/g-wrap/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { propagatedBuildInputs = [ libffi ]; - doCheck = true; + doCheck = !stdenv.isFreeBSD; # XXX: 00-socket.test hangs meta = { description = "G-Wrap, a wrapper generator for Guile"; diff --git a/pkgs/development/tools/misc/tet/default.nix b/pkgs/development/tools/misc/tet/default.nix new file mode 100644 index 00000000000..77b362c712c --- /dev/null +++ b/pkgs/development/tools/misc/tet/default.nix @@ -0,0 +1,29 @@ +{ fetchurl, stdenv }: + +stdenv.mkDerivation (rec { + version = "3.8"; + name = "tet-${version}"; + + src = fetchurl { + url = http://tetworks.opengroup.org/downloads/38/software/Sources/3.8/tet3.8-src.tar.gz ; + sha256 = "1j57hv56df38w249l595b8rsgmsyvjkbysai03a9724gax5jl9av" ; + }; + + buildInputs = [ ]; + + patchPhase = ''chmod +x configure''; + + configurePhase = ''./configure -t lite''; + + buildPhase = ''cd src; make; cd -''; + + installPhase = ''cd src; make install; cd -; cp -vr $PWD $out''; + + meta = { + description = "The Test Environment Toolkit is used in test applications like The Open Group's UNIX Certification program and the Free Standards Group's LSB Certification program"; + homepage = http://tetworks.opengroup.org/Products/tet.htm ; + license = stdenv.lib.licenses.artistic1; + platforms = stdenv.lib.platforms.unix; + maintainers = [ ]; + }; +}) diff --git a/pkgs/servers/shishi/default.nix b/pkgs/servers/shishi/default.nix index a97e6847a45..e26fd6ca749 100644 --- a/pkgs/servers/shishi/default.nix +++ b/pkgs/servers/shishi/default.nix @@ -29,7 +29,7 @@ stdenv.mkDerivation rec { }; # Fixes support for gcrypt 1.6+ - patches = [ ./gcrypt-fix.patch ]; + patches = [ ./gcrypt-fix.patch ./freebsd-unistd.patch ]; buildInputs = [ libgcrypt libgpgerror libtasn1 optPam optLibidn optGnutls ]; diff --git a/pkgs/servers/shishi/freebsd-unistd.patch b/pkgs/servers/shishi/freebsd-unistd.patch new file mode 100644 index 00000000000..9399e20205b --- /dev/null +++ b/pkgs/servers/shishi/freebsd-unistd.patch @@ -0,0 +1,12 @@ +diff --git a/gl/unistd.in.h b/gl/unistd.in.h +index 2ea9af4..ed58960 100644 +--- a/gl/unistd.in.h ++++ b/gl/unistd.in.h +@@ -116,6 +116,7 @@ + # include <getopt.h> + #endif + ++#include "config.h" + _GL_INLINE_HEADER_BEGIN + #ifndef _GL_UNISTD_INLINE + # define _GL_UNISTD_INLINE _GL_INLINE diff --git a/pkgs/stdenv/freebsd/trivial-bootstrap.sh b/pkgs/stdenv/freebsd/trivial-bootstrap.sh index f0b861d1a18..1d7478e158a 100644 --- a/pkgs/stdenv/freebsd/trivial-bootstrap.sh +++ b/pkgs/stdenv/freebsd/trivial-bootstrap.sh @@ -3,7 +3,7 @@ echo Building the trivial bootstrap environment... # needed FreeBSD packages: -# findutils gcpio gawk gnugrep coreutils bash gsed gtar gmake xar binutils gpatch lbzip2 +# findutils gcpio gawk gnugrep coreutils bash gsed gtar gmake xar binutils gpatch lbzip2 diffutils $mkdir -p $out/bin @@ -22,6 +22,12 @@ ln -s /usr/local/bin/gmake make ln -s /usr/local/bin/lbzip2 +ln -s /usr/local/bin/gdiff diff + +ln -s /usr/bin/locale + +ln -s /usr/bin/more + ln -s /usr/bin/bzip2 ln -s /usr/bin/bunzip2 ln -s /usr/bin/bzcat diff --git a/pkgs/tools/text/gawk/default.nix b/pkgs/tools/text/gawk/default.nix index f865b69cfed..e2856b7acaa 100644 --- a/pkgs/tools/text/gawk/default.nix +++ b/pkgs/tools/text/gawk/default.nix @@ -13,6 +13,7 @@ stdenv.mkDerivation rec { stdenv.isCygwin # XXX: `test-dup2' segfaults on Cygwin 6.1 || stdenv.isDarwin # XXX: `locale' segfaults || stdenv.isSunOS # XXX: `_backsmalls1' fails, locale stuff? + || stdenv.isFreeBSD ); buildInputs = stdenv.lib.optional (stdenv.system != "x86_64-cygwin") libsigsegv diff --git a/pkgs/tools/text/gnugrep/default.nix b/pkgs/tools/text/gnugrep/default.nix index 242ce36780d..cad3ccefe1a 100644 --- a/pkgs/tools/text/gnugrep/default.nix +++ b/pkgs/tools/text/gnugrep/default.nix @@ -15,7 +15,8 @@ stdenv.mkDerivation { buildInputs = [ pcre libiconv ]; # cygwin: FAIL: multibyte-white-space - doCheck = !stdenv.isDarwin && !stdenv.isSunOS && !stdenv.isCygwin; + # freebsd: FAIL mb-non-UTF8-performance + doCheck = !stdenv.isDarwin && !stdenv.isSunOS && !stdenv.isCygwin && !stdenv.isFreeBSD; # On Mac OS X, force use of mkdir -p, since Grep's fallback # (./install-sh) is broken. diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index fe9d9eccaee..e1b48ea8569 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6099,6 +6099,9 @@ let aprutil = callPackage ../development/libraries/apr-util { bdbSupport = true; + db = if stdenv.isFreeBSD then db44 else db; + # XXX: only the db_158 interface was available through + # apr with db58 on freebsd (nov 2015), for unknown reasons }; assimp = callPackage ../development/libraries/assimp { }; @@ -6277,7 +6280,9 @@ let cwiid = callPackage ../development/libraries/cwiid { }; - cyrus_sasl = callPackage ../development/libraries/cyrus-sasl { }; + cyrus_sasl = callPackage ../development/libraries/cyrus-sasl { + kerberos = if stdenv.isFreeBSD then libheimdal else kerberos; + }; # Make bdb5 the default as it is the last release under the custom # bsd-like license @@ -8526,6 +8531,8 @@ let python = python2; }; + tet = callPackage ../development/tools/misc/tet { }; + thrift = callPackage ../development/libraries/thrift { }; tidyp = callPackage ../development/libraries/tidyp { }; @@ -9552,7 +9559,9 @@ let ruby = ruby_2_1; }; - shishi = callPackage ../servers/shishi { }; + shishi = if stdenv.isFreeBSD + then callPackage ../servers/shishi { pam = null; } + else callPackage ../servers/shishi { }; sipcmd = callPackage ../applications/networking/sipcmd { }; diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix index e03634c7203..41dcdcddcbf 100644 --- a/pkgs/top-level/perl-packages.nix +++ b/pkgs/top-level/perl-packages.nix @@ -6555,7 +6555,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 ++ stdenv.lib.platforms.illumos; + platforms = stdenv.lib.platforms.linux ++ stdenv.lib.platforms.darwin ++ stdenv.lib.platforms.illumos ++ stdenv.lib.platforms.freebsd; }; }; |