2016-01-06 01:47:46 +00:00
|
|
|
# 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
|
|
|
|
|
|
|
|
pkgbase=mgba
|
|
|
|
pkgname=('libmgba' 'mgba-sdl' 'mgba-qt')
|
2024-01-21 16:03:00 +00:00
|
|
|
pkgver=0.10.3
|
2024-11-08 01:35:00 +00:00
|
|
|
pkgrel=3
|
2017-12-10 04:49:35 +00:00
|
|
|
arch=('x86_64')
|
2016-01-06 01:47:46 +00:00
|
|
|
url='http://mgba.io'
|
|
|
|
license=('custom:MPL2')
|
|
|
|
makedepends=('cmake' 'qt5-multimedia' 'sdl2' 'zlib' 'libpng' 'libzip' 'libedit'
|
2023-08-19 15:30:20 +00:00
|
|
|
'ffmpeg' 'desktop-file-utils' 'qt5-tools' 'lua')
|
|
|
|
optdepends=('lua: scripting support')
|
2024-06-21 22:49:00 +00:00
|
|
|
source=($pkgbase-$pkgver.tar.gz::https://github.com/mgba-emu/mgba/archive/$pkgver.tar.gz
|
|
|
|
https://github.com/mgba-emu/mgba/commit/3a3ebb5d.patch)
|
|
|
|
sha256sums=('be2cda7de3da8819fdab0c659c5cd4c4b8ca89d9ecddeeeef522db6d31a64143'
|
|
|
|
'3fb63923547c42165dfd8bd47925cae3c711fec87f767bb5a94361dd022c8bd2')
|
|
|
|
|
|
|
|
prepare() {
|
|
|
|
cd mgba-$pkgver
|
|
|
|
patch -p1 -i ../3a3ebb5d.patch # Fix build with GCC 14
|
|
|
|
}
|
2016-07-13 01:09:43 +00:00
|
|
|
|
2016-01-06 01:47:46 +00:00
|
|
|
build() {
|
2024-06-21 22:49:00 +00:00
|
|
|
CFLAGS+=" -Wno-incompatible-pointer-types" \
|
2023-01-22 18:30:58 +00:00
|
|
|
cmake -B build -S mgba-$pkgver \
|
|
|
|
-DCMAKE_BUILD_TYPE=None \
|
|
|
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
|
|
|
-DCMAKE_INSTALL_LIBDIR=lib \
|
|
|
|
-DBUILD_LTO=OFF \
|
|
|
|
-Wno-dev
|
|
|
|
cmake --build build
|
2016-01-06 01:47:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
package_libmgba() {
|
|
|
|
pkgdesc='Shared library of mGBA'
|
2022-10-16 15:28:55 +00:00
|
|
|
depends=('zlib' 'libpng' 'libzip' 'libedit' 'ffmpeg' 'sqlite')
|
2016-01-06 01:47:46 +00:00
|
|
|
|
|
|
|
cmake -DCOMPONENT=libmgba mgba-$pkgver -DCMAKE_INSTALL_PREFIX="$pkgdir/usr" \
|
|
|
|
-P build/cmake_install.cmake
|
2021-05-13 18:33:04 +00:00
|
|
|
|
|
|
|
cmake -DCOMPONENT=mgba-dev mgba-$pkgver -DCMAKE_INSTALL_PREFIX="$pkgdir/usr" \
|
|
|
|
-P build/cmake_install.cmake
|
|
|
|
|
2016-01-06 01:47:46 +00:00
|
|
|
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
|
|
|
|
|
2023-01-22 18:30:58 +00:00
|
|
|
install -Dm644 mgba-$pkgver/res/mgba-256.png "$pkgdir"/usr/share/pixmaps/io.mgba.mGBA.png
|
2016-01-06 01:47:46 +00:00
|
|
|
|
|
|
|
install -d "$pkgdir"/usr/share/licenses/$pkgname
|
|
|
|
ln -s /usr/share/licenses/libmgba/LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
|
|
|
|
}
|