Merged haikuports/haikuports into master

This commit is contained in:
Jim Saxton
2014-12-04 08:38:56 -08:00
2 changed files with 71 additions and 14 deletions

View File

@@ -22,6 +22,7 @@ COPYRIGHT="
ARCHITECTURES="x86_gcc2 x86 ?x86 ?x86_64"
SECONDARY_ARCHITECTURES="x86"
#TODO: fix gpgme-config hardcoded package paths
PROVIDES="
gpgme${secondaryArchSuffix} = $portVersion compat >= 1.5
cmd:gpgme_tool${secondaryArchSuffix} = $portVersion compat >= 1.5
@@ -76,6 +77,21 @@ INSTALL()
prepareInstalledDevelLibs libgpgme libgpgme-pthread
# The libtool files reference other libraries using the wrong paths, which
# creates a lot of confusion. Fix them so correct paths are used.
local develPackageName="${portName}_devel-$portFullVersion"
local packageLinksDir=$(dirname $portPackageLinksDir)
for l in libgpgme libgpgme-pthread; do
local linksDir="$packageLinksDir/${develPackageName}/devel~libassuan$secondaryArchSuffix/$relativeDevelopLibDir"
sed -i -e "s,\(-L/packages/libassuan[^ ]*\),-L$linksDir," \
-e "s,[^ ]*/libassuan\.la,$linksDir/libassuan.la,g" \
$developLibDir/$l.la
local linksDir="$packageLinksDir/${develPackageName}/devel~libgpg_error$secondaryArchSuffix/$relativeDevelopLibDir"
sed -i -e "s,\(-L/packages/libgpg_error[^ ]*\),-L$linksDir," \
-e "s,[^ ]*/libgpg-error\.la,$linksDir/libgpg-error.la,g" \
$developLibDir/$l.la
done
packageEntries devel \
$developDir $binDir/gpgme-config
}

View File

@@ -1,40 +1,54 @@
From 9d2d28bfa7cbbdfef179c5fb4a29e777c092bf8a Mon Sep 17 00:00:00 2001
From ce6d32b33fa2385e4627239a10c12ac7d18a66c5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= <revol@free.fr>
Date: Sun, 16 Nov 2014 14:50:17 +0100
Subject: [PATCH 1/2] configure.ac: Haiku does have a thread-safe getenv
Subject: [PATCH 1/3] configure.ac: Haiku does have a thread-safe getenv
Also force HAVE_PTHREAD.
---
configure.ac | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
configure.ac | 19 +++++++++++++++----
1 file changed, 15 insertions(+), 4 deletions(-)
diff --git a/configure.ac b/configure.ac
index 0ffe847..890b682 100644
index 0ffe847..0f33189 100644
--- a/configure.ac
+++ b/configure.ac
@@ -186,11 +186,12 @@ case "${host}" in
@@ -141,6 +141,7 @@ GPG_DEFAULT=no
GPGSM_DEFAULT=no
GPGCONF_DEFAULT=no
G13_DEFAULT=no
+PTHREAD_LIBS=""
component_system=None
have_dosish_system=no
have_android_system=no
@@ -186,11 +187,16 @@ case "${host}" in
AC_HELP_STRING([--enable-w32-qt], [build GPGME Qt for W32]),
build_w32_qt=$enableval)
;;
+ *-haiku*)
+ have_thread_safe_getenv=yes
+ # Haiku has it in libroot
+ AC_CHECK_FUNC(pthread_create,have_pthread=yes)
+ ;;
*)
AC_CHECK_LIB(pthread,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
+ save_LIBS="$LIBS"
+ AC_SEARCH_LIBS(pthread_create,pthread,have_pthread=yes)
+ PTHREAD_LIBS="$LIBS"
+ LIBS="$save_LIBS"
# XXX: Probably use exec-prefix here?
# GPG_DEFAULT='/usr/bin/gpg'
@@ -200,6 +201,10 @@ case "${host}" in
@@ -200,6 +206,11 @@ case "${host}" in
;;
esac
+if test "$have_pthread" = yes; then
+ AC_DEFINE(HAVE_PTHREAD, ,[Define if we have pthread.])
+fi
+AC_SUBST(PTHREAD_LIBS)
+
if test "$have_dosish_system" = yes; then
AC_DEFINE(HAVE_DOSISH_SYSTEM,1,
@@ -43,10 +57,10 @@ index 0ffe847..890b682 100644
1.8.3.4
From 3914cec87c354b9726af7612ed23f945bdab5092 Mon Sep 17 00:00:00 2001
From 24a23b475810c5a5fba58f3d6615b2811cf07392 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= <revol@free.fr>
Date: Wed, 19 Nov 2014 21:52:09 +0100
Subject: [PATCH 2/2] Makefile.am: remove hardcoded -lpthread
Subject: [PATCH 2/3] Makefile.am: replace hardcoded -lpthread by an AC_SUBST
---
src/Makefile.am | 2 +-
@@ -54,7 +68,7 @@ Subject: [PATCH 2/2] Makefile.am: remove hardcoded -lpthread
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/Makefile.am b/src/Makefile.am
index b7ddbc1..258aab8 100644
index b7ddbc1..5ac20de 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -185,7 +185,7 @@ libgpgme_pthread_la_LDFLAGS = $(no_undefined) $(export_symbols) \
@@ -62,12 +76,12 @@ index b7ddbc1..258aab8 100644
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@
+ @PTHREAD_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
index 5c1266e..5261da2 100644
--- a/tests/gpg/Makefile.am
+++ b/tests/gpg/Makefile.am
@@ -61,7 +61,7 @@ INCLUDES = -I$(top_builddir)/src
@@ -75,10 +89,37 @@ index 5c1266e..484226f 100644
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@
+t_thread1_LDADD = ../../src/libgpgme-pthread.la @PTHREAD_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
From 82e7a0cfbfea15ffee496882e5fd3cf93325a948 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= <revol@free.fr>
Date: Wed, 26 Nov 2014 02:24:03 +0100
Subject: [PATCH 3/3] gpgme-config.in: replace hardcoded -lpthread by an
AC_SUBST
---
src/gpgme-config.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/gpgme-config.in b/src/gpgme-config.in
index 4be1e08..bf83deb 100644
--- a/src/gpgme-config.in
+++ b/src/gpgme-config.in
@@ -33,7 +33,7 @@ gpg_error_libs="@GPG_ERROR_LIBS@"
thread_modules=""
@HAVE_PTHREAD_TRUE@thread_modules="$thread_modules pthread"
-libs_pthread="-lpthread"
+libs_pthread="@PTHREAD_LIBS@"
cflags_pthread=""
# Configure glib.
--
1.8.3.4