summaryrefslogtreecommitdiff
path: root/cad
diff options
context:
space:
mode:
authordholland <dholland@pkgsrc.org>2009-08-01 16:22:25 +0000
committerdholland <dholland@pkgsrc.org>2009-08-01 16:22:25 +0000
commit81c2b6bf5e58c19d92ca6a9bd777880ad5dc189a (patch)
tree0b3698dad78729f81b3f4984c1b3fd4b76ffef35 /cad
parentd982a33088c44be1b8c2f3bbe8ef406eb280c5cb (diff)
downloadpkgsrc-81c2b6bf5e58c19d92ca6a9bd777880ad5dc189a.tar.gz
Hack around silly behavior that unlocks every freshly created pthread
mutex. Fixes PR 35261.
Diffstat (limited to 'cad')
-rw-r--r--cad/electric/Makefile4
-rw-r--r--cad/electric/distinfo6
-rw-r--r--cad/electric/patches/patch-ac38
-rw-r--r--cad/electric/patches/patch-ad14
-rw-r--r--cad/electric/patches/patch-ae14
5 files changed, 69 insertions, 7 deletions
diff --git a/cad/electric/Makefile b/cad/electric/Makefile
index f8a6714f33b..778e2b5f85e 100644
--- a/cad/electric/Makefile
+++ b/cad/electric/Makefile
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.17 2009/07/08 15:35:48 joerg Exp $
+# $NetBSD: Makefile,v 1.18 2009/08/01 16:22:25 dholland Exp $
#
DISTNAME= electric-7.00
-PKGREVISION= 2
+PKGREVISION= 3
CATEGORIES= cad
MASTER_SITES= ${MASTER_SITE_GNU:=electric/}
diff --git a/cad/electric/distinfo b/cad/electric/distinfo
index d0c6af5c664..443205c507d 100644
--- a/cad/electric/distinfo
+++ b/cad/electric/distinfo
@@ -1,8 +1,10 @@
-$NetBSD: distinfo,v 1.4 2005/12/28 14:17:57 joerg Exp $
+$NetBSD: distinfo,v 1.5 2009/08/01 16:22:25 dholland Exp $
SHA1 (electric-7.00.tar.gz) = 782652b078e81060928eadfae364cd74da07788e
RMD160 (electric-7.00.tar.gz) = c57a2e0a32e40d435e125cad6dfc5c1b98e9067b
Size (electric-7.00.tar.gz) = 4474722 bytes
SHA1 (patch-aa) = ca3aa5c28eef818dce61055daeedc1b7d2e9a8a7
SHA1 (patch-ab) = f9c648dda476f1e7cd3c3e875236b76198fa317b
-SHA1 (patch-ac) = f599a3440bb1a6402280fe4129361c13cabd38f8
+SHA1 (patch-ac) = fac49d88feab792ff665686e9e4fc8a29caab471
+SHA1 (patch-ad) = 6be5c47ead4bf023ef6215d7bce496a2f7abb5b0
+SHA1 (patch-ae) = 095e56c085ae77d0615134b070082f6599a95280
diff --git a/cad/electric/patches/patch-ac b/cad/electric/patches/patch-ac
index f1ee5a93384..137971fc5d9 100644
--- a/cad/electric/patches/patch-ac
+++ b/cad/electric/patches/patch-ac
@@ -1,7 +1,11 @@
-$NetBSD: patch-ac,v 1.2 2005/12/28 14:17:57 joerg Exp $
+$NetBSD: patch-ac,v 1.3 2009/08/01 16:22:26 dholland Exp $
---- src/graph/graphunixx11.c.orig 2004-07-16 01:59:53.000000000 +0000
-+++ src/graph/graphunixx11.c
+Get number of processors for NetBSD/Dragonfly.
+
+Hack around silly behavior that unlocks every newly created pthread mutex.
+
+--- src/graph/graphunixx11.c.orig 2004-07-15 21:59:53.000000000 -0400
++++ src/graph/graphunixx11.c 2009-08-01 12:17:39.000000000 -0400
@@ -3085,11 +3085,30 @@ void ewait(INTBIG process)
/*
* Routine to return the number of processors on this machine.
@@ -33,3 +37,31 @@ $NetBSD: patch-ac,v 1.2 2005/12/28 14:17:57 joerg Exp $
return(numproc);
}
+@@ -3168,6 +3187,27 @@ void emutexunlock(void *vmutex)
+ }
+
+ /*
++ * Routine that ensures mutual-exclusion object "vmutex" is unlocked.
++ */
++void emutexensureunlocked(void *vmutex)
++{
++#ifdef HAVE_PTHREAD
++ pthread_mutex_t *mutex;
++
++ mutex = (pthread_mutex_t *)vmutex;
++ if (pthread_mutex_trylock(mutex) == 0)
++ {
++ pthread_mutex_unlock(mutex);
++ }
++#else
++ mutex_t *mutexid;
++
++ mutexid = (mutex_t *)vmutex;
++ mutex_unlock(mutexid);
++#endif
++}
++
++/*
+ * Routine to determine the list of printers and return it.
+ * The list terminates with a zero.
+ */
diff --git a/cad/electric/patches/patch-ad b/cad/electric/patches/patch-ad
new file mode 100644
index 00000000000..638ab6872d9
--- /dev/null
+++ b/cad/electric/patches/patch-ad
@@ -0,0 +1,14 @@
+$NetBSD: patch-ad,v 1.1 2009/08/01 16:22:26 dholland Exp $
+
+Hack around silly behavior that unlocks every newly created pthread mutex.
+
+--- src/include/global.h.orig 2009-08-01 12:18:08.000000000 -0400
++++ src/include/global.h 2009-08-01 12:18:21.000000000 -0400
+@@ -2404,6 +2404,7 @@ void enewthread(void* (*function
+ void *emakemutex(void);
+ void emutexlock(void *vmutex);
+ void emutexunlock(void *vmutex);
++void emutexensureunlocked(void *vmutex);
+ CHAR **eprinterlist(void);
+ void flushscreen(void);
+ void exitprogram(void);
diff --git a/cad/electric/patches/patch-ae b/cad/electric/patches/patch-ae
new file mode 100644
index 00000000000..737d3d9f9cd
--- /dev/null
+++ b/cad/electric/patches/patch-ae
@@ -0,0 +1,14 @@
+$NetBSD: patch-ae,v 1.1 2009/08/01 16:22:26 dholland Exp $
+
+Hack around silly behavior that unlocks every newly created pthread mutex.
+
+--- src/db/dbcontrol.c.orig 2009-08-01 12:21:37.000000000 -0400
++++ src/db/dbcontrol.c 2009-08-01 12:22:18.000000000 -0400
+@@ -499,6 +499,6 @@ BOOLEAN ensurevalidmutex(void **mutex, B
+ return(TRUE);
+ }
+ }
+- emutexunlock(*mutex);
++ emutexensureunlocked(*mutex);
+ return(FALSE);
+ }