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 | |
parent | 31d35d3abc8c8c51b7943fc1a8e75de49a2f0a0d (diff) | |
download | alpine_aports-bf9e945981a04cac944060f2d644d9d8ca216ae1.tar.bz2 alpine_aports-bf9e945981a04cac944060f2d644d9d8ca216ae1.tar.xz alpine_aports-bf9e945981a04cac944060f2d644d9d8ca216ae1.zip |
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
-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 @@ | |||
2 | # Maintainer: August Klein <amatcoder@gmail.com> | 2 | # Maintainer: August Klein <amatcoder@gmail.com> |
3 | pkgname=sdl2 | 3 | pkgname=sdl2 |
4 | pkgver=2.0.7 | 4 | pkgver=2.0.7 |
5 | pkgrel=2 | 5 | pkgrel=3 |
6 | pkgdesc="A development library designed to provide low level access to audio, keyboard, mouse, joystick and graphics" | 6 | pkgdesc="A development library designed to provide low level access to audio, keyboard, mouse, joystick and graphics" |
7 | url="http://www.libsdl.org" | 7 | url="http://www.libsdl.org" |
8 | arch="all" | 8 | arch="all" |
@@ -12,7 +12,8 @@ depends_dev="directfb-dev" | |||
12 | makedepends="alsa-lib-dev directfb-dev libxcursor-dev libxrandr-dev libxrender-dev mesa-dev | 12 | makedepends="alsa-lib-dev directfb-dev libxcursor-dev libxrandr-dev libxrender-dev mesa-dev |
13 | libxscrnsaver-dev libxi-dev libx11-dev libxext-dev libusb-dev libxkbcommon-dev" | 13 | libxscrnsaver-dev libxi-dev libx11-dev libxext-dev libusb-dev libxkbcommon-dev" |
14 | subpackages="$pkgname-dev" | 14 | subpackages="$pkgname-dev" |
15 | source="https://www.libsdl.org/release/SDL2-$pkgver.tar.gz" | 15 | source="https://www.libsdl.org/release/SDL2-$pkgver.tar.gz |
16 | fix-directfb-include.patch" | ||
16 | builddir="$srcdir/SDL2-$pkgver" | 17 | builddir="$srcdir/SDL2-$pkgver" |
17 | 18 | ||
18 | build() { | 19 | build() { |
@@ -43,4 +44,5 @@ package() { | |||
43 | make DESTDIR="$pkgdir" install | 44 | make DESTDIR="$pkgdir" install |
44 | } | 45 | } |
45 | 46 | ||
46 | sha512sums="eed5477843086a0e66552eb197a5c4929134522bc366d873732361ea0df5fb841ef7e2b1913e21d1bae69e6fd3152ee630492e615c58cbe903e7d6e47b587410 SDL2-2.0.7.tar.gz" | 47 | sha512sums="eed5477843086a0e66552eb197a5c4929134522bc366d873732361ea0df5fb841ef7e2b1913e21d1bae69e6fd3152ee630492e615c58cbe903e7d6e47b587410 SDL2-2.0.7.tar.gz |
48 | 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 @@ | |||
1 | diff --git a/include/SDL_syswm.h b/include/SDL_syswm.h | ||
2 | index 2d18afb..6416e2f 100644 | ||
3 | --- a/include/SDL_syswm.h | ||
4 | +++ b/include/SDL_syswm.h | ||
5 | @@ -34,6 +34,11 @@ | ||
6 | #include "SDL_version.h" | ||
7 | |||
8 | #include "begin_code.h" | ||
9 | + | ||
10 | +#if defined(SDL_VIDEO_DRIVER_DIRECTFB) | ||
11 | +#include <directfb.h> | ||
12 | +#endif | ||
13 | + | ||
14 | /* Set up for C function definitions, even when using C++ */ | ||
15 | #ifdef __cplusplus | ||
16 | extern "C" { | ||
17 | @@ -79,10 +84,6 @@ struct SDL_SysWMinfo; | ||
18 | |||
19 | #endif /* defined(SDL_VIDEO_DRIVER_X11) */ | ||
20 | |||
21 | -#if defined(SDL_VIDEO_DRIVER_DIRECTFB) | ||
22 | -#include <directfb.h> | ||
23 | -#endif | ||
24 | - | ||
25 | #if defined(SDL_VIDEO_DRIVER_COCOA) | ||
26 | #ifdef __OBJC__ | ||
27 | @class NSWindow; | ||