Date: Wednesday, April 5, 2023 @ 06:40:44
Author: felixonmars
Revision: 1436237
archrelease: copy trunk to community-staging-x86_64
Added:
haskell-sdl2/repos/community-staging-x86_64/
haskell-sdl2/repos/community-staging-x86_64/PKGBUILD
(from rev 1436236, haskell-sdl2/trunk/PKGBUILD)
----------+
PKGBUILD | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 51 insertions(+)
Copied: haskell-sdl2/repos/community-staging-x86_64/PKGBUILD (from rev 1436236,
haskell-sdl2/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD (rev 0)
+++ community-staging-x86_64/PKGBUILD 2023-04-05 06:40:44 UTC (rev 1436237)
@@ -0,0 +1,51 @@
+# Maintainer: Felix Yan <[email protected]>
+
+_hkgname=sdl2
+pkgname=haskell-sdl2
+pkgver=2.5.4.0
+pkgrel=38
+pkgdesc="Both high- and low-level bindings to the SDL library"
+url="https://github.com/haskell-game/sdl2.git"
+license=("BSD")
+arch=('x86_64')
+depends=('ghc-libs' 'sdl2' 'haskell-statevar' 'haskell-linear'
'haskell-vector')
+makedepends=('ghc' 'uusi' 'pulseaudio' 'xorg-server-xvfb' 'haskell-weigh')
+source=("https://hackage.haskell.org/packages/archive/$_hkgname/$pkgver/$_hkgname-$pkgver.tar.gz")
+sha256sums=('d5231b6fbf6d83f928168f05f6174b8776d8e97b55228dc8ec3391ef22bc65bc')
+
+prepare() {
+ cd $_hkgname-$pkgver
+ uusi -u linear -u vector $_hkgname.cabal
+}
+
+build() {
+ cd $_hkgname-$pkgver
+
+ runhaskell Setup configure -O --enable-shared --enable-executable-dynamic
--disable-library-vanilla \
+ --prefix=/usr --docdir=/usr/share/doc/$pkgname --datasubdir=$pkgname
--datasubdir=haskell-sdl2 --enable-tests \
+ --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid
--ghc-option=-fllvm \
+ --ghc-option=-optl-Wl\,-z\,relro\,-z\,now \
+ --ghc-option='-pie' \
+ -f-examples -f-no-linear -f-opengl-example -frecent-ish -fpkgconfig
+
+ runhaskell Setup build $MAKEFLAGS
+ runhaskell Setup register --gen-script
+ runhaskell Setup unregister --gen-script
+ sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
+ sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
+}
+
+check() {
+ cd $_hkgname-$pkgver
+ xvfb-run runhaskell Setup test --show-details=direct
+}
+
+package() {
+ cd $_hkgname-$pkgver
+
+ install -D -m744 register.sh "$pkgdir"/usr/share/haskell/register/$pkgname.sh
+ install -D -m744 unregister.sh
"$pkgdir"/usr/share/haskell/unregister/$pkgname.sh
+ runhaskell Setup copy --destdir="$pkgdir"
+ install -D -m644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
+ rm -f "$pkgdir"/usr/share/doc/$pkgname/LICENSE
+}