diff --git a/Ports/RetroArch/package.sh b/Ports/RetroArch/package.sh index 2946a7382a..b5f7bcb238 100755 --- a/Ports/RetroArch/package.sh +++ b/Ports/RetroArch/package.sh @@ -25,7 +25,7 @@ launcher_category='&Games' launcher_command=/usr/local/bin/retroarch icon_file=media/retroarch.ico -export CFLAGS="-I${SERENITY_INSTALL_ROOT}/usr/include/LibGL -I${SERENITY_INSTALL_ROOT}/usr/local/include/SDL2" +export CFLAGS="-I${SERENITY_INSTALL_ROOT}/usr/local/include/SDL2" post_install() { echo "==== Post installation instructions ====" diff --git a/Ports/RetroArch/patches/0001-Add-SerenityOS-platform.patch b/Ports/RetroArch/patches/0001-Add-SerenityOS-platform.patch index f9d92fdf89..a744b5321f 100644 --- a/Ports/RetroArch/patches/0001-Add-SerenityOS-platform.patch +++ b/Ports/RetroArch/patches/0001-Add-SerenityOS-platform.patch @@ -8,7 +8,7 @@ Subject: [PATCH] Add SerenityOS platform 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/qb/qb.system.sh b/qb/qb.system.sh -index c7ac141..f7f198d 100644 +index c7ac14110bafc0c1715a5b02fc933dc7c45dc449..f7f198dc9c290d5c46079cedd13c5cbb42bb678b 100644 --- a/qb/qb.system.sh +++ b/qb/qb.system.sh @@ -1,5 +1,5 @@ diff --git a/Ports/RetroArch/patches/0003-Add-strlcat.patch b/Ports/RetroArch/patches/0002-Add-strlcat.patch similarity index 85% rename from Ports/RetroArch/patches/0003-Add-strlcat.patch rename to Ports/RetroArch/patches/0002-Add-strlcat.patch index 10bc49d4b5..e9df08836c 100644 --- a/Ports/RetroArch/patches/0003-Add-strlcat.patch +++ b/Ports/RetroArch/patches/0002-Add-strlcat.patch @@ -8,7 +8,7 @@ Subject: [PATCH] Add strlcat() 1 file changed, 4 insertions(+) diff --git a/Makefile.common b/Makefile.common -index 580beba..dbfbd39 100644 +index 40c3ad2d5a077dc8f84932506d4253c7d98e326f..f2d6bcf526a1c7d3aba90bdd4ef6cd1ebc3ca91c 100644 --- a/Makefile.common +++ b/Makefile.common @@ -186,6 +186,10 @@ ifneq ($(findstring Linux,$(OS)),) diff --git a/Ports/RetroArch/patches/0002-Find-libgl.patch b/Ports/RetroArch/patches/0002-Find-libgl.patch deleted file mode 100644 index e9ee6aadb5..0000000000 --- a/Ports/RetroArch/patches/0002-Find-libgl.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: gouchi -Date: Sat, 7 May 2022 18:20:09 +0200 -Subject: [PATCH] Find libgl - ---- - qb/config.libs.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/qb/config.libs.sh b/qb/config.libs.sh -index 19cd2a6..672fb02 100644 ---- a/qb/config.libs.sh -+++ b/qb/config.libs.sh -@@ -402,7 +402,7 @@ if [ "$HAVE_OPENGL" != 'no' ] && [ "$HAVE_OPENGLES" != 'yes' ]; then - check_lib '' OPENGL -lopengl32 - else - check_header '' OPENGL "GL/gl.h" -- check_lib '' OPENGL -lGL -+ check_lib '' OPENGL -lgl - fi - - if [ "$HAVE_OPENGL" = 'yes' ]; then diff --git a/Ports/RetroArch/patches/0004-Disable-pthread_attr_setschedpolicy.patch b/Ports/RetroArch/patches/0003-Disable-pthread_attr_setschedpolicy.patch similarity index 90% rename from Ports/RetroArch/patches/0004-Disable-pthread_attr_setschedpolicy.patch rename to Ports/RetroArch/patches/0003-Disable-pthread_attr_setschedpolicy.patch index 332f610305..8e68e4e056 100644 --- a/Ports/RetroArch/patches/0004-Disable-pthread_attr_setschedpolicy.patch +++ b/Ports/RetroArch/patches/0003-Disable-pthread_attr_setschedpolicy.patch @@ -8,7 +8,7 @@ Subject: [PATCH] Disable pthread_attr_setschedpolicy() 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libretro-common/rthreads/rthreads.c b/libretro-common/rthreads/rthreads.c -index 30ec6ff..08c8a96 100644 +index b611a3e443148f1471d3de7aa6f11b4a62e9ba4a..76800cbdaedf31fcc409456b69ae366a58026163 100644 --- a/libretro-common/rthreads/rthreads.c +++ b/libretro-common/rthreads/rthreads.c @@ -161,7 +161,7 @@ sthread_t *sthread_create(void (*thread_func)(void*), void *userdata) diff --git a/Ports/RetroArch/patches/0005-Use-SDL-software-instead-of-hardware-rendering.patch b/Ports/RetroArch/patches/0004-Use-SDL-software-instead-of-hardware-rendering.patch similarity index 88% rename from Ports/RetroArch/patches/0005-Use-SDL-software-instead-of-hardware-rendering.patch rename to Ports/RetroArch/patches/0004-Use-SDL-software-instead-of-hardware-rendering.patch index 1b10fa4dd2..ddbc8752a9 100644 --- a/Ports/RetroArch/patches/0005-Use-SDL-software-instead-of-hardware-rendering.patch +++ b/Ports/RetroArch/patches/0004-Use-SDL-software-instead-of-hardware-rendering.patch @@ -8,7 +8,7 @@ Subject: [PATCH] Use SDL software instead of hardware rendering 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gfx/drivers/sdl2_gfx.c b/gfx/drivers/sdl2_gfx.c -index 4dbe33f..dd67b4a 100644 +index 4dbe33f446815aa212daf0dbb58c3d2e183e88ec..dd67b4aaec550cf375ea3da088363e266dc5aa31 100644 --- a/gfx/drivers/sdl2_gfx.c +++ b/gfx/drivers/sdl2_gfx.c @@ -182,7 +182,7 @@ static void sdl2_render_msg(sdl2_video_t *vid, const char *msg) diff --git a/Ports/RetroArch/patches/0006-Set-default-options-for-SerenityOS.patch b/Ports/RetroArch/patches/0005-Set-default-options-for-SerenityOS.patch similarity index 99% rename from Ports/RetroArch/patches/0006-Set-default-options-for-SerenityOS.patch rename to Ports/RetroArch/patches/0005-Set-default-options-for-SerenityOS.patch index 9c9009ea3b..fae5fbe879 100644 --- a/Ports/RetroArch/patches/0006-Set-default-options-for-SerenityOS.patch +++ b/Ports/RetroArch/patches/0005-Set-default-options-for-SerenityOS.patch @@ -16,7 +16,7 @@ Set some config paths to home directory create mode 100644 pkg/serenityos/retroarch.cfg diff --git a/Makefile b/Makefile -index 63c7eda..2aed29f 100644 +index 63c7eda4aa9ac2acf7ec7dfe9c04fcd5d8919a74..2aed29f89cf3709186fcd7c13400e34f1c90c299 100644 --- a/Makefile +++ b/Makefile @@ -235,7 +235,7 @@ install: $(TARGET) @@ -30,7 +30,7 @@ index 63c7eda..2aed29f 100644 cp docs/retroarch.6 $(DESTDIR)$(MAN_DIR)/man6 diff --git a/pkg/serenityos/retroarch.cfg b/pkg/serenityos/retroarch.cfg new file mode 100644 -index 0000000..088e883 +index 0000000000000000000000000000000000000000..3fc7d7ac0fbb3330e5a359593ae3acfc88112540 --- /dev/null +++ b/pkg/serenityos/retroarch.cfg @@ -0,0 +1,1021 @@ diff --git a/Ports/RetroArch/patches/ReadMe.md b/Ports/RetroArch/patches/ReadMe.md index ccb290681c..8cab82a1fb 100644 --- a/Ports/RetroArch/patches/ReadMe.md +++ b/Ports/RetroArch/patches/ReadMe.md @@ -5,27 +5,22 @@ Add SerenityOS platform -## `0002-Find-libgl.patch` - -Find libgl - - -## `0003-Add-strlcat.patch` +## `0002-Add-strlcat.patch` Add strlcat() -## `0004-Disable-pthread_attr_setschedpolicy.patch` +## `0003-Disable-pthread_attr_setschedpolicy.patch` Disable pthread_attr_setschedpolicy() -## `0005-Use-SDL-software-instead-of-hardware-rendering.patch` +## `0004-Use-SDL-software-instead-of-hardware-rendering.patch` Use SDL software instead of hardware rendering -## `0006-Set-default-options-for-SerenityOS.patch` +## `0005-Set-default-options-for-SerenityOS.patch` Set default options for SerenityOS diff --git a/Ports/SuperTuxKart/package.sh b/Ports/SuperTuxKart/package.sh index 2282a4d7f9..da11255ddc 100755 --- a/Ports/SuperTuxKart/package.sh +++ b/Ports/SuperTuxKart/package.sh @@ -39,8 +39,8 @@ configopts=( '-DUSE_DNS_C=ON' '-Bbuild' '-GNinja' - "-DCMAKE_C_FLAGS=-I${SERENITY_INSTALL_ROOT}/usr/include/LibGL -I${SERENITY_INSTALL_ROOT}/usr/local/include/SDL2 -I${SERENITY_INSTALL_ROOT}/usr/local/include -lcurl -lharfbuzz -lfreetype" - "-DCMAKE_CXX_FLAGS=-I${SERENITY_INSTALL_ROOT}/usr/include/LibGL -I${SERENITY_INSTALL_ROOT}/usr/local/include/SDL2 -I${SERENITY_INSTALL_ROOT}/usr/local/include -lcurl -lharfbuzz -lfreetype" + "-DCMAKE_C_FLAGS=-I${SERENITY_INSTALL_ROOT}/usr/local/include/SDL2 -I${SERENITY_INSTALL_ROOT}/usr/local/include -lcurl -lharfbuzz -lfreetype" + "-DCMAKE_CXX_FLAGS=-I${SERENITY_INSTALL_ROOT}/usr/local/include/SDL2 -I${SERENITY_INSTALL_ROOT}/usr/local/include -lcurl -lharfbuzz -lfreetype" '-DUSE_IPV6=OFF' '-DUSE_SYSTEM_ENET=OFF' ) diff --git a/Ports/gltron/package.sh b/Ports/gltron/package.sh index 98e3d7c156..212fec60b4 100755 --- a/Ports/gltron/package.sh +++ b/Ports/gltron/package.sh @@ -10,7 +10,6 @@ depends=("libpng" "glu" "SDL_sound" "sdl12-compat" "zlib") configopts=( "--disable-warn" "--with-sdl-prefix=${SERENITY_INSTALL_ROOT}/usr/local" - "CPPFLAGS=-I${SERENITY_INSTALL_ROOT}/usr/include/LibGL" "LIBS=-lm -lSDL_sound" ) launcher_name='GLTron' diff --git a/Ports/gltron/patches/0002-Build-Remove-ansi-build-argument.patch b/Ports/gltron/patches/0001-Build-Remove-ansi-build-argument.patch similarity index 100% rename from Ports/gltron/patches/0002-Build-Remove-ansi-build-argument.patch rename to Ports/gltron/patches/0001-Build-Remove-ansi-build-argument.patch diff --git a/Ports/gltron/patches/0001-Build-Replace-lGL-with-lgl-to-reference-our-LibGL.patch b/Ports/gltron/patches/0001-Build-Replace-lGL-with-lgl-to-reference-our-LibGL.patch deleted file mode 100644 index e2630d7882..0000000000 --- a/Ports/gltron/patches/0001-Build-Replace-lGL-with-lgl-to-reference-our-LibGL.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Jelle Raaijmakers -Date: Mon, 9 May 2022 00:30:04 +0200 -Subject: [PATCH] Build: Replace `-lGL` with `-lgl` to reference our LibGL - ---- - configure | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/configure b/configure -index 226d00eb04f048a51cfbc742ccfe62cfb7ad6750..086139a0e045fe6ad914fc641625fc281ca630e7 100755 ---- a/configure -+++ b/configure -@@ -3130,7 +3130,7 @@ if test "${ac_cv_lib_GL_main+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 - else - ac_check_lib_save_LIBS=$LIBS --LIBS="-lGL $LIBS" -+LIBS="-lgl $LIBS" - cat >conftest.$ac_ext <<_ACEOF - #line 3135 "configure" - #include "confdefs.h" -@@ -3171,7 +3171,7 @@ if test $ac_cv_lib_GL_main = yes; then - #define HAVE_LIBGL 1 - EOF - -- LIBS="-lGL $LIBS" -+ LIBS="-lgl $LIBS" - - else - { { echo "$as_me:3177: error: OpenGL is not installed" >&5 diff --git a/Ports/gltron/patches/0003-Build-Fix-char-vs.-const-char-arguments.patch b/Ports/gltron/patches/0002-Build-Fix-char-vs.-const-char-arguments.patch similarity index 100% rename from Ports/gltron/patches/0003-Build-Fix-char-vs.-const-char-arguments.patch rename to Ports/gltron/patches/0002-Build-Fix-char-vs.-const-char-arguments.patch diff --git a/Ports/gltron/patches/0004-System-Make-sure-to-exit-the-loop-on-receiving-SDL_Q.patch b/Ports/gltron/patches/0003-System-Make-sure-to-exit-the-loop-on-receiving-SDL_Q.patch similarity index 100% rename from Ports/gltron/patches/0004-System-Make-sure-to-exit-the-loop-on-receiving-SDL_Q.patch rename to Ports/gltron/patches/0003-System-Make-sure-to-exit-the-loop-on-receiving-SDL_Q.patch diff --git a/Ports/gltron/patches/ReadMe.md b/Ports/gltron/patches/ReadMe.md index edbc3f2eea..ecf74a049b 100644 --- a/Ports/gltron/patches/ReadMe.md +++ b/Ports/gltron/patches/ReadMe.md @@ -1,23 +1,18 @@ # Patches for gltron on SerenityOS -## `0001-Build-Replace-lGL-with-lgl-to-reference-our-LibGL.patch` - -Build: Replace `-lGL` with `-lgl` to reference our LibGL - - -## `0002-Build-Remove-ansi-build-argument.patch` +## `0001-Build-Remove-ansi-build-argument.patch` Build: Remove `-ansi` build argument -## `0003-Build-Fix-char-vs.-const-char-arguments.patch` +## `0002-Build-Fix-char-vs.-const-char-arguments.patch` Build: Fix `char*` vs. `const char*` arguments These arguments are of the wrong constness, which will trip our compiler. -## `0004-System-Make-sure-to-exit-the-loop-on-receiving-SDL_Q.patch` +## `0003-System-Make-sure-to-exit-the-loop-on-receiving-SDL_Q.patch` System: Make sure to exit the loop on receiving SDL_QUIT diff --git a/Ports/glu/package.sh b/Ports/glu/package.sh index 06290db7c6..23773bc2d5 100755 --- a/Ports/glu/package.sh +++ b/Ports/glu/package.sh @@ -9,10 +9,9 @@ configopts=( "--cross-file=${SERENITY_BUILD_DIR}/meson-cross-file.txt" "--prefix=${SERENITY_INSTALL_ROOT}/usr/local" '-Dbuildtype=release' + '-Dgl_provider=gl' ) -export CPPFLAGS="-I${SERENITY_INSTALL_ROOT}/usr/include/LibGL" - configure() { run meson setup "${configopts[@]}" build } diff --git a/Ports/glu/patches/0001-Build-Manually-find-LibGL.patch b/Ports/glu/patches/0001-Build-Manually-find-LibGL.patch deleted file mode 100644 index 76e88b4902..0000000000 --- a/Ports/glu/patches/0001-Build-Manually-find-LibGL.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Jelle Raaijmakers -Date: Sun, 11 Feb 2024 22:25:59 +0100 -Subject: [PATCH] Build: Manually find LibGL - -We don't have a working pkgconfig to find it, so get rid of it and -manually find the library using the C compiler. ---- - meson.build | 11 ++--------- - 1 file changed, 2 insertions(+), 9 deletions(-) - -diff --git a/meson.build b/meson.build -index 7949e300ac60e0ff6955dedfd9a050cfa3010f4a..18dd4f497e7a43be3e36915bb5430e8891a3a9fb 100644 ---- a/meson.build -+++ b/meson.build -@@ -18,7 +18,8 @@ gl_provider = get_option('gl_provider') - if gl_provider == 'glvnd' - gl_provider = 'opengl' - endif --dep_gl = dependency(gl_provider) -+cc = meson.get_compiler('c') -+dep_gl = cc.find_library('gl', has_headers : 'GL/gl.h') - - inc_include = include_directories('include') - -@@ -28,11 +29,3 @@ install_headers( - 'include/GL/glu.h', - subdir : 'GL', - ) -- --pkgconf = import('pkgconfig') --pkgconf.generate( -- libglu, -- name : 'glu', -- description : 'Mesa OpenGL Utility Library', -- requires: dep_gl --) diff --git a/Ports/glu/patches/0001-Build-Remove-pkgconfig.patch b/Ports/glu/patches/0001-Build-Remove-pkgconfig.patch new file mode 100644 index 0000000000..7d7c278ae1 --- /dev/null +++ b/Ports/glu/patches/0001-Build-Remove-pkgconfig.patch @@ -0,0 +1,27 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Jelle Raaijmakers +Date: Sun, 11 Feb 2024 22:25:59 +0100 +Subject: [PATCH] Build: Remove pkgconfig + +We can't use pkgconfig here since the OpenGL dependency we find is +incompatible with it as an argument. +--- + meson.build | 8 -------- + 1 file changed, 8 deletions(-) + +diff --git a/meson.build b/meson.build +index 7949e300ac60e0ff6955dedfd9a050cfa3010f4a..eed52aea0419aa4efa7ae6d4e71cac4bc28a7b79 100644 +--- a/meson.build ++++ b/meson.build +@@ -28,11 +28,3 @@ install_headers( + 'include/GL/glu.h', + subdir : 'GL', + ) +- +-pkgconf = import('pkgconfig') +-pkgconf.generate( +- libglu, +- name : 'glu', +- description : 'Mesa OpenGL Utility Library', +- requires: dep_gl +-) diff --git a/Ports/glu/patches/ReadMe.md b/Ports/glu/patches/ReadMe.md index 2ffe8753d5..98c466357c 100644 --- a/Ports/glu/patches/ReadMe.md +++ b/Ports/glu/patches/ReadMe.md @@ -1,11 +1,11 @@ # Patches for glu on SerenityOS -## `0001-Build-Manually-find-LibGL.patch` +## `0001-Build-Remove-pkgconfig.patch` -Build: Manually find LibGL +Build: Remove pkgconfig -We don't have a working pkgconfig to find it, so get rid of it and -manually find the library using the C compiler. +We can't use pkgconfig here since the OpenGL dependency we find is +incompatible with it as an argument. ## `0002-Build-Do-not-hide-symbols-by-default.patch` diff --git a/Ports/quake2/package.sh b/Ports/quake2/package.sh index 1c303a6b1a..a2dd1e7fbc 100755 --- a/Ports/quake2/package.sh +++ b/Ports/quake2/package.sh @@ -11,7 +11,6 @@ workdir="quake2sdl-${commit_hash}" makeopts=() configopts=( "-DCMAKE_TOOLCHAIN_FILE=${SERENITY_BUILD_DIR}/CMakeToolchain.txt" - "-DOPENGL_INCLUDE_DIR=${SERENITY_INSTALL_ROOT}/usr/include/LibGL" ) depends=('SDL2') launcher_name='Quake II' diff --git a/Ports/scummvm/package.sh b/Ports/scummvm/package.sh index c8a239c382..53224a8f2a 100755 --- a/Ports/scummvm/package.sh +++ b/Ports/scummvm/package.sh @@ -27,7 +27,6 @@ icon_file='icons/scummvm.ico' export CPPFLAGS='-fvisibility=hidden' export FREETYPE2_CFLAGS="-I${SERENITY_INSTALL_ROOT}/usr/local/include/freetype2" -export OPENGL_CFLAGS="-I${SERENITY_INSTALL_ROOT}/usr/include/LibGL" export SDL_CFLAGS="-I${SERENITY_INSTALL_ROOT}/usr/local/include/SDL2" function post_install() { diff --git a/Ports/scummvm/patches/0001-Teach-configure-about-serenity.patch b/Ports/scummvm/patches/0001-Teach-configure-about-serenity.patch deleted file mode 100644 index d37f6d3330..0000000000 --- a/Ports/scummvm/patches/0001-Teach-configure-about-serenity.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Jelle Raaijmakers -Date: Sun, 9 Jan 2022 23:01:32 +0100 -Subject: [PATCH] Teach configure about serenity - ---- - configure | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/configure b/configure -index 5c28f7e35038236debbdeb3c396ce65f1189b13d..5bbf819fe31d24ac215d59f730bd64eac69c0bfd 100755 ---- a/configure -+++ b/configure -@@ -5843,6 +5843,9 @@ EOF - mingw*) - OPENGL_LIBS="-lopengl32" - ;; -+ serenity*) -+ OPENGL_LIBS="-lgl" -+ ;; - *) - OPENGL_LIBS="-lGL" - ;; diff --git a/Ports/scummvm/patches/ReadMe.md b/Ports/scummvm/patches/ReadMe.md deleted file mode 100644 index 39c8778e43..0000000000 --- a/Ports/scummvm/patches/ReadMe.md +++ /dev/null @@ -1,7 +0,0 @@ -# Patches for scummvm on SerenityOS - -## `0001-Teach-configure-about-serenity.patch` - -Teach configure about serenity - - diff --git a/Ports/tuxracer/package.sh b/Ports/tuxracer/package.sh index 18a21f53ac..521f2c57da 100755 --- a/Ports/tuxracer/package.sh +++ b/Ports/tuxracer/package.sh @@ -8,8 +8,6 @@ files=( ) depends=("glu" "SDL_mixer" "sdl12-compat" "tcl") configopts=( - "--with-gl-inc=${SERENITY_INSTALL_ROOT}/usr/include/LibGL" - "--with-gl-lib-name=gl" "--with-sdl-prefix=${SERENITY_INSTALL_ROOT}/usr/local" "--with-tcl-lib-name=tcl8.6" "--without-x"