From 2e7a65099e0714b7cfd0a2f2f03f65073e8d6736 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= Date: Tue, 25 Nov 2014 02:55:17 +0100 Subject: [PATCH] Add recipe and patch for gpgme --- app-crypt/gpgme/gpgme-1.5.2.recipe | 88 ++++++++++++++++++++ app-crypt/gpgme/patches/gpgme-1.5.2.patchset | 84 +++++++++++++++++++ 2 files changed, 172 insertions(+) create mode 100644 app-crypt/gpgme/gpgme-1.5.2.recipe create mode 100644 app-crypt/gpgme/patches/gpgme-1.5.2.patchset diff --git a/app-crypt/gpgme/gpgme-1.5.2.recipe b/app-crypt/gpgme/gpgme-1.5.2.recipe new file mode 100644 index 000000000..0a32097c1 --- /dev/null +++ b/app-crypt/gpgme/gpgme-1.5.2.recipe @@ -0,0 +1,88 @@ +SUMMARY="GnuPG Made Easy is a library for making GnuPG easier to use" +DESCRIPTION=" +GnuPG Made Easy is the standard library for applications \ +to access most GnuPG functions. +" +HOMEPAGE="https://www.gnupg.org/related_software/swlist.html#gpgme" +SRC_URI="ftp://ftp.gnupg.org/gcrypt/gpgme/gpgme-1.5.2.tar.bz2" +CHECKSUM_SHA256="1e98b0a0a16f0265e8ebe72ef11acd2272322f682188d3e5098770e7f204f1d4" +REVISION="1" +LICENSE="GNU GPL v3" +COPYRIGHT="1998-2010 Free Software Foundation, Inc." + +ARCHITECTURES="x86_gcc2 x86 ?x86 ?x86_64" +SECONDARY_ARCHITECTURES="x86" + +PROVIDES=" + cmd:gpgme_tool${secondaryArchSuffix} = $portVersion compat >= 1.5 + lib:libgpgme_pthread${secondaryArchSuffix} = 11.13.1 compat >= 11 + lib:libgpgme${secondaryArchSuffix} = 11.13.1 compat >= 11 + " +REQUIRES=" + haiku${secondaryArchSuffix} >= $haikuVersion + lib:libgpg_error${secondaryArchSuffix} + cmd:gpg + lib:libglib_2.0$secondaryArchSuffix + lib:libassuan${secondaryArchSuffix} + " +BUILD_REQUIRES=" + devel:libgpg_error${secondaryArchSuffix} + devel:libglib_2.0$secondaryArchSuffix + devel:libassuan${secondaryArchSuffix} + " +BUILD_PREREQUIRES=" + haiku${secondaryArchSuffix}_devel >= $haikuVersion + cmd:autoconf + cmd:automake + cmd:bison + cmd:gcc${secondaryArchSuffix} + cmd:git + cmd:gpg + cmd:gpg_error$secondaryArchSuffix + cmd:ld${secondaryArchSuffix} + cmd:libtoolize + cmd:make + cmd:makeinfo + cmd:msgfmt + cmd:perl + cmd:tar + " +PATCHES="gpgme-1.5.2.patchset" + +BUILD() +{ + #libtoolize --force --copy --install + aclocal + automake --add-missing + ./autogen.sh + #autoconf + runConfigure ./configure + make $jobArgs +} + +INSTALL() +{ + make install + + prepareInstalledDevelLibs libgpgme libgpgme-pthread + + packageEntries devel \ + $developDir $binDir/gpgme-config +} + +TEST() +{ + make check +} + +# ----- devel package ------------------------------------------------------- + +PROVIDES_devel=" + gpgme${secondaryArchSuffix}_devel = $portVersion compat >= 1.5 + cmd:gpgme_config${secondaryArchSuffix} = $portVersion compat >= 1.5 + devel:libgpgme_pthread${secondaryArchSuffix} = 11.13.1 compat >= 11 + devel:libgpgme${secondaryArchSuffix} = 11.13.1 compat >= 11 + " +REQUIRES_devel=" + gpgme${secondaryArchSuffix} == $portVersion base + " diff --git a/app-crypt/gpgme/patches/gpgme-1.5.2.patchset b/app-crypt/gpgme/patches/gpgme-1.5.2.patchset new file mode 100644 index 000000000..1e89a4a49 --- /dev/null +++ b/app-crypt/gpgme/patches/gpgme-1.5.2.patchset @@ -0,0 +1,84 @@ +From 9d2d28bfa7cbbdfef179c5fb4a29e777c092bf8a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= +Date: Sun, 16 Nov 2014 14:50:17 +0100 +Subject: [PATCH 1/2] configure.ac: Haiku does have a thread-safe getenv + +Also force HAVE_PTHREAD. +--- + configure.ac | 11 ++++++++--- + 1 file changed, 8 insertions(+), 3 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 0ffe847..890b682 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -186,11 +186,12 @@ case "${host}" in + AC_HELP_STRING([--enable-w32-qt], [build GPGME Qt for W32]), + build_w32_qt=$enableval) + ;; ++ *-haiku*) ++ have_thread_safe_getenv=yes ++ AC_CHECK_FUNC(pthread_create,have_pthread=yes) ++ ;; + *) + AC_CHECK_LIB(pthread,pthread_create,have_pthread=yes) +- if test "$have_pthread" = yes; then +- AC_DEFINE(HAVE_PTHREAD, ,[Define if we have pthread.]) +- fi + + # XXX: Probably use exec-prefix here? + # GPG_DEFAULT='/usr/bin/gpg' +@@ -200,6 +201,10 @@ case "${host}" in + ;; + esac + ++if test "$have_pthread" = yes; then ++ AC_DEFINE(HAVE_PTHREAD, ,[Define if we have pthread.]) ++fi ++ + if test "$have_dosish_system" = yes; then + AC_DEFINE(HAVE_DOSISH_SYSTEM,1, + [Defined if we run on some of the PCDOS like systems +-- +1.8.3.4 + + +From 3914cec87c354b9726af7612ed23f945bdab5092 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= +Date: Wed, 19 Nov 2014 21:52:09 +0100 +Subject: [PATCH 2/2] Makefile.am: remove hardcoded -lpthread + +--- + src/Makefile.am | 2 +- + tests/gpg/Makefile.am | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/Makefile.am b/src/Makefile.am +index b7ddbc1..258aab8 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -185,7 +185,7 @@ libgpgme_pthread_la_LDFLAGS = $(no_undefined) $(export_symbols) \ + @LIBGPGME_LT_CURRENT@:@LIBGPGME_LT_REVISION@:@LIBGPGME_LT_AGE@ + libgpgme_pthread_la_DEPENDENCIES = @LTLIBOBJS@ $(srcdir)/libgpgme.vers + libgpgme_pthread_la_LIBADD = $(gpgme_res) @LIBASSUAN_LIBS@ @LTLIBOBJS@ \ +- -lpthread @GPG_ERROR_LIBS@ ++ @LIBS@ @GPG_ERROR_LIBS@ + + if BUILD_W32_GLIB + libgpgme_glib_la_LDFLAGS = $(no_undefined) \ +diff --git a/tests/gpg/Makefile.am b/tests/gpg/Makefile.am +index 5c1266e..484226f 100644 +--- a/tests/gpg/Makefile.am ++++ b/tests/gpg/Makefile.am +@@ -61,7 +61,7 @@ INCLUDES = -I$(top_builddir)/src + + AM_CPPFLAGS = @GPG_ERROR_CFLAGS@ + LDADD = ../../src/libgpgme.la +-t_thread1_LDADD = ../../src/libgpgme-pthread.la -lpthread ++t_thread1_LDADD = ../../src/libgpgme-pthread.la @LIBS@ + + # We don't run t-genkey in the test suite, because it takes too long + noinst_PROGRAMS = $(c_tests) t-genkey +-- +1.8.3.4 +