Bug 227345 - games/retroarch: update to 1.7.7, add WAYLAND option
Summary: games/retroarch: update to 1.7.7, add WAYLAND option
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Yuri Victorovich
Depends on:
Blocks: 227726
  Show dependency treegraph
Reported: 2018-04-07 14:16 UTC by Greg V
Modified: 2020-01-18 02:24 UTC (History)
5 users (show)

See Also:
bugzilla: maintainer-feedback? (yuri)

retroarch.patch (8.64 KB, patch)
2018-04-07 14:16 UTC, Greg V
no flags Details | Diff
retroarch-stuff.patch (470.06 KB, patch)
2018-04-07 14:46 UTC, Greg V
no flags Details | Diff
retroarch-update-173.patch (5.55 KB, patch)
2018-05-05 10:17 UTC, Greg V
no flags Details | Diff
retroarch.patch 1.7.5 (500.79 KB, patch)
2018-12-31 22:39 UTC, Greg V
no flags Details | Diff
Update_RetroArch_to_1.7.7 (24.52 KB, patch)
2019-06-21 23:01 UTC, Carlos J. Puga Medina
cpm: maintainer-approval? (yuri)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Greg V 2018-04-07 14:16:53 UTC
Created attachment 192309 [details]

- 1.3.6 to 1.7.1
- cleanup (-pthread is already added, netplay & fbo are not options anymore)
- regenerate patches
- add WAYLAND option (requires wayland-egl in mesa)
- skip the vkCreateInstance check to always build Vulkan support (since loading is dynamic and headers are included)
- instead of adding --x-* to qb/qb.params.sh, use HAS_CONFIGURE instead of GNU_CONFIGURE to prevent that argument from appearing
- set up more things to point to our PREFIX in retroarch.cfg, use lib/libretro instead of libexec/libretro because cores are shared libraries

I'm going to also post assets/shaders ports here soon
Comment 1 Greg V 2018-04-07 14:46:54 UTC
Created attachment 192310 [details]

Here's ports for libretro-core-info, libretro-shaders-glsl, libretro-shaders-slang, retroarch-assets.

I'm not sure what's the best way to handle deps (make RetroArch depend on these optionally but by default?)

And the plists are rather large, maybe they should be dynamic? (what's the way to do that for non-python ports?)
Comment 2 Yuri Victorovich freebsd_committer 2018-04-07 17:04:56 UTC
Hi Greg,

Thank you for the patch. I will look into this within a few days.
I didn't realize there was any interest in RetroArch.
There is also the libretro-cores port that I will re-add. It has been deleted because it had git hash collisions in 7-digit hashes.

Comment 3 Greg V 2018-04-07 18:48:21 UTC
Speaking of cores, mGBA (bug 227346) and Mesen (bug 227351) have upstream libretro support, so their cores come from the corresponding ports. (And PPSSPP will join the party with the next release: https://github.com/hrydgard/ppsspp/pull/10780)
Comment 4 Jan Beich freebsd_committer 2018-04-26 08:50:54 UTC
Also fixes ffmpeg 4.0 support, see

record/drivers/record_ffmpeg.c:351:30: error: use of undeclared identifier 'CODEC_FLAG_QSCALE'
      audio->codec->flags |= CODEC_FLAG_QSCALE;
record/drivers/record_ffmpeg.c:361:30: error: use of undeclared identifier 'CODEC_FLAG_GLOBAL_HEADER'
      audio->codec->flags |= CODEC_FLAG_GLOBAL_HEADER;
record/drivers/record_ffmpeg.c:381:25: error: use of undeclared identifier 'FF_MIN_BUFFER_SIZE'
   audio->outbuf_size = FF_MIN_BUFFER_SIZE;
record/drivers/record_ffmpeg.c:493:30: error: use of undeclared identifier 'CODEC_FLAG_QSCALE'
      video->codec->flags |= CODEC_FLAG_QSCALE;
record/drivers/record_ffmpeg.c:500:30: error: use of undeclared identifier 'CODEC_FLAG_GLOBAL_HEADER'
      video->codec->flags |= CODEC_FLAG_GLOBAL_HEADER;
Comment 5 Greg V 2018-05-05 10:17:33 UTC
Created attachment 193058 [details]

Here's 1.7.3 (on top of the previous patches). Now with Qt GUI.

(and libretro-core-info @ 1.7.2, there's no 1.7.3 tag yet)

Comment 6 Greg V 2018-05-23 13:02:58 UTC
(In reply to Greg V from comment #5)
oops, looks like it also needs: QT_NONSTANDARD=yes
(not a GNU makefile, --with-qt-includes is not a valid option)
Comment 7 Jan Beich freebsd_committer 2018-05-26 14:38:07 UTC
(In reply to Greg V from comment #3)
> PPSSPP will join the party with the next release

Landed in ports r470890. I haven't tested it but RetroArch-1.3.6 is probably too old for ppsspp core.
Comment 8 Greg V 2018-05-27 11:27:42 UTC
(In reply to Jan Beich from comment #7)
Cool! PPSSPP works for me on 1.7.3, but only with Vulkan.

GL segfaults (address 0x0) at ppsspp_libretro.so`Draw::DrawContext::CreatePresets() + 14.
Comment 9 Greg V 2018-12-31 22:39:36 UTC
Created attachment 200666 [details]
retroarch.patch 1.7.5

Update to 1.7.5
Comment 10 Jan Beich freebsd_committer 2019-02-07 11:33:11 UTC
(In reply to Yuri Victorovich from comment #2)
> Thank you for the patch. I will look into this within a few days.

10 months has passed. Do you actually plan to maintain this port?
Comment 11 Carlos J. Puga Medina freebsd_committer 2019-06-21 23:01:10 UTC
Created attachment 205273 [details]

Attached patch to update RetroArch to 1.7.7 release.


This patch doesn't include libretro-* and retroarch-assets ports, but it needs games/retroarch-assets as RUN_DEPENDS.
Comment 12 Yuri Pankov freebsd_committer 2019-09-12 17:36:40 UTC
Just a ping.  1.3.6 found in ports doesn't work at all for me, so I have to use 1.7.8 from git which I'd rather not do. Can the port be updated, please?
Comment 13 Greg V 2019-11-04 21:32:37 UTC
Someone just resurrected libretro core ports: https://github.com/myfreeweb/freebsd-ports-dank/pull/6
Comment 14 Daniel Menelkir 2019-12-10 23:35:51 UTC
(In reply to Greg V from comment #13)

It's me. :D

I find it easier to divide all cores into individual ones to maintain and fix if something ugly happens. 

Some cores are broken and needs some extra effort, but most of them works and I've tested each one that compiles and install.

I've used the old libretro-cores as base, since it installs everything in the right place and added new ones not there, but some cores need more work (like n64 ones and ppsspp). 

But direct to the point, most of those cores will not work in the old one in ports because it's not compatible (ppsspp for instance, will only works for >=1.7.0). The retroarch 1.3.x will probably end up not running any core, and retroarch needs those "cores" to achieve his purpose. 

Updating this port to "at least" the version from Greg will be a big jump to this port, specially because an up-to-date retroarch opens a big door for emulators to freebsd up to dreamcast/ps2/wii era.
Comment 15 Daniel Menelkir 2019-12-14 14:36:16 UTC
I've forgot, here's the repo with only libretro cores, it was tested with Retroarch from Greg's ports.

Comment 16 Daniel Menelkir 2020-01-18 02:24:14 UTC
1.8.3 was launched from libretro developers and it's able to update the cores online, with this feature we could even ask them for having this working on freebsd since we'll not have to rely on ports of libretro cores. So.. what's the status of this?