summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Evans <grknight@gentoo.org>2015-04-07 20:58:24 +0000
committerBrian Evans <grknight@gentoo.org>2015-04-07 20:58:24 +0000
commit6d03a54b88853628785f6cf0c2d35f53b137d1a0 (patch)
treea908728826ccc8129653ce56d6912f115e46bd62 /sys-cluster
parentDrop to unstable (nothing depends on it), remove old EAPI=1 version. (diff)
downloadgentoo-2-6d03a54b88853628785f6cf0c2d35f53b137d1a0.tar.gz
gentoo-2-6d03a54b88853628785f6cf0c2d35f53b137d1a0.tar.bz2
gentoo-2-6d03a54b88853628785f6cf0c2d35f53b137d1a0.zip
Add patch to remove machine specific CFLAGS and add new IUSE instead for one feature
(Portage version: 2.2.18/cvs/Linux x86_64, signed Manifest commit with key D1F781EFF9F4A3B6)
Diffstat (limited to 'sys-cluster')
-rw-r--r--sys-cluster/galera/ChangeLog7
-rw-r--r--sys-cluster/galera/files/galera-strip-machine-cflags.patch62
-rw-r--r--sys-cluster/galera/galera-25.3.10.ebuild17
3 files changed, 80 insertions, 6 deletions
diff --git a/sys-cluster/galera/ChangeLog b/sys-cluster/galera/ChangeLog
index f9003707d176..4b4326106b82 100644
--- a/sys-cluster/galera/ChangeLog
+++ b/sys-cluster/galera/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for sys-cluster/galera
# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-cluster/galera/ChangeLog,v 1.5 2015/04/03 13:04:03 grknight Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/galera/ChangeLog,v 1.6 2015/04/07 20:58:24 grknight Exp $
+
+ 07 Apr 2015; Brian Evans <grknight@gentoo.org>
+ +files/galera-strip-machine-cflags.patch, galera-25.3.10.ebuild:
+ Add patch to remove machine specific CFLAGS and add new IUSE instead for one
+ feature
03 Apr 2015; Brian Evans <grknight@gentoo.org> galera-25.3.5.ebuild:
Add append-flags -D_REENTRANT wrt bug 545376
diff --git a/sys-cluster/galera/files/galera-strip-machine-cflags.patch b/sys-cluster/galera/files/galera-strip-machine-cflags.patch
new file mode 100644
index 000000000000..5aca0f709f44
--- /dev/null
+++ b/sys-cluster/galera/files/galera-strip-machine-cflags.patch
@@ -0,0 +1,62 @@
+diff -aurN a/galerautils/src/SConscript b/galerautils/src/SConscript
+--- a/galerautils/src/SConscript 2015-03-16 07:18:42.000000000 -0400
++++ b/galerautils/src/SConscript 2015-04-07 15:03:21.661301200 -0400
+@@ -1,4 +1,4 @@
+-Import('env', 'x86', 'sysname')
++Import('env', 'sysname')
+
+ libgalerautils_env = env.Clone()
+
+@@ -33,21 +33,6 @@
+ crc32c_sources = [ '#/www.evanjones.ca/crc32c.c' ]
+ crc32c_objs = crc32c_env.SharedObject(crc32c_sources)
+
+-if x86 != 0:
+- crc32c_env.Append(CFLAGS = ' -msse4.2')
+- if sysname == 'sunos':
+- # Ideally we want to simply strip SSE4.2 flag from the resulting
+- # crc32.pic.o
+- # (see http://ffmpeg.org/pipermail/ffmpeg-user/2013-March/013977.html)
+- # but that requires some serious scons-fu, so we just don't
+- # compile hardware support in if host CPU does not have it.
+- from subprocess import check_call
+- try:
+- check_call("isainfo -v | grep sse4.2 >/dev/null 2>&1", shell=True);
+- except:
+- libgalerautils_env.Append(CPPFLAGS = ' -DCRC32C_NO_HARDWARE')
+- crc32c_env.Append(CPPFLAGS = ' -DCRC32C_NO_HARDWARE')
+-
+ libgalerautils_env.StaticLibrary('galerautils',
+ libgalerautils_objs + crc32c_objs)
+
+diff -aurN a/SConstruct b/SConstruct
+--- a/SConstruct 2015-04-07 14:53:59.810301200 -0400
++++ b/SConstruct 2015-04-07 14:54:48.700301200 -0400
+@@ -87,27 +87,6 @@
+ opt_flags = opt_flags + ' -DGU_DBUG_ON'
+
+
+-if x86 == 32:
+- compile_arch = ' -m32 -march=i686'
+- link_arch = compile_arch
+- if sysname == 'linux':
+- link_arch = link_arch + ' -Wl,-melf_i386'
+-elif x86 == 64 and sysname != 'sunos':
+- compile_arch = ' -m64'
+- link_arch = compile_arch
+- if sysname == 'linux':
+- link_arch = link_arch + ' -Wl,-melf_x86_64'
+-elif machine == 'ppc64':
+- compile_arch = ' -mtune=native'
+- link_arch = ''
+-elif sysname == 'sunos':
+- compile_arch = ' -mtune=native'
+- link_arch = ''
+-else:
+- compile_arch = ''
+- link_arch = ''
+-
+-
+ boost = int(ARGUMENTS.get('boost', 1))
+ boost_pool = int(ARGUMENTS.get('boost_pool', 0))
+ ssl = int(ARGUMENTS.get('ssl', 1))
diff --git a/sys-cluster/galera/galera-25.3.10.ebuild b/sys-cluster/galera/galera-25.3.10.ebuild
index 6587abecb3d0..ed5ba0215b67 100644
--- a/sys-cluster/galera/galera-25.3.10.ebuild
+++ b/sys-cluster/galera/galera-25.3.10.ebuild
@@ -1,10 +1,10 @@
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-cluster/galera/galera-25.3.10.ebuild,v 1.1 2015/03/24 18:32:11 grknight Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/galera/galera-25.3.10.ebuild,v 1.2 2015/04/07 20:58:24 grknight Exp $
EAPI=5
-inherit scons-utils multilib toolchain-funcs eutils user
+inherit scons-utils multilib toolchain-funcs eutils user flag-o-matic
MY_PV="release_${PV}"
DESCRIPTION="Synchronous multi-master replication engine that provides its service through wsrep API"
@@ -15,7 +15,7 @@ LICENSE="GPL-2 BSD"
SLOT="0"
KEYWORDS="~amd64 ~x86"
-IUSE="garbd ssl test"
+IUSE="cpu_flags_x86_sse4_2 garbd ssl test"
CDEPEND="
ssl? ( dev-libs/openssl:0= )
@@ -49,8 +49,9 @@ src_prepare() {
# Remove bundled dev-cpp/asio
rm -r "${S}/asio" || die
- # Respect {C,LD}FLAGS.
- epatch "${FILESDIR}/respect-flags.patch"
+ # Respect {C,LD}FLAGS and remove machine specific CFLAGS
+ epatch "${FILESDIR}/respect-flags.patch" \
+ "${FILESDIR}/galera-strip-machine-cflags.patch"
#Remove optional garbd daemon
if ! use garbd ; then
@@ -62,6 +63,12 @@ src_prepare() {
src_configure() {
tc-export CC CXX
+ # Uses hardware specific code that seems to depend on SSE4.2
+ if use cpu_flags_x86_sse4_2 ; then
+ append-cflags -msse4.2
+ else
+ append-cflags -DCRC32C_NO_HARDWARE
+ fi
# strict_build_flags=0 disables -Werror, -pedantic, -Weffc++,
# and -Wold-style-cast
myesconsargs=(