diff options
| author | CharlieRoot | 2011-07-19 18:29:59 +0400 |
|---|---|---|
| committer | Adam Vandenberg | 2011-07-20 09:34:29 -0700 |
| commit | 44db2406d3d71cb5882627581a7dee1c4acbe0a6 (patch) | |
| tree | 22637bff6a8e46b2116c4e5c4bc28065f756e1e6 | |
| parent | 8bd8a276025bc55e81149d1d5c8493304ff33f27 (diff) | |
| download | homebrew-44db2406d3d71cb5882627581a7dee1c4acbe0a6.tar.bz2 | |
MySQL: Fix compilation on Lion
Do not allow cmake find pthread_init because it is internal to Apple's
pthread library although linkable.
Fixes #5251
Fixes #5876
Fixes #6277
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
| -rw-r--r-- | Library/Formula/mysql.rb | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/Library/Formula/mysql.rb b/Library/Formula/mysql.rb index b7642b44b..162c76691 100644 --- a/Library/Formula/mysql.rb +++ b/Library/Formula/mysql.rb @@ -23,7 +23,11 @@ class Mysql < Formula ] end - def patches; DATA; end + # The CMAKE patches are so that on Lion we do not detect a private + # pthread_init function as linkable. + def patches + DATA + end def install # Make sure the var/msql directory exists @@ -173,3 +177,21 @@ index efc8254..8964b70 100644 do # The first option we might strip will always have a space before it because # we set -I$pkgincludedir as the first option +diff --git a/configure.cmake b/configure.cmake +index 0014c1d..21fe471 100644 +--- a/configure.cmake ++++ b/configure.cmake +@@ -391,7 +391,11 @@ CHECK_FUNCTION_EXISTS (pthread_attr_setscope HAVE_PTHREAD_ATTR_SETSCOPE) + CHECK_FUNCTION_EXISTS (pthread_attr_setstacksize HAVE_PTHREAD_ATTR_SETSTACKSIZE) + CHECK_FUNCTION_EXISTS (pthread_condattr_create HAVE_PTHREAD_CONDATTR_CREATE) + CHECK_FUNCTION_EXISTS (pthread_condattr_setclock HAVE_PTHREAD_CONDATTR_SETCLOCK) +-CHECK_FUNCTION_EXISTS (pthread_init HAVE_PTHREAD_INIT) ++ ++IF (NOT CMAKE_OSX_SYSROOT) ++ CHECK_FUNCTION_EXISTS (pthread_init HAVE_PTHREAD_INIT) ++ENDIF (NOT CMAKE_OSX_SYSROOT) ++ + CHECK_FUNCTION_EXISTS (pthread_key_delete HAVE_PTHREAD_KEY_DELETE) + CHECK_FUNCTION_EXISTS (pthread_rwlock_rdlock HAVE_PTHREAD_RWLOCK_RDLOCK) + CHECK_FUNCTION_EXISTS (pthread_sigmask HAVE_PTHREAD_SIGMASK) + |
