PKGBUILDs/community/vbam/PKGBUILD

85 lines
2.1 KiB
Bash
Raw Normal View History

2017-12-31 15:49:08 +00:00
# $Id$
# 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')
2018-03-29 12:21:33 +00:00
pkgver=2.0.2
2018-05-12 16:53:51 +00:00
pkgrel=4
2017-12-31 15:49:08 +00:00
pkgdesc='Nintendo GameBoy Advance emulator'
arch=('x86_64')
url='http://vba-m.com'
license=('GPL2')
depends=('gcc-libs' 'glibc' 'libgl' 'libpng' 'sdl2' 'sfml' 'zlib')
makedepends=('cmake' 'ffmpeg' 'wxgtk3' 'zip')
2018-05-09 03:43:48 +00:00
source=("vbam-${pkgver}.tar.gz::https://github.com/visualboyadvance-m/visualboyadvance-m/archive/v${pkgver}.tar.gz"
"https://github.com/visualboyadvance-m/visualboyadvance-m/commit/f3f6ee7b1c9f95cc1e8df368652034b9da84c130.patch")
sha256sums=('f77461faa660b5fd955249087e45dc1dfa87ab8af8208ad7909b424af0879657'
'7f2b98913117ca873a610e9a0c7bdcd70521daf3c68ba010a2a400a2d1978bd6')
2017-12-31 15:49:08 +00:00
prepare() {
for p in sdl wx; do
if [[ -d build-$p ]]; then
rm -rf build-$p
fi
mkdir build-$p
done
2018-05-09 03:43:48 +00:00
cd visualboyadvance-m-${pkgver}
# Fix build against ffmpeg 4.0
patch -Np1 -i ../f3f6ee7b1c9f95cc1e8df368652034b9da84c130.patch
2017-12-31 15:49:08 +00:00
}
build() {
cd build-sdl
cmake ../visualboyadvance-m-${pkgver} \
-DCMAKE_BUILD_TYPE='Release' \
-DCMAKE_INSTALL_PREFIX='/usr' \
-DCMAKE_SKIP_RPATH='TRUE' \
-DENABLE_SDL='TRUE' \
-DENABLE_WX='FALSE' \
-DENABLE_LINK='TRUE' \
-DENABLE_LTO='FALSE'
make
cd ../build-wx
cmake ../visualboyadvance-m-${pkgver} \
-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'
make
}
package_vbam-sdl() {
backup=('etc/vbam.cfg')
conflicts=('vbam-wx')
cd build-sdl
make DESTDIR="${pkgdir}" install
}
package_vbam-wx() {
depends+=('glib2' 'gtk3' 'openal' 'wxgtk3' 'zip'
'libavcodec.so' 'libavformat.so' 'libavutil.so' 'libswscale.so')
conflicts=('vbam-sdl')
cd build-wx
make DESTDIR="${pkgdir}" install
}
# vim: ts=2 sw=2 et: