diff options
author | Stephen Seo | 2020-05-20 22:33:26 +0900 |
---|---|---|
committer | Stephen Seo | 2020-05-20 22:33:47 +0900 |
commit | 0d28123c93ef1bd6f26fdd5e046943808e78034b (patch) | |
tree | 9c9862864300b917c50f469f37bf6fffed283701 | |
parent | 62d4b3f761c314d56c9a4284df0b39a9a84dad7f (diff) | |
download | aur-0d28123c93ef1bd6f26fdd5e046943808e78034b.tar.gz |
Fix build with external glfw
Thanks xantares for the heads up
-rw-r--r-- | .SRCINFO | 5 | ||||
-rw-r--r-- | PKGBUILD | 21 | ||||
-rw-r--r-- | raylib_glfw.patch | 12 |
3 files changed, 32 insertions, 6 deletions
@@ -1,18 +1,21 @@ pkgbase = mingw-w64-raylib pkgdesc = Simple and easy to use game programming library (mingw-w64) pkgver = 3.0.0 - pkgrel = 1 + pkgrel = 2 url = https://www.raylib.com arch = any license = ZLIB makedepends = ninja makedepends = mingw-w64-cmake depends = mingw-w64-crt + depends = mingw-w64-glfw options = !strip options = !buildflags options = staticlibs source = raylib_3.0.0.tar.gz::https://github.com/raysan5/raylib/archive/3.0.0.tar.gz + source = raylib_glfw.patch md5sums = a5fcabf2e5241b1453521440d911f443 + md5sums = 41f1d54782295383566c5485adc8fae2 pkgname = mingw-w64-raylib @@ -1,25 +1,36 @@ # Maintainer: Stephen Seo <seo.disparate@gmail.com> pkgname=mingw-w64-raylib pkgver=3.0.0 -pkgrel=1 +pkgrel=2 pkgdesc="Simple and easy to use game programming library (mingw-w64)" arch=(any) url="https://www.raylib.com" license=(ZLIB) groups=() -depends=(mingw-w64-crt) +depends=(mingw-w64-crt mingw-w64-glfw) makedepends=(ninja mingw-w64-cmake) replaces=() backup=() options=(!strip !buildflags staticlibs) install= -source=("raylib_${pkgver}.tar.gz::https://github.com/raysan5/raylib/archive/3.0.0.tar.gz") +source=( + "raylib_${pkgver}.tar.gz::https://github.com/raysan5/raylib/archive/3.0.0.tar.gz" + 'raylib_glfw.patch' +) noextract=() -md5sums=('a5fcabf2e5241b1453521440d911f443') +md5sums=( + 'a5fcabf2e5241b1453521440d911f443' + '41f1d54782295383566c5485adc8fae2' +) _architectures="i686-w64-mingw32 x86_64-w64-mingw32" +prepare() { + cd "$srcdir/raylib-${pkgver}" + patch -p1 < "$srcdir/raylib_glfw.patch" +} + build() { for _arch in ${_architectures}; do mkdir -p "$srcdir/build_${_arch}" @@ -28,7 +39,7 @@ build() { -Wno-dev \ -D CMAKE_BUILD_TYPE=Release \ -D CMAKE_C_FLAGS="$CFLAGS -w" \ - -D USE_EXTERNAL_GLFW=OFF \ + -D USE_EXTERNAL_GLFW=ON \ -D BUILD_EXAMPLES=OFF \ -D BUILD_GAMES=OFF \ -D SHARED=ON \ diff --git a/raylib_glfw.patch b/raylib_glfw.patch new file mode 100644 index 000000000000..692c06ac720d --- /dev/null +++ b/raylib_glfw.patch @@ -0,0 +1,12 @@ +Fixes issues with name conflicts building with external glfw +--- a/src/core.c ++++ b/src/core.c +@@ -193,7 +193,7 @@ + + // Support retrieving native window handlers + #if defined(_WIN32) +- #define GLFW_EXPOSE_NATIVE_WIN32 ++// #define GLFW_EXPOSE_NATIVE_WIN32 + #include <GLFW/glfw3native.h> // WARNING: It requires customization to avoid windows.h inclusion! + + #if !defined(SUPPORT_BUSY_WAIT_LOOP) |