1 |
commit: afd26fc53c9730a06f8cc4851d6912db8c53d274 |
2 |
Author: orbea <orbea <AT> riseup <DOT> net> |
3 |
AuthorDate: Sat Jul 30 21:25:42 2022 +0000 |
4 |
Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Aug 4 21:12:46 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=afd26fc5 |
7 |
|
8 |
media-libs/libsdl2: Add 2.0.22 |
9 |
|
10 |
Signed-off-by: orbea <orbea <AT> riseup.net> |
11 |
Closes: https://github.com/gentoo/gentoo/pull/26671 |
12 |
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org> |
13 |
|
14 |
media-libs/libsdl2/Manifest | 1 + |
15 |
media-libs/libsdl2/libsdl2-2.0.22.ebuild | 230 +++++++++++++++++++++++++++++++ |
16 |
2 files changed, 231 insertions(+) |
17 |
|
18 |
diff --git a/media-libs/libsdl2/Manifest b/media-libs/libsdl2/Manifest |
19 |
index 668d6034b1f7..1192c260786b 100644 |
20 |
--- a/media-libs/libsdl2/Manifest |
21 |
+++ b/media-libs/libsdl2/Manifest |
22 |
@@ -1 +1,2 @@ |
23 |
DIST SDL2-2.0.20.tar.gz 7207221 BLAKE2B 03c6d462674aeb90559003e9f4c74f66833e193d2de3f3975f1e1684c5bdccb5c1b3c64c22c822777a63ee218d87fd04ff047b012d8db30a1565dafa34161623 SHA512 4889949eaa674948bdb0a01bb2a842a0943b15b08ff27ec0079b0fd4f79d071ffb32488a5a51c12ad7c74ed5fe73b608cdf6336a44c95dae8a0fb3f47d0f01de |
24 |
+DIST SDL2-2.0.22.tar.gz 7250633 BLAKE2B 7f8b3efa709a0514f6a76df4ffc8b756d287d1e372ed107d0525a22cb5e6a168709136d375b6708b2073a76dd30d1bf06203d2c5c3eb2990e80519c7d1558df5 SHA512 ca4b690433cd4d9d73b797da98666317128e7e817ab60e874a49d94791ea41e8a6b4fc43649593120daa0702190c0f8a6ed326c908d87375c8da9f369d994f6a |
25 |
|
26 |
diff --git a/media-libs/libsdl2/libsdl2-2.0.22.ebuild b/media-libs/libsdl2/libsdl2-2.0.22.ebuild |
27 |
new file mode 100644 |
28 |
index 000000000000..ee04e63c9df9 |
29 |
--- /dev/null |
30 |
+++ b/media-libs/libsdl2/libsdl2-2.0.22.ebuild |
31 |
@@ -0,0 +1,230 @@ |
32 |
+# Copyright 1999-2022 Gentoo Authors |
33 |
+# Distributed under the terms of the GNU General Public License v2 |
34 |
+ |
35 |
+EAPI=8 |
36 |
+ |
37 |
+inherit autotools flag-o-matic multilib-minimal |
38 |
+ |
39 |
+MY_P="SDL2-${PV}" |
40 |
+DESCRIPTION="Simple Direct Media Layer" |
41 |
+HOMEPAGE="https://www.libsdl.org/" |
42 |
+SRC_URI="https://www.libsdl.org/release/${MY_P}.tar.gz" |
43 |
+ |
44 |
+LICENSE="ZLIB" |
45 |
+SLOT="0" |
46 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86" |
47 |
+ |
48 |
+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 doc fcitx4 gles1 gles2 haptic ibus jack +joystick kms libsamplerate nas opengl oss pipewire pulseaudio sndio +sound static-libs +threads udev +video video_cards_vc4 vulkan wayland X xinerama xscreensaver" |
49 |
+REQUIRED_USE=" |
50 |
+ alsa? ( sound ) |
51 |
+ fcitx4? ( dbus ) |
52 |
+ gles1? ( video ) |
53 |
+ gles2? ( video ) |
54 |
+ haptic? ( joystick ) |
55 |
+ ibus? ( dbus ) |
56 |
+ jack? ( sound ) |
57 |
+ nas? ( sound ) |
58 |
+ opengl? ( video ) |
59 |
+ pulseaudio? ( sound ) |
60 |
+ sndio? ( sound ) |
61 |
+ vulkan? ( video ) |
62 |
+ wayland? ( gles2 ) |
63 |
+ xinerama? ( X ) |
64 |
+ xscreensaver? ( X )" |
65 |
+ |
66 |
+CDEPEND=" |
67 |
+ alsa? ( >=media-libs/alsa-lib-1.0.27.2[${MULTILIB_USEDEP}] ) |
68 |
+ dbus? ( >=sys-apps/dbus-1.6.18-r1[${MULTILIB_USEDEP}] ) |
69 |
+ fcitx4? ( app-i18n/fcitx:4 ) |
70 |
+ gles1? ( media-libs/mesa[${MULTILIB_USEDEP},gles1] ) |
71 |
+ gles2? ( >=media-libs/mesa-9.1.6[${MULTILIB_USEDEP},gles2] ) |
72 |
+ ibus? ( app-i18n/ibus ) |
73 |
+ jack? ( virtual/jack[${MULTILIB_USEDEP}] ) |
74 |
+ kms? ( |
75 |
+ >=x11-libs/libdrm-2.4.82[${MULTILIB_USEDEP}] |
76 |
+ >=media-libs/mesa-9.0.0[${MULTILIB_USEDEP},gbm(+)] |
77 |
+ ) |
78 |
+ libsamplerate? ( media-libs/libsamplerate[${MULTILIB_USEDEP}] ) |
79 |
+ nas? ( |
80 |
+ >=media-libs/nas-1.9.4[${MULTILIB_USEDEP}] |
81 |
+ >=x11-libs/libXt-1.1.4[${MULTILIB_USEDEP}] |
82 |
+ ) |
83 |
+ opengl? ( |
84 |
+ >=virtual/opengl-7.0-r1[${MULTILIB_USEDEP}] |
85 |
+ >=virtual/glu-9.0-r1[${MULTILIB_USEDEP}] |
86 |
+ ) |
87 |
+ pipewire? ( media-video/pipewire:=[${MULTILIB_USEDEP}] ) |
88 |
+ pulseaudio? ( >=media-sound/pulseaudio-2.1-r1[${MULTILIB_USEDEP}] ) |
89 |
+ sndio? ( media-sound/sndio:=[${MULTILIB_USEDEP}] ) |
90 |
+ udev? ( >=virtual/libudev-208:=[${MULTILIB_USEDEP}] ) |
91 |
+ wayland? ( |
92 |
+ >=dev-libs/wayland-1.20[${MULTILIB_USEDEP}] |
93 |
+ >=media-libs/mesa-9.1.6[${MULTILIB_USEDEP},egl(+),gles2,wayland] |
94 |
+ >=x11-libs/libxkbcommon-0.2.0[${MULTILIB_USEDEP}] |
95 |
+ ) |
96 |
+ X? ( |
97 |
+ >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}] |
98 |
+ >=x11-libs/libXcursor-1.1.14[${MULTILIB_USEDEP}] |
99 |
+ >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}] |
100 |
+ >=x11-libs/libXi-1.7.2[${MULTILIB_USEDEP}] |
101 |
+ >=x11-libs/libXrandr-1.4.2[${MULTILIB_USEDEP}] |
102 |
+ >=x11-libs/libXxf86vm-1.1.3[${MULTILIB_USEDEP}] |
103 |
+ xinerama? ( >=x11-libs/libXinerama-1.1.3[${MULTILIB_USEDEP}] ) |
104 |
+ xscreensaver? ( >=x11-libs/libXScrnSaver-1.2.2-r1[${MULTILIB_USEDEP}] ) |
105 |
+ )" |
106 |
+RDEPEND="${CDEPEND} |
107 |
+ vulkan? ( media-libs/vulkan-loader )" |
108 |
+DEPEND="${CDEPEND} |
109 |
+ ibus? ( dev-libs/glib:2[${MULTILIB_USEDEP}] ) |
110 |
+ vulkan? ( dev-util/vulkan-headers ) |
111 |
+ X? ( x11-base/xorg-proto ) |
112 |
+" |
113 |
+BDEPEND=" |
114 |
+ virtual/pkgconfig |
115 |
+ doc? ( |
116 |
+ app-doc/doxygen |
117 |
+ media-gfx/graphviz |
118 |
+ ) |
119 |
+ wayland? ( >=dev-util/wayland-scanner-1.20 ) |
120 |
+" |
121 |
+ |
122 |
+MULTILIB_WRAPPED_HEADERS=( |
123 |
+ /usr/include/SDL2/SDL_config.h |
124 |
+ /usr/include/SDL2/SDL_platform.h |
125 |
+ /usr/include/SDL2/begin_code.h |
126 |
+ /usr/include/SDL2/close_code.h |
127 |
+) |
128 |
+ |
129 |
+PATCHES=( |
130 |
+ "${FILESDIR}"/${PN}-2.0.16-static-libs.patch |
131 |
+) |
132 |
+ |
133 |
+S="${WORKDIR}/${MY_P}" |
134 |
+ |
135 |
+src_prepare() { |
136 |
+ default |
137 |
+ |
138 |
+ # Unbundle some headers. |
139 |
+ rm -r src/video/khronos || die |
140 |
+ ln -s "${ESYSROOT}/usr/include" src/video/khronos || die |
141 |
+ |
142 |
+ # SDL seems to customize SDL_config.h.in to remove macros like |
143 |
+ # PACKAGE_NAME. Add AT_NOEAUTOHEADER="yes" to prevent those macros from |
144 |
+ # being reintroduced. |
145 |
+ # https://bugs.gentoo.org/764959 |
146 |
+ AT_NOEAUTOHEADER="yes" AT_M4DIR="/usr/share/aclocal acinclude" \ |
147 |
+ eautoreconf |
148 |
+} |
149 |
+ |
150 |
+multilib_src_configure() { |
151 |
+ use custom-cflags || strip-flags |
152 |
+ |
153 |
+ if use ibus; then |
154 |
+ 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" |
155 |
+ fi |
156 |
+ |
157 |
+ # sorted by `./configure --help` |
158 |
+ local myeconfargs=( |
159 |
+ $(use_enable static-libs static) |
160 |
+ --enable-atomic |
161 |
+ $(use_enable sound audio) |
162 |
+ $(use_enable video) |
163 |
+ --enable-render |
164 |
+ --enable-events |
165 |
+ $(use_enable joystick) |
166 |
+ $(use_enable haptic) |
167 |
+ --enable-power |
168 |
+ --enable-filesystem |
169 |
+ $(use_enable threads) |
170 |
+ --enable-timers |
171 |
+ --enable-file |
172 |
+ --enable-loadso |
173 |
+ --enable-cpuinfo |
174 |
+ --enable-assembly |
175 |
+ $(use_enable cpu_flags_ppc_altivec altivec) |
176 |
+ $(use_enable cpu_flags_x86_sse ssemath) |
177 |
+ $(use_enable cpu_flags_x86_mmx mmx) |
178 |
+ $(use_enable cpu_flags_x86_3dnow 3dnow) |
179 |
+ $(use_enable cpu_flags_x86_sse sse) |
180 |
+ $(use_enable cpu_flags_x86_sse2 sse2) |
181 |
+ $(use_enable oss) |
182 |
+ $(use_enable alsa) |
183 |
+ --disable-alsa-shared |
184 |
+ $(use_enable jack) |
185 |
+ --disable-jack-shared |
186 |
+ --disable-esd |
187 |
+ $(use_enable pipewire) |
188 |
+ --disable-pipewire-shared |
189 |
+ $(use_enable pulseaudio) |
190 |
+ --disable-pulseaudio-shared |
191 |
+ --disable-arts |
192 |
+ $(use_enable libsamplerate) |
193 |
+ $(use_enable nas) |
194 |
+ --disable-nas-shared |
195 |
+ $(use_enable sndio) |
196 |
+ --disable-sndio-shared |
197 |
+ $(use_enable sound diskaudio) |
198 |
+ $(use_enable sound dummyaudio) |
199 |
+ $(use_enable wayland video-wayland) |
200 |
+ --disable-wayland-shared |
201 |
+ $(use_enable video_cards_vc4 video-rpi) |
202 |
+ $(use_enable X video-x11) |
203 |
+ --disable-x11-shared |
204 |
+ $(use_enable X video-x11-xcursor) |
205 |
+ $(use_enable X video-x11-xdbe) |
206 |
+ $(use_enable xinerama video-x11-xinerama) |
207 |
+ $(use_enable X video-x11-xinput) |
208 |
+ $(use_enable X video-x11-xrandr) |
209 |
+ $(use_enable xscreensaver video-x11-scrnsaver) |
210 |
+ $(use_enable X video-x11-xshape) |
211 |
+ $(use_enable X video-x11-vm) |
212 |
+ $(use_enable aqua video-cocoa) |
213 |
+ --disable-video-directfb |
214 |
+ --disable-fusionsound |
215 |
+ --disable-fusionsound-shared |
216 |
+ $(use_enable kms video-kmsdrm) |
217 |
+ --disable-kmsdrm-shared |
218 |
+ $(use_enable video video-dummy) |
219 |
+ $(use_enable opengl video-opengl) |
220 |
+ $(use_enable gles1 video-opengles1) |
221 |
+ $(use_enable gles2 video-opengles2) |
222 |
+ $(use_enable vulkan video-vulkan) |
223 |
+ $(use_enable udev libudev) |
224 |
+ $(use_enable dbus) |
225 |
+ $(use_enable fcitx4 fcitx) |
226 |
+ $(use_enable ibus) |
227 |
+ --disable-directx |
228 |
+ --disable-rpath |
229 |
+ --disable-render-d3d |
230 |
+ $(use_with X x) |
231 |
+ ) |
232 |
+ |
233 |
+ ECONF_SOURCE="${S}" \ |
234 |
+ econf "${myeconfargs[@]}" |
235 |
+} |
236 |
+ |
237 |
+multilib_src_compile() { |
238 |
+ emake V=1 |
239 |
+} |
240 |
+ |
241 |
+src_compile() { |
242 |
+ multilib-minimal_src_compile |
243 |
+ |
244 |
+ if use doc; then |
245 |
+ cd docs || die |
246 |
+ doxygen || die |
247 |
+ fi |
248 |
+} |
249 |
+ |
250 |
+multilib_src_install() { |
251 |
+ emake DESTDIR="${D}" install |
252 |
+} |
253 |
+ |
254 |
+multilib_src_install_all() { |
255 |
+ # Do not delete the static .a libraries here as some are |
256 |
+ # mandatory. They may be needed even when linking dynamically. |
257 |
+ find "${ED}" -type f -name "*.la" -delete || die |
258 |
+ |
259 |
+ dodoc {BUGS,CREDITS,README-SDL,TODO,WhatsNew}.txt README.md docs/README*.md |
260 |
+ use doc && dodoc -r docs/output/html/ |
261 |
+} |