Bug 222779 - New port: emulators/mgba, a Game Boy Advance emulator
Summary: New port: emulators/mgba, a Game Boy Advance emulator
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Tobias Kortkamp
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-04 15:45 UTC by Greg V
Modified: 2017-10-05 16:36 UTC (History)
1 user (show)

See Also:


Attachments
mgba.patch (4.97 KB, patch)
2017-10-04 15:45 UTC, Greg V
no flags Details | Diff
mgba.patch v2 (5.31 KB, patch)
2017-10-05 15:31 UTC, Greg V
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Greg V 2017-10-04 15:45:34 UTC
Created attachment 186908 [details]
mgba.patch

I'm surprised it wasn't already in ports, since the author officially supports FreeBSD…
Comment 1 Tobias Kortkamp freebsd_committer 2017-10-05 15:13:46 UTC
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MDEBUGGERS}
+USES+=	libedit
+.endif
+
+.if ${PORT_OPTIONS:MQT}
+USE_QT5=		qmake_build buildtools_build core gui widgets network opengl multimedia
+USES+=			desktop-file-utils
+INSTALLS_ICONS=	yes
+.endif

Hmm, all of these variables are settable via options helpers.  I don't understand why you stopped
using them here.

+LDFLAGS+=	-L/usr/local/lib # sqlite3

Using /usr/local directly like this is not correct (LOCALBASE can be set to other values by users).  Use ${LOCALBASE} instead or better yet replace the whole thing by adding localbase:ldflags to USES

+FFMPEG_DESC=		FFmpeg video recording support
+MAGICK_DESC=		ImageMagick GIF recording support
+QT_DESC=		Qt frontend

Please move all custom descriptions to after the OPTIONS_* section followed by a section for the
options helpers.  Maybe rename QT->QT5.  FFMPEG, MAGICK, QT5 already have descriptions in
bsd.options.desc.mk.  Do you need custom descriptions?

https://www.freebsd.org/doc/en/books/porters-handbook/book.html#porting-order-options
Comment 2 Tobias Kortkamp freebsd_committer 2017-10-05 15:22:09 UTC
(In reply to Tobias Kortkamp from comment #1)
I think the pkg-descr is a little short.  Can you extend it just a little bit?
Comment 3 Greg V 2017-10-05 15:31:36 UTC
Created attachment 186925 [details]
mgba.patch v2

(In reply to Tobias Kortkamp from comment #1)
Because I can't remember which helpers exist and can't read documentation, apparently :D Fixed.

About descriptions — "ImageMagick image processing library support" doesn't mean much in the context of an emulator. "Qt 5 toolkit support" is also a library-oriented description. "FFmpeg support (WMA, AIFF, AC3, APE...)" is even worse, these are music formats when mGBA uses ffmpeg to record video.
Comment 4 Tobias Kortkamp freebsd_committer 2017-10-05 16:36:07 UTC
Committed with some minor changes. Thanks!
Comment 5 commit-hook freebsd_committer 2017-10-05 16:36:09 UTC
A commit references this bug:

Author: tobik
Date: Thu Oct  5 16:35:18 UTC 2017
New revision: 451322
URL: https://svnweb.freebsd.org/changeset/ports/451322

Log:
  New port: emulators/mgba

  A modern open source Game Boy Advance emulator, with support for Game
  Boy and Game Boy Color games as well.  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.  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.

  WWW: https://mgba.io

  PR:		222779
  Submitted by:	Greg V <greg@unrelenting.technology>

Changes:
  head/emulators/Makefile
  head/emulators/mgba/
  head/emulators/mgba/Makefile
  head/emulators/mgba/distinfo
  head/emulators/mgba/pkg-descr
  head/emulators/mgba/pkg-plist