added community/mgba

This commit is contained in:
Kevin Mihelich 2016-01-06 01:47:46 +00:00
parent 200d0c5ab7
commit 70046c5c21
3 changed files with 92 additions and 0 deletions

71
community/mgba/PKGBUILD Normal file
View file

@ -0,0 +1,71 @@
# $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
# - build for GLES on !aarch64
pkgbase=mgba
pkgname=('libmgba' 'mgba-sdl' 'mgba-qt')
pkgver=0.3.2
pkgrel=1
arch=('i686' 'x86_64')
url='http://mgba.io'
license=('custom:MPL2')
makedepends=('cmake' 'qt5-multimedia' 'sdl2' 'zlib' 'libpng' 'libzip' 'libedit'
'ffmpeg' 'imagemagick' 'desktop-file-utils')
install=$pkgbase.install
source=($pkgbase-$pkgver.tar.gz::https://github.com/mgba-emu/mgba/archive/$pkgver.tar.gz
mgba.desktop)
md5sums=('04d111daa79b21b96219f7e884245ddc'
'8639165ead14363de45c0f9db3b7d97a')
prepare() {
[[ ! -d build ]] && mkdir build || rm -rf build
cd mgba-$pkgver/res
convert mgba-1024.png -resize 256x256 mgba-256.png
}
build() {
cd build
[[ $CARCH != "aarch64" ]] && CONFIG="-DBUILD_GL=OFF -DBUILD_GLES2=ON"
cmake "$srcdir"/mgba-$pkgver -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_LTO=OFF $CONFIG
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
desktop-file-install mgba.desktop --dir "$pkgdir"/usr/share/applications/
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
}

View file

@ -0,0 +1,10 @@
[Desktop Entry]
Type=Application
Version=1.0
Name=mGBA
Comment=mGBA Game Boy Advance Emulator
Icon=mgba.png
Exec=mgba-qt
Categories=Game;Emulator;
Terminal=false
StartupNotify=false

View file

@ -0,0 +1,11 @@
post_install() {
gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
}
post_upgrade() {
post_install
}
post_remove() {
post_install
}