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

Sven-Hendrik Haase svenstaro at archlinux.org
Thu Jul 2 23:04:18 UTC 2020


    Date: Thursday, July 2, 2020 @ 23:04:17
  Author: svenstaro
Revision: 390442

upgpkg: sdl2 2.0.12-2: Enable hidapi support (FS#67174)

Modified:
  sdl2/trunk/PKGBUILD

----------+
 PKGBUILD |   25 +++++++++++++------------
 1 file changed, 13 insertions(+), 12 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-06-25 13:38:05 UTC (rev 390441)
+++ PKGBUILD	2020-07-02 23:04:17 UTC (rev 390442)
@@ -2,14 +2,14 @@
 
 pkgname=sdl2
 pkgver=2.0.12
-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="https://www.libsdl.org"
 license=('MIT')
-depends=('glibc' 'libxext' 'libxrender' 'libx11' 'libgl' 'libxcursor' 'libibus')
+depends=('glibc' 'libxext' 'libxrender' 'libx11' 'libgl' 'libxcursor' 'libibus' 'hidapi')
 makedepends=('alsa-lib' 'mesa' 'libpulse' 'libxrandr' 'libxinerama' 'wayland' 'libxkbcommon'
-             'wayland-protocols' 'ibus' 'fcitx' 'libxss' 'cmake' 'jack')
+             'wayland-protocols' 'ibus' 'fcitx' 'libxss' 'cmake' 'jack' 'ninja')
 optdepends=('alsa-lib: ALSA audio driver'
             'libpulse: PulseAudio audio driver'
             'jack: JACK audio driver')
@@ -20,13 +20,14 @@
 
 prepare() {
   cd SDL2-${pkgver}
-
-  mkdir build
+  sed -i "s/LIBUSB libusb/LIBUSB libusb-1.0/g" cmake/sdlchecks.cmake
 }
 
 build() {
-  cd SDL2-${pkgver}/build
-  cmake .. \
+  cd SDL2-${pkgver}
+  cmake . \
+      -Bbuild \
+      -GNinja \
       -DCMAKE_INSTALL_PREFIX=/usr \
       -DSDL_STATIC=OFF \
       -DSDL_DLOPEN=ON \
@@ -34,22 +35,22 @@
       -DESD=OFF \
       -DNAS=OFF \
       -DALSA=ON \
+      -DHIDAPI=ON \
       -DPULSEAUDIO_SHARED=ON \
       -DVIDEO_WAYLAND=ON \
       -DRPATH=OFF \
       -DCLOCK_GETTIME=ON \
       -DJACK_SHARED=ON
-  make
+  ninja -C build
 }
 
 package() {
-  cd SDL2-${pkgver}/build
+  cd SDL2-${pkgver}
+  DESTDIR="${pkgdir}" ninja -C build install
 
-  make DESTDIR="${pkgdir}" install
-
   sed -i "s/libSDL2\.a/libSDL2main.a/g" "$pkgdir"/usr/lib/cmake/SDL2/SDL2Targets-noconfig.cmake
 
-  install -Dm644 ../COPYING.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+  install -Dm644 COPYING.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
 }
 
 # vim: ts=2 sw=2 et:


More information about the arch-commits mailing list