2016-01-06 01:47:46 +00:00
|
|
|
# $Id$
|
|
|
|
# Maintainer: Jonathan Steel <jsteel at archlinux.org>
|
|
|
|
# Contributor: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
|
|
|
|
# Contributor: Duck Hunt <vaporeon@tfwno.gf>
|
|
|
|
|
|
|
|
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
|
|
|
# - disable LTO
|
2016-09-21 19:55:35 +00:00
|
|
|
# - build for GLES, disable SDL on !aarch64
|
2016-01-06 01:47:46 +00:00
|
|
|
|
|
|
|
pkgbase=mgba
|
|
|
|
pkgname=('libmgba' 'mgba-sdl' 'mgba-qt')
|
2017-01-05 19:22:29 +00:00
|
|
|
pkgver=0.5.2
|
2017-07-18 23:57:58 +00:00
|
|
|
pkgrel=4
|
2016-01-06 01:47:46 +00:00
|
|
|
arch=('i686' 'x86_64')
|
|
|
|
url='http://mgba.io'
|
|
|
|
license=('custom:MPL2')
|
|
|
|
makedepends=('cmake' 'qt5-multimedia' 'sdl2' 'zlib' 'libpng' 'libzip' 'libedit'
|
2017-02-09 01:20:31 +00:00
|
|
|
'ffmpeg' 'imagemagick' 'desktop-file-utils' 'qt5-tools')
|
2017-07-18 23:57:58 +00:00
|
|
|
source=($pkgbase-$pkgver.tar.gz::https://github.com/mgba-emu/mgba/archive/$pkgver.tar.gz
|
|
|
|
mgba-gcc7.patch)
|
|
|
|
md5sums=('c3d20052503dca08e58030ac4e3f0408'
|
|
|
|
'ea583f6af8cdbfed8f83f16311b9c788')
|
2016-01-06 01:47:46 +00:00
|
|
|
|
2016-07-13 01:09:43 +00:00
|
|
|
prepare() {
|
|
|
|
[[ ! -d build ]] && mkdir build || rm -rf build
|
2017-07-18 23:57:58 +00:00
|
|
|
|
|
|
|
cd $pkgbase-$pkgver
|
|
|
|
patch -p1 -i ../mgba-gcc7.patch # Fix build with GCC7
|
2016-07-13 01:09:43 +00:00
|
|
|
}
|
|
|
|
|
2016-01-06 01:47:46 +00:00
|
|
|
build() {
|
|
|
|
cd build
|
2016-09-21 19:55:35 +00:00
|
|
|
[[ $CARCH != "aarch64" ]] && CONFIG="-DBUILD_GL=OFF -DBUILD_GLES2=ON -DBUILD_SDL=OFF"
|
2016-09-21 19:33:59 +00:00
|
|
|
cmake "$srcdir"/mgba-$pkgver -DCMAKE_INSTALL_PREFIX=/usr \
|
|
|
|
-DCMAKE_INSTALL_LIBDIR=lib -DBUILD_LTO=OFF $CONFIG
|
2016-01-06 01:47:46 +00:00
|
|
|
make
|
|
|
|
}
|
|
|
|
|
|
|
|
package_libmgba() {
|
|
|
|
pkgdesc='Shared library of mGBA'
|
|
|
|
depends=('zlib' 'libpng' 'libzip' 'libedit' 'ffmpeg' 'imagemagick')
|
|
|
|
|
|
|
|
cmake -DCOMPONENT=libmgba mgba-$pkgver -DCMAKE_INSTALL_PREFIX="$pkgdir/usr" \
|
|
|
|
-P build/cmake_install.cmake
|
|
|
|
install -Dm644 mgba-$pkgver/LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
|
|
|
|
}
|
|
|
|
|
|
|
|
package_mgba-sdl() {
|
|
|
|
pkgdesc='A Nintendo Gameboy Advance Emulator focusing on both speed and accuracy'
|
|
|
|
depends=('libmgba' 'sdl2')
|
|
|
|
|
|
|
|
cmake -DCOMPONENT=mgba-sdl mgba-$pkgver -DCMAKE_INSTALL_PREFIX="$pkgdir/usr" \
|
|
|
|
-P build/cmake_install.cmake
|
|
|
|
|
|
|
|
install -d "$pkgdir"/usr/share/licenses/$pkgname
|
|
|
|
ln -s /usr/share/licenses/libmgba/LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
|
|
|
|
}
|
|
|
|
|
|
|
|
package_mgba-qt() {
|
|
|
|
pkgdesc='A Nintendo Gameboy Advance Emulator focusing on both speed and accuracy. Qt5 UI.'
|
|
|
|
depends=('libmgba' 'qt5-multimedia' 'sdl2')
|
|
|
|
|
|
|
|
cmake -DCOMPONENT=mgba-qt mgba-$pkgver -DCMAKE_INSTALL_PREFIX="$pkgdir/usr" \
|
|
|
|
-P build/cmake_install.cmake
|
|
|
|
|
2016-02-05 00:37:08 +00:00
|
|
|
desktop-file-install mgba-$pkgver/res/mgba-qt.desktop --dir "$pkgdir"/usr/share/applications/
|
2016-01-06 01:47:46 +00:00
|
|
|
install -Dm644 mgba-$pkgver/res/mgba-256.png "$pkgdir"/usr/share/pixmaps/mgba.png
|
|
|
|
|
|
|
|
install -d "$pkgdir"/usr/share/licenses/$pkgname
|
|
|
|
ln -s /usr/share/licenses/libmgba/LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
|
|
|
|
}
|