[arch-commits] Commit in sdl2/trunk (PKGBUILD)

Sven-Hendrik Haase svenstaro at archlinux.org
Wed Mar 28 11:10:53 UTC 2018


    Date: Wednesday, March 28, 2018 @ 11:10:53
  Author: svenstaro
Revision: 320546

upgpkg: sdl2 2.0.8-2

Switch to CMake for building

Modified:
  sdl2/trunk/PKGBUILD

----------+
 PKGBUILD |   29 +++++++++++++++++------------
 1 file changed, 17 insertions(+), 12 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2018-03-28 10:20:36 UTC (rev 320545)
+++ PKGBUILD	2018-03-28 11:10:53 UTC (rev 320546)
@@ -1,7 +1,7 @@
 # Maintainer: Sven-Hendrik Haase <sh at lutzhaase.com>
 pkgname=sdl2
 pkgver=2.0.8
-pkgrel=1
+pkgrel=2
 pkgdesc="A library for portable low-level access to a video framebuffer, audio output, mouse, and keyboard (Version 2)"
 arch=('x86_64')
 url="http://www.libsdl.org"
@@ -8,7 +8,7 @@
 license=('MIT')
 depends=('glibc' 'libxext' 'libxrender' 'libx11' 'libgl' 'libxcursor')
 makedepends=('alsa-lib' 'mesa' 'libpulse' 'libxrandr' 'libxinerama' 'wayland' 'libxkbcommon'
-             'wayland-protocols' 'ibus' 'fcitx' 'libxss')
+             'wayland-protocols' 'ibus' 'fcitx' 'libxss' 'cmake')
 optdepends=('alsa-lib: ALSA audio driver'
             'libpulse: PulseAudio audio driver')
 source=("https://www.libsdl.org/release/SDL2-${pkgver}.tar.gz"{,.sig})
@@ -17,23 +17,28 @@
 validpgpkeys=('1528635D8053A57F77D1E08630A59377A7763BE6')
 
 prepare() {
+  cd SDL2-${pkgver}
+  rm -rf build
   mkdir build
 }
 
 build() {
-  cd build
-  ../SDL2-$pkgver/configure --prefix=/usr \
-    --enable-sdl-dlopen \
-    --disable-arts --disable-esd --disable-nas \
-    --enable-alsa --enable-pulseaudio-shared \
-    --enable-video-wayland \
-    --enable-ibus --enable-fcitx \
-    --disable-rpath
+  cd SDL2-${pkgver}/build
+  cmake .. \
+      -DCMAKE_INSTALL_PREFIX=/usr \
+      -DSDL_DLOPEN=ON \
+      -DARTS=OFF \
+      -DESD=OFF \
+      -DNAS=OFF \
+      -DALSA=OFF \
+      -DPULSEAUDIO_SHARED=ON \
+      -DVIDEO_WAYLAND=ON \
+      -DRPATH=OFF
   make
 }
 
 package() {
-  cd build
+  cd SDL2-${pkgver}/build
   make DESTDIR="$pkgdir" install
-  install -Dm644 ../SDL2-$pkgver/COPYING.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+  install -Dm644 ../COPYING.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
 }



More information about the arch-commits mailing list