summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuy Martin <gmsoft@gentoo.org>2004-05-14 14:56:58 +0000
committerGuy Martin <gmsoft@gentoo.org>2004-05-14 14:56:58 +0000
commit908d29f1e0a39fcb3020ea1bb4a91fd9f2c6010f (patch)
tree5ac584f3c6e13b63d7dac15718797ebd364944a2 /dev-db/postgresql
parentBump version. (diff)
downloadgentoo-2-908d29f1e0a39fcb3020ea1bb4a91fd9f2c6010f.tar.gz
gentoo-2-908d29f1e0a39fcb3020ea1bb4a91fd9f2c6010f.tar.bz2
gentoo-2-908d29f1e0a39fcb3020ea1bb4a91fd9f2c6010f.zip
Readded test and set support for hppa.
Diffstat (limited to 'dev-db/postgresql')
-rw-r--r--dev-db/postgresql/ChangeLog6
-rw-r--r--dev-db/postgresql/files/postgresql-7.4.1-hppa-testandset.patch52
-rw-r--r--dev-db/postgresql/postgresql-7.4.2-r2.ebuild8
3 files changed, 63 insertions, 3 deletions
diff --git a/dev-db/postgresql/ChangeLog b/dev-db/postgresql/ChangeLog
index 8679484466df..d3614a29653b 100644
--- a/dev-db/postgresql/ChangeLog
+++ b/dev-db/postgresql/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for dev-db/postgresql
# Copyright 2002-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql/ChangeLog,v 1.96 2004/05/12 00:47:08 randy Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql/ChangeLog,v 1.97 2004/05/14 14:56:58 gmsoft Exp $
+
+ 14 May 2004; Guy Martin <gmsoft@gentoo.org> postgresql-7.4.2-r2.ebuild,
+ files/postgresql-7.4.1-hppa-testandset.patch:
+ Readded test and set support for hppa.
11 May 2004; Michael McCabe <randy@gentoo.org> postgresql-7.4.2-r2.ebuild:
Added s390 keywords
diff --git a/dev-db/postgresql/files/postgresql-7.4.1-hppa-testandset.patch b/dev-db/postgresql/files/postgresql-7.4.1-hppa-testandset.patch
new file mode 100644
index 000000000000..010a42a4088e
--- /dev/null
+++ b/dev-db/postgresql/files/postgresql-7.4.1-hppa-testandset.patch
@@ -0,0 +1,52 @@
+diff -urN postgresql-7.4.1.orig/src/include/port/linux.h postgresql-7.4.1/src/include/port/linux.h
+--- postgresql-7.4.1.orig/src/include/port/linux.h 2003-10-26 01:41:10.000000000 +0000
++++ postgresql-7.4.1/src/include/port/linux.h 2004-01-09 20:22:50.000000000 +0000
+@@ -3,6 +3,11 @@
+
+ #define HAS_TEST_AND_SET
+
++#elif defined(__hppa__)
++typedef struct { int sema[4]; } slock_t;
++
++#define HAS_TEST_AND_SET
++
+ #elif defined(__sparc__)
+ typedef unsigned char slock_t;
+
+diff -urN postgresql-7.4.1.orig/src/include/storage/s_lock.h postgresql-7.4.1/src/include/storage/s_lock.h
+--- postgresql-7.4.1.orig/src/include/storage/s_lock.h 2003-11-04 09:43:56.000000000 +0000
++++ postgresql-7.4.1/src/include/storage/s_lock.h 2004-01-09 20:12:15.000000000 +0000
+@@ -112,6 +112,33 @@
+
+ #endif /* __i386__ || __x86_64__ */
+
++#if defined(__hppa__) || defined(__hppa)
++#define TAS(lock) tas(lock)
++
++#define __ldcw(a) ({ \
++ unsigned int __ret; \
++ __asm__ __volatile__("ldcw 0(%2),%0" \
++ : "=r" (__ret), "=m" (*(a)) : "r" (a)); \
++ __ret; \
++})
++
++#define __PA_LDCW_ALIGNMENT 16
++#define __ldcw_align(a) ({ \
++ volatile unsigned int __ret = (unsigned int) a; \
++ if ((__ret & ~(__PA_LDCW_ALIGNMENT - 1)) < (unsigned int) a) \
++ __ret = (__ret & ~(__PA_LDCW_ALIGNMENT - 1)) + __PA_LDCW_ALIGNMENT; \
++ (unsigned int *) __ret; \
++})
++
++static __inline__ int
++tas(volatile slock_t *lock)
++{
++ volatile unsigned int *a = __ldcw_align (lock);
++ return (__ldcw(a) == 0);
++}
++
++#endif /* __hppa__ || __hppa */
++
+
+ /* Intel Itanium */
+ #if defined(__ia64__) || defined(__ia64)
diff --git a/dev-db/postgresql/postgresql-7.4.2-r2.ebuild b/dev-db/postgresql/postgresql-7.4.2-r2.ebuild
index 796c5effb368..fa5b76e5ee04 100644
--- a/dev-db/postgresql/postgresql-7.4.2-r2.ebuild
+++ b/dev-db/postgresql/postgresql-7.4.2-r2.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql/postgresql-7.4.2-r2.ebuild,v 1.3 2004/05/12 00:47:08 randy Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-db/postgresql/postgresql-7.4.2-r2.ebuild,v 1.4 2004/05/14 14:56:58 gmsoft Exp $
inherit eutils gnuconfig flag-o-matic
@@ -84,7 +84,11 @@ src_unpack() {
epatch ${FILESDIR}/${P}-vacuum-delay.patch
fi
- [ "${ARCH}" = "hppa" ] && epatch ${FILESDIR}/${P}-hppa-testandset.patch
+ if [ "${ARCH}" = "hppa" ]
+ then
+ cd ${S}
+ epatch ${FILESDIR}/${PN}-7.4.1-hppa-testandset.patch
+ fi
}
src_compile() {