PKGBUILDs/community/vbam/PKGBUILD
2022-02-18 06:01:15 +00:00

106 lines
2.4 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'
# - patch to fix doctest header with new glibc
pkgbase=vbam
pkgname=(
vbam-sdl
vbam-wx
)
pkgver=2.1.4.r453.65b5affe
pkgrel=1
pkgdesc='Nintendo GameBoy Advance emulator'
arch=(x86_64)
url=https://vba-m.com
license=(GPL2)
depends=(
libavcodec.so
libavformat.so
libavutil.so
libswscale.so
libgl
libpng
sdl2
sfml
zlib
)
makedepends=(
cmake
ffmpeg
git
libglvnd
ninja
wxgtk3
zip
)
#_tag=8f4862de88de2f95866b7e501304f1e57a4e0abb
_commit=65b5affe7ddd87653362d1bb1cb3da7979762b92
#source=(git+https://github.com/visualboyadvance-m/visualboyadvance-m.git?signed#tag=${_tag})
source=(
git+https://github.com/visualboyadvance-m/visualboyadvance-m.git#commit=${_commit}
vbam-ffmpeg5.0.patch
doctest.patch
)
b2sums=('SKIP'
'c24813fab7a155ac0711e4c5764148d45dae8c1a57938fd8ce253368c31f7d91c2c912f5b0da48c70952f990449315489f175e0894d9f4a75efc53a3e6abd162'
'e602abde1eb36eed2e047d20d74346c051ad3f2f17f3b5c7afa59181947c7af587139753a3d5ad53f5b4ea15634be807779cfa595ce07d9e64f6e8c31909a990')
validpgpkeys=(A0C0E526E36FD2138C149D4D08AB596679D86240) # Rafael Kitover <rkitover@gmail.com>
prepare() {
cd visualboyadvance-m
patch -Np1 -i ../vbam-ffmpeg5.0.patch
patch -Np1 -i ../doctest.patch
}
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 \
-DwxWidgets_CONFIG_EXECUTABLE=/usr/bin/wx-config-gtk3
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
wxgtk3
zip
)
conflicts=(vbam-sdl)
DESTDIR="${pkgdir}" cmake --install build-wx
}
# vim: ts=2 sw=2 et: