mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-11-05 04:06:38 +08:00
Fix compilation for glutin, sdl2-gears, open-tyrian
This commit is contained in:
parent
4bcf49aa83
commit
f1e0590abf
@ -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
|
||||
"""
|
||||
|
||||
@ -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/"
|
||||
"""
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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}"
|
||||
|
||||
@ -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 :
|
||||
Loading…
Reference in New Issue
Block a user