summaryrefslogtreecommitdiff
path: root/user/sdl2/APKBUILD
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2019-12-28 08:06:31 -0600
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2019-12-28 08:06:31 -0600
commitfd63dbb46621a57d0c1e684d32e32b28b7c43d5a (patch)
tree8766dbe3c4081011b5e88929433d265e2fafeae0 /user/sdl2/APKBUILD
parent0ba5758baa00b2602d875d8904084b8bac276322 (diff)
downloadpackages-fd63dbb46621a57d0c1e684d32e32b28b7c43d5a.tar.gz
packages-fd63dbb46621a57d0c1e684d32e32b28b7c43d5a.tar.bz2
packages-fd63dbb46621a57d0c1e684d32e32b28b7c43d5a.tar.xz
packages-fd63dbb46621a57d0c1e684d32e32b28b7c43d5a.zip
user/sdl2: Use CMake instead of autotools
The SDL 2 build system does not support dash-binsh when using the autotools build system: ./configure: 1: ./configure: objects: not found ./configure: 1: ./configure: objects: not found ./configure: 1: ./configure: objects: not found ./configure: 1: ./configure: objects: not found ./configure: 1: ./configure: objects: not found ./configure: 1: ./configure: objects: not found ./configure: 1: ./configure: objects: not found ./configure: 1: ./configure: objects: not found make: *** No rule to make target 'build/SDL.lo', needed by 'build/libSDL2.la'. Stop. Even when forcing shell to bash and running configure under bash, libtool fails to work: ./libtool: 1569: ./libtool: preserve_args+= --quiet: not found The CMake build system works with dash-binsh, so let's just use that.
Diffstat (limited to 'user/sdl2/APKBUILD')
-rw-r--r--user/sdl2/APKBUILD32
1 files changed, 14 insertions, 18 deletions
diff --git a/user/sdl2/APKBUILD b/user/sdl2/APKBUILD
index 0ba480012..d9926687a 100644
--- a/user/sdl2/APKBUILD
+++ b/user/sdl2/APKBUILD
@@ -6,37 +6,33 @@ pkgrel=0
pkgdesc="Low level audio, keyboard, mouse, joystick and graphics library"
url="https://www.libsdl.org/"
arch="all"
+options="!check" # No test suite.
license="zlib"
depends=""
makedepends="alsa-lib-dev libx11-dev libxcursor-dev libxext-dev libxi-dev
libxkbcommon-dev libxrandr-dev libxrender-dev libusb-dev mesa-dev
- libxscrnsaver-dev dbus-dev eudev-dev pulseaudio-dev"
+ libxscrnsaver-dev dbus-dev eudev-dev pulseaudio-dev cmake"
subpackages="$pkgname-dev"
source="https://www.libsdl.org/release/SDL2-$pkgver.tar.gz"
builddir="$srcdir/SDL2-$pkgver"
build() {
# pmOS needs DirectFB for battery animations and LUKS unlocking
- ./configure \
- --build=$CBUILD \
- --host=$CHOST \
- --prefix=/usr \
- --enable-alsa \
- --enable-clock_gettime \
- --disable-arts \
- --disable-esd \
- --disable-nas \
- --disable-rpath \
- --with-x \
- make
-}
-
-check() {
- [ "$($builddir/sdl2-config --version)" = "$pkgver" ]
+ if [ "$CBUILD" != "$CHOST" ]; then
+ CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
+ fi
+ cmake \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_LIBDIR=lib \
+ -DBUILD_SHARED_LIBS=True \
+ -DCMAKE_BUILD_TYPE=RelWithDebugInfo \
+ -DCMAKE_C_FLAGS="$CFLAGS" \
+ ${CMAKE_CROSSOPTS} -Bbuild
+ make -C build
}
package() {
- make DESTDIR="$pkgdir" install
+ make DESTDIR="$pkgdir" -C build install
}
sha512sums="f49b869362699b3282f6e82920e59c7fac581bcbf955f18a81cc126293c08093a90df7fcb39517cc8bc32708d2213fe645a42b655d6d811c1386efebb3d3c798 SDL2-2.0.10.tar.gz"