summaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2006-05-29 16:31:43 +0000
committerjoerg <joerg@pkgsrc.org>2006-05-29 16:31:43 +0000
commitef635bb61e0e2446a26683d89299d8df8d039790 (patch)
treee2229f04b7cdace42b63aa031ec3d27d35bff17a /lang
parentcc4a2ab6731ba09bbaf7ce6e42fb36cfcdc39ecf (diff)
downloadpkgsrc-ef635bb61e0e2446a26683d89299d8df8d039790.tar.gz
Expects bash. Use portable way to initialise a recursive mutex.
DragonFly is a BSD as well. Bump revision.
Diffstat (limited to 'lang')
-rw-r--r--lang/spl/Makefile6
-rw-r--r--lang/spl/distinfo4
-rw-r--r--lang/spl/patches/patch-aa46
-rw-r--r--lang/spl/patches/patch-ab22
4 files changed, 74 insertions, 4 deletions
diff --git a/lang/spl/Makefile b/lang/spl/Makefile
index fc914a8524a..60ee7b50792 100644
--- a/lang/spl/Makefile
+++ b/lang/spl/Makefile
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.3 2006/05/19 13:44:50 rillig Exp $
+# $NetBSD: Makefile,v 1.4 2006/05/29 16:31:43 joerg Exp $
#
DISTNAME= spl-0.9h
-PKGREVISION= 2
+PKGREVISION= 3
CATEGORIES= lang
MASTER_SITES= http://www.clifford.at/spl/releases/
@@ -11,7 +11,7 @@ HOMEPAGE= http://www.clifford.at/spl
COMMENT= The SPL Programming Language
USE_LANGUAGES= c
-USE_TOOLS+= gmake gawk
+USE_TOOLS+= bash gmake gawk
SUBST_CLASSES+= prefix
SUBST_STAGE.prefix= pre-patch
diff --git a/lang/spl/distinfo b/lang/spl/distinfo
index 7c3a5fbadda..8648ef0d103 100644
--- a/lang/spl/distinfo
+++ b/lang/spl/distinfo
@@ -1,5 +1,7 @@
-$NetBSD: distinfo,v 1.1.1.1 2006/05/19 07:49:09 rillig Exp $
+$NetBSD: distinfo,v 1.2 2006/05/29 16:31:43 joerg Exp $
SHA1 (spl-0.9h.tar.gz) = 030b25a13d52629b75e8fd3d076d9e431c1f7b49
RMD160 (spl-0.9h.tar.gz) = b794f9590e00dd2cd2c161c1edf5ece4007a0a3d
Size (spl-0.9h.tar.gz) = 329352 bytes
+SHA1 (patch-aa) = ed93b5bde73c3b5b1ce69deae82a6f0fd6f4b609
+SHA1 (patch-ab) = 58a75944874ad881aa83a420a78c6b6c0943eee1
diff --git a/lang/spl/patches/patch-aa b/lang/spl/patches/patch-aa
new file mode 100644
index 00000000000..adf7baa6cda
--- /dev/null
+++ b/lang/spl/patches/patch-aa
@@ -0,0 +1,46 @@
+$NetBSD: patch-aa,v 1.1 2006/05/29 16:31:43 joerg Exp $
+
+--- clib.c.orig 2006-05-15 09:49:19.000000000 +0000
++++ clib.c
+@@ -366,13 +366,40 @@ static inline void DO_UNLOCK() {
+
+ # else
+
+-static pthread_mutex_t load_unload_lck = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
++static int load_unload_initialised;
++static pthread_mutex_t load_unload_init_lck = PTHREAD_MUTEX_INITIALIZER;
++static pthread_mutex_t load_unload_lck;
++
++static void DO_LOCK_INIT(void)
++{
++ pthread_mutexattr_t mattr;
++
++ pthread_mutex_lock(&load_unload_init_lck);
++
++ if (load_unload_initialised) {
++ pthread_mutex_unlock(&load_unload_init_lck);
++ return;
++ }
++
++ pthread_mutexattr_init(&mattr);
++ pthread_mutexattr_settype(&mattr, PTHREAD_MUTEX_RECURSIVE);
++ pthread_mutex_init(&load_unload_lck, &mattr);
++ pthread_mutexattr_destroy(&mattr);
++
++ load_unload_initialised = 1;
++
++ pthread_mutex_unlock(&load_unload_init_lck);
++}
+
+ static inline void DO_LOCK() {
++ if (!load_unload_initialised)
++ DO_LOCK_INIT();
+ pthread_mutex_lock(&load_unload_lck);
+ }
+
+ static inline void DO_UNLOCK() {
++ if (!load_unload_initialised)
++ DO_LOCK_INIT();
+ pthread_mutex_unlock(&load_unload_lck);
+ }
+
diff --git a/lang/spl/patches/patch-ab b/lang/spl/patches/patch-ab
new file mode 100644
index 00000000000..16fd1ef7ace
--- /dev/null
+++ b/lang/spl/patches/patch-ab
@@ -0,0 +1,22 @@
+$NetBSD: patch-ab,v 1.1 2006/05/29 16:31:43 joerg Exp $
+
+--- GNUmakefile.orig 2006-05-29 15:40:44.000000000 +0000
++++ GNUmakefile
+@@ -22,7 +22,7 @@
+ BUILDING_FOR_MACOSX := $(shell uname | grep -qvi darwin; echo $$?)
+ BUILDING_FOR_CYGWIN := $(shell uname | grep -qvi cygwin; echo $$?)
+ BUILDING_FOR_MINGW := $(shell uname | grep -qvi mingw; echo $$?)
+-BUILDING_FOR_BSD := $(shell uname | grep -qvi bsd; echo $$?)
++BUILDING_FOR_BSD := $(shell uname | egrep -qvi \(bsd\|dragonfly\); echo $$?)
+ BUILDING_FOR_IRIX := $(shell uname | grep -qvi irix; echo $$?)
+
+
+@@ -159,7 +159,7 @@ else
+ endif
+
+ ifeq ($(ENABLE_REGEX_SUPPORT),1)
+- LDLIBS += $(shell pcre-config --libs)
++ LDLIBS += $(shell pcre-config --libs) -R${PREFIX}/lib
+ DLL_LIBS += $(shell pcre-config --libs)
+ CFLAGS += $(shell pcre-config --cflags) -DENABLE_REGEX_SUPPORT
+ endif