Bug 227345 - games/retroarch: update to 1.8.5 (and add WAYLAND option, fix powerpc64, etc.)
Summary: games/retroarch: update to 1.8.5 (and add WAYLAND option, fix powerpc64, etc.)
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: Matthias Andree
URL:
Keywords:
Depends on:
Blocks: 227726
  Show dependency treegraph
 
Reported: 2018-04-07 14:16 UTC by Val Packett
Modified: 2020-04-17 17:51 UTC (History)
7 users (show)

See Also:
mandree: maintainer-feedback+


Attachments
retroarch.patch (8.64 KB, patch)
2018-04-07 14:16 UTC, Val Packett
no flags Details | Diff
retroarch-stuff.patch (470.06 KB, patch)
2018-04-07 14:46 UTC, Val Packett
no flags Details | Diff
retroarch-update-173.patch (5.55 KB, patch)
2018-05-05 10:17 UTC, Val Packett
no flags Details | Diff
retroarch.patch 1.7.5 (500.79 KB, patch)
2018-12-31 22:39 UTC, Val Packett
no flags Details | Diff
Update_RetroArch_to_1.7.7 (24.52 KB, patch)
2019-06-21 23:01 UTC, Carlos J. Puga Medina
no flags Details | Diff
retroarch-update-185.patch (538.38 KB, patch)
2020-03-21 22:51 UTC, Val Packett
no flags Details | Diff
retroarch-update-185.patch v2 (539.77 KB, patch)
2020-04-02 12:48 UTC, Val Packett
no flags Details | Diff
retroarch-update-185.patch v3 (539.25 KB, patch)
2020-04-12 17:58 UTC, Val Packett
no flags Details | Diff
retroarch-update-185.patch v4 (539.75 KB, patch)
2020-04-16 11:53 UTC, Val Packett
mandree: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Val Packett 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 Val Packett 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 freebsd_triage 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 Val Packett 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 freebsd_triage 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 Val Packett 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 Val Packett 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 freebsd_triage 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 Val Packett 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 Val Packett 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 freebsd_triage 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 freebsd_triage 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 freebsd_triage 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 Val Packett 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.

https://gitlab.com/menelkir/freebsd-overlay
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?
Comment 17 Daniel Engberg freebsd_committer freebsd_triage 2020-03-17 00:22:07 UTC
Yuri, any progress or can we let someone else pick up this port?
Comment 18 commit-hook freebsd_committer freebsd_triage 2020-03-17 02:29:11 UTC
A commit references this bug:

Author: yuri
Date: Tue Mar 17 02:28:47 UTC 2020
New revision: 528553
URL: https://svnweb.freebsd.org/changeset/ports/528553

Log:
  games/retroarch: Release maintainership

  Somebody needs to adopt RetroArch. It seems to have grown very complex,
  and I don't use it and don't have much interest in it.

  PR:		227345

Changes:
  head/games/retroarch/Makefile
Comment 19 Val Packett 2020-03-21 22:51:58 UTC
Created attachment 212598 [details]
retroarch-update-185.patch

Here's 1.8.5. (not tested in synth/poudriere, sorry)

I'll take maintainership.
Comment 20 Daniel Engberg freebsd_committer freebsd_triage 2020-03-22 05:47:20 UTC
Great work!

Poudriere error:
"
====> Compressing man pages (compress-man)
===========================================================================
====> Running Q/A tests (stage-qa)
Error: '/usr/bin/env python3' is an invalid shebang you need USES=shebangfix for 'bin/retroarch-cg2glsl'
*** Error code 1

Stop.
make: stopped in /usr/ports/games/retroarch
"
Comment 21 commit-hook freebsd_committer freebsd_triage 2020-03-29 23:26:46 UTC
A commit references this bug:

Author: yuri
Date: Sun Mar 29 23:15:34 UTC 2020
New revision: 529848
URL: https://svnweb.freebsd.org/changeset/ports/529848

Log:
  games/retroarch: Greg V takes maintainership

  PR:		227345
  Requested by:	Greg V <greg@unrelenting.technology>

Changes:
  head/games/retroarch/Makefile
Comment 22 Val Packett 2020-04-02 12:48:11 UTC
Created attachment 212979 [details]
retroarch-update-185.patch v2

v2 of 1.8.5 update:

- Fixed stage-qa (python/shebangfix)
- Moved fPIC from port variable to PR/patch: https://github.com/libretro/RetroArch/pull/10384
- Fixed build with security/rhash installed: https://github.com/libretro/RetroArch/pull/10382
- Fixed ifdefs to solve powerpc64 issue: https://github.com/libretro/RetroArch/pull/10383
- Made X11 an option
- Added libcaca option (the build system was auto finding this for me)

Should be ready to go I think.
Comment 23 Val Packett 2020-04-12 17:58:13 UTC
Created attachment 213338 [details]
retroarch-update-185.patch v3

One little revision, fixing the dependency on libwayland-egl, which has been living in wayland instead of mesa for a long time.

This is ready to go.
Comment 24 Daniel Engberg freebsd_committer freebsd_triage 2020-04-16 09:24:14 UTC
Did you test it in poudriere?
Comment 25 Val Packett 2020-04-16 11:27:23 UTC
(In reply to daniel.engberg.lists from comment #24)

That's how I found the wrong libwayland-egl dependency. (I'm testing in my custom tree however, haven't tried only applying this patch to the upstream tree.)
Comment 26 Val Packett 2020-04-16 11:53:11 UTC
Created attachment 213461 [details]
retroarch-update-185.patch v4

Rebased after the webcamd/v4l related update
Comment 27 Matthias Andree freebsd_committer freebsd_triage 2020-04-17 16:13:37 UTC
Comment on attachment 213461 [details]
retroarch-update-185.patch v4

maintainer submission
Comment 28 commit-hook freebsd_committer freebsd_triage 2020-04-17 17:51:39 UTC
A commit references this bug:

Author: mandree
Date: Fri Apr 17 17:51:19 UTC 2020
New revision: 531956
URL: https://svnweb.freebsd.org/changeset/ports/531956

Log:
  games/retroarch: update to 1.8.5 (and add WAYLAND option, fix powerpc64, etc.)

  This is mostly Greg's patch,
  I have added the new ports to games/Makefile (missing from PR, SUBDIR+=),
  and fixed a few spaces-vs-TAB glitches in the makefile,
  and reformatted the pkg-descr, and changed libretro-shaders-slang/pkg-descr to:

  | Vulkan GLSL RetroArch shader system
  |
  | WWW: https://github.com/libretro/slang-shaders

  v1:

  Here's 1.8.5.

  v2 of 1.8.5 update:

  - Fixed stage-qa (python/shebangfix)
  - Moved fPIC from port variable to PR/patch:
    https://github.com/libretro/RetroArch/pull/10384
  - Fixed build with security/rhash installed:
    https://github.com/libretro/RetroArch/pull/10382
  - Fixed ifdefs to solve powerpc64 issue:
    https://github.com/libretro/RetroArch/pull/10383
  - Made X11 an option
  - Added libcaca option (the build system was auto finding this for me)

  v3:

  One little revision, fixing the dependency on libwayland-egl,
  which has been living in wayland instead of mesa for a long time.

  v4:

  Rebased after the webcamd/v4l related update

  Test built in poudriere 11.3 i386 and 12.1 amd64.

  PR:		227345
  Submitted by:	Greg V <greg@unrelenting.technology> (maintainer)

Changes:
  head/games/Makefile
  head/games/libretro-core-info/
  head/games/libretro-core-info/Makefile
  head/games/libretro-core-info/distinfo
  head/games/libretro-core-info/files/
  head/games/libretro-core-info/files/patch-Makefile
  head/games/libretro-core-info/pkg-descr
  head/games/libretro-core-info/pkg-plist
  head/games/libretro-shaders-glsl/
  head/games/libretro-shaders-glsl/Makefile
  head/games/libretro-shaders-glsl/distinfo
  head/games/libretro-shaders-glsl/files/
  head/games/libretro-shaders-glsl/files/patch-Makefile
  head/games/libretro-shaders-glsl/pkg-descr
  head/games/libretro-shaders-glsl/pkg-plist
  head/games/libretro-shaders-slang/
  head/games/libretro-shaders-slang/Makefile
  head/games/libretro-shaders-slang/distinfo
  head/games/libretro-shaders-slang/files/
  head/games/libretro-shaders-slang/files/patch-Makefile
  head/games/libretro-shaders-slang/pkg-descr
  head/games/libretro-shaders-slang/pkg-plist
  head/games/retroarch/Makefile
  head/games/retroarch/distinfo
  head/games/retroarch/files/patch-deps_glslang_glslang_glslang_Include_PoolAlloc.h
  head/games/retroarch/files/patch-libretro-common_include_streams_interface__stream.h
  head/games/retroarch/files/patch-libretro-common_rthreads_rthreads.c
  head/games/retroarch/files/patch-qb_qb.params.sh
  head/games/retroarch/files/pkg-message.in
  head/games/retroarch/pkg-plist
  head/games/retroarch-assets/
  head/games/retroarch-assets/Makefile
  head/games/retroarch-assets/distinfo
  head/games/retroarch-assets/files/
  head/games/retroarch-assets/files/patch-Makefile
  head/games/retroarch-assets/pkg-descr
  head/games/retroarch-assets/pkg-plist