forked from mirrors/nixpkgs
serf: update scons patch, enable kerberos on darwin
NIX_CFLAGS_COMPILE set by the old patch is long not recognized by cc wrappers.
This commit is contained in:
parent
2b1915b9f6
commit
5d960b51c6
|
@ -13,31 +13,32 @@ stdenv.mkDerivation rec {
|
|||
buildInputs = [ apr scons openssl aprutil zlib libiconv ]
|
||||
++ stdenv.lib.optional (!stdenv.isCygwin) kerberos;
|
||||
|
||||
postPatch = ''
|
||||
sed -e '/^env[.]Append(BUILDERS/ienv.Append(ENV={"PATH":os.environ["PATH"]})' \
|
||||
-e '/^env[.]Append(BUILDERS/ienv.Append(ENV={"NIX_CFLAGS_COMPILE":os.environ["NIX_CFLAGS_COMPILE"]})' \
|
||||
-e '/^env[.]Append(BUILDERS/ienv.Append(ENV={"NIX_LDFLAGS":os.environ["NIX_LDFLAGS"]})' \
|
||||
-i SConstruct
|
||||
'';
|
||||
patches = [ ./scons.patch ];
|
||||
|
||||
buildPhase = ''
|
||||
scons PREFIX="$out" OPENSSL="${openssl}" ZLIB="${zlib}" APR="$(echo "${apr.dev}"/bin/*-config)" CFLAGS="-I${zlib.dev}/include" \
|
||||
LINKFLAGS="-L${zlib.out}/lib -L${openldap}/lib -L${libiconv}/lib" \
|
||||
APU="$(echo "${aprutil.dev}"/bin/*-config)" CC=$CC ${
|
||||
if (stdenv.isDarwin || stdenv.isCygwin) then "" else "GSSAPI=\"${kerberos.dev}\""
|
||||
}
|
||||
scons \
|
||||
-j $NIX_BUILD_CORES \
|
||||
APR="$(echo ${apr.dev}/bin/*-config)" \
|
||||
APU="$(echo ${aprutil.dev}/bin/*-config)" \
|
||||
CC=$CC \
|
||||
OPENSSL=${openssl} \
|
||||
PREFIX="$out" \
|
||||
ZLIB=${zlib} \
|
||||
${
|
||||
if stdenv.isCygwin then "" else "GSSAPI=${kerberos.dev}"
|
||||
}
|
||||
'';
|
||||
|
||||
NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.isDarwin "-L/usr/lib";
|
||||
|
||||
installPhase = ''
|
||||
scons install
|
||||
'';
|
||||
|
||||
meta = {
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "HTTP client library based on APR";
|
||||
license = stdenv.lib.licenses.asl20;
|
||||
maintainers = [stdenv.lib.maintainers.raskin];
|
||||
platforms = stdenv.lib.platforms.linux ++ stdenv.lib.platforms.darwin;
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ orivej raskin ];
|
||||
platforms = platforms.linux ++ platforms.darwin;
|
||||
};
|
||||
}
|
||||
|
|
12
pkgs/development/libraries/serf/scons.patch
Normal file
12
pkgs/development/libraries/serf/scons.patch
Normal file
|
@ -0,0 +1,12 @@
|
|||
diff --git a/SConstruct b/SConstruct
|
||||
index 4358a23..0d862e7 100644
|
||||
--- a/SConstruct
|
||||
+++ b/SConstruct
|
||||
@@ -155,6 +155,7 @@ if sys.platform == 'win32':
|
||||
env = Environment(variables=opts,
|
||||
tools=('default', 'textfile',),
|
||||
CPPPATH=['.', ],
|
||||
+ ENV=os.environ,
|
||||
)
|
||||
|
||||
env.Append(BUILDERS = {
|
Loading…
Reference in a new issue