aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorJack Nagel2012-08-17 11:17:13 -0500
committerJack Nagel2012-08-17 11:22:35 -0500
commit55c854cb33c7fbafb82a621cc6e03e183740816a (patch)
treeb513bd01582179f8b19c05b3f69c787d2fc7d68c /Library/Formula
parentfaaa6c1524f93743228fb276b53e984187a8683d (diff)
downloadhomebrew-55c854cb33c7fbafb82a621cc6e03e183740816a.tar.bz2
percona-server: build without exotic optimization flags
Currently we patch mysql_config to sanitize the CFLAGS that are exported to software that queries it during builds, such as the mysql gem. Since there isn't any way to control what compiler is used by Ruby/gem to build native extensions, we must remove any compiler or CPU specific flags. Instead, let's build without these flags to begin with, which will keep mysql_config clean and provide consistency between the flags used to build percona-server and those used to build software that links to it. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/percona-server.rb40
1 files changed, 4 insertions, 36 deletions
diff --git a/Library/Formula/percona-server.rb b/Library/Formula/percona-server.rb
index dfc65c5de..9c0987784 100644
--- a/Library/Formula/percona-server.rb
+++ b/Library/Formula/percona-server.rb
@@ -28,13 +28,11 @@ class PerconaServer < Formula
cause "https://github.com/mxcl/homebrew/issues/issue/144"
end
- # The CMAKE patches are so that on Lion we do not detect a private
- # pthread_init function as linkable. Patch sourced from the MySQL formula.
- def patches
- DATA
- end
-
def install
+ # Build without compiler or CPU specific optimization flags to facilitate
+ # compilation of gems and other software that queries `mysql-config`.
+ ENV.minimal_optimization
+
# Make sure the var/msql directory exists
(var+"percona").mkpath
@@ -160,33 +158,3 @@ class PerconaServer < Formula
EOPLIST
end
end
-
-
-__END__
-diff --git a/scripts/mysql_config.sh b/scripts/mysql_config.sh
-index 9296075..a600de2 100644
---- a/scripts/mysql_config.sh
-+++ b/scripts/mysql_config.sh
-@@ -137,7 +137,8 @@ for remove in DDBUG_OFF DSAFE_MUTEX DUNIV_MUST_NOT_INLINE DFORCE_INIT_OF_VARS \
- DEXTRA_DEBUG DHAVE_purify O 'O[0-9]' 'xO[0-9]' 'W[-A-Za-z]*' \
- 'mtune=[-A-Za-z0-9]*' 'mcpu=[-A-Za-z0-9]*' 'march=[-A-Za-z0-9]*' \
- Xa xstrconst "xc99=none" AC99 \
-- unroll2 ip mp restrict
-+ unroll2 ip mp restrict \
-+ mmmx 'msse[0-9.]*' 'mfpmath=sse' w pipe 'fomit-frame-pointer' 'mmacosx-version-min=10.[0-9]'
- 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/scripts/mysqld_safe.sh b/scripts/mysqld_safe.sh
-index 37e0e35..38ad6c8 100644
---- a/scripts/mysqld_safe.sh
-+++ b/scripts/mysqld_safe.sh
-@@ -558,7 +558,7 @@ else
- fi
-
- USER_OPTION=""
--if test -w / -o "$USER" = "root"
-+if test -w /sbin -o "$USER" = "root"
- then
- if test "$user" != "root" -o $SET_USER = 1
- then