aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorale <ale@FreeBSD.org>2011-01-09 20:29:19 +0800
committerale <ale@FreeBSD.org>2011-01-09 20:29:19 +0800
commit10dcfa79691731b7d169c1413438b89c5b20443e (patch)
tree0195445d8e17e009e7be37b2f22d0e8ded7ead77
parentc1635cfb48b4011c2bf530a89dd5240ac103deba (diff)
downloadfreebsd-ports-gnome-10dcfa79691731b7d169c1413438b89c5b20443e.tar.gz
freebsd-ports-gnome-10dcfa79691731b7d169c1413438b89c5b20443e.tar.zst
freebsd-ports-gnome-10dcfa79691731b7d169c1413438b89c5b20443e.zip
Fix mysqlclient library in single-threaded applications,
by correctly implementing pthread_once (see PR threads/150959). While I'm here, replace CONFLICTS with CONFLICTS_INSTALL. Bump PORTREVISION. PR: ports/153588 Submitted by: Richard Anthony Secor <rsecor@seqlogic.com>
-rw-r--r--databases/mysql55-client/Makefile2
-rw-r--r--databases/mysql55-client/files/patch-include_my_pthread.h14
-rw-r--r--databases/mysql55-server/Makefile4
-rw-r--r--databases/mysql55-server/files/patch-include_my_pthread.h14
-rw-r--r--databases/percona55-client/Makefile2
-rw-r--r--databases/percona55-client/files/patch-include_my_pthread.h14
-rw-r--r--databases/percona55-server/Makefile4
-rw-r--r--databases/percona55-server/files/patch-include_my_pthread.h14
8 files changed, 62 insertions, 6 deletions
diff --git a/databases/mysql55-client/Makefile b/databases/mysql55-client/Makefile
index e91e7e1b36e7..0801fcee7ca6 100644
--- a/databases/mysql55-client/Makefile
+++ b/databases/mysql55-client/Makefile
@@ -18,7 +18,7 @@ PLIST= ${.CURDIR}/pkg-plist
LATEST_LINK= mysql55-client
-CONFLICTS= mysql-client-[34].* mysql-client-5.[0-46-9].*
+CONFLICTS_INSTALL= mysql-client-[34].* mysql-client-5.[0-46-9].*
CMAKE_ARGS= -DWITHOUT_SERVER=1
diff --git a/databases/mysql55-client/files/patch-include_my_pthread.h b/databases/mysql55-client/files/patch-include_my_pthread.h
new file mode 100644
index 000000000000..bcca323e3931
--- /dev/null
+++ b/databases/mysql55-client/files/patch-include_my_pthread.h
@@ -0,0 +1,14 @@
+--- include/my_pthread.h.orig 2011-01-09 10:17:18.000000000 +0100
++++ include/my_pthread.h 2011-01-09 12:06:33.000000000 +0100
+@@ -215,7 +215,10 @@
+
+ #define my_pthread_once_t pthread_once_t
+ #define MY_PTHREAD_ONCE_INIT PTHREAD_ONCE_INIT
+-#define my_pthread_once(C,F) pthread_once(C,F)
++#define my_pthread_once(C,F) do { \
++ if (__isthreaded) pthread_once(C,F); \
++ else if ((C)->state == PTHREAD_NEEDS_INIT) { F(); (C)->state = PTHREAD_DONE_INIT; } \
++ } while(0)
+
+ /* Test first for RTS or FSU threads */
+
diff --git a/databases/mysql55-server/Makefile b/databases/mysql55-server/Makefile
index b085577c424e..492274106e41 100644
--- a/databases/mysql55-server/Makefile
+++ b/databases/mysql55-server/Makefile
@@ -7,7 +7,7 @@
PORTNAME?= mysql
PORTVERSION= 5.5.8
-PORTREVISION?= 0
+PORTREVISION?= 1
CATEGORIES= databases ipv6
MASTER_SITES= ${MASTER_SITE_MYSQL}
MASTER_SITE_SUBDIR= MySQL-5.5
@@ -62,7 +62,7 @@ WANT_MYSQL_VER= 55
LATEST_LINK= mysql55-server
-CONFLICTS= mysql-server-[34].* mysql-server-5.[0-46-9].*
+CONFLICTS_INSTALL= mysql-server-[34].* mysql-server-5.[0-46-9].*
USE_RC_SUBR= mysql-server.sh
diff --git a/databases/mysql55-server/files/patch-include_my_pthread.h b/databases/mysql55-server/files/patch-include_my_pthread.h
new file mode 100644
index 000000000000..bcca323e3931
--- /dev/null
+++ b/databases/mysql55-server/files/patch-include_my_pthread.h
@@ -0,0 +1,14 @@
+--- include/my_pthread.h.orig 2011-01-09 10:17:18.000000000 +0100
++++ include/my_pthread.h 2011-01-09 12:06:33.000000000 +0100
+@@ -215,7 +215,10 @@
+
+ #define my_pthread_once_t pthread_once_t
+ #define MY_PTHREAD_ONCE_INIT PTHREAD_ONCE_INIT
+-#define my_pthread_once(C,F) pthread_once(C,F)
++#define my_pthread_once(C,F) do { \
++ if (__isthreaded) pthread_once(C,F); \
++ else if ((C)->state == PTHREAD_NEEDS_INIT) { F(); (C)->state = PTHREAD_DONE_INIT; } \
++ } while(0)
+
+ /* Test first for RTS or FSU threads */
+
diff --git a/databases/percona55-client/Makefile b/databases/percona55-client/Makefile
index e91e7e1b36e7..0801fcee7ca6 100644
--- a/databases/percona55-client/Makefile
+++ b/databases/percona55-client/Makefile
@@ -18,7 +18,7 @@ PLIST= ${.CURDIR}/pkg-plist
LATEST_LINK= mysql55-client
-CONFLICTS= mysql-client-[34].* mysql-client-5.[0-46-9].*
+CONFLICTS_INSTALL= mysql-client-[34].* mysql-client-5.[0-46-9].*
CMAKE_ARGS= -DWITHOUT_SERVER=1
diff --git a/databases/percona55-client/files/patch-include_my_pthread.h b/databases/percona55-client/files/patch-include_my_pthread.h
new file mode 100644
index 000000000000..bcca323e3931
--- /dev/null
+++ b/databases/percona55-client/files/patch-include_my_pthread.h
@@ -0,0 +1,14 @@
+--- include/my_pthread.h.orig 2011-01-09 10:17:18.000000000 +0100
++++ include/my_pthread.h 2011-01-09 12:06:33.000000000 +0100
+@@ -215,7 +215,10 @@
+
+ #define my_pthread_once_t pthread_once_t
+ #define MY_PTHREAD_ONCE_INIT PTHREAD_ONCE_INIT
+-#define my_pthread_once(C,F) pthread_once(C,F)
++#define my_pthread_once(C,F) do { \
++ if (__isthreaded) pthread_once(C,F); \
++ else if ((C)->state == PTHREAD_NEEDS_INIT) { F(); (C)->state = PTHREAD_DONE_INIT; } \
++ } while(0)
+
+ /* Test first for RTS or FSU threads */
+
diff --git a/databases/percona55-server/Makefile b/databases/percona55-server/Makefile
index b085577c424e..492274106e41 100644
--- a/databases/percona55-server/Makefile
+++ b/databases/percona55-server/Makefile
@@ -7,7 +7,7 @@
PORTNAME?= mysql
PORTVERSION= 5.5.8
-PORTREVISION?= 0
+PORTREVISION?= 1
CATEGORIES= databases ipv6
MASTER_SITES= ${MASTER_SITE_MYSQL}
MASTER_SITE_SUBDIR= MySQL-5.5
@@ -62,7 +62,7 @@ WANT_MYSQL_VER= 55
LATEST_LINK= mysql55-server
-CONFLICTS= mysql-server-[34].* mysql-server-5.[0-46-9].*
+CONFLICTS_INSTALL= mysql-server-[34].* mysql-server-5.[0-46-9].*
USE_RC_SUBR= mysql-server.sh
diff --git a/databases/percona55-server/files/patch-include_my_pthread.h b/databases/percona55-server/files/patch-include_my_pthread.h
new file mode 100644
index 000000000000..bcca323e3931
--- /dev/null
+++ b/databases/percona55-server/files/patch-include_my_pthread.h
@@ -0,0 +1,14 @@
+--- include/my_pthread.h.orig 2011-01-09 10:17:18.000000000 +0100
++++ include/my_pthread.h 2011-01-09 12:06:33.000000000 +0100
+@@ -215,7 +215,10 @@
+
+ #define my_pthread_once_t pthread_once_t
+ #define MY_PTHREAD_ONCE_INIT PTHREAD_ONCE_INIT
+-#define my_pthread_once(C,F) pthread_once(C,F)
++#define my_pthread_once(C,F) do { \
++ if (__isthreaded) pthread_once(C,F); \
++ else if ((C)->state == PTHREAD_NEEDS_INIT) { F(); (C)->state = PTHREAD_DONE_INIT; } \
++ } while(0)
+
+ /* Test first for RTS or FSU threads */
+