diff options
author | Samuel Bauer <samuel.bauer@yahoo.fr> | 2021-04-29 22:18:56 +0200 |
---|---|---|
committer | Samuel Bauer <samuel.bauer@yahoo.fr> | 2021-04-29 22:18:56 +0200 |
commit | 3476a3262beada5fd1f938c649228e0a6fb09b07 (patch) | |
tree | 8dca61707f4e61e3e308857096068435ae398d70 /games-action | |
parent | app-emulation/arnold: new ebuild (diff) | |
download | guru-3476a3262beada5fd1f938c649228e0a6fb09b07.tar.gz guru-3476a3262beada5fd1f938c649228e0a6fb09b07.tar.bz2 guru-3476a3262beada5fd1f938c649228e0a6fb09b07.zip |
games-action/blackvoxel: new ebuild
Signed-off-by: Samuel Bauer <samuel.bauer@yahoo.fr>
Diffstat (limited to 'games-action')
-rw-r--r-- | games-action/blackvoxel/Manifest | 1 | ||||
-rw-r--r-- | games-action/blackvoxel/blackvoxel-2.42.ebuild | 48 | ||||
-rw-r--r-- | games-action/blackvoxel/blackvoxel-9999.ebuild | 46 | ||||
-rw-r--r-- | games-action/blackvoxel/files/blackvoxel-2.42-makefile.patch | 30 | ||||
-rw-r--r-- | games-action/blackvoxel/files/blackvoxel-2.42-savedir.patch | 18 | ||||
-rw-r--r-- | games-action/blackvoxel/metadata.xml | 8 |
6 files changed, 151 insertions, 0 deletions
diff --git a/games-action/blackvoxel/Manifest b/games-action/blackvoxel/Manifest new file mode 100644 index 000000000..9493eb6ce --- /dev/null +++ b/games-action/blackvoxel/Manifest @@ -0,0 +1 @@ +DIST blackvoxel-2.42.tar.bz2 18367949 BLAKE2B f45da57846370ae2109709cb28f3bb02fbd63ff208306705dd8da544737f84250542a4c58b3889e603f16ca898f9ee4458361c326fd28f68cb2a70f891de0f67 SHA512 275c7cb34c58bbd772bc1daf7beb26395c509d37341fe1c343f745bc3fa73223f9d36b275f0813a06908f258b39f94c1e4229f8e27fb822cf71881e66fccd3fb diff --git a/games-action/blackvoxel/blackvoxel-2.42.ebuild b/games-action/blackvoxel/blackvoxel-2.42.ebuild new file mode 100644 index 000000000..125773d8b --- /dev/null +++ b/games-action/blackvoxel/blackvoxel-2.42.ebuild @@ -0,0 +1,48 @@ +# Copyright 2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit desktop eutils xdg + +DESCRIPTION="Blackvoxel Video Game" +HOMEPAGE="https://www.blackvoxel.com/" +SRC_URI="https://www.blackvoxel.com/dm_download.php?file=163&key=1 -> ${P}.tar.bz2" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64" +IUSE="" + +DEPEND=" + dev-libs/expat + media-libs/alsa-lib + media-libs/glew:0 + media-libs/libsdl + x11-libs/libX11 + virtual/opengl +" +RDEPEND="${DEPEND}" + +S="${WORKDIR}/${PN}_source_${PV//./_}" + +PATCHES=( + "${FILESDIR}"/${P}-makefile.patch + "${FILESDIR}"/${P}-savedir.patch +) + +src_compile() { + emake blackvoxeldatadir="/usr/share/${PN}" bindir="/usr/bin" +} + +src_install() { + dodoc Contributors.txt + doman blackvoxel.6 + newicon -s 16 Icons/blackvoxel-16x16.png blackvoxel.png + newicon -s 32 Icons/blackvoxel-32x32.png blackvoxel.png + newicon -s 128 Icons/blackvoxel_128x128.png blackvoxel.png + + dobin blackvoxel + insinto "/usr/share/${PN}" + doins -r Misc Sound VoxelTypes gui randomnum.dat +} diff --git a/games-action/blackvoxel/blackvoxel-9999.ebuild b/games-action/blackvoxel/blackvoxel-9999.ebuild new file mode 100644 index 000000000..6e3d11256 --- /dev/null +++ b/games-action/blackvoxel/blackvoxel-9999.ebuild @@ -0,0 +1,46 @@ +# Copyright 2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit eutils git-r3 + +DESCRIPTION="Blackvoxel Video Game" +HOMEPAGE="https://www.blackvoxel.com/" +EGIT_REPO_URI="https://github.com/Blackvoxel/Blackvoxel" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="" +IUSE="" + +DEPEND=" + dev-libs/expat + media-libs/alsa-lib + media-libs/glew:0 + media-libs/libsdl + x11-libs/libX11 + virtual/opengl +" +RDEPEND="${DEPEND}" + +src_prepare() { + sed -i -e '/COMPILEOPTION_SAVEFOLDERNAME/s:Blackvoxel:.local/share/blackvoxel:' \ + src/ACompileSettings.h || die + sed -i -e 's/LDFLAGS=/LDFLAGS+= /' -e 's/LDFLAGS/s/-s //' \ + -e '/(CPU_BITS)/ { s/; make //; s/cd/+make -C/}' \ + -e '/CFLAGS+/d' -e 's/CFLAGS=/CFLAGS+=/' Makefile || die + default +} + +src_compile() { + emake blackvoxeldatadir="/usr/share/${PN}" bindir="/usr/bin" +} + +src_install() { + dodoc Contributors.txt README.md + + dobin blackvoxel + insinto "/usr/share/${PN}" + doins -r Misc Sound VoxelTypes gui randomnum.dat +} diff --git a/games-action/blackvoxel/files/blackvoxel-2.42-makefile.patch b/games-action/blackvoxel/files/blackvoxel-2.42-makefile.patch new file mode 100644 index 000000000..5ce5184b4 --- /dev/null +++ b/games-action/blackvoxel/files/blackvoxel-2.42-makefile.patch @@ -0,0 +1,30 @@ +--- a/Makefile ++++ b/Makefile +@@ -11,7 +11,7 @@ + CC=g++ + LD=g++ + PROGNAME=blackvoxel +-CFLAGS=-I "src/sc_Squirrel3/include" -DCOMPILEOPTION_DEMO=0 -DDEVELOPPEMENT_ON=0 -DCOMPILEOPTION_SPECIAL=0 -DCOMPILEOPTION_DATAFILESPATH="\"$(blackvoxeldatadir)\"" ++CFLAGS+=-I "src/sc_Squirrel3/include" -DCOMPILEOPTION_DEMO=0 -DDEVELOPPEMENT_ON=0 -DCOMPILEOPTION_SPECIAL=0 -DCOMPILEOPTION_DATAFILESPATH="\"$(blackvoxeldatadir)\"" + SRC= $(wildcard src/*.cpp) $(wildcard src/z/*.cpp) + OBJ= $(SRC:src/%.cpp=obj/%.o) + +@@ -28,8 +28,7 @@ + KERNELNAME =$(shell uname -s) + + ifeq ($(KERNELNAME),Linux) +- CFLAGS+= -O3 -c -fmessage-length=0 +- LDFLAGS=-s -zrelro -L"src/sc_Squirrel3/lib" -lGLU -lSDL -lGLEW -lGL -lsquirrel -lsqstdlib ++ LDFLAGS+= -zrelro -L"src/sc_Squirrel3/lib" -lGLU -lSDL -lGLEW -lGL -lsquirrel -lsqstdlib + else ifeq ($(KERNELNAME), FreeBSD) + # To be done... + CFLAGS+= -O3 -c -fmessage-length=0 +@@ -57,7 +56,7 @@ + + + squirrel: +- cd src/sc_Squirrel3 ; make sq$(CPU_BITS) ++ +make -C src/sc_Squirrel3 sq$(CPU_BITS) + + clean: + @rm -rf obj diff --git a/games-action/blackvoxel/files/blackvoxel-2.42-savedir.patch b/games-action/blackvoxel/files/blackvoxel-2.42-savedir.patch new file mode 100644 index 000000000..d5bad7b21 --- /dev/null +++ b/games-action/blackvoxel/files/blackvoxel-2.42-savedir.patch @@ -0,0 +1,18 @@ +--- a/src/ACompileSettings.h ++++ b/src/ACompileSettings.h +@@ -129,13 +129,11 @@ + + #ifdef __linux__ + +- #define COMPILEOPTION_SAVEFOLDERNAME "Blackvoxel" ++ #define COMPILEOPTION_SAVEFOLDERNAME ".local/share/blackvoxel" + #define COMPILEOPTION_USEHOMEDIRSTORAGE 1 + #define COMPILEOPTION_WINXPTIMECOMPUTING 0 + +- #if DEVELOPPEMENT_ON == 1 +- #define COMPILEOPTION_DATAFILESPATH "" +- #else ++ #if DEVELOPPEMENT_ON == 0 + #ifndef COMPILEOPTION_DATAFILESPATH + #if COMPILEOPTION_ONLYSCHOOLMODE + #define COMPILEOPTION_DATAFILESPATH "/usr/share/blackvoxel_school" diff --git a/games-action/blackvoxel/metadata.xml b/games-action/blackvoxel/metadata.xml new file mode 100644 index 000000000..ffffe4022 --- /dev/null +++ b/games-action/blackvoxel/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"> + <name>mazes-80</name> + <email>mazes-80@none.org</email> +</maintainer> +</pkgmetadata> |