From f1e0590abf11ed5fd4c421a68cd83c58e84c97a7 Mon Sep 17 00:00:00 2001 From: Wildan M Date: Wed, 16 Sep 2026 22:41:10 +0700 Subject: [PATCH] Fix compilation for glutin, sdl2-gears, open-tyrian --- recipes/demos/glutin/recipe.toml | 11 +++-- recipes/demos/sdl2-gears/recipe.toml | 2 +- recipes/games/opentyrian/manifest | 2 +- recipes/games/opentyrian/recipe.toml | 12 +++--- recipes/games/opentyrian/redox.patch | 60 ---------------------------- 5 files changed, 15 insertions(+), 72 deletions(-) delete mode 100644 recipes/games/opentyrian/redox.patch diff --git a/recipes/demos/glutin/recipe.toml b/recipes/demos/glutin/recipe.toml index d3f2f4ddb..e9c3ce147 100644 --- a/recipes/demos/glutin/recipe.toml +++ b/recipes/demos/glutin/recipe.toml @@ -5,12 +5,17 @@ upstream = "https://github.com/rust-windowing/glutin.git" [build] template = "custom" -cargopath = "glutin_examples" dependencies = [ "mesa", - "zlib" + "zlib", +] +dev-dependencies = [ + "libstdcxx", ] script = """ DYNAMIC_INIT -CARGOPATH="glutin_examples" cookbook_cargo_examples window +COOKBOOK_CARGO_FLAGS=() +CARGOPATH="glutin_examples" +export RUSTFLAGS="$RUSTFLAGS -Clink-arg=-lOSMesa" +cookbook_cargo_examples window """ diff --git a/recipes/demos/sdl2-gears/recipe.toml b/recipes/demos/sdl2-gears/recipe.toml index 04ef051f6..655910846 100644 --- a/recipes/demos/sdl2-gears/recipe.toml +++ b/recipes/demos/sdl2-gears/recipe.toml @@ -11,7 +11,7 @@ mkdir -p "${COOKBOOK_STAGE}/usr/games/sdl2_gears" ${CXX} -O2 -I "${COOKBOOK_SYSROOT}/include" $LDFLAGS ${COOKBOOK_RECIPE}/gears.c \ -o sdl2_gears -dynamic \ -lSDL2_image -lSDL2_mixer -lSDL2_ttf $("${PKG_CONFIG}" --libs osmesa) \ - -lSDL2 -lorbital -lfreetype -lpng -ljpeg -lvorbisfile -lvorbis -logg -lz + -lSDL2 -lorbital -lfreetype -lpng -lvorbisfile -lvorbis -logg -lz cp -rv "${COOKBOOK_RECIPE}/assets" "${COOKBOOK_STAGE}/usr/games/sdl2_gears/" cp -v sdl2_gears "${COOKBOOK_STAGE}/usr/games/sdl2_gears/" """ diff --git a/recipes/games/opentyrian/manifest b/recipes/games/opentyrian/manifest index bcda89e35..58d174321 100644 --- a/recipes/games/opentyrian/manifest +++ b/recipes/games/opentyrian/manifest @@ -1,4 +1,4 @@ name=OpenTyrian category=Games binary=/usr/games/opentyrian -icon=/ui/icons/apps/opentyrian.png +icon=/usr/share/icons/apps/opentyrian.png diff --git a/recipes/games/opentyrian/recipe.toml b/recipes/games/opentyrian/recipe.toml index 3f9fbfb5e..56faec62c 100644 --- a/recipes/games/opentyrian/recipe.toml +++ b/recipes/games/opentyrian/recipe.toml @@ -9,7 +9,8 @@ [source] git = "https://github.com/opentyrian/opentyrian" -patches = [ "redox.patch" ] +shallow_clone = true +rev = "v2.1.20260913" [build] template = "custom" @@ -20,6 +21,9 @@ dependencies = [ "zlib", # "sdl2-net" ] +dev-dependencies = [ + "libstdcxx", +] script = """ DYNAMIC_INIT @@ -30,17 +34,11 @@ COOKBOOK_CONFIGURE_FLAGS="" # See Makefile for variables to override export PKG_CONFIG="${TARGET}-pkg-config" ASSETSDIR="${COOKBOOK_STAGE}/usr/share/games/tyrian" -export WITH_NETWORK=false -export REDOX_OVERRIDE=true export prefix="/usr" export bindir="${prefix}/games" export icondir="/usr/share/icons/apps" export gamesdir="${prefix}/share/games" -if [ "${COOKBOOK_DYNAMIC}" == "1" ]; then - LDFLAGS+=" -lstdc++" -fi - # Prepare the sources and download Tyrian (freeware) rsync -av --delete "${COOKBOOK_SOURCE}/" "${COOKBOOK_RECIPE}/tyrian21.zip.sha" ./ mkdir -p "${ASSETSDIR}" diff --git a/recipes/games/opentyrian/redox.patch b/recipes/games/opentyrian/redox.patch deleted file mode 100644 index e0de2aec7..000000000 --- a/recipes/games/opentyrian/redox.patch +++ /dev/null @@ -1,60 +0,0 @@ -Binary files source/.git/index and source-new/.git/index differ -diff '--color=auto' -rupwN source/Makefile source-new/Makefile ---- source/Makefile 2024-10-21 02:46:06.720225834 -0400 -+++ source-new/Makefile 2024-10-25 01:03:37.283351544 -0400 -@@ -5,10 +5,11 @@ ifneq ($(filter Msys Cygwin, $(shell una - TYRIAN_DIR = C:\\TYRIAN - else - PLATFORM := UNIX -- TYRIAN_DIR = $(gamesdir)/tyrian -+ TYRIAN_DIR ?= $(gamesdir)/tyrian - endif - --WITH_NETWORK := true -+WITH_NETWORK ?= true -+REDOX_OVERRIDE ?= false - - ################################################################################ - -@@ -114,11 +115,15 @@ installdirs : - mkdir -p $(DESTDIR)$(docdir) - mkdir -p $(DESTDIR)$(man6dir) - mkdir -p $(DESTDIR)$(desktopdir) -- mkdir -p $(DESTDIR)$(icondir)/hicolor/22x22/apps -- mkdir -p $(DESTDIR)$(icondir)/hicolor/24x24/apps -- mkdir -p $(DESTDIR)$(icondir)/hicolor/32x32/apps -- mkdir -p $(DESTDIR)$(icondir)/hicolor/48x48/apps -- mkdir -p $(DESTDIR)$(icondir)/hicolor/128x128/apps -+ if [ "$(REDOX_OVERRIDE)" = "true" ]; then\ -+ mkdir -p $(DESTDIR)$(icondir);\ -+ else\ -+ mkdir -p $(DESTDIR)$(icondir)/hicolor/22x22/apps;\ -+ mkdir -p $(DESTDIR)$(icondir)/hicolor/24x24/apps;\ -+ mkdir -p $(DESTDIR)$(icondir)/hicolor/32x32/apps;\ -+ mkdir -p $(DESTDIR)$(icondir)/hicolor/48x48/apps;\ -+ mkdir -p $(DESTDIR)$(icondir)/hicolor/128x128/apps;\ -+ fi;\ - - .PHONY : install - install : $(TARGET) installdirs -@@ -126,11 +131,15 @@ install : $(TARGET) installdirs - $(INSTALL_DATA) NEWS README $(DESTDIR)$(docdir)/ - $(INSTALL_DATA) linux/man/opentyrian.6 $(DESTDIR)$(man6dir)/opentyrian$(man6ext) - $(INSTALL_DATA) linux/opentyrian.desktop $(DESTDIR)$(desktopdir)/ -- $(INSTALL_DATA) linux/icons/tyrian-22.png $(DESTDIR)$(icondir)/hicolor/22x22/apps/opentyrian.png -- $(INSTALL_DATA) linux/icons/tyrian-24.png $(DESTDIR)$(icondir)/hicolor/24x24/apps/opentyrian.png -- $(INSTALL_DATA) linux/icons/tyrian-32.png $(DESTDIR)$(icondir)/hicolor/32x32/apps/opentyrian.png -- $(INSTALL_DATA) linux/icons/tyrian-48.png $(DESTDIR)$(icondir)/hicolor/48x48/apps/opentyrian.png -- $(INSTALL_DATA) linux/icons/tyrian-128.png $(DESTDIR)$(icondir)/hicolor/128x128/apps/opentyrian.png -+ if [ "$(REDOX_OVERRIDE)" = "true" ]; then\ -+ $(INSTALL_DATA) linux/icons/tyrian-32.png $(DESTDIR)$(icondir)/opentyrian.png;\ -+ else\ -+ $(INSTALL_DATA) linux/icons/tyrian-22.png $(DESTDIR)$(icondir)/hicolor/22x22/apps/opentyrian.png;\ -+ $(INSTALL_DATA) linux/icons/tyrian-24.png $(DESTDIR)$(icondir)/hicolor/24x24/apps/opentyrian.png;\ -+ $(INSTALL_DATA) linux/icons/tyrian-32.png $(DESTDIR)$(icondir)/hicolor/32x32/apps/opentyrian.png;\ -+ $(INSTALL_DATA) linux/icons/tyrian-48.png $(DESTDIR)$(icondir)/hicolor/48x48/apps/opentyrian.png;\ -+ $(INSTALL_DATA) linux/icons/tyrian-128.png $(DESTDIR)$(icondir)/hicolor/128x128/apps/opentyrian.png;\ -+ fi;\ - - .PHONY : uninstall - uninstall :