serf: support cross compilation

serf consumes apr-util's apu-1-config file to obtain linker flags, so we extend the existing Makefile patch there to also apply to apu-1-config
This commit is contained in:
Colin 2023-04-13 07:04:06 +00:00
parent 90588d5e85
commit ed3f60f8f8
2 changed files with 4 additions and 1 deletions

View File

@ -48,6 +48,8 @@ stdenv.mkDerivation rec {
lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
substituteInPlace Makefile \
--replace "-ldb-6.9" "-ldb"
substituteInPlace apu-1-config \
--replace "-ldb-6.9" "-ldb"
'';
propagatedBuildInputs = [ apr expat libiconv libxcrypt ]

View File

@ -11,10 +11,11 @@ index 4358a23..6ce7776 100644
if target in build_targets:
return PathVariable.PathIsDirCreate(key, val, env)
else:
@@ -155,6 +155,7 @@ if sys.platform == 'win32':
@@ -155,6 +155,8 @@ if sys.platform == 'win32':
env = Environment(variables=opts,
tools=('default', 'textfile',),
CPPPATH=['.', ],
+ AR=os.environ['AR'],
+ ENV=os.environ,
)