aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2017-11-22 15:26:28 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2017-11-22 15:30:31 +0000
commitbf9e945981a04cac944060f2d644d9d8ca216ae1 (patch)
tree06f4914841d5f05610e5d25fe96cd075a35ef25b
parent31d35d3abc8c8c51b7943fc1a8e75de49a2f0a0d (diff)
downloadalpine_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/APKBUILD8
-rw-r--r--main/sdl2/fix-directfb-include.patch27
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>
3pkgname=sdl2 3pkgname=sdl2
4pkgver=2.0.7 4pkgver=2.0.7
5pkgrel=2 5pkgrel=3
6pkgdesc="A development library designed to provide low level access to audio, keyboard, mouse, joystick and graphics" 6pkgdesc="A development library designed to provide low level access to audio, keyboard, mouse, joystick and graphics"
7url="http://www.libsdl.org" 7url="http://www.libsdl.org"
8arch="all" 8arch="all"
@@ -12,7 +12,8 @@ depends_dev="directfb-dev"
12makedepends="alsa-lib-dev directfb-dev libxcursor-dev libxrandr-dev libxrender-dev mesa-dev 12makedepends="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"
14subpackages="$pkgname-dev" 14subpackages="$pkgname-dev"
15source="https://www.libsdl.org/release/SDL2-$pkgver.tar.gz" 15source="https://www.libsdl.org/release/SDL2-$pkgver.tar.gz
16 fix-directfb-include.patch"
16builddir="$srcdir/SDL2-$pkgver" 17builddir="$srcdir/SDL2-$pkgver"
17 18
18build() { 19build() {
@@ -43,4 +44,5 @@ package() {
43 make DESTDIR="$pkgdir" install 44 make DESTDIR="$pkgdir" install
44} 45}
45 46
46sha512sums="eed5477843086a0e66552eb197a5c4929134522bc366d873732361ea0df5fb841ef7e2b1913e21d1bae69e6fd3152ee630492e615c58cbe903e7d6e47b587410 SDL2-2.0.7.tar.gz" 47sha512sums="eed5477843086a0e66552eb197a5c4929134522bc366d873732361ea0df5fb841ef7e2b1913e21d1bae69e6fd3152ee630492e615c58cbe903e7d6e47b587410 SDL2-2.0.7.tar.gz
48f57a7a7b89f11934835b5693d104354be1107ddd31d34f6cfc07cf480b0811d775c95685f6b6b20c6154f03744ed976c8092973ddb6e87773969b8394e852c24 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 @@
1diff --git a/include/SDL_syswm.h b/include/SDL_syswm.h
2index 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;