1 |
commit: 84ee86e1399efb7a39b33f1ad7e00e5978111d5a |
2 |
Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Oct 8 04:29:12 2021 +0000 |
4 |
Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Oct 8 04:37:21 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=84ee86e1 |
7 |
|
8 |
dev-games/clanlib: fix consumers when built against glibc-2.34 |
9 |
|
10 |
Code to avoid issues was pre-existing but not enabled on Linux. |
11 |
|
12 |
Affected 0.8 and 2.3 slots, >=4.0 is no longer using this function. |
13 |
|
14 |
Closes: https://bugs.gentoo.org/808707 |
15 |
Closes: https://bugs.gentoo.org/811591 |
16 |
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org> |
17 |
|
18 |
dev-games/clanlib/clanlib-0.8.1-r2.ebuild | 94 ++++++++++++++++++ |
19 |
dev-games/clanlib/clanlib-2.3.7-r2.ebuild | 107 +++++++++++++++++++++ |
20 |
.../clanlib/files/clanlib-0.8.1-glibc2.34.patch | 17 ++++ |
21 |
.../clanlib/files/clanlib-2.3.7-glibc2.34.patch | 17 ++++ |
22 |
4 files changed, 235 insertions(+) |
23 |
|
24 |
diff --git a/dev-games/clanlib/clanlib-0.8.1-r2.ebuild b/dev-games/clanlib/clanlib-0.8.1-r2.ebuild |
25 |
new file mode 100644 |
26 |
index 00000000000..a52b9730199 |
27 |
--- /dev/null |
28 |
+++ b/dev-games/clanlib/clanlib-0.8.1-r2.ebuild |
29 |
@@ -0,0 +1,94 @@ |
30 |
+# Copyright 1999-2021 Gentoo Authors |
31 |
+# Distributed under the terms of the GNU General Public License v2 |
32 |
+ |
33 |
+EAPI=7 |
34 |
+ |
35 |
+DESCRIPTION="Multi-platform game development library" |
36 |
+HOMEPAGE="http://www.clanlib.org/" |
37 |
+SRC_URI="http://clanlib.org/download/releases-${PV:0:3}/ClanLib-${PV}.tgz" |
38 |
+S="${WORKDIR}"/ClanLib-${PV} |
39 |
+ |
40 |
+LICENSE="ZLIB" |
41 |
+SLOT="0.8" |
42 |
+# Not big endian safe! #82779 |
43 |
+KEYWORDS="~amd64 ~x86" |
44 |
+IUSE="doc ipv6 mikmod opengl sdl static-libs vorbis" |
45 |
+ |
46 |
+# opengl keyword does not drop the GL/GLU requirement. |
47 |
+# Autoconf files need to be fixed |
48 |
+RDEPEND=" |
49 |
+ media-libs/alsa-lib |
50 |
+ media-libs/libpng:0 |
51 |
+ virtual/jpeg:0 |
52 |
+ virtual/glu |
53 |
+ virtual/opengl |
54 |
+ x11-libs/libXi |
55 |
+ x11-libs/libXmu |
56 |
+ x11-libs/libXxf86vm |
57 |
+ mikmod? ( media-libs/libmikmod ) |
58 |
+ sdl? ( |
59 |
+ media-libs/libsdl[X] |
60 |
+ media-libs/sdl-gfx |
61 |
+ ) |
62 |
+ vorbis? ( media-libs/libvorbis ) |
63 |
+" |
64 |
+DEPEND=" |
65 |
+ ${RDEPEND} |
66 |
+ x11-base/xorg-proto |
67 |
+" |
68 |
+ |
69 |
+PATCHES=( |
70 |
+ "${FILESDIR}/${P}-ndebug.patch" |
71 |
+ "${FILESDIR}/${P}-gcc43.patch" |
72 |
+ "${FILESDIR}/${P}-gcc44.patch" |
73 |
+ "${FILESDIR}/${P}-gcc47.patch" |
74 |
+ "${FILESDIR}/${P}-gcc6.patch" |
75 |
+ "${FILESDIR}/${P}-llvm.patch" |
76 |
+ "${FILESDIR}/${P}-libpng15.patch" |
77 |
+ "${FILESDIR}/${P}-docbuilder.patch" |
78 |
+ "${FILESDIR}/${P}-glibc2.34.patch" |
79 |
+) |
80 |
+ |
81 |
+DOCS=( |
82 |
+ CODING_STYLE CREDITS NEWS PATCHES |
83 |
+ README{,.anjuta,.distros,.kdevelop,.sdl,.upgrade} INSTALL.linux |
84 |
+) |
85 |
+ |
86 |
+src_prepare() { |
87 |
+ default |
88 |
+ # See #739358 |
89 |
+ sed -i -e "s:libdir=\${exec_prefix}/lib:libdir=@libdir@:g" \ |
90 |
+ pkgconfig/*.pc.in || die |
91 |
+} |
92 |
+ |
93 |
+src_configure() { |
94 |
+ # clanSound only controls mikmod/vorbis so there's |
95 |
+ # no need to pass --{en,dis}able-clanSound ... |
96 |
+ # clanDisplay only controls X, SDL, OpenGL plugins |
97 |
+ # so no need to pass --{en,dis}able-clanDisplay |
98 |
+ # also same reason why we don't have to use clanGUI |
99 |
+ econf \ |
100 |
+ --enable-dyn \ |
101 |
+ --enable-clanNetwork \ |
102 |
+ $(use_enable x86 asm386) \ |
103 |
+ $(use_enable doc docs) \ |
104 |
+ $(use_enable opengl clanGL) \ |
105 |
+ $(use_enable sdl clanSDL) \ |
106 |
+ $(use_enable vorbis clanVorbis) \ |
107 |
+ $(use_enable mikmod clanMikMod) \ |
108 |
+ $(use_enable ipv6 getaddr) \ |
109 |
+ $(use_enable static-libs static) |
110 |
+} |
111 |
+ |
112 |
+src_install() { |
113 |
+ default |
114 |
+ |
115 |
+ if use doc ; then |
116 |
+ dodir /usr/share/doc/${PF}/html |
117 |
+ mv "${D}"/usr/share/doc/clanlib/* "${D}"/usr/share/doc/${PF}/html/ || die |
118 |
+ rm -rf "${D}"/usr/share/doc/clanlib |
119 |
+ cp -r Examples Resources "${D}"/usr/share/doc/${PF}/ || die |
120 |
+ fi |
121 |
+ |
122 |
+ find "${ED}" -name '*.la' -delete || die |
123 |
+} |
124 |
|
125 |
diff --git a/dev-games/clanlib/clanlib-2.3.7-r2.ebuild b/dev-games/clanlib/clanlib-2.3.7-r2.ebuild |
126 |
new file mode 100644 |
127 |
index 00000000000..b27100b9778 |
128 |
--- /dev/null |
129 |
+++ b/dev-games/clanlib/clanlib-2.3.7-r2.ebuild |
130 |
@@ -0,0 +1,107 @@ |
131 |
+# Copyright 1999-2021 Gentoo Authors |
132 |
+# Distributed under the terms of the GNU General Public License v2 |
133 |
+ |
134 |
+EAPI=7 |
135 |
+ |
136 |
+inherit autotools toolchain-funcs |
137 |
+ |
138 |
+MY_P=ClanLib-${PV} |
139 |
+DESCRIPTION="Multi-platform game development library" |
140 |
+HOMEPAGE="http://www.clanlib.org/" |
141 |
+SRC_URI="http://clanlib.org/download/releases-2.0/${MY_P}.tgz" |
142 |
+S="${WORKDIR}"/${MY_P} |
143 |
+ |
144 |
+LICENSE="ZLIB" |
145 |
+SLOT="2.3" |
146 |
+# Not big endian safe! #82779 |
147 |
+KEYWORDS="~amd64 ~x86" |
148 |
+IUSE="doc ipv6 mikmod opengl sound sqlite cpu_flags_x86_sse2 static-libs vorbis X" |
149 |
+REQUIRED_USE="opengl? ( X )" |
150 |
+ |
151 |
+BDEPEND=" |
152 |
+ virtual/pkgconfig |
153 |
+ doc? ( app-doc/doxygen dev-lang/perl ) |
154 |
+" |
155 |
+RDEPEND=" |
156 |
+ sys-libs/zlib |
157 |
+ X? ( |
158 |
+ app-arch/bzip2 |
159 |
+ media-libs/libpng:0 |
160 |
+ media-libs/freetype |
161 |
+ media-libs/fontconfig |
162 |
+ virtual/jpeg:0 |
163 |
+ x11-libs/libX11 |
164 |
+ opengl? ( virtual/opengl ) |
165 |
+ ) |
166 |
+ mikmod? ( |
167 |
+ media-libs/alsa-lib |
168 |
+ media-libs/libmikmod |
169 |
+ ) |
170 |
+ sqlite? ( dev-db/sqlite:3 ) |
171 |
+ sound? ( media-libs/alsa-lib ) |
172 |
+ vorbis? ( |
173 |
+ media-libs/alsa-lib |
174 |
+ media-libs/libogg |
175 |
+ media-libs/libvorbis |
176 |
+ ) |
177 |
+" |
178 |
+DEPEND="${RDEPEND}" |
179 |
+ |
180 |
+PATCHES=( |
181 |
+ "${FILESDIR}"/${P}-autotools.patch |
182 |
+ "${FILESDIR}"/${P}-doc.patch |
183 |
+ "${FILESDIR}"/${P}-freetype_pkgconfig.patch #764902 |
184 |
+ "${FILESDIR}"/${P}-glibc2.34.patch |
185 |
+) |
186 |
+ |
187 |
+DOCS=( CODING_STYLE CREDITS PATCHES README ) |
188 |
+ |
189 |
+src_prepare() { |
190 |
+ default |
191 |
+ |
192 |
+ eautoreconf |
193 |
+ |
194 |
+ ln -sf ../../../Sources/API Documentation/Utilities/ReferenceDocs/ClanLib || die |
195 |
+} |
196 |
+ |
197 |
+src_configure() { |
198 |
+ # Add -DPACKAGE_BUGREPORT? |
199 |
+ local myeconfargs=( |
200 |
+ $(use_enable doc docs) |
201 |
+ $(use_enable cpu_flags_x86_sse2 sse2) |
202 |
+ $(use_enable opengl clanGL) |
203 |
+ $(use_enable opengl clanGL1) |
204 |
+ $(use_enable opengl clanGUI) |
205 |
+ $(use_enable X clanDisplay) |
206 |
+ $(use_enable vorbis clanVorbis) |
207 |
+ $(use_enable mikmod clanMikMod) |
208 |
+ $(use_enable sqlite clanSqlite) |
209 |
+ $(use_enable ipv6 getaddr) |
210 |
+ ) |
211 |
+ |
212 |
+ use sound \ |
213 |
+ || use vorbis \ |
214 |
+ || use mikmod \ |
215 |
+ || myeconfargs+=( --disable-clanSound ) |
216 |
+ |
217 |
+ tc-export PKG_CONFIG |
218 |
+ |
219 |
+ econf "${myeconfargs[@]}" |
220 |
+} |
221 |
+ |
222 |
+src_compile() { |
223 |
+ emake |
224 |
+ |
225 |
+ use doc && emake html |
226 |
+} |
227 |
+ |
228 |
+# html files are keeped in a directory that is dependent on the SLOT |
229 |
+# so to keep eventual bookmarks to the doc from version to version |
230 |
+src_install() { |
231 |
+ default |
232 |
+ |
233 |
+ if use doc ; then |
234 |
+ emake DESTDIR="${D}" install-html |
235 |
+ dodoc -r Examples Resources |
236 |
+ fi |
237 |
+} |
238 |
|
239 |
diff --git a/dev-games/clanlib/files/clanlib-0.8.1-glibc2.34.patch b/dev-games/clanlib/files/clanlib-0.8.1-glibc2.34.patch |
240 |
new file mode 100644 |
241 |
index 00000000000..85c20ccdbcf |
242 |
--- /dev/null |
243 |
+++ b/dev-games/clanlib/files/clanlib-0.8.1-glibc2.34.patch |
244 |
@@ -0,0 +1,17 @@ |
245 |
+pthread_mutexattr_setkind_np() is long deprecated and should be using |
246 |
+pthread_mutexattr_settype() instead even on Linux. Fixes consumers |
247 |
+when built against glibc-2.34. |
248 |
+ |
249 |
+https://bugs.gentoo.org/808707 |
250 |
+--- a/Sources/Core/System/Unix/mutex_pthread.cpp |
251 |
++++ b/Sources/Core/System/Unix/mutex_pthread.cpp |
252 |
+@@ -42,3 +42,3 @@ |
253 |
+ { |
254 |
+-#ifdef __FreeBSD__ |
255 |
++#if 1 |
256 |
+ int pthread_mutexattr_settype(pthread_mutexattr_t *attr, int kind); |
257 |
+@@ -65,3 +65,3 @@ |
258 |
+ #else |
259 |
+-#ifdef __FreeBSD__ |
260 |
++#if 1 |
261 |
+ pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE); |
262 |
|
263 |
diff --git a/dev-games/clanlib/files/clanlib-2.3.7-glibc2.34.patch b/dev-games/clanlib/files/clanlib-2.3.7-glibc2.34.patch |
264 |
new file mode 100644 |
265 |
index 00000000000..05e7320428c |
266 |
--- /dev/null |
267 |
+++ b/dev-games/clanlib/files/clanlib-2.3.7-glibc2.34.patch |
268 |
@@ -0,0 +1,17 @@ |
269 |
+pthread_mutexattr_setkind_np() is long deprecated and should be using |
270 |
+pthread_mutexattr_settype() instead even on Linux. Fixes consumers |
271 |
+when built against glibc-2.34. |
272 |
+ |
273 |
+https://bugs.gentoo.org/811591 |
274 |
+--- a/Sources/Core/System/mutex.cpp |
275 |
++++ b/Sources/Core/System/mutex.cpp |
276 |
+@@ -37,3 +37,3 @@ |
277 |
+ { |
278 |
+-#if defined(__APPLE__) || defined (__FreeBSD__) || defined(__OpenBSD__) |
279 |
++#if 1 |
280 |
+ int pthread_mutexattr_settype(pthread_mutexattr_t *attr, int kind); |
281 |
+@@ -55,3 +55,3 @@ |
282 |
+ pthread_mutexattr_init(&attr); |
283 |
+- #if defined(__FreeBSD__) || defined(__APPLE__) |
284 |
++ #if 1 |
285 |
+ pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE); |