diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2017-11-22 15:26:28 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2017-11-22 15:30:31 +0000 |
commit | bf9e945981a04cac944060f2d644d9d8ca216ae1 (patch) | |
tree | 06f4914841d5f05610e5d25fe96cd075a35ef25b /main/sdl2 | |
parent | 31d35d3abc8c8c51b7943fc1a8e75de49a2f0a0d (diff) | |
download | aports-bf9e945981a04cac944060f2d644d9d8ca216ae1.tar.bz2 aports-bf9e945981a04cac944060f2d644d9d8ca216ae1.tar.xz |
main/sdl2: fix include of directfb in header
we need to include the directfb.h outside extern "C" because it includes
c++ headers, or we will have an error: template with C linkage when
compiling gource.
similar to this issue here:
https://github.com/msgpack/msgpack-c/issues/551
Diffstat (limited to 'main/sdl2')
-rw-r--r-- | main/sdl2/APKBUILD | 8 | ||||
-rw-r--r-- | main/sdl2/fix-directfb-include.patch | 27 |
2 files changed, 32 insertions, 3 deletions
diff --git a/main/sdl2/APKBUILD b/main/sdl2/APKBUILD index 023e0e8bc1..679614c4b5 100644 --- a/main/sdl2/APKBUILD +++ b/main/sdl2/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: August Klein <amatcoder@gmail.com> pkgname=sdl2 pkgver=2.0.7 -pkgrel=2 +pkgrel=3 pkgdesc="A development library designed to provide low level access to audio, keyboard, mouse, joystick and graphics" url="http://www.libsdl.org" arch="all" @@ -12,7 +12,8 @@ depends_dev="directfb-dev" makedepends="alsa-lib-dev directfb-dev libxcursor-dev libxrandr-dev libxrender-dev mesa-dev libxscrnsaver-dev libxi-dev libx11-dev libxext-dev libusb-dev libxkbcommon-dev" subpackages="$pkgname-dev" -source="https://www.libsdl.org/release/SDL2-$pkgver.tar.gz" +source="https://www.libsdl.org/release/SDL2-$pkgver.tar.gz + fix-directfb-include.patch" builddir="$srcdir/SDL2-$pkgver" build() { @@ -43,4 +44,5 @@ package() { make DESTDIR="$pkgdir" install } -sha512sums="eed5477843086a0e66552eb197a5c4929134522bc366d873732361ea0df5fb841ef7e2b1913e21d1bae69e6fd3152ee630492e615c58cbe903e7d6e47b587410 SDL2-2.0.7.tar.gz" +sha512sums="eed5477843086a0e66552eb197a5c4929134522bc366d873732361ea0df5fb841ef7e2b1913e21d1bae69e6fd3152ee630492e615c58cbe903e7d6e47b587410 SDL2-2.0.7.tar.gz +f57a7a7b89f11934835b5693d104354be1107ddd31d34f6cfc07cf480b0811d775c95685f6b6b20c6154f03744ed976c8092973ddb6e87773969b8394e852c24 fix-directfb-include.patch" diff --git a/main/sdl2/fix-directfb-include.patch b/main/sdl2/fix-directfb-include.patch new file mode 100644 index 0000000000..0f7cf36016 --- /dev/null +++ b/main/sdl2/fix-directfb-include.patch @@ -0,0 +1,27 @@ +diff --git a/include/SDL_syswm.h b/include/SDL_syswm.h +index 2d18afb..6416e2f 100644 +--- a/include/SDL_syswm.h ++++ b/include/SDL_syswm.h +@@ -34,6 +34,11 @@ + #include "SDL_version.h" + + #include "begin_code.h" ++ ++#if defined(SDL_VIDEO_DRIVER_DIRECTFB) ++#include <directfb.h> ++#endif ++ + /* Set up for C function definitions, even when using C++ */ + #ifdef __cplusplus + extern "C" { +@@ -79,10 +84,6 @@ struct SDL_SysWMinfo; + + #endif /* defined(SDL_VIDEO_DRIVER_X11) */ + +-#if defined(SDL_VIDEO_DRIVER_DIRECTFB) +-#include <directfb.h> +-#endif +- + #if defined(SDL_VIDEO_DRIVER_COCOA) + #ifdef __OBJC__ + @class NSWindow; |