1 |
commit: f348c75259048a39b2e8f7496b53627644e6282b |
2 |
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Dec 22 17:30:41 2020 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Dec 22 17:30:48 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f348c752 |
7 |
|
8 |
media-libs/libsdl2: Bump to version 2.0.14 |
9 |
|
10 |
Package-Manager: Portage-3.0.12, Repoman-3.0.2 |
11 |
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org> |
12 |
|
13 |
media-libs/libsdl2/Manifest | 1 + |
14 |
.../libsdl2/files/libsdl2-2.0.14-static-libs.patch | 34 ++++ |
15 |
.../libsdl2/files/libsdl2-2.0.14-vulkan.patch | 13 ++ |
16 |
media-libs/libsdl2/libsdl2-2.0.14.ebuild | 207 +++++++++++++++++++++ |
17 |
4 files changed, 255 insertions(+) |
18 |
|
19 |
diff --git a/media-libs/libsdl2/Manifest b/media-libs/libsdl2/Manifest |
20 |
index 13e81b9f1b2..fef6b59307f 100644 |
21 |
--- a/media-libs/libsdl2/Manifest |
22 |
+++ b/media-libs/libsdl2/Manifest |
23 |
@@ -1 +1,2 @@ |
24 |
DIST SDL2-2.0.12.tar.gz 5720162 BLAKE2B 1e50d2d3060c38faadfc6610e3af7b0e54ce880101f8ca441b84431fb5f683cc6353402025be2eecbb8b9f85bb3982c9aea36e96067a97d079d39f9cd44964a0 SHA512 3f1f04af0f3d9dda9c84a2e9274ae8d83ea0da3fc367970a820036cc4dc1dbf990cfc37e4975ae05f0b45a4ffa739c6c19e470c00bf3f2bce9b8b63717b8b317 |
25 |
+DIST SDL2-2.0.14.tar.gz 6089974 BLAKE2B 5982c66430f8ae62094dbc216781efafd3a07c50efd16bc8307d5048227011d4710d5af1b15be01a55fa6f3ae41eedf9c2df67bafd98042e3b2978a05e7ffd27 SHA512 ebc482585bd565bf3003fbcedd91058b2183e333b9ea566d2f386da0298ff970645d9d25c1aa4459c7c96e9ea839fd1c5f2da0242a56892865b2e456cdd027ee |
26 |
|
27 |
diff --git a/media-libs/libsdl2/files/libsdl2-2.0.14-static-libs.patch b/media-libs/libsdl2/files/libsdl2-2.0.14-static-libs.patch |
28 |
new file mode 100644 |
29 |
index 00000000000..01b9c513437 |
30 |
--- /dev/null |
31 |
+++ b/media-libs/libsdl2/files/libsdl2-2.0.14-static-libs.patch |
32 |
@@ -0,0 +1,34 @@ |
33 |
+Fix --disable-static. |
34 |
+ |
35 |
+Bug: https://bugzilla.libsdl.org/show_bug.cgi?id=1431 |
36 |
+ |
37 |
+--- SDL2-2.0.14/configure.ac |
38 |
++++ SDL2-2.0.14/configure.ac |
39 |
+@@ -3863,7 +3863,7 @@ |
40 |
+ if test -f /lib/w32api/libuuid.a; then |
41 |
+ LIBUUID=/lib/w32api/libuuid.a |
42 |
+ else |
43 |
+- LIBUUID=-luuid |
44 |
++ LIBUUID=-Wl,-luuid |
45 |
+ fi |
46 |
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lshell32 -lsetupapi -lversion $LIBUUID -static-libgcc" |
47 |
+ # The Windows platform requires special setup |
48 |
+--- SDL2-2.0.14/Makefile.in |
49 |
++++ SDL2-2.0.14/Makefile.in |
50 |
+@@ -151,13 +151,13 @@ |
51 |
+ .PHONY: all update-revision install install-bin install-hdrs install-lib install-data uninstall uninstall-bin uninstall-hdrs uninstall-lib uninstall-data clean distclean dist $(OBJECTS:.lo=.d) |
52 |
+ |
53 |
+ $(objects)/$(TARGET): $(GEN_HEADERS) $(GEN_OBJECTS) $(OBJECTS) $(VERSION_OBJECTS) |
54 |
+- $(RUN_CMD_LTLINK)$(LIBTOOL) --tag=CC --mode=link $(CC) -o $@ $(OBJECTS) $(GEN_OBJECTS) $(VERSION_OBJECTS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS) |
55 |
++ $(RUN_CMD_LTLINK)$(LIBTOOL) --tag=CC --mode=link $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS) |
56 |
+ |
57 |
+ $(objects)/$(SDLMAIN_TARGET): $(SDLMAIN_OBJECTS) |
58 |
+- $(RUN_CMD_LTLINK)$(LIBTOOL) --tag=CC --mode=link $(CC) -static -o $@ $(SDLMAIN_OBJECTS) -rpath $(libdir) |
59 |
++ $(RUN_CMD_LTLINK)$(LIBTOOL) --tag=CC --mode=link $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS) -all-static |
60 |
+ |
61 |
+ $(objects)/$(SDLTEST_TARGET): $(SDLTEST_OBJECTS) |
62 |
+- $(RUN_CMD_LTLINK)$(LIBTOOL) --tag=CC --mode=link $(CC) -static -o $@ $(SDLTEST_OBJECTS) -rpath $(libdir) |
63 |
++ $(RUN_CMD_LTLINK)$(LIBTOOL) --tag=CC --mode=link $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS) -all-static |
64 |
+ |
65 |
+ install: all install-bin install-hdrs install-lib install-data |
66 |
+ install-bin: |
67 |
|
68 |
diff --git a/media-libs/libsdl2/files/libsdl2-2.0.14-vulkan.patch b/media-libs/libsdl2/files/libsdl2-2.0.14-vulkan.patch |
69 |
new file mode 100644 |
70 |
index 00000000000..948f68fe234 |
71 |
--- /dev/null |
72 |
+++ b/media-libs/libsdl2/files/libsdl2-2.0.14-vulkan.patch |
73 |
@@ -0,0 +1,13 @@ |
74 |
+--- SDL2-2.0.14/src/video/SDL_vulkan_utils.c |
75 |
++++ SDL2-2.0.14/src/video/SDL_vulkan_utils.c |
76 |
+@@ -91,8 +91,10 @@ |
77 |
+ return "VK_ERROR_VALIDATION_FAILED_EXT"; |
78 |
+ case VK_ERROR_INVALID_SHADER_NV: |
79 |
+ return "VK_ERROR_INVALID_SHADER_NV"; |
80 |
++#if VK_HEADER_VERSION < 162 |
81 |
+ case VK_ERROR_INCOMPATIBLE_VERSION_KHR: |
82 |
+ return "VK_ERROR_INCOMPATIBLE_VERSION_KHR"; |
83 |
++#endif |
84 |
+ case VK_ERROR_INVALID_DRM_FORMAT_MODIFIER_PLANE_LAYOUT_EXT: |
85 |
+ return "VK_ERROR_INVALID_DRM_FORMAT_MODIFIER_PLANE_LAYOUT_EXT"; |
86 |
+ case VK_ERROR_NOT_PERMITTED_EXT: |
87 |
|
88 |
diff --git a/media-libs/libsdl2/libsdl2-2.0.14.ebuild b/media-libs/libsdl2/libsdl2-2.0.14.ebuild |
89 |
new file mode 100644 |
90 |
index 00000000000..4002370c79e |
91 |
--- /dev/null |
92 |
+++ b/media-libs/libsdl2/libsdl2-2.0.14.ebuild |
93 |
@@ -0,0 +1,207 @@ |
94 |
+# Copyright 1999-2020 Gentoo Authors |
95 |
+# Distributed under the terms of the GNU General Public License v2 |
96 |
+ |
97 |
+EAPI=7 |
98 |
+inherit autotools flag-o-matic toolchain-funcs multilib-minimal |
99 |
+ |
100 |
+MY_P="SDL2-${PV}" |
101 |
+DESCRIPTION="Simple Direct Media Layer" |
102 |
+HOMEPAGE="https://www.libsdl.org/" |
103 |
+SRC_URI="https://www.libsdl.org/release/${MY_P}.tar.gz" |
104 |
+ |
105 |
+LICENSE="ZLIB" |
106 |
+SLOT="0" |
107 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86" |
108 |
+ |
109 |
+IUSE="alsa aqua cpu_flags_ppc_altivec cpu_flags_x86_3dnow cpu_flags_x86_mmx cpu_flags_x86_sse cpu_flags_x86_sse2 custom-cflags dbus fcitx4 gles2 haptic ibus jack +joystick kms libsamplerate nas opengl oss pulseaudio +sound static-libs +threads udev +video video_cards_vc4 vulkan wayland X xinerama xscreensaver" |
110 |
+REQUIRED_USE=" |
111 |
+ alsa? ( sound ) |
112 |
+ fcitx4? ( dbus ) |
113 |
+ gles2? ( video ) |
114 |
+ ibus? ( dbus ) |
115 |
+ jack? ( sound ) |
116 |
+ nas? ( sound ) |
117 |
+ opengl? ( video ) |
118 |
+ pulseaudio? ( sound ) |
119 |
+ vulkan? ( video ) |
120 |
+ wayland? ( gles2 ) |
121 |
+ xinerama? ( X ) |
122 |
+ xscreensaver? ( X )" |
123 |
+ |
124 |
+CDEPEND=" |
125 |
+ alsa? ( >=media-libs/alsa-lib-1.0.27.2[${MULTILIB_USEDEP}] ) |
126 |
+ dbus? ( >=sys-apps/dbus-1.6.18-r1[${MULTILIB_USEDEP}] ) |
127 |
+ fcitx4? ( app-i18n/fcitx:4 ) |
128 |
+ gles2? ( >=media-libs/mesa-9.1.6[${MULTILIB_USEDEP},gles2] ) |
129 |
+ ibus? ( app-i18n/ibus ) |
130 |
+ jack? ( virtual/jack[${MULTILIB_USEDEP}] ) |
131 |
+ kms? ( |
132 |
+ >=x11-libs/libdrm-2.4.82[${MULTILIB_USEDEP}] |
133 |
+ >=media-libs/mesa-9.0.0[${MULTILIB_USEDEP},gbm] |
134 |
+ ) |
135 |
+ libsamplerate? ( media-libs/libsamplerate[${MULTILIB_USEDEP}] ) |
136 |
+ nas? ( |
137 |
+ >=media-libs/nas-1.9.4[${MULTILIB_USEDEP}] |
138 |
+ >=x11-libs/libXt-1.1.4[${MULTILIB_USEDEP}] |
139 |
+ ) |
140 |
+ opengl? ( |
141 |
+ >=virtual/opengl-7.0-r1[${MULTILIB_USEDEP}] |
142 |
+ >=virtual/glu-9.0-r1[${MULTILIB_USEDEP}] |
143 |
+ ) |
144 |
+ pulseaudio? ( >=media-sound/pulseaudio-2.1-r1[${MULTILIB_USEDEP}] ) |
145 |
+ udev? ( >=virtual/libudev-208:=[${MULTILIB_USEDEP}] ) |
146 |
+ wayland? ( |
147 |
+ >=dev-libs/wayland-1.0.6[${MULTILIB_USEDEP}] |
148 |
+ >=media-libs/mesa-9.1.6[${MULTILIB_USEDEP},egl,gles2,wayland] |
149 |
+ >=x11-libs/libxkbcommon-0.2.0[${MULTILIB_USEDEP}] |
150 |
+ ) |
151 |
+ X? ( |
152 |
+ >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}] |
153 |
+ >=x11-libs/libXcursor-1.1.14[${MULTILIB_USEDEP}] |
154 |
+ >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}] |
155 |
+ >=x11-libs/libXi-1.7.2[${MULTILIB_USEDEP}] |
156 |
+ >=x11-libs/libXrandr-1.4.2[${MULTILIB_USEDEP}] |
157 |
+ >=x11-libs/libXxf86vm-1.1.3[${MULTILIB_USEDEP}] |
158 |
+ xinerama? ( >=x11-libs/libXinerama-1.1.3[${MULTILIB_USEDEP}] ) |
159 |
+ xscreensaver? ( >=x11-libs/libXScrnSaver-1.2.2-r1[${MULTILIB_USEDEP}] ) |
160 |
+ )" |
161 |
+RDEPEND="${CDEPEND} |
162 |
+ vulkan? ( media-libs/vulkan-loader )" |
163 |
+DEPEND="${CDEPEND} |
164 |
+ ibus? ( dev-libs/glib:2[${MULTILIB_USEDEP}] ) |
165 |
+ vulkan? ( dev-util/vulkan-headers ) |
166 |
+ X? ( x11-base/xorg-proto ) |
167 |
+" |
168 |
+BDEPEND=" |
169 |
+ virtual/pkgconfig |
170 |
+" |
171 |
+ |
172 |
+MULTILIB_WRAPPED_HEADERS=( |
173 |
+ /usr/include/SDL2/SDL_config.h |
174 |
+ /usr/include/SDL2/SDL_platform.h |
175 |
+ /usr/include/SDL2/begin_code.h |
176 |
+ /usr/include/SDL2/close_code.h |
177 |
+) |
178 |
+ |
179 |
+PATCHES=( |
180 |
+ "${FILESDIR}"/${PN}-2.0.14-static-libs.patch |
181 |
+ "${FILESDIR}"/${PN}-2.0.14-vulkan.patch |
182 |
+) |
183 |
+ |
184 |
+S="${WORKDIR}/${MY_P}" |
185 |
+ |
186 |
+src_prepare() { |
187 |
+ default |
188 |
+ |
189 |
+ # Unbundle some headers. |
190 |
+ rm -r src/video/khronos || die |
191 |
+ ln -s "${ESYSROOT}/usr/include" src/video/khronos || die |
192 |
+ |
193 |
+ AT_M4DIR="/usr/share/aclocal acinclude" eautoreconf |
194 |
+ |
195 |
+ # libsdl2-2.0.14 build regression. Please check if still needed |
196 |
+ multilib_copy_sources |
197 |
+} |
198 |
+ |
199 |
+multilib_src_configure() { |
200 |
+ use custom-cflags || strip-flags |
201 |
+ |
202 |
+ # libsdl2-2.0.14 build regression. Please check if still needed |
203 |
+ append-flags -D__LINUX__ |
204 |
+ |
205 |
+ if use ibus; then |
206 |
+ local -x IBUS_CFLAGS="-I${ESYSROOT}/usr/include/ibus-1.0 -I${ESYSROOT}/usr/include/glib-2.0 -I${ESYSROOT}/usr/$(get_libdir)/glib-2.0/include" |
207 |
+ fi |
208 |
+ |
209 |
+ # sorted by `./configure --help` |
210 |
+ local myeconfargs=( |
211 |
+ $(use_enable static-libs static) |
212 |
+ --enable-atomic |
213 |
+ $(use_enable sound audio) |
214 |
+ $(use_enable video) |
215 |
+ --enable-render |
216 |
+ --enable-events |
217 |
+ $(use_enable joystick) |
218 |
+ $(use_enable haptic) |
219 |
+ --enable-power |
220 |
+ --enable-filesystem |
221 |
+ $(use_enable threads) |
222 |
+ --enable-timers |
223 |
+ --enable-file |
224 |
+ --enable-loadso |
225 |
+ --enable-cpuinfo |
226 |
+ --enable-assembly |
227 |
+ $(use_enable cpu_flags_ppc_altivec altivec) |
228 |
+ $(use_enable cpu_flags_x86_sse ssemath) |
229 |
+ $(use_enable cpu_flags_x86_mmx mmx) |
230 |
+ $(use_enable cpu_flags_x86_3dnow 3dnow) |
231 |
+ $(use_enable cpu_flags_x86_sse sse) |
232 |
+ $(use_enable cpu_flags_x86_sse2 sse2) |
233 |
+ $(use_enable oss) |
234 |
+ $(use_enable alsa) |
235 |
+ --disable-alsa-shared |
236 |
+ $(use_enable jack) |
237 |
+ --disable-jack-shared |
238 |
+ --disable-esd |
239 |
+ $(use_enable pulseaudio) |
240 |
+ --disable-pulseaudio-shared |
241 |
+ --disable-arts |
242 |
+ $(use_enable libsamplerate) |
243 |
+ $(use_enable nas) |
244 |
+ --disable-nas-shared |
245 |
+ --disable-sndio |
246 |
+ --disable-sndio-shared |
247 |
+ $(use_enable sound diskaudio) |
248 |
+ $(use_enable sound dummyaudio) |
249 |
+ $(use_enable wayland video-wayland) |
250 |
+ --disable-wayland-shared |
251 |
+ $(use_enable video_cards_vc4 video-rpi) |
252 |
+ $(use_enable X video-x11) |
253 |
+ --disable-x11-shared |
254 |
+ $(use_enable X video-x11-xcursor) |
255 |
+ $(use_enable X video-x11-xdbe) |
256 |
+ $(use_enable xinerama video-x11-xinerama) |
257 |
+ $(use_enable X video-x11-xinput) |
258 |
+ $(use_enable X video-x11-xrandr) |
259 |
+ $(use_enable xscreensaver video-x11-scrnsaver) |
260 |
+ $(use_enable X video-x11-xshape) |
261 |
+ $(use_enable X video-x11-vm) |
262 |
+ $(use_enable aqua video-cocoa) |
263 |
+ --disable-video-directfb |
264 |
+ --disable-fusionsound |
265 |
+ --disable-fusionsound-shared |
266 |
+ $(use_enable kms video-kmsdrm) |
267 |
+ --disable-kmsdrm-shared |
268 |
+ $(use_enable video video-dummy) |
269 |
+ $(use_enable opengl video-opengl) |
270 |
+ --disable-video-opengles1 |
271 |
+ $(use_enable gles2 video-opengles2) |
272 |
+ $(use_enable vulkan video-vulkan) |
273 |
+ $(use_enable udev libudev) |
274 |
+ $(use_enable dbus) |
275 |
+ $(use_enable fcitx4 fcitx) |
276 |
+ $(use_enable ibus) |
277 |
+ --disable-directx |
278 |
+ --disable-rpath |
279 |
+ --disable-render-d3d |
280 |
+ $(use_with X x) |
281 |
+ ) |
282 |
+ |
283 |
+ #ECONF_SOURCE="${S}" |
284 |
+ econf "${myeconfargs[@]}" |
285 |
+} |
286 |
+ |
287 |
+multilib_src_compile() { |
288 |
+ emake V=1 |
289 |
+} |
290 |
+ |
291 |
+multilib_src_install() { |
292 |
+ emake DESTDIR="${D}" install |
293 |
+} |
294 |
+ |
295 |
+multilib_src_install_all() { |
296 |
+ # Do not delete the static .a libraries here as some are |
297 |
+ # mandatory. They may be needed even when linking dynamically. |
298 |
+ find "${ED}" -type f -name "*.la" -delete || die |
299 |
+ dodoc {BUGS,CREDITS,README,README-SDL,TODO,WhatsNew}.txt docs/README*.md |
300 |
+} |