diff options
author | Azamat H. Hackimov <azamat.hackimov@gmail.com> | 2018-04-21 12:04:45 +0300 |
---|---|---|
committer | James Le Cuirot <chewi@gentoo.org> | 2018-05-07 22:05:46 +0100 |
commit | e993186d745cece33c2085c215cdeb17c30b5696 (patch) | |
tree | 2069ffc98383ab1392ec93a5287587681a0fc591 /media-libs/libsdl2/files | |
parent | x11-libs/fltk: Use pkg-config to find freetype (diff) | |
download | gentoo-e993186d745cece33c2085c215cdeb17c30b5696.tar.gz gentoo-e993186d745cece33c2085c215cdeb17c30b5696.tar.bz2 gentoo-e993186d745cece33c2085c215cdeb17c30b5696.zip |
media-libs/libsdl2: Fix to CMake building errors
Generated sdl2.pc contains trailing spaces which considered as error in
CMake policy CMP0004. Added patch that fixes that.
Upstream bug: https://bugzilla.libsdl.org/show_bug.cgi?id=4144
Bug: https://bugs.gentoo.org/646364
Package-Manager: Portage-2.3.24, Repoman-2.3.6
Closes: https://github.com/gentoo/gentoo/pull/8098
Diffstat (limited to 'media-libs/libsdl2/files')
-rw-r--r-- | media-libs/libsdl2/files/libsdl2-2.0.8-rework-variables.patch | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/media-libs/libsdl2/files/libsdl2-2.0.8-rework-variables.patch b/media-libs/libsdl2/files/libsdl2-2.0.8-rework-variables.patch new file mode 100644 index 000000000000..9fc43f2b38cf --- /dev/null +++ b/media-libs/libsdl2/files/libsdl2-2.0.8-rework-variables.patch @@ -0,0 +1,68 @@ + +# HG changeset patch +# User Sam Lantinga <slouken@libsdl.org> +# Date 1524545759 25200 +# Node ID 28be2719184c8177899d96b696bcf5e28451266f +# Parent 2a7839691e3d88c0480c4a855126d5fa03f9ff6a +Fixed bug 4144 - CMake complains about trailing spaces in sdl2.pc + + Azamat H. Hackimov + +When you try use SDL2 2.0.8 in CMake project in Linux, it complains about trailing spaces in sdl2.pc: + +CMake Error at CMakeLists.txt:147 (add_executable): + Target "TestSimpleMain" links to item "-L/usr/lib64 -lSDL2 " which has + leading or trailing whitespace. This is now an error according to policy + CMP0004. + +diff -r 2a7839691e3d -r 28be2719184c configure +--- a/configure Mon Apr 23 21:50:03 2018 -0700 ++++ b/configure Mon Apr 23 21:55:59 2018 -0700 +@@ -15752,10 +15752,17 @@ + # fi + #done + SDL_CFLAGS="$BASE_CFLAGS" +-SDL_LIBS="-lSDL2 $BASE_LDFLAGS" +-CPPFLAGS="$CPPFLAGS $EXTRA_CFLAGS" +-CFLAGS="$CFLAGS $EXTRA_CFLAGS" +-LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS" ++SDL_LIBS="-lSDL2" ++if "$BASE_LDFLAGS" != "" ; then ++ SDL_LIBS="$SDL_LIBS $BASE_LDFLAGS" ++fi ++if "$EXTRA_CFLAGS" != "" ; then ++ CPPFLAGS="$CPPFLAGS $EXTRA_CFLAGS" ++ CFLAGS="$CFLAGS $EXTRA_CFLAGS" ++fi ++if "$EXTRA_LDFLAGS" != "" ; then ++ LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS" ++fi + + base_libdir=`echo \${libdir} | sed 's/.*\/\(.*\)/\1/; q'` + +diff -r 2a7839691e3d -r 28be2719184c configure.in +--- a/configure.in Mon Apr 23 21:50:03 2018 -0700 ++++ b/configure.in Mon Apr 23 21:55:59 2018 -0700 +@@ -123,10 +123,17 @@ + # fi + #done + SDL_CFLAGS="$BASE_CFLAGS" +-SDL_LIBS="-lSDL2 $BASE_LDFLAGS" +-CPPFLAGS="$CPPFLAGS $EXTRA_CFLAGS" +-CFLAGS="$CFLAGS $EXTRA_CFLAGS" +-LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS" ++SDL_LIBS="-lSDL2" ++if [ "$BASE_LDFLAGS" != "" ]; then ++ SDL_LIBS="$SDL_LIBS $BASE_LDFLAGS" ++fi ++if [ "$EXTRA_CFLAGS" != "" ]; then ++ CPPFLAGS="$CPPFLAGS $EXTRA_CFLAGS" ++ CFLAGS="$CFLAGS $EXTRA_CFLAGS" ++fi ++if [ "$EXTRA_LDFLAGS" != "" ]; then ++ LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS" ++fi + + dnl set this to use on systems that use lib64 instead of lib + base_libdir=`echo \${libdir} | sed 's/.*\/\(.*\)/\1/; q'` + |