Skip to content

Instantly share code, notes, and snippets.

@FliiFe
Created June 5, 2025 23:37
Show Gist options
  • Save FliiFe/a6ecbc76958e1afa238d4f1ebb187786 to your computer and use it in GitHub Desktop.
Save FliiFe/a6ecbc76958e1afa238d4f1ebb187786 to your computer and use it in GitHub Desktop.
Patch the playdate simulator for systems with different webkitgtk versions !

Patching the playdate simulator for newer webkitgtk versions

WebkitGTK versions 4.0 is being removed from gentoo's main repo, in favour of the equivalent 4.1 version. This breaks PlaydateSimulator which dynamically loads libwebkit2gtk-4.0.so.37.

The dirty hack would be to symlink the newer sofiles to the old filenames. Any sane person would dislike this approach though, as it specifically works around the package manager and messes with system-wide libraries. Instead, we can patch the ELF to directly request the newer versions.

cd $PLAYDATE_SDK_PATH
cd bin
patchelf --replace-needed libwebkit2gtk-4.0.so.37 libwebkit2gtk-4.1.so PlaydateSimulator
patchelf --replace-needed libjavascriptcoregtk-4.0.so.18 libjavascriptcoregtk-4.1.so PlaydateSimulator

File names can be adjusted according to what is available on your system and what the current version of the SDK requires (ldd PlaydateSimulator and look for not found entries).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment