From 208221fa425b883ef819811173f2b58368c26c0a Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Fri, 30 Dec 2016 21:17:47 +0100 Subject: [PATCH] games-strategy/dunelegacy: bump to 0.96.4 --- ....exheres-0 => dunelegacy-0.96.4.exheres-0} | 7 ++- ...user-C-XX-FLAGS-and-set-saner-defaul.patch | 28 +++++++++ ...-config-to-get-SDL2-SDL2_mixer-flags.patch | 38 ++++++++++++ .../files/dunelegacy-0.96.3-build.patch | 61 ------------------- 4 files changed, 70 insertions(+), 64 deletions(-) rename packages/games-strategy/dunelegacy/{dunelegacy-0.96.3.exheres-0 => dunelegacy-0.96.4.exheres-0} (86%) create mode 100644 packages/games-strategy/dunelegacy/files/0001-Don-t-overwrite-user-C-XX-FLAGS-and-set-saner-defaul.patch create mode 100644 packages/games-strategy/dunelegacy/files/0002-Use-pkg-config-to-get-SDL2-SDL2_mixer-flags.patch delete mode 100644 packages/games-strategy/dunelegacy/files/dunelegacy-0.96.3-build.patch diff --git a/packages/games-strategy/dunelegacy/dunelegacy-0.96.3.exheres-0 b/packages/games-strategy/dunelegacy/dunelegacy-0.96.4.exheres-0 similarity index 86% rename from packages/games-strategy/dunelegacy/dunelegacy-0.96.3.exheres-0 rename to packages/games-strategy/dunelegacy/dunelegacy-0.96.4.exheres-0 index 68565d1..7e5f2ed 100644 --- a/packages/games-strategy/dunelegacy/dunelegacy-0.96.3.exheres-0 +++ b/packages/games-strategy/dunelegacy/dunelegacy-0.96.4.exheres-0 @@ -15,12 +15,13 @@ DEPENDENCIES=" build: virtual/pkg-config build+run: - media-libs/SDL:0[X] - media-libs/SDL_mixer:0[midi] + media-libs/SDL:2[X] + media-libs/SDL_mixer:2[midi] " DEFAULT_SRC_PREPARE_PATCHES=( - -p0 "${FILES}"/${PNV}-build.patch + "${FILES}"/0001-Don-t-overwrite-user-C-XX-FLAGS-and-set-saner-defaul.patch + "${FILES}"/0002-Use-pkg-config-to-get-SDL2-SDL2_mixer-flags.patch ) src_install() { diff --git a/packages/games-strategy/dunelegacy/files/0001-Don-t-overwrite-user-C-XX-FLAGS-and-set-saner-defaul.patch b/packages/games-strategy/dunelegacy/files/0001-Don-t-overwrite-user-C-XX-FLAGS-and-set-saner-defaul.patch new file mode 100644 index 0000000..c0122da --- /dev/null +++ b/packages/games-strategy/dunelegacy/files/0001-Don-t-overwrite-user-C-XX-FLAGS-and-set-saner-defaul.patch @@ -0,0 +1,28 @@ +From 55cb71defbc9f3f3b101fff423aa24a6346141ff Mon Sep 17 00:00:00 2001 +From: Julian Ospald +Date: Fri, 30 Dec 2016 21:14:38 +0100 +Subject: [PATCH 1/2] Don't overwrite user C{,XX}FLAGS and set saner defaults +Upstream: no + +--- + configure.ac | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index e08e6ee..2da5f58 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -19,8 +19,8 @@ fi + AC_SUBST(dunelegacydatadir) + + dnl Some flags for gcc +-CXXFLAGS="-std=c++11 -pthread -fPIC -O3 -pipe -pedantic -Wall -Wextra -Wno-unused-parameter -Wno-shift-negative-value -DNDEBUG" +-CFLAGS="-std=c99 -pthread -fPIC -O3 -pipe -pedantic -Wall -Wextra -Wno-unused-parameter -Wno-shift-negative-value -DNDEBUG" ++CXXFLAGS="-std=c++11 -pthread -fPIC -Wall -Wextra -Wno-unused-parameter -Wno-shift-negative-value -DNDEBUG ${CXXFLAGS}" ++CFLAGS="-std=c99 -pthread -fPIC -Wall -Wextra -Wno-unused-parameter -Wno-shift-negative-value -DNDEBUG ${CFLAGS}" + dnl Additional flags: -Wconversion -Wno-sign-conversion -Wlogical-op + + dnl Some flags for clang +-- +2.11.0 + diff --git a/packages/games-strategy/dunelegacy/files/0002-Use-pkg-config-to-get-SDL2-SDL2_mixer-flags.patch b/packages/games-strategy/dunelegacy/files/0002-Use-pkg-config-to-get-SDL2-SDL2_mixer-flags.patch new file mode 100644 index 0000000..48204f3 --- /dev/null +++ b/packages/games-strategy/dunelegacy/files/0002-Use-pkg-config-to-get-SDL2-SDL2_mixer-flags.patch @@ -0,0 +1,38 @@ +From df3c27ae3739259ea38226cd52d83e074304e8ce Mon Sep 17 00:00:00 2001 +From: Julian Ospald +Date: Fri, 30 Dec 2016 21:15:01 +0100 +Subject: [PATCH 2/2] Use pkg-config to get SDL2/SDL2_mixer flags +Upstream: no + +--- + configure.ac | 9 +-------- + 1 file changed, 1 insertion(+), 8 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 2da5f58..4ddfa49 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -40,19 +40,12 @@ fi + dnl Check for SDL library + dnl Check for SDL_mixer library. + SDL_VERSION=2.0.0 +-AM_PATH_SDL2($SDL_VERSION, : , AC_MSG_ERROR([*** SDL2 version $SDL_VERSION not found!])) ++PKG_CHECK_MODULES([SDL], [sdl2 >= $SDL_VERSION SDL2_mixer]) + dnl PKG_CHECK_MODULES(SDL, sdl2 SDL2_mixer) + CFLAGS="$CFLAGS $SDL_CFLAGS" + CXXFLAGS="$CXXFLAGS $SDL_CFLAGS" + LIBS="$LIBS $SDL_LIBS" + +-dnl Check for SDL_mixer library. +-AC_CHECK_LIB(SDL2_mixer, +- Mix_OpenAudio, +- LIBS="$LIBS -lSDL2_mixer", +- AC_MSG_ERROR([*** SDL2_mixer library not found!]) +-) +- + dnl enet defines + AC_CHECK_FUNC(gethostbyaddr_r, [AC_DEFINE(HAS_GETHOSTBYADDR_R)]) + AC_CHECK_FUNC(gethostbyname_r, [AC_DEFINE(HAS_GETHOSTBYNAME_R)]) +-- +2.11.0 + diff --git a/packages/games-strategy/dunelegacy/files/dunelegacy-0.96.3-build.patch b/packages/games-strategy/dunelegacy/files/dunelegacy-0.96.3-build.patch deleted file mode 100644 index 1c10e21..0000000 --- a/packages/games-strategy/dunelegacy/files/dunelegacy-0.96.3-build.patch +++ /dev/null @@ -1,61 +0,0 @@ -Author: Julian Ospald -Date: Thu Aug 9 18:57:40 2012 +0200 -Upstream: no - - respect flags - use pkg-config - use LDADD instead of LDFLAGS for libs - ---- configure.ac -+++ configure.ac -@@ -16,14 +16,6 @@ - - AC_SUBST(dunelegacydatadir) - --dnl Some flags for gcc --CXXFLAGS="-O3 -pipe -pedantic -Wall -Wextra -Wno-unused-parameter -DNDEBUG" --dnl Additional flags: -Wconversion -Wno-sign-conversion -- --dnl Some flags for clang --dnl CXXFLAGS="-O3 -pipe -pedantic -Weverything -Wno-sign-conversion -Wno-conversion -Wno-shadow -Wno-missing-noreturn -Wno-padded -Wno-packed -Wno-weak-vtables -Wno-c++11-narrowing -Wno-cast-align -Wno-unreachable-code -Wno-missing-prototypes -Wno-float-equal -Wno-global-constructors -Wno-exit-time-destructors -Wno-format-nonliteral -Wno-unused-macros -Wextra -Wno-unused-parameter" -- -- - dnl test for -ffp-contract=off (gcc >= 4.6) and use -mno-fused-madd instead - oldCFLAGS="$CFLAGS" - CFLAGS="-ffp-contract=off" -@@ -33,34 +25,14 @@ - ) - CFLAGS="$oldCFLAGS" - --case "$target_cpu" in --i*86) CXXFLAGS="$CXXFLAGS -mfpmath=sse -msse";; --esac -- --AC_ARG_ENABLE([debug], -- [AS_HELP_STRING([--enable-debug], -- [compile with debug information @<:@default=disabled@:>@])], -- [], -- []) -- --if test "$enable_debug" = "yes" ; then -- CXXFLAGS="$CXXFLAGS -g" --fi - - dnl Check for SDL library - SDL_VERSION=1.2.0 --AM_PATH_SDL($SDL_VERSION, : , AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!])) -+PKG_CHECK_MODULES([SDL], [sdl >= $SDL_VERSION SDL_mixer]) - CFLAGS="$CFLAGS $SDL_CFLAGS" - CXXFLAGS="$CXXFLAGS $SDL_CFLAGS" - LIBS="$LIBS $SDL_LIBS" - --dnl Check for SDL_mixer library. --AC_CHECK_LIB(SDL_mixer, -- Mix_OpenAudio, -- LIBS="$LIBS -lSDL_mixer", -- AC_MSG_ERROR([*** SDL_mixer library not found!]) --) -- - dnl enet defines - AC_CHECK_FUNC(gethostbyaddr_r, [AC_DEFINE(HAS_GETHOSTBYADDR_R)]) - AC_CHECK_FUNC(gethostbyname_r, [AC_DEFINE(HAS_GETHOSTBYNAME_R)])