changeset 587:226e462a8a73

add OpenSSL support to package postgresql
author Volker Grabsch <vog@notjusthosting.com>
date Fri, 11 Dec 2009 14:52:04 +0100
parents 407cf0b9f8fc
children 64f1de293362
files src/postgresql.mk
diffstat 1 files changed, 10 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/postgresql.mk	Tue Dec 08 00:56:35 2009 +0100
+++ b/src/postgresql.mk	Fri Dec 11 14:52:04 2009 +0100
@@ -30,7 +30,7 @@
 $(PKG)_WEBSITE  := http://www.postgresql.org/
 $(PKG)_URL      := http://ftp2.nl.postgresql.org/source/v$($(PKG)_VERSION)/$($(PKG)_FILE)
 $(PKG)_URL_2    := http://ftp10.us.postgresql.org/postgresql/source/v$($(PKG)_VERSION)/$($(PKG)_FILE)
-$(PKG)_DEPS     := gcc zlib readline
+$(PKG)_DEPS     := gcc zlib openssl readline
 
 define $(PKG)_UPDATE
     wget -q -O- 'http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/' | \
@@ -41,8 +41,14 @@
 endef
 
 define $(PKG)_BUILD
+    # The static OpenSSL libraries are in unix (not win32) naming style.
+    $(SED) 's,SSLEAY32,SSL,' -i '$(1)'/configure
+    $(SED) 's,ssleay32,ssl,' -i '$(1)'/configure
+    $(SED) 's,EAY32,CRYPTO,' -i '$(1)'/configure
+    $(SED) 's,eay32,crypto,' -i '$(1)'/configure
+    $(SED) 's,ssleay32,ssl,' -i '$(1)'/src/interfaces/libpq/Makefile
+    $(SED) 's,eay32,crypto,' -i '$(1)'/src/interfaces/libpq/Makefile
     # Since we build only client libary, use bogus tzdata to satisfy configure.
-    # We have to build the shared library, but we won't install it.
     cd '$(1)' && ./configure \
         --prefix='$(PREFIX)/$(TARGET)' \
         --host='$(TARGET)' \
@@ -56,14 +62,14 @@
         --without-pam \
         --without-ldap \
         --without-bonjour \
-        --without-openssl \
+        --with-openssl \
         --with-readline \
         --without-ossp-uuid \
         --without-libxml \
         --without-libxslt \
         --with-zlib \
         --with-system-tzdata=/dev/null \
-        LIBS='-lsecur32'
+        LIBS='-lsecur32 -lws2_32 -lgdi32'
     $(MAKE) -C '$(1)'/src/interfaces/libpq -j '$(JOBS)' install haslibarule= shlib=
     $(MAKE) -C '$(1)'/src/port             -j '$(JOBS)'         haslibarule= shlib=
     $(MAKE) -C '$(1)'/src/bin/psql         -j '$(JOBS)' install haslibarule= shlib=