Gentoo Archives: gentoo-commits

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