Bug 227345

Summary: games/retroarch: update to 1.7.7, add WAYLAND option
Product: Ports & Packages Reporter: Greg V <greg>
Component: Individual Port(s)Assignee: Yuri Victorovich <yuri>
Status: New ---    
Severity: Affects Only Me CC: cpm, jbeich, menelkir, yuri, yuripv
Priority: --- Flags: bugzilla: maintainer-feedback? (yuri)
Version: Latest   
Hardware: Any   
OS: Any   
Bug Depends on:    
Bug Blocks: 227726    
Attachments:
Description Flags
retroarch.patch
none
retroarch-stuff.patch
none
retroarch-update-173.patch
none
retroarch.patch 1.7.5
none
Update_RetroArch_to_1.7.7 cpm: maintainer-approval? (yuri)

Description Greg V 2018-04-07 14:16:53 UTC
Created attachment 192309 [details]
retroarch.patch

- 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]
retroarch-stuff.patch

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.

Yuri
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]
retroarch-update-173.patch

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)

https://www.libretro.com/index.php/retroarch-1-7-3-released/
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]
Update_RetroArch_to_1.7.7

Attached patch to update RetroArch to 1.7.7 release.

https://www.libretro.com/index.php/retroarch-1-7-7-released/

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