summaryrefslogtreecommitdiff
path: root/package/postgresql
diff options
context:
space:
mode:
Diffstat (limited to 'package/postgresql')
-rw-r--r--package/postgresql/Makefile69
-rw-r--r--package/postgresql/files/pg_config19
-rw-r--r--package/postgresql/patches/patch-src_include_Makefile14
3 files changed, 49 insertions, 53 deletions
diff --git a/package/postgresql/Makefile b/package/postgresql/Makefile
index 14408bf09..62f5e5c97 100644
--- a/package/postgresql/Makefile
+++ b/package/postgresql/Makefile
@@ -1,68 +1,45 @@
# This file is part of the OpenADK project. OpenADK is copyrighted
# material, please see the LICENCE file in the top-level directory.
-include ${TOPDIR}/rules.mk
+include $(ADK_TOPDIR)/rules.mk
PKG_NAME:= postgresql
-PKG_VERSION:= 8.4.4
+PKG_VERSION:= 9.6.3
PKG_RELEASE:= 1
-PKG_MD5SUM:= ae7f305eb9388b187e8f07dee0cec55c
-PKG_DESCR:= PostgreSQL database library
-PKG_SECTION:= db
-PKG_BUILDDEP:= zlib
+PKG_HASH:= df088372230b1dd21d87bb81686471508f4c42094d4f4f32b5d8e686fea69fa6
+PKG_DESCR:= postgresql database library
+PKG_SECTION:= libs/db
PKG_URL:= http://www.postgresql.org/
-PKG_SITES:= ftp://ftp7.de.postgresql.org/pub/ftp.postgresql.org/source/v${PKG_VERSION}/
+PKG_SITES:= http://ftp.postgresql.org/pub/source/v$(PKG_VERSION)/
+PKG_LIBNAME:= libpq
+PKG_OPTS:= dev
-PKG_SUBPKGS:= LIBPQ LIBPQ_DEV
+DISTFILES:= $(PKG_NAME)-$(PKG_VERSION).tar.gz
-include ${TOPDIR}/mk/package.mk
+include $(ADK_TOPDIR)/mk/package.mk
-$(eval $(call PKG_template,LIBPQ,libpq,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
-$(eval $(call PKG_template,LIBPQ_DEV,libpq-dev,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
+$(eval $(call PKG_template,LIBPQ,libpq,$(PKG_VERSION)-$(PKG_RELEASE),$(PKG_DEPENDS),$(PKG_DESCR),$(PKG_SECTION),$(PKG_OPTS)))
-BUILD_STYLE:= manual
-INSTALL_STYLE:= manual
-PKG_CONFIGURE_ARGS:= --disable-integer-datetimes \
- --without-krb5 \
+TARGET_CFLAGS:= $(filter-out -ffast-math,$(TARGET_CFLAGS))
+
+CONFIGURE_ARGS+= --disable-integer-datetimes \
--without-openssl \
--without-pam \
--without-perl \
--without-python \
--without-readline \
+ --without-zlib \
--without-bonjour \
--without-tcl \
- --with-system-tzdata=${STAGING_TARGET_DIR} \
- --with-zlib="yes"
-CONFIGURE_ARGS+= ${PKG_CONFIGURE_ARGS}
-
-pre-configure:
- (cd ${WRKBUILD}; rm -rf config.{cache,status} ; \
- ./configure \
- --prefix=/usr \
- ${PKG_CONFIGURE_ARGS} \
- );
- ${MAKE} -C "${WRKBUILD}/src/bin/pg_config" \
- CC="${CC_FOR_BUILD}" \
- DESTDIR="${WRKINST}" \
- all install
-
-do-build:
- ${MAKE} -C "${WRKBUILD}/src/include" \
- DESTDIR="${WRKINST}" \
- all install
- ${MAKE} -C "${WRKBUILD}/src/interfaces/libpq" \
- DESTDIR="${WRKINST}" \
- all install
+ --with-system-tzdata=$(STAGING_TARGET_DIR)
libpq-install:
- ${INSTALL_DIR} ${IDIR_LIBPQ}/usr/lib
- ${CP} ${WRKINST}/usr/lib/libpq.so* ${IDIR_LIBPQ}/usr/lib
+ $(INSTALL_DIR) $(IDIR_LIBPQ)/usr/lib
+ $(CP) $(WRKINST)/usr/lib/libpq.so* $(IDIR_LIBPQ)/usr/lib
-libpq-dev-install:
- ${INSTALL_DIR} ${IDIR_LIBPQ_DEV}/usr/include
- ${CP} ${WRKINST}/usr/include/* ${IDIR_LIBPQ_DEV}/usr/include
- ${INSTALL_DIR} ${IDIR_LIBPQ_DEV}/usr/bin
- ${INSTALL_BIN} ${WRKINST}/usr/bin/pg_config \
- ${IDIR_LIBPQ_DEV}/usr/bin
+post-install:
+ PATH='$(HOST_PATH)' sed -e "s#@@STAGING_TARGET_DIR@@#$(STAGING_TARGET_DIR)#" \
+ ./files/pg_config > $(STAGING_HOST_DIR)/usr/bin/pg_config
+ -rm $(STAGING_TARGET_DIR)/usr/bin/pg_config
-include ${TOPDIR}/mk/pkg-bottom.mk
+include $(ADK_TOPDIR)/mk/pkg-bottom.mk
diff --git a/package/postgresql/files/pg_config b/package/postgresql/files/pg_config
new file mode 100644
index 000000000..0d82c24a1
--- /dev/null
+++ b/package/postgresql/files/pg_config
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+#
+# Minimal pg_config implementation as replacement for the native pg_config application
+# Only implements --includedir and --libdir
+#
+
+prefix=@@STAGING_TARGET_DIR@@/usr
+
+case "$1" in
+ --includedir)
+ echo "$prefix/include"
+ ;;
+ --libdir)
+ echo "$prefix/lib"
+ ;;
+ *)
+ echo "Usage: $0 {--includedir|--libdir}"
+esac
diff --git a/package/postgresql/patches/patch-src_include_Makefile b/package/postgresql/patches/patch-src_include_Makefile
index 169bee10e..6d5202392 100644
--- a/package/postgresql/patches/patch-src_include_Makefile
+++ b/package/postgresql/patches/patch-src_include_Makefile
@@ -1,19 +1,19 @@
---- postgresql-8.4.4.orig/src/include/Makefile 2009-07-20 22:48:58.000000000 +0200
-+++ postgresql-8.4.4/src/include/Makefile 2010-05-29 18:30:38.481613604 +0200
-@@ -40,7 +40,6 @@ install: all installdirs
- # These headers are needed for server-side development
+--- postgresql-9.1.1.orig/src/include/Makefile 2011-09-22 23:57:57.000000000 +0200
++++ postgresql-9.1.1/src/include/Makefile 2011-12-04 12:52:09.467806235 +0100
+@@ -41,7 +41,6 @@ install: all installdirs
$(INSTALL_DATA) pg_config.h '$(DESTDIR)$(includedir_server)'
$(INSTALL_DATA) pg_config_os.h '$(DESTDIR)$(includedir_server)'
+ $(INSTALL_DATA) utils/errcodes.h '$(DESTDIR)$(includedir_server)/utils'
- $(INSTALL_DATA) utils/fmgroids.h '$(DESTDIR)$(includedir_server)/utils'
# We don't use INSTALL_DATA for performance reasons --- there are a lot of files
cp $(srcdir)/*.h '$(DESTDIR)$(includedir_server)'/ || exit; \
chmod $(INSTALL_DATA_MODE) '$(DESTDIR)$(includedir_server)'/*.h || exit; \
-@@ -62,7 +61,7 @@ uninstall:
+@@ -63,7 +62,7 @@ uninstall:
clean:
-- rm -f utils/fmgroids.h parser/gram.h utils/probes.h
-+ rm -f parser/gram.h utils/probes.h
+- rm -f utils/fmgroids.h utils/errcodes.h parser/gram.h utils/probes.h catalog/schemapg.h
++ rm -f utils/errcodes.h parser/gram.h utils/probes.h catalog/schemapg.h
distclean maintainer-clean: clean
rm -f pg_config.h dynloader.h pg_config_os.h stamp-h