1 |
commit: 3476a3262beada5fd1f938c649228e0a6fb09b07 |
2 |
Author: Samuel Bauer <samuel.bauer <AT> yahoo <DOT> fr> |
3 |
AuthorDate: Thu Apr 29 20:18:56 2021 +0000 |
4 |
Commit: Samuel Bauer <samuel.bauer <AT> yahoo <DOT> fr> |
5 |
CommitDate: Thu Apr 29 20:18:56 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=3476a326 |
7 |
|
8 |
games-action/blackvoxel: new ebuild |
9 |
|
10 |
Signed-off-by: Samuel Bauer <samuel.bauer <AT> yahoo.fr> |
11 |
|
12 |
games-action/blackvoxel/Manifest | 1 + |
13 |
games-action/blackvoxel/blackvoxel-2.42.ebuild | 48 ++++++++++++++++++++++ |
14 |
games-action/blackvoxel/blackvoxel-9999.ebuild | 46 +++++++++++++++++++++ |
15 |
.../files/blackvoxel-2.42-makefile.patch | 30 ++++++++++++++ |
16 |
.../blackvoxel/files/blackvoxel-2.42-savedir.patch | 18 ++++++++ |
17 |
games-action/blackvoxel/metadata.xml | 8 ++++ |
18 |
6 files changed, 151 insertions(+) |
19 |
|
20 |
diff --git a/games-action/blackvoxel/Manifest b/games-action/blackvoxel/Manifest |
21 |
new file mode 100644 |
22 |
index 000000000..9493eb6ce |
23 |
--- /dev/null |
24 |
+++ b/games-action/blackvoxel/Manifest |
25 |
@@ -0,0 +1 @@ |
26 |
+DIST blackvoxel-2.42.tar.bz2 18367949 BLAKE2B f45da57846370ae2109709cb28f3bb02fbd63ff208306705dd8da544737f84250542a4c58b3889e603f16ca898f9ee4458361c326fd28f68cb2a70f891de0f67 SHA512 275c7cb34c58bbd772bc1daf7beb26395c509d37341fe1c343f745bc3fa73223f9d36b275f0813a06908f258b39f94c1e4229f8e27fb822cf71881e66fccd3fb |
27 |
|
28 |
diff --git a/games-action/blackvoxel/blackvoxel-2.42.ebuild b/games-action/blackvoxel/blackvoxel-2.42.ebuild |
29 |
new file mode 100644 |
30 |
index 000000000..125773d8b |
31 |
--- /dev/null |
32 |
+++ b/games-action/blackvoxel/blackvoxel-2.42.ebuild |
33 |
@@ -0,0 +1,48 @@ |
34 |
+# Copyright 2020 Gentoo Authors |
35 |
+# Distributed under the terms of the GNU General Public License v2 |
36 |
+ |
37 |
+EAPI=7 |
38 |
+ |
39 |
+inherit desktop eutils xdg |
40 |
+ |
41 |
+DESCRIPTION="Blackvoxel Video Game" |
42 |
+HOMEPAGE="https://www.blackvoxel.com/" |
43 |
+SRC_URI="https://www.blackvoxel.com/dm_download.php?file=163&key=1 -> ${P}.tar.bz2" |
44 |
+ |
45 |
+LICENSE="GPL-3" |
46 |
+SLOT="0" |
47 |
+KEYWORDS="~amd64" |
48 |
+IUSE="" |
49 |
+ |
50 |
+DEPEND=" |
51 |
+ dev-libs/expat |
52 |
+ media-libs/alsa-lib |
53 |
+ media-libs/glew:0 |
54 |
+ media-libs/libsdl |
55 |
+ x11-libs/libX11 |
56 |
+ virtual/opengl |
57 |
+" |
58 |
+RDEPEND="${DEPEND}" |
59 |
+ |
60 |
+S="${WORKDIR}/${PN}_source_${PV//./_}" |
61 |
+ |
62 |
+PATCHES=( |
63 |
+ "${FILESDIR}"/${P}-makefile.patch |
64 |
+ "${FILESDIR}"/${P}-savedir.patch |
65 |
+) |
66 |
+ |
67 |
+src_compile() { |
68 |
+ emake blackvoxeldatadir="/usr/share/${PN}" bindir="/usr/bin" |
69 |
+} |
70 |
+ |
71 |
+src_install() { |
72 |
+ dodoc Contributors.txt |
73 |
+ doman blackvoxel.6 |
74 |
+ newicon -s 16 Icons/blackvoxel-16x16.png blackvoxel.png |
75 |
+ newicon -s 32 Icons/blackvoxel-32x32.png blackvoxel.png |
76 |
+ newicon -s 128 Icons/blackvoxel_128x128.png blackvoxel.png |
77 |
+ |
78 |
+ dobin blackvoxel |
79 |
+ insinto "/usr/share/${PN}" |
80 |
+ doins -r Misc Sound VoxelTypes gui randomnum.dat |
81 |
+} |
82 |
|
83 |
diff --git a/games-action/blackvoxel/blackvoxel-9999.ebuild b/games-action/blackvoxel/blackvoxel-9999.ebuild |
84 |
new file mode 100644 |
85 |
index 000000000..6e3d11256 |
86 |
--- /dev/null |
87 |
+++ b/games-action/blackvoxel/blackvoxel-9999.ebuild |
88 |
@@ -0,0 +1,46 @@ |
89 |
+# Copyright 2020 Gentoo Authors |
90 |
+# Distributed under the terms of the GNU General Public License v2 |
91 |
+ |
92 |
+EAPI=7 |
93 |
+ |
94 |
+inherit eutils git-r3 |
95 |
+ |
96 |
+DESCRIPTION="Blackvoxel Video Game" |
97 |
+HOMEPAGE="https://www.blackvoxel.com/" |
98 |
+EGIT_REPO_URI="https://github.com/Blackvoxel/Blackvoxel" |
99 |
+ |
100 |
+LICENSE="GPL-3" |
101 |
+SLOT="0" |
102 |
+KEYWORDS="" |
103 |
+IUSE="" |
104 |
+ |
105 |
+DEPEND=" |
106 |
+ dev-libs/expat |
107 |
+ media-libs/alsa-lib |
108 |
+ media-libs/glew:0 |
109 |
+ media-libs/libsdl |
110 |
+ x11-libs/libX11 |
111 |
+ virtual/opengl |
112 |
+" |
113 |
+RDEPEND="${DEPEND}" |
114 |
+ |
115 |
+src_prepare() { |
116 |
+ sed -i -e '/COMPILEOPTION_SAVEFOLDERNAME/s:Blackvoxel:.local/share/blackvoxel:' \ |
117 |
+ src/ACompileSettings.h || die |
118 |
+ sed -i -e 's/LDFLAGS=/LDFLAGS+= /' -e 's/LDFLAGS/s/-s //' \ |
119 |
+ -e '/(CPU_BITS)/ { s/; make //; s/cd/+make -C/}' \ |
120 |
+ -e '/CFLAGS+/d' -e 's/CFLAGS=/CFLAGS+=/' Makefile || die |
121 |
+ default |
122 |
+} |
123 |
+ |
124 |
+src_compile() { |
125 |
+ emake blackvoxeldatadir="/usr/share/${PN}" bindir="/usr/bin" |
126 |
+} |
127 |
+ |
128 |
+src_install() { |
129 |
+ dodoc Contributors.txt README.md |
130 |
+ |
131 |
+ dobin blackvoxel |
132 |
+ insinto "/usr/share/${PN}" |
133 |
+ doins -r Misc Sound VoxelTypes gui randomnum.dat |
134 |
+} |
135 |
|
136 |
diff --git a/games-action/blackvoxel/files/blackvoxel-2.42-makefile.patch b/games-action/blackvoxel/files/blackvoxel-2.42-makefile.patch |
137 |
new file mode 100644 |
138 |
index 000000000..5ce5184b4 |
139 |
--- /dev/null |
140 |
+++ b/games-action/blackvoxel/files/blackvoxel-2.42-makefile.patch |
141 |
@@ -0,0 +1,30 @@ |
142 |
+--- a/Makefile |
143 |
++++ b/Makefile |
144 |
+@@ -11,7 +11,7 @@ |
145 |
+ CC=g++ |
146 |
+ LD=g++ |
147 |
+ PROGNAME=blackvoxel |
148 |
+-CFLAGS=-I "src/sc_Squirrel3/include" -DCOMPILEOPTION_DEMO=0 -DDEVELOPPEMENT_ON=0 -DCOMPILEOPTION_SPECIAL=0 -DCOMPILEOPTION_DATAFILESPATH="\"$(blackvoxeldatadir)\"" |
149 |
++CFLAGS+=-I "src/sc_Squirrel3/include" -DCOMPILEOPTION_DEMO=0 -DDEVELOPPEMENT_ON=0 -DCOMPILEOPTION_SPECIAL=0 -DCOMPILEOPTION_DATAFILESPATH="\"$(blackvoxeldatadir)\"" |
150 |
+ SRC= $(wildcard src/*.cpp) $(wildcard src/z/*.cpp) |
151 |
+ OBJ= $(SRC:src/%.cpp=obj/%.o) |
152 |
+ |
153 |
+@@ -28,8 +28,7 @@ |
154 |
+ KERNELNAME =$(shell uname -s) |
155 |
+ |
156 |
+ ifeq ($(KERNELNAME),Linux) |
157 |
+- CFLAGS+= -O3 -c -fmessage-length=0 |
158 |
+- LDFLAGS=-s -zrelro -L"src/sc_Squirrel3/lib" -lGLU -lSDL -lGLEW -lGL -lsquirrel -lsqstdlib |
159 |
++ LDFLAGS+= -zrelro -L"src/sc_Squirrel3/lib" -lGLU -lSDL -lGLEW -lGL -lsquirrel -lsqstdlib |
160 |
+ else ifeq ($(KERNELNAME), FreeBSD) |
161 |
+ # To be done... |
162 |
+ CFLAGS+= -O3 -c -fmessage-length=0 |
163 |
+@@ -57,7 +56,7 @@ |
164 |
+ |
165 |
+ |
166 |
+ squirrel: |
167 |
+- cd src/sc_Squirrel3 ; make sq$(CPU_BITS) |
168 |
++ +make -C src/sc_Squirrel3 sq$(CPU_BITS) |
169 |
+ |
170 |
+ clean: |
171 |
+ @rm -rf obj |
172 |
|
173 |
diff --git a/games-action/blackvoxel/files/blackvoxel-2.42-savedir.patch b/games-action/blackvoxel/files/blackvoxel-2.42-savedir.patch |
174 |
new file mode 100644 |
175 |
index 000000000..d5bad7b21 |
176 |
--- /dev/null |
177 |
+++ b/games-action/blackvoxel/files/blackvoxel-2.42-savedir.patch |
178 |
@@ -0,0 +1,18 @@ |
179 |
+--- a/src/ACompileSettings.h |
180 |
++++ b/src/ACompileSettings.h |
181 |
+@@ -129,13 +129,11 @@ |
182 |
+ |
183 |
+ #ifdef __linux__ |
184 |
+ |
185 |
+- #define COMPILEOPTION_SAVEFOLDERNAME "Blackvoxel" |
186 |
++ #define COMPILEOPTION_SAVEFOLDERNAME ".local/share/blackvoxel" |
187 |
+ #define COMPILEOPTION_USEHOMEDIRSTORAGE 1 |
188 |
+ #define COMPILEOPTION_WINXPTIMECOMPUTING 0 |
189 |
+ |
190 |
+- #if DEVELOPPEMENT_ON == 1 |
191 |
+- #define COMPILEOPTION_DATAFILESPATH "" |
192 |
+- #else |
193 |
++ #if DEVELOPPEMENT_ON == 0 |
194 |
+ #ifndef COMPILEOPTION_DATAFILESPATH |
195 |
+ #if COMPILEOPTION_ONLYSCHOOLMODE |
196 |
+ #define COMPILEOPTION_DATAFILESPATH "/usr/share/blackvoxel_school" |
197 |
|
198 |
diff --git a/games-action/blackvoxel/metadata.xml b/games-action/blackvoxel/metadata.xml |
199 |
new file mode 100644 |
200 |
index 000000000..ffffe4022 |
201 |
--- /dev/null |
202 |
+++ b/games-action/blackvoxel/metadata.xml |
203 |
@@ -0,0 +1,8 @@ |
204 |
+<?xml version="1.0" encoding="UTF-8"?> |
205 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
206 |
+<pkgmetadata> |
207 |
+<maintainer type="person"> |
208 |
+ <name>mazes-80</name> |
209 |
+ <email>mazes-80@××××.org</email> |
210 |
+</maintainer> |
211 |
+</pkgmetadata> |