2013-12-31 15:00:21 +01:00
|
|
|
{ stdenv, fetchurl, makeWrapper, apr, expat, gnused
|
2012-07-02 21:38:50 +02:00
|
|
|
, sslSupport ? true, openssl
|
2014-01-31 21:05:37 +01:00
|
|
|
, bdbSupport ? false, db
|
2015-06-05 15:50:14 +02:00
|
|
|
, ldapSupport ? !stdenv.isCygwin, openldap
|
2014-11-27 00:16:50 +01:00
|
|
|
, libiconv
|
FreeBSD: apr-util, cyrus-sasl, berkeley db, glib, gnutls, kerberos, libelf-freebsd, openldap, serf, guile, tet, shishi, gawk, gnugrep
2015-11-28 01:46:00 +01:00
|
|
|
, cyrus_sasl, autoreconfHook
|
2006-09-11 11:17:28 +02:00
|
|
|
}:
|
|
|
|
|
2012-07-02 21:38:50 +02:00
|
|
|
assert sslSupport -> openssl != null;
|
2014-01-31 21:05:37 +01:00
|
|
|
assert bdbSupport -> db != null;
|
2012-07-02 21:38:50 +02:00
|
|
|
assert ldapSupport -> openldap != null;
|
2006-09-11 11:17:28 +02:00
|
|
|
|
2015-06-15 13:16:27 +02:00
|
|
|
with stdenv.lib;
|
2013-12-31 15:00:21 +01:00
|
|
|
|
2009-08-07 17:26:13 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2018-01-25 19:35:46 +01:00
|
|
|
name = "apr-util-1.6.1";
|
2012-07-02 21:38:50 +02:00
|
|
|
|
2006-09-11 11:17:28 +02:00
|
|
|
src = fetchurl {
|
2009-08-07 17:26:13 +02:00
|
|
|
url = "mirror://apache/apr/${name}.tar.bz2";
|
2018-01-25 19:35:46 +01:00
|
|
|
sha256 = "0nq3s1yn13vplgl6qfm09f7n0wm08malff9s59bqf9nid9xjzqfk";
|
2006-09-11 11:17:28 +02:00
|
|
|
};
|
2012-07-02 21:38:50 +02:00
|
|
|
|
2016-01-05 09:42:56 +01:00
|
|
|
patches = optional stdenv.isFreeBSD ./include-static-dependencies.patch;
|
|
|
|
|
2016-08-29 02:30:01 +02:00
|
|
|
outputs = [ "out" "dev" ];
|
2015-10-18 13:29:23 +02:00
|
|
|
outputBin = "dev";
|
|
|
|
|
2016-01-05 09:42:56 +01:00
|
|
|
buildInputs = optional stdenv.isFreeBSD autoreconfHook;
|
2011-04-09 16:24:25 +02:00
|
|
|
|
2016-04-16 18:49:30 +02:00
|
|
|
configureFlags = [ "--with-apr=${apr.dev}" "--with-expat=${expat.dev}" ]
|
2016-01-05 09:42:56 +01:00
|
|
|
++ optional (!stdenv.isCygwin) "--with-crypto"
|
2016-04-16 19:44:32 +02:00
|
|
|
++ optional sslSupport "--with-openssl=${openssl.dev}"
|
2018-05-22 01:51:49 +02:00
|
|
|
++ optional bdbSupport "--with-berkeley-db=${db.dev}"
|
2016-01-05 09:42:56 +01:00
|
|
|
++ optional ldapSupport "--with-ldap=ldap"
|
|
|
|
++ optionals stdenv.isCygwin
|
|
|
|
[ "--without-pgsql" "--without-sqlite2" "--without-sqlite3"
|
|
|
|
"--without-freetds" "--without-berkeley-db" "--without-crypto" ]
|
|
|
|
;
|
2013-06-13 11:32:55 +02:00
|
|
|
|
2014-11-27 00:16:50 +01:00
|
|
|
propagatedBuildInputs = [ makeWrapper apr expat libiconv ]
|
2013-12-31 15:00:21 +01:00
|
|
|
++ optional sslSupport openssl
|
2014-01-31 21:05:37 +01:00
|
|
|
++ optional bdbSupport db
|
FreeBSD: apr-util, cyrus-sasl, berkeley db, glib, gnutls, kerberos, libelf-freebsd, openldap, serf, guile, tet, shishi, gawk, gnugrep
2015-11-28 01:46:00 +01:00
|
|
|
++ optional ldapSupport openldap
|
|
|
|
++ optional stdenv.isFreeBSD cyrus_sasl;
|
2013-12-31 15:00:21 +01:00
|
|
|
|
|
|
|
postInstall = ''
|
2018-05-22 23:50:40 +02:00
|
|
|
for f in $out/lib/*.la $out/lib/apr-util-1/*.la $dev/bin/apu-1-config; do
|
2016-09-22 16:53:09 +02:00
|
|
|
substituteInPlace $f \
|
|
|
|
--replace "${expat.dev}/lib" "${expat.out}/lib" \
|
2018-05-22 01:51:49 +02:00
|
|
|
--replace "${db.dev}/lib" "${db.out}/lib" \
|
2016-09-22 16:53:09 +02:00
|
|
|
--replace "${openssl.dev}/lib" "${openssl.out}/lib"
|
2015-10-18 13:29:23 +02:00
|
|
|
done
|
2016-09-22 16:53:09 +02:00
|
|
|
|
|
|
|
# Give apr1 access to sed for runtime invocations.
|
2015-10-18 13:29:23 +02:00
|
|
|
wrapProgram $dev/bin/apu-1-config --prefix PATH : "${gnused}/bin"
|
2013-12-31 15:00:21 +01:00
|
|
|
'';
|
2012-07-02 21:38:50 +02:00
|
|
|
|
2013-01-14 14:38:00 +01:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2008-02-05 12:41:49 +01:00
|
|
|
passthru = {
|
2012-07-02 21:38:50 +02:00
|
|
|
inherit sslSupport bdbSupport ldapSupport;
|
2008-02-05 12:41:49 +01:00
|
|
|
};
|
|
|
|
|
2018-09-30 11:02:17 +02:00
|
|
|
meta = with stdenv.lib; {
|
2008-02-05 12:41:49 +01:00
|
|
|
homepage = http://apr.apache.org/;
|
|
|
|
description = "A companion library to APR, the Apache Portable Runtime";
|
2018-09-30 11:02:17 +02:00
|
|
|
maintainers = [ maintainers.eelco ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
license = licenses.asl20;
|
2008-02-05 12:41:49 +01:00
|
|
|
};
|
|
|
|
}
|