Skip to content
Snippets Groups Projects
Commit 42ea5e32 authored by Jeremy Soller's avatar Jeremy Soller
Browse files

Merge branch 'package-games-opentyrian' into 'master'

package(games): OpenTyrian (1995/2004)

See merge request !411
parents f398a634 36e7ac47
No related branches found
No related tags found
1 merge request!411package(games): OpenTyrian (1995/2004)
name=OpenTyrian
category=Games
binary=/usr/games/opentyrian
icon=/ui/icons/apps/opentyrian.png
# 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
"""
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 :
7790d09a2a3addcd33c66ef063d5900eb81cc9c342f4807eb8356364dd1d9277 tyrian21.zip
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment