uwimap: Fixed cross-compilation
Shouldn't cause a rebuild of native package. The build system, as with Lua, couldn't find cc, ar and ranlib - I helped it a little.
This commit is contained in:
parent
a473b6efc5
commit
a2b474b9b5
@ -1,6 +1,6 @@
|
|||||||
{stdenv, fetchurl, pam, openssl}:
|
{stdenv, fetchurl, pam, openssl}:
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation ({
|
||||||
name = "uw-imap-2007f";
|
name = "uw-imap-2007f";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
@ -12,7 +12,8 @@ stdenv.mkDerivation {
|
|||||||
then "osx"
|
then "osx"
|
||||||
else "lnp" # Linux with PAM modules;
|
else "lnp" # Linux with PAM modules;
|
||||||
# -fPIC is required to compile php with imap on x86_64 systems
|
# -fPIC is required to compile php with imap on x86_64 systems
|
||||||
+ stdenv.lib.optionalString stdenv.isx86_64 " EXTRACFLAGS=-fPIC";
|
+ stdenv.lib.optionalString stdenv.isx86_64 " EXTRACFLAGS=-fPIC"
|
||||||
|
+ stdenv.lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) " CC=${stdenv.hostPlatform.config}-gcc RANLIB=${stdenv.hostPlatform.config}-ranlib";
|
||||||
|
|
||||||
hardeningDisable = [ "format" ];
|
hardeningDisable = [ "format" ];
|
||||||
|
|
||||||
@ -46,4 +47,11 @@ stdenv.mkDerivation {
|
|||||||
passthru = {
|
passthru = {
|
||||||
withSSL = true;
|
withSSL = true;
|
||||||
};
|
};
|
||||||
}
|
} // stdenv.lib.optionalAttrs (stdenv.buildPlatform != stdenv.hostPlatform) {
|
||||||
|
# This is set here to prevent rebuilds on native compilation.
|
||||||
|
# Configure phase is a no-op there, because this package doesn't use ./configure scripts.
|
||||||
|
configurePhase = ''
|
||||||
|
echo "Cross-compilation, injecting make flags"
|
||||||
|
makeFlagsArray+=("ARRC=${stdenv.hostPlatform.config}-ar rc")
|
||||||
|
'';
|
||||||
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user