aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2013-12-19 08:39:12 +0000
committerTimo Teräs <timo.teras@iki.fi>2013-12-19 08:39:12 +0000
commit9b8d4c0e8c96cd3dc63af540d681e9812d34c29e (patch)
tree8974fa37cc6573db1714fdb6d5f5cca63aaf17fe /main
parent8bb99971778669cfeec37c66b5edae66855340c8 (diff)
downloadaports-9b8d4c0e8c96cd3dc63af540d681e9812d34c29e.tar.bz2
aports-9b8d4c0e8c96cd3dc63af540d681e9812d34c29e.tar.xz
main/pgcluster: fix musl build
Diffstat (limited to 'main')
-rw-r--r--main/pgcluster/APKBUILD17
-rw-r--r--main/pgcluster/musl-fixes.patch59
2 files changed, 75 insertions, 1 deletions
diff --git a/main/pgcluster/APKBUILD b/main/pgcluster/APKBUILD
index e68949d676..f6b2db05ff 100644
--- a/main/pgcluster/APKBUILD
+++ b/main/pgcluster/APKBUILD
@@ -2,7 +2,7 @@
pkgname=pgcluster
pkgver=1.9.0_rc5
_myver=1.9.0rc5
-pkgrel=7
+pkgrel=8
pkgdesc="PostgreSQL with multi-master cluster/replication patch"
url="http://pgfoundry.org/projects/pgcluster/"
arch="all"
@@ -11,6 +11,7 @@ depends=
makedepends="readline-dev openssl-dev zlib-dev"
subpackages="$pkgname-dev $pkgname-doc $pkgname-libpq $pkgname-client"
source="http://pgfoundry.org/frs/download.php/1705/$pkgname-$_myver.tar.gz
+ musl-fixes.patch
$pkgname.initd
$pkgname.confd
"
@@ -22,6 +23,11 @@ _builddir="$srcdir/$pkgname-$_myver"
prepare() {
cd "$_builddir"
update_config_sub || return 1
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
}
build() {
@@ -64,5 +70,14 @@ client() {
md5sums="d2fe705e25a01c19c8f8daa1fbcc55d1 pgcluster-1.9.0rc5.tar.gz
+6f891b75d0fe520dfe4bc0ffe8c15323 musl-fixes.patch
7c7a679f3b780b967649ef9caf988cf9 pgcluster.initd
503f94824fc7a385a831d7e55b74f9a0 pgcluster.confd"
+sha256sums="e8974ac01b8f93d8b8b8ce49949b251950ee3d72cd0adfb3efb700d6c3be1365 pgcluster-1.9.0rc5.tar.gz
+2fca1efcb234df9db91423c51db156bffd8a5494b8660b45b6878bc74402af71 musl-fixes.patch
+a7a7f83b3784b8fe3fa6ef633b14aec4129f312a3261564011cf1bfd04a57337 pgcluster.initd
+9717fca2db4a30067f0e78976592467035be419949322c9973bde34eb3024e56 pgcluster.confd"
+sha512sums="825b3da733c2e455bbdfca5833ec6f874d622529cc70fa6a398db458696d8398aa52101633ea703c698df0c86170b2522bb289ac3888b3f76575781f4a4c0d64 pgcluster-1.9.0rc5.tar.gz
+e07a310644f6bad61a199c0d16997d2cd5105a81ad92074839c8296f7357e0abd25a17601485f6baf5b62a07e478fda1ceb36ef79dff2341f5b5ea912bd5b17e musl-fixes.patch
+43768c968236c252b0cbe80eeee606a805f5e79a3e05b4c1b05e0c7d618f30b342fb2d320523ef73e5933b950c6dcb77087d3c742cdf62684386ff338d367a94 pgcluster.initd
+2dfa32a7c5fb39bf0fcc91f49a8fa432a983ad7eeecffe969f030e60da6ad5502aba6160daaae19c30c8596aab0ecf246775a53a18acb841c73c409a5a959bb2 pgcluster.confd"
diff --git a/main/pgcluster/musl-fixes.patch b/main/pgcluster/musl-fixes.patch
new file mode 100644
index 0000000000..4f03458cda
--- /dev/null
+++ b/main/pgcluster/musl-fixes.patch
@@ -0,0 +1,59 @@
+--- pgcluster-1.9.0rc5.orig/src/pgcluster/pgrp/main.c
++++ pgcluster-1.9.0rc5/src/pgcluster/pgrp/main.c
+@@ -166,7 +166,7 @@
+ static void startup_replication_server(void);
+ static int replicate_loop(int fd);
+ static void replicate_main(void);
+-static void quick_exit(SIGNAL_ARGS);
++static void signal_exit(SIGNAL_ARGS);
+ static void daemonize(void);
+ static void write_pid_file(void);
+ static void stop_pgreplicate(void);
+@@ -231,10 +231,10 @@
+
+ close(fd);
+
+- PGRsignal(SIGHUP, quick_exit);
+- PGRsignal(SIGINT, quick_exit);
+- PGRsignal(SIGQUIT, quick_exit);
+- PGRsignal(SIGTERM, quick_exit);
++ PGRsignal(SIGHUP, signal_exit);
++ PGRsignal(SIGINT, signal_exit);
++ PGRsignal(SIGQUIT, signal_exit);
++ PGRsignal(SIGTERM, signal_exit);
+ PGRsignal(SIGALRM, SIG_IGN);
+ PGRsignal(SIGPIPE, SIG_IGN);
+ setpgid(0,pgid);
+@@ -524,7 +524,7 @@
+
+ /*--------------------------------------------------------------------
+ * SYMBOL
+- * quick_exit()
++ * signal_exit()
+ * NOTES
+ * Exit child process
+ * ARGS
+@@ -534,10 +534,10 @@
+ *--------------------------------------------------------------------
+ */
+ static void
+-quick_exit(SIGNAL_ARGS)
++signal_exit(SIGNAL_ARGS)
+ {
+ #ifdef PRINT_DEBUG
+- show_debug("quick_exit:signo = %d", postgres_signal_arg);
++ show_debug("signal_exit:signo = %d", postgres_signal_arg);
+ #endif
+ exit(0);
+ }
+--- pgcluster-1.9.0rc5.orig/src/pgcluster/pgrp/recovery.c
++++ pgcluster-1.9.0rc5/src/pgcluster/pgrp/recovery.c
+@@ -398,7 +398,7 @@
+ #ifdef PRINT_DEBUG
+ show_debug("%s:already recovery job runing",func);
+ #endif
+- memset(packet,0,sizeof(packet));
++ memset(packet,0,sizeof(*packet));
+ PGRset_recovery_packet_no(packet, RECOVERY_ERROR_OCCUPIED) ;
+ status = send_packet(&Target,packet);
+ loop_end = true;