Skip to content

Instantly share code, notes, and snippets.

@plntyk
Created May 22, 2015 16:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save plntyk/7259bee75576e67f8d2c to your computer and use it in GitHub Desktop.
Save plntyk/7259bee75576e67f8d2c to your computer and use it in GitHub Desktop.
From 2df0c6f3587d6b151250ccc1351c65a7ac010e77 Mon Sep 17 00:00:00 2001
From: Dirk Neukirchen <dirkneukirchen@web.de>
Date: Fri, 22 May 2015 18:17:47 +0200
Subject: [PATCH] postgresql: update to 9.4.1
- supports arm64/aarch64
Signed-off-by: Dirk Neukirchen <dirkneukirchen@web.de>
---
libs/postgresql/Makefile | 14 ++++----------
libs/postgresql/patches/001-configure_fixes.patch | 11 +++++++++++
libs/postgresql/patches/200-ranlib.patch | 4 ++--
libs/postgresql/patches/800-busybox-default-pager.patch | 2 +-
4 files changed, 18 insertions(+), 13 deletions(-)
create mode 100644 libs/postgresql/patches/001-configure_fixes.patch
diff --git a/libs/postgresql/Makefile b/libs/postgresql/Makefile
index e3b5cee..727f7c7 100644
--- a/libs/postgresql/Makefile
+++ b/libs/postgresql/Makefile
@@ -8,7 +8,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=postgresql
-PKG_VERSION:=9.0.17
+PKG_VERSION:=9.4.1
PKG_RELEASE:=1
PKG_MAINTAINER:=Jo-Philipp Wich <jow@openwrt.org>
PKG_LICENSE:=PostgreSQL
@@ -18,10 +18,11 @@ PKG_SOURCE_URL:=\
http://ftp9.us.postgresql.org/pub/mirrors/postgresql/source/v$(PKG_VERSION) \
http://ftp.be.postgresql.org/postgresql/source/v$(PKG_VERSION) \
ftp://ftp-archives.postgresql.org/pub/source/v$(PKG_VERSION)
-PKG_MD5SUM:=46bf3ef3761c091fb0d2e25012c1709e
+PKG_MD5SUM:=2cf30f50099ff1109d0aa517408f8eff
PKG_BUILD_PARALLEL:=1
PKG_USE_MIPS16:=0
PKG_FIXUP:=autoreconf
+PKG_MACRO_PATHS:=config
include $(INCLUDE_DIR)/package.mk
@@ -85,17 +86,13 @@ define Build/Configure
--enable-static \
--disable-integer-datetimes \
--disable-rpath \
- --without-java \
- --without-krb4 \
--without-krb5 \
--without-openssl \
--without-pam \
--without-perl \
--without-python \
--without-readline \
- --without-rendezvous \
--without-tcl \
- --without-tk \
--with-zlib="yes" \
--enable-depend \
--with-system-timezone=/tmp \
@@ -141,16 +138,12 @@ define Build/Configure
--enable-static \
--disable-integer-datetimes \
--disable-rpath \
- --without-java \
- --without-krb4 \
--without-krb5 \
--without-openssl \
--without-pam \
--without-perl \
--without-python \
- --without-rendezvous \
--without-tcl \
- --without-tk \
--with-zlib="yes" \
--enable-depend \
$(if $(CONFIG_TARGET_avr32),--disable-spinlocks) \
@@ -242,6 +235,7 @@ define Build/InstallDev
$(CP) $(PKG_INSTALL_DIR)/usr/include/pg_config.h $(1)/usr/include/
$(CP) $(PKG_INSTALL_DIR)/usr/include/pg_config_manual.h $(1)/usr/include/
$(CP) $(PKG_INSTALL_DIR)/usr/include/postgres_ext.h $(1)/usr/include/
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/pg_config_ext.h $(1)/usr/include/
$(CP) $(PKG_INSTALL_DIR)/usr/include/postgresql $(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libpq.{a,so*} $(1)/usr/lib/
diff --git a/libs/postgresql/patches/001-configure_fixes.patch b/libs/postgresql/patches/001-configure_fixes.patch
new file mode 100644
index 0000000..2edaba6
--- /dev/null
+++ b/libs/postgresql/patches/001-configure_fixes.patch
@@ -0,0 +1,11 @@
+--- a/configure.in
++++ b/configure.in
+@@ -25,7 +25,7 @@ recommended. You can remove the check f
+ your responsibility whether the result works or not.])])
+ AC_COPYRIGHT([Copyright (c) 1996-2014, PostgreSQL Global Development Group])
+ AC_CONFIG_SRCDIR([src/backend/access/common/heaptuple.c])
+-AC_CONFIG_AUX_DIR(config)
++AC_CONFIG_AUX_DIR([config])
+ AC_PREFIX_DEFAULT(/usr/local/pgsql)
+ AC_SUBST(configure_args, [$ac_configure_args])
+
diff --git a/libs/postgresql/patches/200-ranlib.patch b/libs/postgresql/patches/200-ranlib.patch
index 1b68b83..5fc6d3d 100644
--- a/libs/postgresql/patches/200-ranlib.patch
+++ b/libs/postgresql/patches/200-ranlib.patch
@@ -1,10 +1,10 @@
--- a/src/port/Makefile
+++ b/src/port/Makefile
-@@ -53,6 +53,7 @@ uninstall:
+@@ -52,6 +52,7 @@ uninstall:
libpgport.a: $(OBJS)
$(AR) $(AROPT) $@ $^
+ $(RANLIB) libpgport.a
# thread.o needs PTHREAD_CFLAGS (but thread_srv.o does not)
- thread.o: thread.c
+ thread.o: CFLAGS+=$(PTHREAD_CFLAGS)
diff --git a/libs/postgresql/patches/800-busybox-default-pager.patch b/libs/postgresql/patches/800-busybox-default-pager.patch
index 3cd2532..1be1969 100644
--- a/libs/postgresql/patches/800-busybox-default-pager.patch
+++ b/libs/postgresql/patches/800-busybox-default-pager.patch
@@ -1,6 +1,6 @@
--- a/src/bin/psql/print.h
+++ b/src/bin/psql/print.h
-@@ -171,10 +171,6 @@ extern void printQuery(const PGresult *r
+@@ -179,10 +179,6 @@ extern void printQuery(const PGresult *r
extern void setDecimalLocale(void);
extern const printTextFormat *get_line_style(const printTableOpt *opt);
--
2.4.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment