FreeBSD: apr-util, cyrus-sasl, berkeley db, glib, gnutls, kerberos, libelf-freebsd, openldap, serf, guile, tet, shishi, gawk, gnugrep

janus a472d836 9897b356

+141 -33
+2 -1
pkgs/applications/version-management/git-and-tools/git/default.nix
··· 34 34 ++ stdenv.lib.optionals guiSupport [tcl tk]; 35 35 36 36 # required to support pthread_cancel() 37 - NIX_LDFLAGS = stdenv.lib.optionalString (!stdenv.isDarwin) "-lgcc_s"; 37 + NIX_LDFLAGS = stdenv.lib.optionalString (!stdenv.cc.isClang) "-lgcc_s" 38 + + stdenv.lib.optionalString (stdenv.isFreeBSD) "-lthr"; 38 39 39 40 # without this, git fails when trying to check for /etc/gitconfig existence 40 41 propagatedSandboxProfile = stdenv.lib.sandbox.allowDirectoryList "/etc";
+8 -2
pkgs/development/libraries/apr-util/default.nix
··· 3 3 , bdbSupport ? false, db 4 4 , ldapSupport ? !stdenv.isCygwin, openldap 5 5 , libiconv 6 + , cyrus_sasl, autoreconfHook 6 7 }: 7 8 8 9 assert sslSupport -> openssl != null; ··· 18 19 url = "mirror://apache/apr/${name}.tar.bz2"; 19 20 sha256 = "0bn81pfscy9yjvbmyx442svf43s6dhrdfcsnkpxz43fai5qk5kx6"; 20 21 }; 22 + 23 + patches = stdenv.lib.optionals stdenv.isFreeBSD [ ./include-static-dependencies.patch ]; 24 + 25 + buildInputs = stdenv.lib.optionals stdenv.isFreeBSD [ autoreconfHook ]; 21 26 22 27 configureFlags = '' 23 28 --with-apr=${apr} --with-expat=${expat} 24 29 ${optionalString (!stdenv.isCygwin) "--with-crypto"} 25 30 ${stdenv.lib.optionalString sslSupport "--with-openssl=${openssl}"} 26 31 ${stdenv.lib.optionalString bdbSupport "--with-berkeley-db=${db}"} 27 - ${stdenv.lib.optionalString ldapSupport "--with-ldap"}${ 32 + ${stdenv.lib.optionalString ldapSupport "--with-ldap=ldap"}${ 28 33 optionalString stdenv.isCygwin "--without-pgsql --without-sqlite2 --without-sqlite3 --without-freetds --without-berkeley-db --without-crypto"} 29 34 ''; 30 35 31 36 propagatedBuildInputs = [ makeWrapper apr expat libiconv ] 32 37 ++ optional sslSupport openssl 33 38 ++ optional bdbSupport db 34 - ++ optional ldapSupport openldap; 39 + ++ optional ldapSupport openldap 40 + ++ optional stdenv.isFreeBSD cyrus_sasl; 35 41 36 42 # Give apr1 access to sed for runtime invocations 37 43 postInstall = ''
+12
pkgs/development/libraries/apr-util/include-static-dependencies.patch
··· 1 + diff --git a/build/apu-conf.m4 b/build/apu-conf.m4 2 + index 8943f10..aa44305 100644 3 + --- a/build/apu-conf.m4 4 + +++ b/build/apu-conf.m4 5 + @@ -279,6 +279,7 @@ AC_ARG_WITH(ldap,[ --with-ldap=library ldap library to use], 6 + APU_FIND_LDAPLIB("ldap", "-llber -lresolv -lsocket -lnsl") 7 + APU_FIND_LDAPLIB("ldap", "-ldl -lpthread") 8 + else 9 + + APU_FIND_LDAPLIB($LIBLDAP, "-llber -lcrypto -lssl -lsasl2") 10 + APU_FIND_LDAPLIB($LIBLDAP) 11 + APU_FIND_LDAPLIB($LIBLDAP, "-lresolv") 12 + APU_FIND_LDAPLIB($LIBLDAP, "-lresolv -lsocket -lnsl")
+11 -4
pkgs/development/libraries/cyrus-sasl/default.nix
··· 1 - { lib, stdenv, fetchurl, openssl, kerberos, db, gettext, pam, fixDarwinDylibNames }: 1 + { lib, stdenv, fetchurl, openssl, kerberos, db, gettext, pam, fixDarwinDylibNames, autoreconfHook }: 2 2 3 3 with stdenv.lib; 4 4 stdenv.mkDerivation rec { ··· 10 10 }; 11 11 12 12 buildInputs = 13 - [ openssl db gettext kerberos ] 13 + [ openssl db gettext kerberos autoreconfHook ] 14 14 ++ lib.optional stdenv.isLinux pam 15 15 ++ lib.optional stdenv.isDarwin fixDarwinDylibNames; 16 16 17 - patches = [ ./missing-size_t.patch ]; # https://bugzilla.redhat.com/show_bug.cgi?id=906519 18 - patchFlags = "-p0"; 17 + patches = [ 18 + ./missing-size_t.patch # https://bugzilla.redhat.com/show_bug.cgi?id=906519 19 + ( 20 + fetchurl { 21 + url = "http://www.linuxfromscratch.org/patches/blfs/svn/cyrus-sasl-2.1.26-fixes-3.patch"; 22 + sha256 = "1vh4pc2rxxm6yvykx0b7kg09jbcwcxwv5rs6yq2ag3y8p6a9x86w"; 23 + } 24 + ) 25 + ]; 19 26 20 27 configureFlags = [ 21 28 "--with-openssl=${openssl}"
+2 -2
pkgs/development/libraries/cyrus-sasl/missing-size_t.patch
··· 1 1 Gentoo bug #458790 2 - --- include/sasl.h 2012-10-12 17:05:48.000000000 +0300 3 - +++ include/sasl.h 2013-02-23 16:56:44.648786268 +0200 2 + --- a/include/sasl.h 2012-10-12 17:05:48.000000000 +0300 3 + +++ b/include/sasl.h 2013-02-23 16:56:44.648786268 +0200 4 4 @@ -121,6 +121,9 @@ 5 5 #ifndef SASL_H 6 6 #define SASL_H 1
+1
pkgs/development/libraries/db/generic.nix
··· 23 23 (if cxxSupport then "--enable-cxx" else "--disable-cxx") 24 24 (if compat185 then "--enable-compat185" else "--disable-compat185") 25 25 "--enable-dbm" 26 + (stdenv.lib.optionalString stdenv.isFreeBSD "--with-pic") 26 27 ]; 27 28 28 29 preConfigure = ''
+4
pkgs/development/libraries/glib/default.nix
··· 63 63 propagatedBuildInputs = [ pcre zlib libffi libiconv ] 64 64 ++ libintlOrEmpty; 65 65 66 + LIBELF_CFLAGS = optional stdenv.isFreeBSD "-I${libelf}"; 67 + LIBELF_LIBS = optional stdenv.isFreeBSD "-L${libelf} -lelf"; 68 + 66 69 configureFlags = 67 70 optional stdenv.isDarwin "--disable-compile-warnings" 71 + ++ optional stdenv.isFreeBSD "--with-libiconv=gnu" 68 72 ++ optional stdenv.isSunOS ["--disable-modular-tests" "--with-libiconv"]; 69 73 70 74 NIX_CFLAGS_COMPILE = optionalString stdenv.isDarwin " -lintl"
+1 -1
pkgs/development/libraries/gnutls/generic.nix
··· 30 30 enableParallelBuilding = !guileBindings; 31 31 32 32 buildInputs = [ lzo lzip nettle libtasn1 libidn p11_kit zlib gmp autogen ] 33 - ++ lib.optional (stdenv.isDarwin) libiconv 33 + ++ lib.optional (stdenv.isFreeBSD || stdenv.isDarwin) libiconv 34 34 ++ lib.optional (tpmSupport && stdenv.isLinux) trousers 35 35 ++ [ unbound ] 36 36 ++ lib.optional guileBindings guile;
+5 -4
pkgs/development/libraries/kerberos/heimdal.nix
··· 23 23 nativeBuildInputs = [ autoreconfHook pkgconfig python perl yacc flex ] 24 24 ++ (with perlPackages; [ JSON ]) 25 25 ++ optional (!libOnly) texinfo; 26 - buildInputs = [ libcap_ng sqlite openssl db libedit ] 26 + buildInputs = (if (!stdenv.isFreeBSD) then [ libcap_ng db ] else []) ++ [ sqlite openssl libedit ] 27 27 ++ optionals (!libOnly) [ openldap pam ]; 28 28 29 29 ## ugly, X should be made an option ··· 31 31 "--sysconfdir=/etc" 32 32 "--localstatedir=/var" 33 33 "--enable-hdb-openldap-module" 34 - "--with-capng" 35 34 "--with-sqlite3=${sqlite}" 36 - "--with-berkeley-db=${db}" 37 35 "--with-libedit=${libedit}" 38 36 "--with-openssl=${openssl}" 39 37 "--without-x" 40 38 ] ++ optionals (!libOnly) [ 41 39 "--with-openldap=${openldap}" 40 + ] ++ optionals (!stdenv.isFreeBSD) [ 41 + "--with-berkeley-db=${db}" 42 + "--with-capng" 42 43 ]; 43 44 44 45 buildPhase = optionalString libOnly '' ··· 83 84 meta = { 84 85 description = "An implementation of Kerberos 5 (and some more stuff)"; 85 86 license = licenses.bsd3; 86 - platforms = platforms.linux; 87 + platforms = platforms.linux ++ platforms.freebsd; 87 88 maintainers = with maintainers; [ wkennington ]; 88 89 }; 89 90
+17 -9
pkgs/development/libraries/libelf-freebsd/default.nix
··· 1 - { fetchsvn, stdenv }: 1 + { fetchsvn, stdenv, gnum4, tet }: 2 2 3 3 stdenv.mkDerivation (rec { 4 4 version = "3258"; 5 5 name = "libelf-freebsd-${version}"; 6 6 7 - #src = fetchurl { 8 - # url = "http://sourceforge.net/code-snapshots/svn/e/el/elftoolchain/code/elftoolchain-code-${version}-trunk.zip"; 9 - # sha256 = "0vf7s9dwk2xkmhb79aigqm0x0yfbw1j0b9ksm51207qwr179n6jr"; 10 - #}; 11 7 src = fetchsvn { 12 - url = svn://svn.code.sf.net/p/elftoolchain/code/trunk ; 13 - rev = 3258; 8 + url = svn://svn.code.sf.net/p/elftoolchain/code/trunk; 9 + rev = (stdenv.lib.strings.toInt version); 14 10 }; 15 11 16 - doCheck = true; 17 - 12 + buildInputs = [ gnum4 tet ]; 13 + 14 + buildPhase = '' 15 + 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 16 + cp -vr ${tet} test/tet/tet3.8 17 + chmod -R a+w test/tet/tet3.8 18 + make libelf 19 + ''; 20 + 21 + installPhase = '' 22 + cp -vr libelf $out 23 + cp -vr common/. $out/ 24 + ''; 25 + 18 26 meta = { 19 27 description = "Essential compilation tools and libraries for building and analyzing ELF based program images"; 20 28
+12 -2
pkgs/development/libraries/openldap/default.nix
··· 9 9 }; 10 10 11 11 # Should be removed with >=2.4.43 12 - patches = [ ./CVE-2015-6908.patch ]; 12 + patches = [ 13 + ./CVE-2015-6908.patch 14 + ( 15 + fetchurl { 16 + sha256 = "5bcb3f9fb7186b380efa0a1c2d31ad755e190134b5c4dac07c65bbf7c0b6b3b3"; 17 + url = "https://github.com/LMDB/lmdb/commit/3360cbad668f678fb23c064ca4efcc5c9ae95d10.patch"; 18 + name = "openldap-clang-compilation.patch"; 19 + } 20 + ) 21 + ]; 13 22 14 23 outputs = [ "out" "man" ]; 15 24 ··· 19 28 [ "--enable-overlays" 20 29 "--disable-dependency-tracking" # speeds up one-time build 21 30 ] ++ stdenv.lib.optional (openssl == null) "--without-tls" 22 - ++ stdenv.lib.optional (cyrus_sasl == null) "--without-cyrus-sasl"; 31 + ++ stdenv.lib.optional (cyrus_sasl == null) "--without-cyrus-sasl" 32 + ++ stdenv.lib.optional stdenv.isFreeBSD "--with-pic"; 23 33 24 34 dontPatchELF = 1; # !!! 25 35
+1 -1
pkgs/development/libraries/serf/default.nix
··· 21 21 buildPhase = '' 22 22 scons PREFIX="$out" OPENSSL="${openssl}" ZLIB="${zlib}" APR="$(echo "${apr}"/bin/*-config)" \ 23 23 APU="$(echo "${aprutil}"/bin/*-config)" CC="${ 24 - if stdenv.isDarwin then "clang" else "${stdenv.cc}/bin/gcc" 24 + if stdenv.cc.isClang then "clang" else "${stdenv.cc}/bin/gcc" 25 25 }" ${ 26 26 if (stdenv.isDarwin || stdenv.isCygwin) then "" else "GSSAPI=\"${kerberos}\"" 27 27 }
+1 -1
pkgs/development/tools/guile/g-wrap/default.nix
··· 14 14 15 15 propagatedBuildInputs = [ libffi ]; 16 16 17 - doCheck = true; 17 + doCheck = !stdenv.isFreeBSD; # XXX: 00-socket.test hangs 18 18 19 19 meta = { 20 20 description = "G-Wrap, a wrapper generator for Guile";
+29
pkgs/development/tools/misc/tet/default.nix
··· 1 + { fetchurl, stdenv }: 2 + 3 + stdenv.mkDerivation (rec { 4 + version = "3.8"; 5 + name = "tet-${version}"; 6 + 7 + src = fetchurl { 8 + url = http://tetworks.opengroup.org/downloads/38/software/Sources/3.8/tet3.8-src.tar.gz ; 9 + sha256 = "1j57hv56df38w249l595b8rsgmsyvjkbysai03a9724gax5jl9av" ; 10 + }; 11 + 12 + buildInputs = [ ]; 13 + 14 + patchPhase = ''chmod +x configure''; 15 + 16 + configurePhase = ''./configure -t lite''; 17 + 18 + buildPhase = ''cd src; make; cd -''; 19 + 20 + installPhase = ''cd src; make install; cd -; cp -vr $PWD $out''; 21 + 22 + meta = { 23 + 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"; 24 + homepage = http://tetworks.opengroup.org/Products/tet.htm ; 25 + license = stdenv.lib.licenses.artistic1; 26 + platforms = stdenv.lib.platforms.unix; 27 + maintainers = [ ]; 28 + }; 29 + })
+1 -1
pkgs/servers/shishi/default.nix
··· 29 29 }; 30 30 31 31 # Fixes support for gcrypt 1.6+ 32 - patches = [ ./gcrypt-fix.patch ]; 32 + patches = [ ./gcrypt-fix.patch ./freebsd-unistd.patch ]; 33 33 34 34 buildInputs = [ libgcrypt libgpgerror libtasn1 optPam optLibidn optGnutls ]; 35 35
+12
pkgs/servers/shishi/freebsd-unistd.patch
··· 1 + diff --git a/gl/unistd.in.h b/gl/unistd.in.h 2 + index 2ea9af4..ed58960 100644 3 + --- a/gl/unistd.in.h 4 + +++ b/gl/unistd.in.h 5 + @@ -116,6 +116,7 @@ 6 + # include <getopt.h> 7 + #endif 8 + 9 + +#include "config.h" 10 + _GL_INLINE_HEADER_BEGIN 11 + #ifndef _GL_UNISTD_INLINE 12 + # define _GL_UNISTD_INLINE _GL_INLINE
+7 -1
pkgs/stdenv/freebsd/trivial-bootstrap.sh
··· 3 3 echo Building the trivial bootstrap environment... 4 4 5 5 # needed FreeBSD packages: 6 - # findutils gcpio gawk gnugrep coreutils bash gsed gtar gmake xar binutils gpatch lbzip2 6 + # findutils gcpio gawk gnugrep coreutils bash gsed gtar gmake xar binutils gpatch lbzip2 diffutils 7 7 8 8 $mkdir -p $out/bin 9 9 ··· 21 21 ln -s /usr/local/bin/gmake make 22 22 23 23 ln -s /usr/local/bin/lbzip2 24 + 25 + ln -s /usr/local/bin/gdiff diff 26 + 27 + ln -s /usr/bin/locale 28 + 29 + ln -s /usr/bin/more 24 30 25 31 ln -s /usr/bin/bzip2 26 32 ln -s /usr/bin/bunzip2
+1
pkgs/tools/text/gawk/default.nix
··· 13 13 stdenv.isCygwin # XXX: `test-dup2' segfaults on Cygwin 6.1 14 14 || stdenv.isDarwin # XXX: `locale' segfaults 15 15 || stdenv.isSunOS # XXX: `_backsmalls1' fails, locale stuff? 16 + || stdenv.isFreeBSD 16 17 ); 17 18 18 19 buildInputs = stdenv.lib.optional (stdenv.system != "x86_64-cygwin") libsigsegv
+2 -1
pkgs/tools/text/gnugrep/default.nix
··· 15 15 buildInputs = [ pcre libiconv ]; 16 16 17 17 # cygwin: FAIL: multibyte-white-space 18 - doCheck = !stdenv.isDarwin && !stdenv.isSunOS && !stdenv.isCygwin; 18 + # freebsd: FAIL mb-non-UTF8-performance 19 + doCheck = !stdenv.isDarwin && !stdenv.isSunOS && !stdenv.isCygwin && !stdenv.isFreeBSD; 19 20 20 21 # On Mac OS X, force use of mkdir -p, since Grep's fallback 21 22 # (./install-sh) is broken.
+11 -2
pkgs/top-level/all-packages.nix
··· 6099 6099 6100 6100 aprutil = callPackage ../development/libraries/apr-util { 6101 6101 bdbSupport = true; 6102 + db = if stdenv.isFreeBSD then db44 else db; 6103 + # XXX: only the db_158 interface was available through 6104 + # apr with db58 on freebsd (nov 2015), for unknown reasons 6102 6105 }; 6103 6106 6104 6107 assimp = callPackage ../development/libraries/assimp { }; ··· 6277 6280 6278 6281 cwiid = callPackage ../development/libraries/cwiid { }; 6279 6282 6280 - cyrus_sasl = callPackage ../development/libraries/cyrus-sasl { }; 6283 + cyrus_sasl = callPackage ../development/libraries/cyrus-sasl { 6284 + kerberos = if stdenv.isFreeBSD then libheimdal else kerberos; 6285 + }; 6281 6286 6282 6287 # Make bdb5 the default as it is the last release under the custom 6283 6288 # bsd-like license ··· 8526 8531 python = python2; 8527 8532 }; 8528 8533 8534 + tet = callPackage ../development/tools/misc/tet { }; 8535 + 8529 8536 thrift = callPackage ../development/libraries/thrift { }; 8530 8537 8531 8538 tidyp = callPackage ../development/libraries/tidyp { }; ··· 9552 9559 ruby = ruby_2_1; 9553 9560 }; 9554 9561 9555 - shishi = callPackage ../servers/shishi { }; 9562 + shishi = if stdenv.isFreeBSD 9563 + then callPackage ../servers/shishi { pam = null; } 9564 + else callPackage ../servers/shishi { }; 9556 9565 9557 9566 sipcmd = callPackage ../applications/networking/sipcmd { }; 9558 9567
+1 -1
pkgs/top-level/perl-packages.nix
··· 6555 6555 meta = { 6556 6556 description = "The World-Wide Web library for Perl"; 6557 6557 license = with stdenv.lib.licenses; [ artistic1 gpl1Plus ]; 6558 - platforms = stdenv.lib.platforms.linux ++ stdenv.lib.platforms.darwin ++ stdenv.lib.platforms.illumos; 6558 + platforms = stdenv.lib.platforms.linux ++ stdenv.lib.platforms.darwin ++ stdenv.lib.platforms.illumos ++ stdenv.lib.platforms.freebsd; 6559 6559 }; 6560 6560 }; 6561 6561