mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-05 22:48:55 +02:00
x86_64 is used as a baseline: the "x86_64" entry, whatever status it has, is transformed into "all", and then the other entries in ARCHITECTURES either dropped or rearranged appropriately.
120 lines
3.8 KiB
Bash
120 lines
3.8 KiB
Bash
SUMMARY="A new Game Boy, Game Boy Color, and Game Boy Advance emulator written in C"
|
|
DESCRIPTION="mGBA is a new generation of Game Boy Advance emulator. The project \
|
|
started in April 2013 with the goal of being fast enough to run on lower end \
|
|
hardware than other emulators support, without sacrificing accuracy or \
|
|
portability. Even in the initial version, games generally played without \
|
|
problems. mGBA has only gotten better since then, and now boasts being the \
|
|
most accurate GBA emulator around.
|
|
|
|
Other goals include accurate enough emulation to provide a development \
|
|
environment for homebrew software, a good workflow for tool-assist runners, \
|
|
and a modern feature set for emulators that older emulators may not support."
|
|
HOMEPAGE="https://mgba.io/"
|
|
COPYRIGHT="2013-2021 Jeffrey Pfau"
|
|
LICENSE="MPL v2.0"
|
|
REVISION="1"
|
|
SOURCE_URI="https://github.com/mgba-emu/mgba/archive/$portVersion.tar.gz"
|
|
CHECKSUM_SHA256="c1e5f6c7635dfb015f8c9466638dd55ee7747cdfb0ca69017baf15ec19d727f9"
|
|
ADDITIONAL_FILES="mgba.rdef.in"
|
|
|
|
ARCHITECTURES="all !x86_gcc2"
|
|
SECONDARY_ARCHITECTURES="x86"
|
|
|
|
PROVIDES="
|
|
mgba$secondaryArchSuffix = $portVersion
|
|
cmd:mgba$secondaryArchSuffix = $portVersion
|
|
cmd:mgba_qt$secondaryArchSuffix = $portVersion
|
|
lib:libmgba$secondaryArchSuffix = $portVersion
|
|
"
|
|
REQUIRES="
|
|
haiku$secondaryArchSuffix
|
|
lib:libavcodec$secondaryArchSuffix
|
|
lib:libavformat$secondaryArchSuffix
|
|
lib:libavutil$secondaryArchSuffix
|
|
lib:libedit$secondaryArchSuffix
|
|
lib:liblzma$secondaryArchSuffix
|
|
lib:libminizip$secondaryArchSuffix
|
|
lib:libncurses$secondaryArchSuffix
|
|
lib:libpng16$secondaryArchSuffix
|
|
lib:libQt5Core$secondaryArchSuffix
|
|
lib:libQt5Gui$secondaryArchSuffix
|
|
lib:libQt5Multimedia$secondaryArchSuffix
|
|
lib:libQt5Network$secondaryArchSuffix
|
|
lib:libQt5Widgets$secondaryArchSuffix
|
|
# If you have come here to upgrade mGBA to use SDL2, know this:
|
|
# Haiku's SDL2 port is (at time of writing) TOTALLY INCOMPATIBLE with
|
|
# Qt and cannot be run in the same binary as it, as both create
|
|
# BApplication objects independent of the other.
|
|
# SDL1.2 checks if one already exists first, so it's OK.
|
|
lib:libSDL_1.2$secondaryArchSuffix
|
|
lib:libsqlite3$secondaryArchSuffix
|
|
lib:libswscale$secondaryArchSuffix
|
|
lib:libz$secondaryArchSuffix
|
|
lib:libzip$secondaryArchSuffix
|
|
"
|
|
|
|
BUILD_REQUIRES="
|
|
haiku${secondaryArchSuffix}_devel
|
|
devel:libavcodec$secondaryArchSuffix
|
|
devel:libavformat$secondaryArchSuffix
|
|
devel:libavutil$secondaryArchSuffix
|
|
devel:libedit$secondaryArchSuffix
|
|
devel:liblzma$secondaryArchSuffix
|
|
devel:libminizip$secondaryArchSuffix
|
|
devel:libncurses$secondaryArchSuffix
|
|
devel:libpng16$secondaryArchSuffix
|
|
devel:libQt5Core$secondaryArchSuffix
|
|
devel:libQt5Gui$secondaryArchSuffix
|
|
devel:libQt5Multimedia$secondaryArchSuffix
|
|
devel:libQt5Network$secondaryArchSuffix
|
|
devel:libQt5Widgets$secondaryArchSuffix
|
|
devel:libSDL_1.2$secondaryArchSuffix
|
|
devel:libsqlite3$secondaryArchSuffix
|
|
devel:libswscale$secondaryArchSuffix
|
|
devel:libz$secondaryArchSuffix
|
|
devel:libzip$secondaryArchSuffix
|
|
"
|
|
BUILD_PREREQUIRES="
|
|
cmd:cmake
|
|
cmd:gcc$secondaryArchSuffix
|
|
cmd:ld$secondaryArchSuffix
|
|
cmd:lrelease$secondaryArchSuffix >= 5
|
|
cmd:ninja
|
|
cmd:pkg_config$secondaryArchSuffix
|
|
"
|
|
|
|
BUILD()
|
|
{
|
|
cmake . $cmakeDirArgs \
|
|
-GNinja \
|
|
-DBUILD_GL=OFF \
|
|
-DBUILD_GLES2=OFF \
|
|
-DBUILD_GLES3=OFF \
|
|
-DUSE_DISCORD_RPC=OFF
|
|
ninja $jobArgs
|
|
}
|
|
|
|
INSTALL()
|
|
{
|
|
ninja install
|
|
|
|
local APP_SIGNATURE="application/x-vnd.qt5-mgba"
|
|
local MAJOR="`echo "$portVersion" | cut -d. -f1`"
|
|
local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
|
|
local MINOR="`echo "$portVersion" | cut -d. -f3`"
|
|
local LONG_INFO="$SUMMARY"
|
|
sed \
|
|
-e "s|@APP_SIGNATURE@|$APP_SIGNATURE|" \
|
|
-e "s|@MAJOR@|$MAJOR|" \
|
|
-e "s|@MIDDLE@|$MIDDLE|" \
|
|
-e "s|@MINOR@|$MINOR|" \
|
|
-e "s|@LONG_INFO@|$LONG_INFO|" \
|
|
$portDir/additional-files/mgba.rdef.in > mgba.rdef
|
|
|
|
# not needed
|
|
rm -rf $prefix/share
|
|
|
|
addResourcesToBinaries mgba.rdef $binDir/mgba-qt
|
|
addAppDeskbarSymlink $binDir/mgba-qt mGBA
|
|
}
|