summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Reynolds <fauno@kiwwwi.com.ar>2011-07-05 10:38:59 -0300
committerNicolas Reynolds <fauno@kiwwwi.com.ar>2011-07-05 10:38:59 -0300
commit11a1b08acdd527368c28d3a7308cb65496aaa2a4 (patch)
treeff08165e6913982ca436ddd6399a840473acb308
parenta6ece47f4db2e86f129125c749f413e36e19b411 (diff)
Retrieved patch from older mips64el branch
-rw-r--r--extra/gnupg/PKGBUILD7
-rw-r--r--extra/gnupg/gnupg_1.4.11_mips_gcc4.4.patch47
2 files changed, 52 insertions, 2 deletions
diff --git a/extra/gnupg/PKGBUILD b/extra/gnupg/PKGBUILD
index 85a7bfa18..43bb5d030 100644
--- a/extra/gnupg/PKGBUILD
+++ b/extra/gnupg/PKGBUILD
@@ -8,13 +8,16 @@ pkgdesc="GNU Privacy Guard - a PGP replacement tool"
arch=('i686' 'x86_64' 'mips64el')
license=('GPL3')
depends=('zlib' 'bzip2' 'libldap>=2.4.18' 'libusb-compat' 'curl>=7.16.2' 'readline>=6.0.00')
-source=(ftp://ftp.franken.de/pub/crypt/mirror/ftp.gnupg.org/gcrypt/gnupg/$pkgname-$pkgver.tar.bz2)
+source=(ftp://ftp.franken.de/pub/crypt/mirror/ftp.gnupg.org/gcrypt/gnupg/$pkgname-$pkgver.tar.bz2
+ gnupg_1.4.11_mips_gcc4.4.patch)
install=gnupg.install
url="http://www.gnupg.org/"
-md5sums=('411744e1ef8ce90b87938c4203f001f1')
+md5sums=('411744e1ef8ce90b87938c4203f001f1'
+ '2d919d48c847e9856dabdbb66328f09a')
build() {
cd ${srcdir}/${pkgname}-${pkgver}
+ patch -Np1 -i ${srcdir}/gnupg_1.4.11_mips_gcc4.4.patch
./configure --prefix=/usr \
--libexecdir=/usr/lib \
--enable-noexecstack
diff --git a/extra/gnupg/gnupg_1.4.11_mips_gcc4.4.patch b/extra/gnupg/gnupg_1.4.11_mips_gcc4.4.patch
new file mode 100644
index 000000000..5fcbdc628
--- /dev/null
+++ b/extra/gnupg/gnupg_1.4.11_mips_gcc4.4.patch
@@ -0,0 +1,47 @@
+## mips_gcc4.4 by Werner Koch
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Build fails on mips(el) due to changes the removal
+## DP: of the 'h' constraint for MIPS in gcc-4.4.x versions.
+## DP: <URL:http://lists.gnupg.org/pipermail/gnupg-devel/2010-October/025805.html>
+
+diff -Nur gnupg-1.4.11.orig/mpi/longlong.h gnupg-1.4.11/mpi/longlong.h
+--- gnupg-1.4.11.orig/mpi/longlong.h 2010-06-01 13:01:46.000000000 +0200
++++ gnupg-1.4.11/mpi/longlong.h 2010-10-28 22:01:19.000000000 +0200
+@@ -710,12 +710,13 @@
+ ************** MIPS *****************
+ ***************************************/
+ #if defined (__mips__) && W_TYPE_SIZE == 32
+-#if __GNUC__ > 4 || ( __GNUC__ == 4 && __GNUC_MINOR >= 4 )
+-#define umul_ppmm(w1, w0, u, v) \
++#if (__GNUC__ >= 5) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)
++#define umul_ppmm(w1, w0, u, v) \
+ do { \
+- UDItype __ll = (UDItype)(u) * (v); \
+- w1 = __ll >> 32; \
+- w0 = __ll; \
++ UDItype _r; \
++ _r = (UDItype) u * v; \
++ (w1) = _r >> 32; \
++ (w0) = (USItype) _r; \
+ } while (0)
+ #elif __GNUC__ > 2 || __GNUC_MINOR__ >= 7
+ #define umul_ppmm(w1, w0, u, v) \
+@@ -742,7 +743,16 @@
+ ************** MIPS/64 **************
+ ***************************************/
+ #if (defined (__mips) && __mips >= 3) && W_TYPE_SIZE == 64
+-#if __GNUC__ > 2 || __GNUC_MINOR__ >= 7
++# if (__GNUC__ >= 5) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)
++ typedef unsigned int UTItype __attribute__ ((mode (TI)));
++ # define umul_ppmm(w1, w0, u, v) \
++ do { \
++ UTItype _r; \
++ _r = (UTItype) u * v; \
++ (w1) = _r >> 64; \
++ (w0) = (UDItype) _r; \
++ } while (0)
++# elif if __GNUC__ > 2 || __GNUC_MINOR__ >= 7
+ #define umul_ppmm(w1, w0, u, v) \
+ __asm__ ("dmultu %2,%3" \
+ : "=l" ((UDItype)(w0)), \