mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-09 23:23:00 -04:00
games-puzzle/blockout: new package
Signed-off-by: Andrés Becerra <andres.becerra@gmail.com>
This commit is contained in:
2
games-puzzle/blockout/Manifest
Normal file
2
games-puzzle/blockout/Manifest
Normal file
@@ -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
|
||||
48
games-puzzle/blockout/blockout-2.5.ebuild
Normal file
48
games-puzzle/blockout/blockout-2.5.ebuild
Normal file
@@ -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
|
||||
}
|
||||
42
games-puzzle/blockout/files/blockout-2.5-datadir.patch
Normal file
42
games-puzzle/blockout/files/blockout-2.5-datadir.patch
Normal file
@@ -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];
|
||||
BIN
games-puzzle/blockout/files/blockout_icon.png
Normal file
BIN
games-puzzle/blockout/files/blockout_icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 462 B |
8
games-puzzle/blockout/metadata.xml
Normal file
8
games-puzzle/blockout/metadata.xml
Normal file
@@ -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>
|
||||
Reference in New Issue
Block a user