Merge pull request #44083 from dingxiangfei2009/cross-compiling-postgresql

Allow postgresql to cross compile
This commit is contained in:
John Ericson 2018-08-03 14:44:55 -04:00 committed by GitHub
commit ebbd6f3471
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 22 additions and 5 deletions

View File

@ -10,7 +10,11 @@ stdenv.mkDerivation {
sha256= "11a615225baa5f8bb686824423f50e4427acd3f70d394765bdff32801f0fd5b0";
};
configureFlags = stdenv.lib.optional stdenv.isFreeBSD "--with-pic";
configureFlags = [
"ac_cv_va_copy=yes"
] ++ stdenv.lib.optional stdenv.isFreeBSD "--with-pic";
patches = [ ./shtool.patch ];
meta = with stdenv.lib; {
homepage = http://www.ossp.org/pkg/lib/uuid/;

View File

@ -0,0 +1,11 @@
--- a/shtool 2008-07-05 05:43:08.000000000 +0800
+++ b/shtool 2018-07-25 15:45:40.559587471 +0800
@@ -1400,7 +1400,7 @@
if [ ".$opt_t" = .yes ]; then
echo "strip $dsttmp" 1>&2
fi
- strip $dsttmp || shtool_exit $?
+ $STRIP $dsttmp || shtool_exit $?
fi
if [ ".$opt_o" != . ]; then
if [ ".$opt_t" = .yes ]; then

View File

@ -1,4 +1,4 @@
{ lib, stdenv, glibc, fetchurl, zlib, readline, libossp_uuid, openssl, libxml2, makeWrapper }:
{ lib, stdenv, glibc, fetchurl, zlib, readline, libossp_uuid, openssl, libxml2, makeWrapper, tzdata }:
let
@ -22,14 +22,16 @@ let
makeFlags = [ "world" ];
NIX_CFLAGS_COMPILE = [ "-I${libxml2.dev}/include/libxml2" ];
configureFlags = [
"--with-openssl"
"--with-libxml"
"--sysconfdir=/etc"
"--libdir=$(lib)/lib"
]
++ lib.optional (stdenv.isDarwin) "--with-uuid=e2fs"
++ lib.optional (!stdenv.isDarwin) "--with-ossp-uuid";
"--with-system-tzdata=${tzdata}"
(if stdenv.isDarwin then "--with-uuid=e2fs" else "--with-ossp-uuid")
];
patches =
[ (if atLeast "9.4" then ./disable-resolve_symlinks-94.patch else ./disable-resolve_symlinks.patch)