Patchwork gnupg: added new recipe

login
register
mail settings
Submitter Jacob Kjaergaard
Date March 20, 2013, 9:53 a.m.
Message ID <1363773228-32249-1-git-send-email-jabk@prevas.dk>
Download mbox | patch
Permalink /patch/229295/
State Accepted
Delegated to: Esben Haabendal
Headers show

Comments

Jacob Kjaergaard - March 20, 2013, 9:53 a.m.
From: Jacob Kjaergaard <jacob.kjaergaard@prevas.dk>

---
 recipes/gnupg/gnupg-1.4.10/long-long-thumb.patch |   12 +++++++
 recipes/gnupg/gnupg-1.4.10/mips_gcc4.4.patch     |   42 ++++++++++++++++++++++
 recipes/gnupg/gnupg.inc                          |   38 ++++++++++++++++++++
 recipes/gnupg/gnupg_1.4.10.oe                    |   11 ++++++
 recipes/gnupg/gnupg_1.4.10.oe.sig                |    1 +
 5 files changed, 104 insertions(+)
 create mode 100644 recipes/gnupg/gnupg-1.4.10/long-long-thumb.patch
 create mode 100644 recipes/gnupg/gnupg-1.4.10/mips_gcc4.4.patch
 create mode 100644 recipes/gnupg/gnupg.inc
 create mode 100644 recipes/gnupg/gnupg_1.4.10.oe
 create mode 100644 recipes/gnupg/gnupg_1.4.10.oe.sig

Patch

diff --git a/recipes/gnupg/gnupg-1.4.10/long-long-thumb.patch b/recipes/gnupg/gnupg-1.4.10/long-long-thumb.patch
new file mode 100644
index 0000000..dd4ec73
--- /dev/null
+++ b/recipes/gnupg/gnupg-1.4.10/long-long-thumb.patch
@@ -0,0 +1,12 @@ 
+--- gnupg/mpi/longlong.h~      2006-02-14 10:09:55.000000000 +0000
++++ gnupg/mpi/longlong.h       2008-10-27 13:11:09.000000000 +0000
+@@ -181,7 +181,7 @@
+ /***************************************
+  **************  ARM  ******************
+  ***************************************/
+-#if defined (__arm__) && W_TYPE_SIZE == 32
++#if defined (__arm__) && W_TYPE_SIZE == 32 && !defined(__thumb__)
+ #define add_ssaaaa(sh, sl, ah, al, bh, bl) \
+   __asm__ ("adds %1, %4, %5\n"                                          \
+          "adc  %0, %2, %3"                                            \
+
diff --git a/recipes/gnupg/gnupg-1.4.10/mips_gcc4.4.patch b/recipes/gnupg/gnupg-1.4.10/mips_gcc4.4.patch
new file mode 100644
index 0000000..b101a5b
--- /dev/null
+++ b/recipes/gnupg/gnupg-1.4.10/mips_gcc4.4.patch
@@ -0,0 +1,42 @@ 
+Index: gnupg-1.4.10/mpi/longlong.h
+===================================================================
+--- gnupg-1.4.10.orig/mpi/longlong.h	2008-12-11 17:39:43.000000000 +0100
++++ gnupg-1.4.10/mpi/longlong.h	2010-03-27 14:27:53.000000000 +0100
+@@ -706,18 +706,35 @@
+ #endif /* __m88110__ */
+ #endif /* __m88000__ */
+ 
++/* Test for gcc >= maj.min, as per __GNUC_PREREQ in glibc */
++#if defined (__GNUC__) && defined (__GNUC_MINOR__)
++#define __GNUC_PREREQ(maj, min) \
++	((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
++#else
++#define __GNUC_PREREQ(maj, min)  0
++#endif
++
+ /***************************************
+  **************  MIPS  *****************
+  ***************************************/
+ #if defined (__mips__) && W_TYPE_SIZE == 32
+-#if __GNUC__ > 2 || __GNUC_MINOR__ >= 7
++#if __GNUC_PREREQ (4,4)
++#define umul_ppmm(w1, w0, u, v) \
++  do {                                                                 \
++	UDItype __ll = (UDItype)(u) * (v);                                 \
++	w1 = __ll >> 32;                                                   \
++	w0 = __ll;                                                         \
++  } while (0)
++#endif
++#if !defined (umul_ppmm) && __GNUC_PREREQ (2,7)
+ #define umul_ppmm(w1, w0, u, v) \
+   __asm__ ("multu %2,%3"                                                \
+ 	   : "=l" ((USItype)(w0)),                                      \
+ 	     "=h" ((USItype)(w1))                                       \
+ 	   : "d" ((USItype)(u)),                                        \
+ 	     "d" ((USItype)(v)))
+-#else
++#endif
++#if !defined (umul_ppmm)
+ #define umul_ppmm(w1, w0, u, v) \
+   __asm__ ("multu %2,%3 \n" \
+ 	   "mflo %0 \n"     \
diff --git a/recipes/gnupg/gnupg.inc b/recipes/gnupg/gnupg.inc
new file mode 100644
index 0000000..31cc74d
--- /dev/null
+++ b/recipes/gnupg/gnupg.inc
@@ -0,0 +1,38 @@ 
+DESCRIPTION = "gnupg - GNU privacy guard"
+HOMEPAGE = "http://www.gnupg.org/"
+LICENSE = "GPLv2"
+
+inherit autotools gettext
+
+DEPENDS = "zlib bzip2"
+
+MIRRORS ="""
+ftp://ftp.gnupg.org/gcrypt
+http://mirrors.rootmode.com/ftp.gnupg.org
+"""
+
+SRC_URI = "ftp://ftp.gnupg.org/gcrypt/gnupg/gnupg-${PV}.tar.bz2"
+
+S = "${SRCDIR}/gnupg-${PV}"
+
+EXTRA_OECONF = "--disable-ldap \
+		--with-zlib \
+		--with-bzip2 \
+		--disable-selinux-support"
+
+do_install[postfuncs] =+ "do_install_post"
+
+do_install_post() {
+	install -d ${D}${docdir}/${PN}
+	mv ${D}${datadir}/${PN}/* ${D}/${docdir}/${PN}/ || :
+	mv ${D}${prefix}/doc/* ${D}/${docdir}/${PN}/ || :
+}
+
+# split out gpgv from main package
+RDEPENDS_gnupg = "gpgv"
+PACKAGES =+ "gpgv"
+FILES_gpgv = "${bindir}/gpgv"
+
+# Exclude debug files from the main packages
+FILES_${PN} = "${bindir}/* ${datadir}/${PN} ${libexecdir}/${PN}/*"
+FILES_${PN}-dbg += "${libexecdir}/${PN}/.debug"
diff --git a/recipes/gnupg/gnupg_1.4.10.oe b/recipes/gnupg/gnupg_1.4.10.oe
new file mode 100644
index 0000000..5a36cf0
--- /dev/null
+++ b/recipes/gnupg/gnupg_1.4.10.oe
@@ -0,0 +1,11 @@ 
+require gnupg.inc
+
+DEPENDS += "readline"
+EXTRA_OECONF += "--with-readline ac_cv_sys_symbol_underscore=yes --without-libusb"
+#   --without-readline      do not support fancy command line editing
+
+SRC_URI += "file://long-long-thumb.patch"
+SRC_URI += "file://mips_gcc4.4.patch"
+
+
+
diff --git a/recipes/gnupg/gnupg_1.4.10.oe.sig b/recipes/gnupg/gnupg_1.4.10.oe.sig
new file mode 100644
index 0000000..a5de7d6
--- /dev/null
+++ b/recipes/gnupg/gnupg_1.4.10.oe.sig
@@ -0,0 +1 @@ 
+fd1b6a5f3b2dd836b598a1123ac257b8f105615d  gnupg-1.4.10.tar.bz2