aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'games-puzzle')
-rw-r--r--games-puzzle/blockout/Manifest2
-rw-r--r--games-puzzle/blockout/blockout-2.5.ebuild48
-rw-r--r--games-puzzle/blockout/files/blockout-2.5-datadir.patch42
-rw-r--r--games-puzzle/blockout/files/blockout_icon.pngbin0 -> 462 bytes
-rw-r--r--games-puzzle/blockout/metadata.xml8
5 files changed, 100 insertions, 0 deletions
diff --git a/games-puzzle/blockout/Manifest b/games-puzzle/blockout/Manifest
new file mode 100644
index 000000000..3c31d2b21
--- /dev/null
+++ b/games-puzzle/blockout/Manifest
@@ -0,0 +1,2 @@
+DIST bl25-linux-x86.tar.gz 4379299 BLAKE2B d4276b1a444a3cc656a44b4e28a2630413ac4c406e5a27e4f9c10f188b4b75957430325e3d551e8cedb93428737b7992af6c6e20a178fc5c4d3312aa6906eaa9 SHA512 2833bcda201b438de414f791f3ad5f8805ba0fc7f3aecb9911a813782954524a6ddaf27f8ba56dbcdca89a5ccacfaf59f43900544d3927f47d75abfc93c4a622
+DIST bl25-src.tar.gz 479743 BLAKE2B 4e42da05fdfda203e96fddb2f2d1f00878ecfd1f22cbe8bd1b0446a1960e51bb6db39bb031f25bd375c2b30a45b20c6abddbdc3b373f6fe1876097c4555f0bcf SHA512 8767c55fdbc511c07758a2e6905376b44e0e9478f3092f829147774538647c2fc8798b778a475e5efe7907ceb0d87136d27582c5ea0e372b12552ccf6aece445
diff --git a/games-puzzle/blockout/blockout-2.5.ebuild b/games-puzzle/blockout/blockout-2.5.ebuild
new file mode 100644
index 000000000..957c249e4
--- /dev/null
+++ b/games-puzzle/blockout/blockout-2.5.ebuild
@@ -0,0 +1,48 @@
+# Copyright 2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+inherit desktop
+
+DESCRIPTION="BlockOut II is an adaptation of the original Blockout DOS game"
+
+HOMEPAGE="http://www.blockout.net/blockout2"
+SRC_URI="
+ mirror://sourceforge/blockout/bl25-src.tar.gz
+ mirror://sourceforge/blockout/bl25-linux-x86.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="
+ media-libs/alsa-lib
+ media-libs/libsdl
+ media-libs/sdl-mixer
+ virtual/glu
+ virtual/opengl"
+
+DEPEND="${RDEPEND}"
+S="${WORKDIR}"/BL_SRC
+PATCHES="${FILESDIR}"/${P}-datadir.patch
+
+src_compile() {
+ GAME_DATADIR="/usr/share/${PN}"
+ emake -C ImageLib/src
+ emake -C BlockOut GAME_DATA_PREFIX="${GAME_DATADIR}"
+}
+
+src_install() {
+ dobin BlockOut/blockout
+
+ insinto "${GAME_DATADIR}"/images
+ doins -r "${WORKDIR}"/blockout/images/*
+
+ insinto "${GAME_DATADIR}"/sounds
+ doins -r "${WORKDIR}"/blockout/sounds/*
+
+ dodoc "${WORKDIR}"/blockout/README.txt
+
+ newicon "${FILESDIR}/blockout_icon.png" blockout_icon.png
+ make_desktop_entry ${PN} BlockOut blockout_icon Game
+}
diff --git a/games-puzzle/blockout/files/blockout-2.5-datadir.patch b/games-puzzle/blockout/files/blockout-2.5-datadir.patch
new file mode 100644
index 000000000..4a049f1de
--- /dev/null
+++ b/games-puzzle/blockout/files/blockout-2.5-datadir.patch
@@ -0,0 +1,42 @@
+diff --git a/BlockOut/Makefile b/BlockOut/Makefile
+index 0cdfa00..7e5b531 100644
+--- a/BlockOut/Makefile
++++ b/BlockOut/Makefile
+@@ -71,6 +71,10 @@ LFLAGS = -L $(SDL_LIBS) \
+
+ endif
+
++ifdef GAME_DATA_PREFIX
++CXXFLAGS += -DBL2_HOME=\"$(GAME_DATA_PREFIX)\"
++endif
++
+
+ #--------------------------------------------------------------------
+
+diff --git a/BlockOut/Utils.cpp b/BlockOut/Utils.cpp
+index 4ccd8df..eb37e88 100644
+--- a/BlockOut/Utils.cpp
++++ b/BlockOut/Utils.cpp
+@@ -206,13 +206,21 @@ BOOL CheckEnv() {
+ printf("Please set the HOME variable to your home directory (ex: HOME=/users/jeanluc)\n");
+ return FALSE;
+ }
+-
++
++#ifndef BL2_HOME
++
+ char *blockoutHome = getenv("BL2_HOME");
+ if( blockoutHome==NULL ) {
+ printf("BL2_HOME environement variable if not defined !\n");
+ printf("Please set the BL2_HOME to the BlockOut II installation directory (ex: BL2_HOME=/usr/local/bl2).\n");
+ return FALSE;
+ }
++#else
++
++ char const *blockoutHome = BL2_HOME;
++
++#endif
++
+ strcpy( bl2Home , blockoutHome );
+
+ char bl2Dir[512];
diff --git a/games-puzzle/blockout/files/blockout_icon.png b/games-puzzle/blockout/files/blockout_icon.png
new file mode 100644
index 000000000..e86e3a6e5
--- /dev/null
+++ b/games-puzzle/blockout/files/blockout_icon.png
Binary files differ
diff --git a/games-puzzle/blockout/metadata.xml b/games-puzzle/blockout/metadata.xml
new file mode 100644
index 000000000..a471078e7
--- /dev/null
+++ b/games-puzzle/blockout/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>andres.becerra@gmail.com</email>
+ <name>Andrés Becerra Sandoval</name>
+ </maintainer>
+</pkgmetadata>