add patch to fix building shared libraries with patch from tt_1(bug #553746)
authorMichael Sterrett <mr_bones_@gentoo.org>
Tue, 6 Oct 2015 22:14:22 +0000 (18:14 -0400)
committerMichael Sterrett <mr_bones_@gentoo.org>
Tue, 6 Oct 2015 22:14:42 +0000 (18:14 -0400)
Package-Manager: portage-2.2.20.1

games-strategy/s25rttr/files/s25rttr-0.8.1-fpic.patch [new file with mode: 0644]
games-strategy/s25rttr/s25rttr-0.8.1.ebuild

diff --git a/games-strategy/s25rttr/files/s25rttr-0.8.1-fpic.patch b/games-strategy/s25rttr/files/s25rttr-0.8.1-fpic.patch
new file mode 100644 (file)
index 0000000..4a1d11e
--- /dev/null
@@ -0,0 +1,38 @@
+From 2b4f956263864cebb1b9c5ce120c7cd30f512bdb Mon Sep 17 00:00:00 2001
+From: nE0sIghT <ykonotopov@gmail.com>
+Date: Sat, 18 Jul 2015 19:03:05 +0300
+Subject: [PATCH] Fixed build of sdl drivers
+
+---
+ driver/audio/SDL/src/CMakeLists.txt | 1 +
+ driver/video/SDL/src/CMakeLists.txt | 1 +
+ 2 files changed, 2 insertions(+)
+
+diff --git a/driver/audio/SDL/src/CMakeLists.txt b/driver/audio/SDL/src/CMakeLists.txt
+index 5ad3f02..5a91cd5 100644
+--- a/driver/audio/SDL/src/CMakeLists.txt
++++ b/driver/audio/SDL/src/CMakeLists.txt
+@@ -20,6 +20,7 @@ IF (SDL_FOUND)
+         
+         ADD_LIBRARY(audioSDL SHARED SDL.cpp SDL.h main.h SoundSDL_Music.cpp SoundSDL_Music.h SoundSDL_Effect.cpp SoundSDL_Effect.h ${PROJECT_SOURCE_DIR}/build_version.cpp ../../../src/DriverInterface.cpp ../../../src/tempname.cpp ../../../src/tempname.h)
+     
++      ADD_DEFINITIONS(-fPIC)
+         ADD_FLAGS(CMAKE_C_FLAGS -I${SDL_INCLUDE_DIR} -I${SDLMIXER_INCLUDE_DIR})
+         ADD_FLAGS(CMAKE_CXX_FLAGS -I${SDL_INCLUDE_DIR} -I${SDLMIXER_INCLUDE_DIR})
+diff --git a/driver/video/SDL/src/CMakeLists.txt b/driver/video/SDL/src/CMakeLists.txt
+index 83d10cf..ca67573 100644
+--- a/driver/video/SDL/src/CMakeLists.txt
++++ b/driver/video/SDL/src/CMakeLists.txt
+@@ -16,6 +16,7 @@ IF (SDL_FOUND)
+       ADD_LIBRARY(videoSDL SHARED SDL.cpp SDL.h main.h ../../../../build_version.cpp ../../../src/DriverInterface.cpp)
++      ADD_DEFINITIONS(-fPIC)
+       ADD_FLAGS(CMAKE_C_FLAGS -I${SDL_INCLUDE_DIR})
+       ADD_FLAGS(CMAKE_CXX_FLAGS -I${SDL_INCLUDE_DIR})
+-- 
+2.3.6
+
+
index 0643f3aa723a7fc5e94f518d19abc577a917aea4..202ecbc53324b77fbf1106a6273e128600f5fee6 100644 (file)
@@ -30,7 +30,8 @@ DEPEND="${RDEPEND}
 
 src_prepare() {
        epatch "${FILESDIR}"/${P}-cmake.patch \
-               "${FILESDIR}"/${P}-soundconverter.patch
+               "${FILESDIR}"/${P}-soundconverter.patch \
+               "${FILESDIR}"/${P}-fpic.patch
 }
 
 src_configure() {