blob: 365b196004cf64d63965b08d1aec51e0d4584db7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
_pkgname=mingw-w64-raylib
pkgname=mingw-w64-raylib-static
pkgver=4.2.0
pkgrel=1
pkgdesc="Simple and easy to use game programming library (mingw-w64)"
arch=(any)
url="https://www.raylib.com"
license=(ZLIB)
# Use internal GLFW for now, since the bundled GLFW is newer
#depends=(mingw-w64-crt mingw-w64-glfw)
depends=(mingw-w64-crt)
makedepends=(mingw-w64-cmake)
provides=($_pkgname)
conflicts=($_pkgname)
options=(!strip !buildflags staticlibs)
install=
source=(
"raylib_${pkgver}.tar.gz::https://github.com/raysan5/raylib/archive/refs/tags/${pkgver}.tar.gz"
'raylib_glfw.patch'
)
noextract=()
md5sums=(
8b63a4d4a1e4356fc332fa16eb85d87e
a44c1130eac923910f3047696c9a7363
)
_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}"
pushd "$srcdir/build_${_arch}"
"${_arch}-cmake" "$srcdir/raylib-${pkgver}" \
-Wno-dev \
-D CMAKE_BUILD_TYPE=Release \
-D CMAKE_C_FLAGS="$CFLAGS -w" \
-D USE_EXTERNAL_GLFW=OFF \
-D BUILD_EXAMPLES=OFF \
-D BUILD_GAMES=OFF \
-D SHARED=ON \
-D STATIC=OFF
make -j
popd
done
}
package() {
for _arch in ${_architectures}; do
pushd "$srcdir/build_${_arch}"
DESTDIR="$pkgdir" make install
${_arch}-strip -g "$pkgdir"/usr/${_arch}/lib/*.a
popd
done
}
|