Bug 257172 - [NEW PORT] emulators/libretro-mame: MAME-current for libretro
Summary: [NEW PORT] emulators/libretro-mame: MAME-current for libretro
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Neel Chauhan
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-07-14 06:41 UTC by Timothy Beyer
Modified: 2022-05-19 17:50 UTC (History)
3 users (show)

See Also:


Attachments
emulators_libretro-mame.shar (4.22 KB, text/plain)
2021-07-14 06:41 UTC, Timothy Beyer
no flags Details
[PATCH] updated version of emulators/libretro-mame with pkgconfig (4.50 KB, patch)
2022-02-15 10:35 UTC, Timothy Beyer
beyert: maintainer-approval+
Details | Diff
[PATCH / NEW PORT] higher quality patch that builds on poudriere, fixes other build issues (4.50 KB, patch)
2022-05-17 05:00 UTC, Timothy Beyer
beyert: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Timothy Beyer 2021-07-14 06:41:20 UTC
Created attachment 226446 [details]
emulators_libretro-mame.shar

This is the current version of MAME for libretro.  It is significantly more accurate for many games than the libretro cores of MAME 2000, MAME 2003, and similar, and supports all of the same games that modern versions of MAME are capable of running.  The main caveat is that it doesn't support rewind, and that it is still considered somewhat experimental by the retroarch developers.  During testing, I was surprised to find relatively accurate emulation of a wide variety of hardware that I didn't expect to work.

It uses a largely similar build process to the main emulators/mame port, so updating this port is relatively easy, and in fact, I was able to reuse some parts of that respective port.
Comment 1 Li-Wen Hsu freebsd_committer freebsd_triage 2021-12-22 13:44:34 UTC
The distinfo seems out of date due to upstream change.  After updating, I got this build error:

https://gist.github.com/70e399aca8fcf6de627e507fefa15f5d

I think we need to add some more build dependencies.
Comment 2 Timothy Beyer 2021-12-23 07:08:30 UTC
(In reply to Li-Wen Hsu from comment #1)
Thanks for trying to build my submission.

Now that I finally have some bhyve instances, I'll test my ports on a machine without tons of stuff already installed.

I will try to get my overall submission quality up in terms of ensuring that I don't miss any dependencies, which seems be a mistake that I make without such a build environment such as poudriere or an empty jail.

I'll see if I can get a corrected version finished and tested in the next hour or so, and I'll see if I set the GH_TAGNAME incorrectly (or maybe they did a rebase, not sure).
Comment 3 Timothy Beyer 2022-02-15 10:35:16 UTC
Created attachment 231832 [details]
[PATCH] updated version of emulators/libretro-mame with pkgconfig

Fixed patch, tested on a FreeBSD 13.0-RELEASE amd64 bhyve vm with all packages uninstalled before compilation.

I am now using the newest version available in the libretro mame github, and I believe corresponds to a major version number tag as well, so odds are, they won't rebase it again if that was the prior issue (no idea why it stopped building on that prior revision).

As it turns out, the line "BUILD_DEPENDS= libglvnd>=0:graphics/libglvnd" is neither necessary nor sufficient for a successful build.

The issue finding include/GL/gl.h in that port has everything to do with the presence of pkgconfig in USES.

I have tested the build twice in my VM, which took approximately 3 hours each time, resulting in a successful build both times (the second time to verify if removing the BUILD_DEPENDS line was possible, which turned out to be the case.
Comment 4 Timothy Beyer 2022-05-17 05:00:03 UTC
Created attachment 233989 [details]
[PATCH / NEW PORT] higher quality patch that builds on poudriere, fixes other build issues

This is a higher quality patch that builds on poudriere and resolves all known build issues.
Comment 5 Neel Chauhan freebsd_committer freebsd_triage 2022-05-19 17:49:16 UTC
Committed!
Comment 6 commit-hook freebsd_committer freebsd_triage 2022-05-19 17:50:14 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=5f4caf1945f77bcffb540d69cd309d539a760c41

commit 5f4caf1945f77bcffb540d69cd309d539a760c41
Author:     Timothy Beyer <beyert_freebsd@fastmail.net>
AuthorDate: 2022-05-17 03:53:46 +0000
Commit:     Neel Chauhan <nc@FreeBSD.org>
CommitDate: 2022-05-19 17:49:21 +0000

    emulators/libretro-mame: New port: MAME-current for libretro

    PR:     257172

 emulators/Makefile                                 |  1 +
 emulators/libretro-mame/Makefile (new)             | 73 ++++++++++++++++++++++
 emulators/libretro-mame/distinfo (new)             |  3 +
 emulators/libretro-mame/files/patch-makefile (new) | 20 ++++++
 emulators/libretro-mame/pkg-descr (new)            |  3 +
 5 files changed, 100 insertions(+)