diff options
author | David Tardon <dtardon@redhat.com> | 2016-11-03 17:38:23 +0100 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2016-11-04 16:22:23 +0100 |
commit | 6287b17ce78424ce2cc364761c7605e35f3cc80a (patch) | |
tree | ce9fade3b20d626fa7b20b74c80248596425a260 /external | |
parent | b5c566fd1028cf804522e90d2674acf140f52933 (diff) |
fix build of postgresql with bundled zlib
Change-Id: I8a1a8b8e1437d79d4c262cb8521a1239c250699e
Diffstat (limited to 'external')
-rw-r--r-- | external/postgresql/ExternalProject_postgresql.mk | 4 | ||||
-rw-r--r-- | external/postgresql/UnpackedTarball_postgresql.mk | 6 | ||||
-rw-r--r-- | external/postgresql/internal-zlib.patch.1 | 29 |
3 files changed, 39 insertions, 0 deletions
diff --git a/external/postgresql/ExternalProject_postgresql.mk b/external/postgresql/ExternalProject_postgresql.mk index 42fa12f6dc43..11481117cf7e 100644 --- a/external/postgresql/ExternalProject_postgresql.mk +++ b/external/postgresql/ExternalProject_postgresql.mk @@ -31,6 +31,10 @@ else postgresql_CPPFLAGS := $(ZLIB_CFLAGS) postgresql_LDFLAGS := +ifeq ($(SYSTEM_ZLIB),) +postgresql_LDFLAGS += $(ZLIB_LIBS) +endif + ifeq ($(DISABLE_OPENSSL),) ifeq ($(SYSTEM_OPENSSL),) postgresql_CPPFLAGS += -I$(call gb_UnpackedTarball_get_dir,openssl)/include diff --git a/external/postgresql/UnpackedTarball_postgresql.mk b/external/postgresql/UnpackedTarball_postgresql.mk index 3d0fe6cf6c26..2e41bf66d806 100644 --- a/external/postgresql/UnpackedTarball_postgresql.mk +++ b/external/postgresql/UnpackedTarball_postgresql.mk @@ -19,4 +19,10 @@ $(eval $(call gb_UnpackedTarball_add_patches,postgresql, \ external/postgresql/postgresql-9.2.1-libreoffice.patch \ )) +ifeq ($(SYSTEM_ZLIB),) +$(eval $(call gb_UnpackedTarball_add_patches,postgresql, \ + external/postgresql/internal-zlib.patch.1 \ +)) +endif + # vim: set noet sw=4 ts=4: diff --git a/external/postgresql/internal-zlib.patch.1 b/external/postgresql/internal-zlib.patch.1 new file mode 100644 index 000000000000..ac2b728e1314 --- /dev/null +++ b/external/postgresql/internal-zlib.patch.1 @@ -0,0 +1,29 @@ +diff -up postgresql/configure.dt postgresql/configure +--- postgresql/configure.dt 2016-11-03 17:34:17.282388226 +0100 ++++ postgresql/configure 2016-11-03 17:34:35.004202484 +0100 +@@ -8566,13 +8566,13 @@ fi + + if test "$with_zlib" = yes; then + +-{ $as_echo "$as_me:$LINENO: checking for inflate in -lz" >&5 +-$as_echo_n "checking for inflate in -lz... " >&6; } ++{ $as_echo "$as_me:$LINENO: checking for inflate in -lzlib" >&5 ++$as_echo_n "checking for inflate in -lzlib... " >&6; } + if test "${ac_cv_lib_z_inflate+set}" = set; then + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +-LIBS="-lz $LIBS" ++LIBS="-lzlib $LIBS" + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF +@@ -8636,7 +8636,7 @@ if test "x$ac_cv_lib_z_inflate" = x""yes + #define HAVE_LIBZ 1 + _ACEOF + +- LIBS="-lz $LIBS" ++ LIBS="-lzlib $LIBS" + + else + { { $as_echo "$as_me:$LINENO: error: zlib library not found |