aboutsummaryrefslogtreecommitdiff
path: root/games/mgba
diff options
context:
space:
mode:
authorDugan Chen <thedoogster [at] gmail [dot] com>2018-03-29 15:32:05 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2018-03-31 07:41:39 +0700
commit0468360611bad751b5f296bb406c56486b66681c (patch)
treec26e3e05380146d61e8cd6d1f633f8b82448fbb1 /games/mgba
parent0ba35a07e17fc048351d388e7c006cf3edf31c9c (diff)
games/mgba: Build libretro.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'games/mgba')
-rw-r--r--games/mgba/README5
-rw-r--r--games/mgba/mgba.SlackBuild8
-rw-r--r--games/mgba/mgba_libretro.info16
3 files changed, 27 insertions, 2 deletions
diff --git a/games/mgba/README b/games/mgba/README
index 0046641253839..397c41f49c806 100644
--- a/games/mgba/README
+++ b/games/mgba/README
@@ -2,12 +2,15 @@ mGBA is an emulator for running Game Boy Advance games. It aims to be
faster and more accurate than many existing Game Boy Advance
emulators, as well as adding features that other emulators lack.
+This build both the standalone application and the Libretro core (for use with
+RetroArch).
+
The following optional dependencies will be automatically detected.
* SDL2
* libedit (for the command-line debugger)
* ffmpeg
-If you have Qt 5, then you can build mGBA with a GUI:
+If you have Qt 5, then you can build the standalone application with a GUI:
QT=on ./mGBA.SlackBuild
diff --git a/games/mgba/mgba.SlackBuild b/games/mgba/mgba.SlackBuild
index 05177e06bfc4c..ec7d815f92e35 100644
--- a/games/mgba/mgba.SlackBuild
+++ b/games/mgba/mgba.SlackBuild
@@ -23,8 +23,9 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=mgba
+LIBNAM=${PRGNAM}_libretro
VERSION=${VERSION:-0.6.1}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -81,13 +82,18 @@ cd build
-DCMAKE_INSTALL_BINDIR=games \
-DCMAKE_INSTALL_DOCDIR=doc/$PRGNAM-$VERSION \
-DCMAKE_INSTALL_LIBDIR:PATH=lib$LIBDIRSUFFIX \
+ -DLIBRETRO_LIBDIR=/usr/lib$LIBDIRSUFFIX/libretro \
-DMANDIR=man \
-DBUILD_QT=${QT} \
+ -DBUILD_LIBRETRO=ON \
-DCMAKE_BUILD_TYPE=Release ..
make
make install DESTDIR=$PKG
cd ..
+install -Dm0644 $CWD/$LIBNAM.info \
+ $PKG/usr/lib${LIBDIRSUFFIX}/libretro/info/$LIBNAM.info
+
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
diff --git a/games/mgba/mgba_libretro.info b/games/mgba/mgba_libretro.info
new file mode 100644
index 0000000000000..d3132f79d4484
--- /dev/null
+++ b/games/mgba/mgba_libretro.info
@@ -0,0 +1,16 @@
+display_name = "Nintendo - Game Boy Advance (mGBA)"
+authors = "endrift"
+supported_extensions = "gb|gbc|gba"
+corename = "mGBA"
+manufacturer = "Nintendo"
+categories = "Emulator"
+systemname = "Game Boy/Game Boy Color/Game Boy Advance"
+database = "Nintendo - Game Boy|Nintendo - Game Boy Color|Nintendo - Game Boy Advance|Nintendo - Game Boy Advance (e-Cards)"
+license = "MPLv2.0"
+permissions = ""
+supports_no_game = "false"
+firmware_count = 1
+firmware0_desc = "gba_bios.bin (Game Boy Advance BIOS)"
+firmware0_path = "gba_bios.bin"
+firmware0_opt = "true"
+notes = "(!) gba_bios.bin (md5): a860e8c0b6d573d191e4ec7db1b1e4f6"