aboutsummaryrefslogtreecommitdiffstats
path: root/main/sdl2
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2019-07-22 18:12:54 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2019-07-22 19:03:08 +0000
commitede95d986c91cc187d590baddf3f69caee3fed8e (patch)
tree21c7c43fdd80d25f6c1c08dd55e9485123003be6 /main/sdl2
parentb36171f596419c893625fda7e9a9bd707e128160 (diff)
main/sdl2: fix directfb cflags in .pc
make sure the directfb CFLAGS are included in the .pc. This fixes the following compiler error: /usr/include/SDL2/SDL_syswm.h:77:10: fatal error: directfb.h: No such file or directory #include <directfb.h> ^~~~~~~~~~~~ We don't add the directfb pkg-config file as a dependency because directfb will not be directly linked to sdl, instead sdl will dlopen it. We do need the headers though, so we simply add the directfb CFLAGS. This is also what the autotools configure script does.
Diffstat (limited to 'main/sdl2')
-rw-r--r--main/sdl2/APKBUILD8
-rw-r--r--main/sdl2/directfb-cflags.patch12
2 files changed, 17 insertions, 3 deletions
diff --git a/main/sdl2/APKBUILD b/main/sdl2/APKBUILD
index 9230065499a..f1d5c5110f1 100644
--- a/main/sdl2/APKBUILD
+++ b/main/sdl2/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: August Klein <amatcoder@gmail.com>
pkgname=sdl2
pkgver=2.0.9
-pkgrel=1
+pkgrel=2
pkgdesc="A development library designed to provide low level access to audio, keyboard, mouse, joystick and graphics"
url="https://www.libsdl.org"
arch="all"
@@ -12,7 +12,8 @@ makedepends="cmake alsa-lib-dev directfb-dev libxcursor-dev libxrandr-dev libxre
libxscrnsaver-dev libxi-dev libx11-dev libxext-dev libusb-dev libxkbcommon-dev wayland-dev
wayland-protocols"
subpackages="$pkgname-dev"
-source="https://www.libsdl.org/release/SDL2-$pkgver.tar.gz"
+source="https://www.libsdl.org/release/SDL2-$pkgver.tar.gz
+ directfb-cflags.patch"
options="!check" # No good way to run the available tests
builddir="$srcdir/SDL2-$pkgver"
@@ -48,4 +49,5 @@ package() {
DESTDIR="$pkgdir" make install
}
-sha512sums="a78a4708b2bb5b35a7c7b7501eb3bd60a9aa3bb95a3d84e57763df4a377185e7312a94b66321eef7ca0d17255e4b402fc950e83ef0dbbd08f14ff1194107dc10 SDL2-2.0.9.tar.gz"
+sha512sums="a78a4708b2bb5b35a7c7b7501eb3bd60a9aa3bb95a3d84e57763df4a377185e7312a94b66321eef7ca0d17255e4b402fc950e83ef0dbbd08f14ff1194107dc10 SDL2-2.0.9.tar.gz
+e4e946a3bd51e011be1aa7d0c9a22182b1c00f277f4ae758dbe54f4ab1e4edb27f56f4324f9ace8d09f337a2f65b64b72e51326449ab2327632ff8b5fb57414b directfb-cflags.patch"
diff --git a/main/sdl2/directfb-cflags.patch b/main/sdl2/directfb-cflags.patch
new file mode 100644
index 00000000000..77f2398201e
--- /dev/null
+++ b/main/sdl2/directfb-cflags.patch
@@ -0,0 +1,12 @@
+diff --git a/cmake/sdlchecks.cmake b/cmake/sdlchecks.cmake
+index 4a2c3ed..c863d38 100644
+--- a/cmake/sdlchecks.cmake
++++ b/cmake/sdlchecks.cmake
+@@ -732,6 +732,7 @@ macro(CheckDirectFB)
+ set(SDL_VIDEO_DRIVER_DIRECTFB 1)
+ set(SDL_VIDEO_RENDER_DIRECTFB 1)
+ list(APPEND EXTRA_CFLAGS ${PKG_DIRECTFB_CFLAGS})
++ list(JOIN PKG_DIRECTFB_CFLAGS " " SDL_CFLAGS)
+ if(DIRECTFB_SHARED)
+ if(NOT HAVE_DLOPEN)
+ message_warn("You must have SDL_LoadObject() support for dynamic DirectFB loading")