Merge pull request #151823 from Mindavi/apr-util/eval

aprutil: fix evaluation, support cross-compilation
This commit is contained in:
Guillaume Girol 2022-02-16 21:04:01 +00:00 committed by GitHub
commit 8481553b61
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 6 deletions

View file

@ -26,6 +26,7 @@ stdenv.mkDerivation rec {
outputs = [ "out" "dev" ];
outputBin = "dev";
nativeBuildInputs = [ makeWrapper ];
buildInputs = optional stdenv.isFreeBSD autoreconfHook;
configureFlags = [ "--with-apr=${apr.dev}" "--with-expat=${expat.dev}" ]
@ -38,7 +39,15 @@ stdenv.mkDerivation rec {
"--without-freetds" "--without-berkeley-db" "--without-crypto" ]
;
propagatedBuildInputs = [ makeWrapper apr expat libiconv ]
# For some reason, db version 6.9 is selected when cross-compiling.
# It's unclear as to why, it requires someone with more autotools / configure knowledge to go deeper into that.
# Always replacing the link flag with a generic link flag seems to help though, so let's do that for now.
postConfigure = lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
substituteInPlace Makefile \
--replace "-ldb-6.9" "-ldb"
'';
propagatedBuildInputs = [ apr expat libiconv ]
++ optional sslSupport openssl
++ optional bdbSupport db
++ optional ldapSupport openldap

View file

@ -15898,11 +15898,7 @@ with pkgs;
autoreconfHook = buildPackages.autoreconfHook269;
};
aprutil = callPackage ../development/libraries/apr-util {
db = if stdenv.isFreeBSD then db4 else db;
# XXX: only the db_185 interface was available through
# apr with db58 on freebsd (nov 2015), for unknown reasons
};
aprutil = callPackage ../development/libraries/apr-util { };
aravis = callPackage ../development/libraries/aravis {
inherit (gst_all_1) gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad;