mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-06-24 22:04:19 +08:00
Merge branch 'package-games-opentyrian' into 'master'
package(games): OpenTyrian (1995/2004) See merge request redox-os/cookbook!411
This commit is contained in:
commit
42ea5e327d
4
recipes/games/opentyrian/manifest
Normal file
4
recipes/games/opentyrian/manifest
Normal file
@ -0,0 +1,4 @@
|
||||
name=OpenTyrian
|
||||
category=Games
|
||||
binary=/usr/games/opentyrian
|
||||
icon=/ui/icons/apps/opentyrian.png
|
||||
50
recipes/games/opentyrian/recipe.toml
Normal file
50
recipes/games/opentyrian/recipe.toml
Normal file
@ -0,0 +1,50 @@
|
||||
# Version date: 02-August-2024
|
||||
#
|
||||
# Notes:
|
||||
# As Tyrian is an ancient, sprite based game, the code isn't updated
|
||||
# super frequently. So instead of just pinning the version to the last
|
||||
# official release in 2022, I'm pulling from main because it's unlikely
|
||||
# anything will break. The last two commits were small fixes, one in 2023
|
||||
# and one in 2024.
|
||||
|
||||
[source]
|
||||
git = "https://github.com/opentyrian/opentyrian"
|
||||
patches = [ "redox.patch" ]
|
||||
|
||||
[build]
|
||||
template = "custom"
|
||||
dependencies = [
|
||||
"llvm18",
|
||||
"liborbital",
|
||||
"mesa",
|
||||
"sdl2",
|
||||
"zlib",
|
||||
# "sdl2-net"
|
||||
]
|
||||
script = """
|
||||
# Build system is only a standalone Makefile
|
||||
COOKBOOK_CONFIGURE="true"
|
||||
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="/ui/icons/apps"
|
||||
export gamesdir="${prefix}/share/games"
|
||||
|
||||
# Prepare the sources and download Tyrian (freeware)
|
||||
rsync -av --delete "${COOKBOOK_SOURCE}/" "${COOKBOOK_RECIPE}/tyrian21.zip.sha" ./
|
||||
mkdir -p "${ASSETSDIR}"
|
||||
curl -OL https://camanis.net/tyrian/tyrian21.zip
|
||||
sha256sum -c tyrian21.zip.sha
|
||||
unzip -jd "${ASSETSDIR}" tyrian21.zip
|
||||
|
||||
# The build system doesn't automatically apply patches to cloned repositories
|
||||
git apply "${COOKBOOK_RECIPE}/redox.patch"
|
||||
|
||||
cookbook_configure
|
||||
"""
|
||||
60
recipes/games/opentyrian/redox.patch
Normal file
60
recipes/games/opentyrian/redox.patch
Normal file
@ -0,0 +1,60 @@
|
||||
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 :
|
||||
1
recipes/games/opentyrian/tyrian21.zip.sha
Normal file
1
recipes/games/opentyrian/tyrian21.zip.sha
Normal file
@ -0,0 +1 @@
|
||||
7790d09a2a3addcd33c66ef063d5900eb81cc9c342f4807eb8356364dd1d9277 tyrian21.zip
|
||||
Loading…
Reference in New Issue
Block a user