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

Jan Steffens heftig at gemini.archlinux.org
Sat Dec 25 01:04:17 UTC 2021


    Date: Saturday, December 25, 2021 @ 01:04:17
  Author: heftig
Revision: 433047

2.0.18-3: lto

Modified:
  sdl2/trunk/PKGBUILD

----------+
 PKGBUILD |   25 +++++++++++--------------
 1 file changed, 11 insertions(+), 14 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2021-12-24 17:02:52 UTC (rev 433046)
+++ PKGBUILD	2021-12-25 01:04:17 UTC (rev 433047)
@@ -2,7 +2,7 @@
 
 pkgname=sdl2
 pkgver=2.0.18
-pkgrel=2
+pkgrel=3
 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"
@@ -29,24 +29,21 @@
 }
 
 build() {
-  cd SDL2-${pkgver}
-  cmake \
-      -Bbuild \
-      -GNinja \
-      -DCMAKE_INSTALL_PREFIX=/usr \
-      -DSDL_STATIC=OFF \
-      -DSDL_DLOPEN=ON \
-      -DSDL_RPATH=OFF
-  ninja -C build
+  CFLAGS+=" -ffat-lto-objects"
+  cmake -S SDL2-${pkgver} -B build -G Ninja \
+    -D CMAKE_INSTALL_PREFIX=/usr \
+    -D SDL_STATIC=OFF \
+    -D SDL_DLOPEN=ON \
+    -D SDL_RPATH=OFF
+  cmake --build build
 }
 
 package() {
-  cd SDL2-${pkgver}
-  DESTDIR="${pkgdir}" ninja -C build install
+  DESTDIR="${pkgdir}" cmake --install build
 
   sed -i "s/libSDL2\.a/libSDL2main.a/g" "$pkgdir"/usr/lib/cmake/SDL2/SDL2Targets-noconfig.cmake
 
-  install -Dm644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+  install -Dm644 SDL2-${pkgver}/LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
 }
 
-# vim: ts=2 sw=2 et:
+# vim:set ts=2 sw=2 et:



More information about the arch-commits mailing list