summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Ospald <hasufell@gentoo.org>2012-05-16 14:50:47 +0000
committerJulian Ospald <hasufell@gentoo.org>2012-05-16 14:50:47 +0000
commit3521d8edcd2f470c644eb2c153f0925bc778bc5c (patch)
tree47bbd64078169bfdf45789ee53aaac88dd66aed4 /games-strategy
parentkeyword ~amd64-fbsd (diff)
downloadgentoo-2-3521d8edcd2f470c644eb2c153f0925bc778bc5c.tar.gz
gentoo-2-3521d8edcd2f470c644eb2c153f0925bc778bc5c.tar.bz2
gentoo-2-3521d8edcd2f470c644eb2c153f0925bc778bc5c.zip
respect CXXFLAGS wrt #416261
(Portage version: 2.2.0_alpha104/cvs/Linux x86_64)
Diffstat (limited to 'games-strategy')
-rw-r--r--games-strategy/widelands/ChangeLog7
-rw-r--r--games-strategy/widelands/files/widelands-0.16-cxxflags.patch16
-rw-r--r--games-strategy/widelands/files/widelands-0.17-cxxflags.patch33
-rw-r--r--games-strategy/widelands/widelands-0.16.ebuild7
-rw-r--r--games-strategy/widelands/widelands-0.17.ebuild4
5 files changed, 62 insertions, 5 deletions
diff --git a/games-strategy/widelands/ChangeLog b/games-strategy/widelands/ChangeLog
index bdb9bc696d79..b25b8983f3eb 100644
--- a/games-strategy/widelands/ChangeLog
+++ b/games-strategy/widelands/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for games-strategy/widelands
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/games-strategy/widelands/ChangeLog,v 1.41 2012/05/15 11:15:48 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-strategy/widelands/ChangeLog,v 1.42 2012/05/16 14:50:47 hasufell Exp $
+
+ 16 May 2012; Julian Ospald <hasufell@gentoo.org> widelands-0.16.ebuild,
+ +files/widelands-0.16-cxxflags.patch, widelands-0.17.ebuild,
+ +files/widelands-0.17-cxxflags.patch:
+ respect CXXFLAGS wrt #416261
*widelands-0.17 (15 May 2012)
diff --git a/games-strategy/widelands/files/widelands-0.16-cxxflags.patch b/games-strategy/widelands/files/widelands-0.16-cxxflags.patch
new file mode 100644
index 000000000000..3dfb88fb6fd4
--- /dev/null
+++ b/games-strategy/widelands/files/widelands-0.16-cxxflags.patch
@@ -0,0 +1,16 @@
+From: Julian Ospald <hasufell@gentoo.org>
+Date: Wed May 16 12:30:18 UTC 2012
+
+respect CXXFLAGS
+
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -204,7 +204,7 @@
+ set (CMAKE_CXX_FLAGS_DEBUG "-g -DDEBUG -DNOPARACHUTE${WL_COMPILERFLAG_OLDSTYLECAST}${WL_COMPILERFLAG_GENERICWARNINGS}${WL_COMPILERFLAG_EXTRAWARNINGS}${WL_COMPILERFLAG_STRICT}" CACHE STRING "Set by widelands CMakeLists.txt" FORCE)
+
+ # CMAKE defines "-O3 -DNDEBUG", but we better say -O2 (see gcc manual)
+-set (CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG" CACHE STRING "Set by widelands CMakeLists.txt" FORCE)
++set (CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG" CACHE STRING "Set by widelands CMakeLists.txt" FORCE)
+
+ #If building with MSVC, then check for 3rdparty libs
+ if (DEFINED MSVC)
diff --git a/games-strategy/widelands/files/widelands-0.17-cxxflags.patch b/games-strategy/widelands/files/widelands-0.17-cxxflags.patch
new file mode 100644
index 000000000000..419d5d78a35b
--- /dev/null
+++ b/games-strategy/widelands/files/widelands-0.17-cxxflags.patch
@@ -0,0 +1,33 @@
+From: Julian Ospald <hasufell@gentoo.org>
+Date: Wed May 16 12:06:13 UTC 2012
+
+respect CXXFLAGS
+
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -209,24 +209,7 @@
+
+ # CMAKE only defines "-g", but we need -DDEBUG also, and we need -DNOPARACHUTE (for SDL) in Debug
+ set (CMAKE_CXX_FLAGS_DEBUG "-g -DDEBUG -DNOPARACHUTE${WL_COMPILERFLAG_OLDSTYLECAST}${WL_COMPILERFLAG_GENERICWARNINGS}${WL_COMPILERFLAG_EXTRAWARNINGS}${WL_COMPILERFLAG_STRICT}" CACHE STRING "Set by widelands CMakeLists.txt" FORCE)
+-
+-#This can be removed if no one uses gcc 4.5.1 or 4.5.2 any more
+-IF (${CMAKE_COMPILER_IS_GNUCXX})
+-EXEC_PROGRAM (
+- ${CMAKE_CXX_COMPILER}
+- ARGS --version
+- OUTPUT_VARIABLE WLBUILD_COMPILERVERSION
+- )
+- STRING(REGEX REPLACE ".*(4)\\.(5)\\.([0-9]).*" "\\1.\\2.\\3" WLBUILD_COMPILERVERSION_REP ${WLBUILD_COMPILERVERSION})
+- IF (WLBUILD_COMPILERVERSION_REP STREQUAL "4.5.1" OR WLBUILD_COMPILERVERSION_REP STREQUAL "4.5.2")
+- message("Detected gcc ${WLBUILD_COMPILERVERSION_REP}")
+- message("Suffering from gcc bug, disabling -O3")
+- set (CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG" CACHE STRING "Set by widelands CMakeLists.txt" FORCE)
+- ELSE (WLBUILD_COMPILERVERSION_REP STREQUAL "4.5.1" OR WLBUILD_COMPILERVERSION_REP STREQUAL "4.5.2")
+- #This line is the default and should be preserved.
+- set (CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG" CACHE STRING "Set by widelands CMakeLists.txt" FORCE)
+- ENDIF (WLBUILD_COMPILERVERSION_REP STREQUAL "4.5.1" OR WLBUILD_COMPILERVERSION_REP STREQUAL "4.5.2")
+-ENDIF (${CMAKE_COMPILER_IS_GNUCXX})
++set (CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG" CACHE STRING "Release compiler flags" FORCE)
+
+ #If building with MSVC, then check for 3rdparty libs
+ if (DEFINED MSVC)
diff --git a/games-strategy/widelands/widelands-0.16.ebuild b/games-strategy/widelands/widelands-0.16.ebuild
index 1b107822c7ff..8421078f91d7 100644
--- a/games-strategy/widelands/widelands-0.16.ebuild
+++ b/games-strategy/widelands/widelands-0.16.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2011 Gentoo Foundation
+# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/games-strategy/widelands/widelands-0.16.ebuild,v 1.7 2011/10/15 15:24:49 xarthisius Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-strategy/widelands/widelands-0.16.ebuild,v 1.8 2012/05/16 14:50:47 hasufell Exp $
EAPI=3
inherit versionator cmake-utils games
@@ -38,7 +38,8 @@ src_prepare() {
sed -i -e '22i#define OF(x) x' src/io/filesystem/ioapi.h || die
epatch \
"${FILESDIR}"/${P}-goldmine.patch \
- "${FILESDIR}"/${P}-libpng15.patch
+ "${FILESDIR}"/${P}-libpng15.patch \
+ "${FILESDIR}"/${P}-cxxflags.patch
}
src_configure() {
diff --git a/games-strategy/widelands/widelands-0.17.ebuild b/games-strategy/widelands/widelands-0.17.ebuild
index 289f0c8c6ab6..a4164855cdd5 100644
--- a/games-strategy/widelands/widelands-0.17.ebuild
+++ b/games-strategy/widelands/widelands-0.17.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/games-strategy/widelands/widelands-0.17.ebuild,v 1.1 2012/05/15 11:15:48 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/games-strategy/widelands/widelands-0.17.ebuild,v 1.2 2012/05/16 14:50:47 hasufell Exp $
EAPI=3
inherit versionator cmake-utils games
@@ -32,6 +32,8 @@ CMAKE_BUILD_TYPE=Release
PREFIX=${GAMES_DATADIR}/${PN}
src_prepare() {
+ epatch "${FILESDIR}"/${P}-cxxflags.patch
+
sed -i -e 's:__ppc__:__PPC__:' src/s2map.cc || die
sed -i -e '74i#define OF(x) x' src/io/filesystem/{un,}zip.h || die
sed -i -e '22i#define OF(x) x' src/io/filesystem/ioapi.h || die