PKGBUILDs/community/vbam/PKGBUILD
2022-12-28 12:13:53 -05:00

98 lines
1.9 KiB
Bash

# Maintainer: Maxime Gauduin <alucryd@archlinux.org>
# Contributor: Bartłomiej Piotrowski <nospam@bpiotrowski.pl>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - disable LTO: -DENABLE_LTO='FALSE'
pkgbase=vbam
pkgname=(
vbam-sdl
vbam-wx
)
pkgver=2.1.5
pkgrel=1
pkgdesc='Nintendo GameBoy Advance emulator'
arch=(x86_64)
url=https://vba-m.com
license=(GPL2)
depends=(
glu
libavcodec.so
libavformat.so
libavutil.so
libswscale.so
libgl
libpng
sdl2
sfml
zlib
)
makedepends=(
cmake
doctest
ffmpeg
git
libglvnd
ninja
wxwidgets-gtk3
zip
)
_tag=a964f4a5c69ce30d124bd6dcf987bdedc82f3928
source=(git+https://github.com/visualboyadvance-m/visualboyadvance-m.git?signed#tag=${_tag})
b2sums=('SKIP')
validpgpkeys=(A0C0E526E36FD2138C149D4D08AB596679D86240) # Rafael Kitover <rkitover@gmail.com>
prepare() {
cd visualboyadvance-m
# Unbundle doctest (bundled one is not glibc 2.34 compatible)
sed -e 's|${CMAKE_SOURCE_DIR}/third_party|/usr|' -i src/wx/tests/CMakeLists.txt
}
pkgver() {
cd visualboyadvance-m
git describe --tags | sed 's/^v//; s/-/.r/; s/-g/./'
}
build() {
cmake -S visualboyadvance-m -B build-sdl -G Ninja \
-DCMAKE_BUILD_TYPE='' \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_SKIP_RPATH=TRUE \
-DENABLE_SDL=TRUE \
-DENABLE_WX=FALSE \
-DENABLE_LINK=TRUE \
-DENABLE_LTO=FALSE
cmake --build build-sdl
cmake -S visualboyadvance-m -B build-wx -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_SKIP_RPATH=TRUE \
-DENABLE_SDL=FALSE \
-DENABLE_WX=TRUE \
-DENABLE_FFMPEG=TRUE \
-DENABLE_LINK=TRUE \
-DENABLE_LTO=FALSE
cmake --build build-wx
}
package_vbam-sdl() {
backup=(etc/vbam.cfg)
conflicts=(vbam-wx)
DESTDIR="${pkgdir}" cmake --install build-sdl
}
package_vbam-wx() {
depends+=(
glib2
gtk3
openal
wxwidgets-gtk3
zip
)
conflicts=(vbam-sdl)
DESTDIR="${pkgdir}" cmake --install build-wx
}
# vim: ts=2 sw=2 et: