public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/proj/guru:master commit in: games-puzzle/blockout/files/, games-puzzle/blockout/
@ 2024-01-25 10:49 David Roman
  0 siblings, 0 replies; only message in thread
From: David Roman @ 2024-01-25 10:49 UTC (permalink / raw
  To: gentoo-commits

commit:     ead256e67d3c6d62b7012616d55ec411f3abf057
Author:     Andrés Becerra <andres.becerra <AT> gmail <DOT> com>
AuthorDate: Tue Jan 23 16:16:49 2024 +0000
Commit:     David Roman <davidroman96 <AT> gmail <DOT> com>
CommitDate: Tue Jan 23 16:16:49 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=ead256e6

games-puzzle/blockout: new package

Signed-off-by: Andrés Becerra <andres.becerra <AT> gmail.com>

 games-puzzle/blockout/Manifest                     |   2 +
 games-puzzle/blockout/blockout-2.5.ebuild          |  48 +++++++++++++++++++++
 .../blockout/files/blockout-2.5-datadir.patch      |  42 ++++++++++++++++++
 games-puzzle/blockout/files/blockout_icon.png      | Bin 0 -> 462 bytes
 games-puzzle/blockout/metadata.xml                 |   8 ++++
 5 files changed, 100 insertions(+)

diff --git a/games-puzzle/blockout/Manifest b/games-puzzle/blockout/Manifest
new file mode 100644
index 0000000000..3c31d2b21a
--- /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 0000000000..957c249e46
--- /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 0000000000..4a049f1de9
--- /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 0000000000..e86e3a6e51
Binary files /dev/null and b/games-puzzle/blockout/files/blockout_icon.png differ

diff --git a/games-puzzle/blockout/metadata.xml b/games-puzzle/blockout/metadata.xml
new file mode 100644
index 0000000000..a471078e75
--- /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>


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2024-01-25 10:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-25 10:49 [gentoo-commits] repo/proj/guru:master commit in: games-puzzle/blockout/files/, games-puzzle/blockout/ David Roman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox