Bug 282792 - emulators/ppsspp: update to 1.18.1, bundle static ffmpeg-3.0.2 for improved PSP game compatibility
Summary: emulators/ppsspp: update to 1.18.1, bundle static ffmpeg-3.0.2 for improved P...
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: Daniel Engberg
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-11-16 00:47 UTC by Kevin Reinholz
Modified: 2024-12-05 00:08 UTC (History)
2 users (show)

See Also:


Attachments
Ports tree patch updating emulators/ppsspp to 1.18.1 with proposed multimedia/ffmpeg3 port as build dependency (20.76 KB, patch)
2024-11-16 00:47 UTC, Kevin Reinholz
no flags Details | Diff
Updated patch updating emulators/ppsspp to 1.18.1 with bundled multimedia/ffmpeg3 as static build dep (24.50 KB, patch)
2024-11-17 04:07 UTC, Kevin Reinholz
no flags Details | Diff
Patch updating emulators/ppsspp to 1.18.1 with bundled multimedia/ffmpeg3 as static build dep (13.69 KB, patch)
2024-11-24 03:34 UTC, Kevin Reinholz
no flags Details | Diff
Update ppsspp to 1.18.1 and bundle static ffmpeg3 to fix FMV-related game crashes (11.76 KB, patch)
2024-11-24 03:58 UTC, Kevin Reinholz
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Reinholz 2024-11-16 00:47:58 UTC
Created attachment 255210 [details]
Ports tree patch updating emulators/ppsspp to 1.18.1 with proposed multimedia/ffmpeg3 port as build dependency

Proposed patch updating emulators/ppsspp from 1.17.1 to latest upstream 1.18.1, and bundling proposed multimedia/ffmpeg3 port from https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=282188
Comment 1 Kevin Reinholz 2024-11-17 04:07:56 UTC
Created attachment 255228 [details]
Updated patch updating emulators/ppsspp to 1.18.1 with bundled multimedia/ffmpeg3 as static build dep

Updated patch to update emulators/ppsspp to version 1.18.1 and replace system ffmpeg with proposed multimedia/ffmpeg3 as static build dep.

Replaced files/patch-no-egl with files/patch-no-egl-plus-warnings-fix, which backports a fix from PPSSPP upstream Commit 55aa1ff (https://github.com/hrydgard/ppsspp/commit/55aa1ff66e80a22338bdf30f7256ff985a6e1b08) to suppress clang warnings during build due to gcc-specific flag running regardless of compiler used.

Bumped versions of bundled build deps miniupnpd, cpu_features, ppsspp-debugger, and rcheevos that I missed the first time around.
Comment 2 Kevin Reinholz 2024-11-21 14:57:34 UTC
(In reply to Kevin Reinholz from comment #1)

Caught a minor mistake in my updated patch:

google-cpu_features doesn't need to be updated. The version targeted in the current emulators/ppsspp port is:

google-cpu_features-v0.8.0-27-gfd4ffc1

And my erroneous update to:

google-cpu_features-v0.9.0-gfd4ffc1

Is the same exact git commit, albeit with the wrong release number before it.

Commit fd4ffc1 is indeed 27 commits ahead of the v0.8.0 release. The v0.9.0 release is another 8 git commits ahead of that.

My erroneous update doesn't seem to change what version of google-cpu_features is downloaded during the build process, aside from the checksum, but it is still a mistake since commit fd4ffc1 is pre-v0.9.0.
Comment 3 commit-hook freebsd_committer freebsd_triage 2024-11-23 08:54:39 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=2438c611d73764c64186c48b2789036602f7bd21

commit 2438c611d73764c64186c48b2789036602f7bd21
Author:     Kevin Reinholz <kreinholz@gmail.com>
AuthorDate: 2024-11-17 05:16:29 +0000
Commit:     Daniel Engberg <diizzy@FreeBSD.org>
CommitDate: 2024-11-23 08:42:35 +0000

    multimedia/ffmpeg3: New port: Legacy branch of ffmpeg 3.*

    To be used exclusively with emulators/ppsspp as newer versions are
    incompatible due to how the hardware in the Sony PSP works.
    FFmpeg is stripped down to avoid incompatbilities with external
    dependencies, only provides static libraries to avoid getting
    pull in unintentionally and is statically linked to PPSSPP.

    PR:             282188, 282792

 multimedia/Makefile                                |   1 +
 multimedia/ffmpeg3/Makefile (new)                  | 128 +++++++++++++++++++++
 multimedia/ffmpeg3/distinfo (new)                  |   5 +
 multimedia/ffmpeg3/files/patch-configure (new)     |  17 +++
 .../ffmpeg3/files/patch-libavformat_rtsp.c (new)   |  44 +++++++
 .../ffmpeg3/files/patch-libavutil_common.h (new)   |  13 +++
 multimedia/ffmpeg3/override.mk (new)               |   8 ++
 multimedia/ffmpeg3/pkg-descr (new)                 |   3 +
 multimedia/ffmpeg3/pkg-plist (new)                 |  99 ++++++++++++++++
 9 files changed, 318 insertions(+)
Comment 4 Kevin Reinholz 2024-11-24 03:34:46 UTC
Created attachment 255421 [details]
Patch updating emulators/ppsspp to 1.18.1 with bundled multimedia/ffmpeg3 as static build dep

Now that multimedia/ffmpeg3 is committed to the Ports tree, smaller proposed patch updating ppsspp from 1.17.1_1 to 1.18.1, using static multimedia/ffmpeg3 libs as a build dep.
Comment 5 Kevin Reinholz 2024-11-24 03:58:18 UTC
Created attachment 255422 [details]
Update ppsspp to 1.18.1 and bundle static ffmpeg3 to fix FMV-related game crashes

Accidentally created a patch from the wrong place, updating a locally maintained custom 1.17.1 build instead of the current Ports official one. This one should actually work to update emulators/ppsspp to current upstream, bundle static ffmpeg libs from the new multimedia/ffmpeg3 port, without anything extraneous.
Comment 6 Kevin Reinholz 2024-11-24 20:57:37 UTC
Although I don't use either, I tested the related emulators/ppsspp-qt5 and emulators/libretro-ppsspp ports, and both build just fine when emulators/ppsspp is updated to 1.18.1 with my latest patch. Neither displayed any obvious console log or in-game issues during about 5 minutes of testing with each, either.

Since all 3 of these ports are currently maintainerless, I'm willing to take on that role. I can continue to submit proposed patches for future updates as bug reports, or if there is a better/preferred way, I'm happy to do that as well.

The only thing that ought to be changed for both emulators/ppsspp-qt5 and emulators/libretro-ppsspp in connection with the update of emulators/ppsspp to 1.18.1 is the top line in both Makefiles, PORTREVISION=, should be deleted since this will be the first update to 1.18.1, no _1 needed yet until a dependency bump or bug fix necessitates it.
Comment 7 commit-hook freebsd_committer freebsd_triage 2024-12-04 20:27:52 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=29fccbe5a0da3318741bf4669478deb490432f1a

commit 29fccbe5a0da3318741bf4669478deb490432f1a
Author:     Kevin Reinholz <kreinholz@gmail.com>
AuthorDate: 2024-12-04 20:23:26 +0000
Commit:     Daniel Engberg <diizzy@FreeBSD.org>
CommitDate: 2024-12-04 20:26:43 +0000

    emulators/ppsspp: Update to 1.18.1

    * Use to multimedia/ffmpeg3 for compatibility and stability
    * Submitter becomes maintainer

    Changelog: https://www.ppsspp.org/news/release-1.18/

    Reset PORTREVISION for slave ports, emulators/libretro-ppsspp and
    emulators/ppsspp-qt5

    PR:             282792

 emulators/libretro-ppsspp/Makefile                 |  1 -
 emulators/ppsspp-qt5/Makefile                      |  1 -
 emulators/ppsspp/Makefile                          | 19 ++++++------
 emulators/ppsspp/distinfo                          | 16 +++++-----
 .../files/patch-Core_Util_PortManager.cpp (gone)   | 25 ---------------
 .../patch-cmake_Modules_FindFFmpeg.cmake (new)     | 36 ++++++++++++++++++++++
 emulators/ppsspp/files/patch-ffmpeg5 (gone)        | 13 --------
 emulators/ppsspp/files/patch-no-egl (gone)         | 18 -----------
 .../files/patch-no-egl-plus-warnings-fix (new)     | 33 ++++++++++++++++++++
 9 files changed, 88 insertions(+), 74 deletions(-)
Comment 8 Daniel Engberg freebsd_committer freebsd_triage 2024-12-04 20:32:39 UTC
Committed!

I apologize for keeping you waiting, one thing that we can improve next update is not hardcoding /usr/local for ffmpeg3. Ideally it should be %%LOCALBASE%% which we patch during build to whatever LOCALBASE is set to.

See post-patch section in https://cgit.freebsd.org/ports/tree/net-mgmt/netdata/ and the patch file(s) for example(s).

Great work!
Comment 9 Kevin Reinholz 2024-12-05 00:08:13 UTC
Thank you! Fix made and ready for the next update.