Gentoo Archives: gentoo-commits

From: James Le Cuirot <chewi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/libsdl2/
Date: Mon, 27 Jan 2020 21:07:55
Message-Id: 1580159250.681d4c0b1d09199bec912a3bcd959f6ae89cedd5.chewi@gentoo
1 commit: 681d4c0b1d09199bec912a3bcd959f6ae89cedd5
2 Author: James Le Cuirot <chewi <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jan 27 20:58:29 2020 +0000
4 Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org>
5 CommitDate: Mon Jan 27 21:07:30 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=681d4c0b
7
8 media-libs/libsdl2: Add jack USE flag
9
10 Closes: https://bugs.gentoo.org/697658
11 Package-Manager: Portage-2.3.85, Repoman-2.3.20
12 Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>
13
14 media-libs/libsdl2/libsdl2-2.0.10-r1.ebuild | 193 ++++++++++++++++++++++++++++
15 1 file changed, 193 insertions(+)
16
17 diff --git a/media-libs/libsdl2/libsdl2-2.0.10-r1.ebuild b/media-libs/libsdl2/libsdl2-2.0.10-r1.ebuild
18 new file mode 100644
19 index 00000000000..ba7791dcca7
20 --- /dev/null
21 +++ b/media-libs/libsdl2/libsdl2-2.0.10-r1.ebuild
22 @@ -0,0 +1,193 @@
23 +# Copyright 1999-2020 Gentoo Authors
24 +# Distributed under the terms of the GNU General Public License v2
25 +
26 +EAPI=7
27 +inherit autotools flag-o-matic toolchain-funcs multilib-minimal
28 +
29 +MY_P="SDL2-${PV}"
30 +DESCRIPTION="Simple Direct Media Layer"
31 +HOMEPAGE="https://www.libsdl.org/"
32 +SRC_URI="https://www.libsdl.org/release/${MY_P}.tar.gz"
33 +
34 +LICENSE="ZLIB"
35 +SLOT="0"
36 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
37 +
38 +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"
39 +REQUIRED_USE="
40 + alsa? ( sound )
41 + gles? ( video )
42 + jack? ( sound )
43 + nas? ( sound )
44 + opengl? ( video )
45 + pulseaudio? ( sound )
46 + vulkan? ( video )
47 + wayland? ( gles )
48 + xinerama? ( X )
49 + xscreensaver? ( X )"
50 +
51 +CDEPEND="
52 + alsa? ( >=media-libs/alsa-lib-1.0.27.2[${MULTILIB_USEDEP}] )
53 + dbus? ( >=sys-apps/dbus-1.6.18-r1[${MULTILIB_USEDEP}] )
54 + gles? ( >=media-libs/mesa-9.1.6[${MULTILIB_USEDEP},gles2] )
55 + jack? ( virtual/jack[${MULTILIB_USEDEP}] )
56 + kms? (
57 + >=x11-libs/libdrm-2.4.46[${MULTILIB_USEDEP}]
58 + >=media-libs/mesa-9.0.0[${MULTILIB_USEDEP},gbm]
59 + )
60 + libsamplerate? ( media-libs/libsamplerate[${MULTILIB_USEDEP}] )
61 + nas? (
62 + >=media-libs/nas-1.9.4[${MULTILIB_USEDEP}]
63 + >=x11-libs/libXt-1.1.4[${MULTILIB_USEDEP}]
64 + )
65 + opengl? (
66 + >=virtual/opengl-7.0-r1[${MULTILIB_USEDEP}]
67 + >=virtual/glu-9.0-r1[${MULTILIB_USEDEP}]
68 + )
69 + pulseaudio? ( >=media-sound/pulseaudio-2.1-r1[${MULTILIB_USEDEP}] )
70 + tslib? ( >=x11-libs/tslib-1.0-r3[${MULTILIB_USEDEP}] )
71 + udev? ( >=virtual/libudev-208:=[${MULTILIB_USEDEP}] )
72 + wayland? (
73 + >=dev-libs/wayland-1.0.6[${MULTILIB_USEDEP}]
74 + >=media-libs/mesa-9.1.6[${MULTILIB_USEDEP},egl,gles2,wayland]
75 + >=x11-libs/libxkbcommon-0.2.0[${MULTILIB_USEDEP}]
76 + )
77 + X? (
78 + >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
79 + >=x11-libs/libXcursor-1.1.14[${MULTILIB_USEDEP}]
80 + >=x11-libs/libXext-1.3.2[${MULTILIB_USEDEP}]
81 + >=x11-libs/libXi-1.7.2[${MULTILIB_USEDEP}]
82 + >=x11-libs/libXrandr-1.4.2[${MULTILIB_USEDEP}]
83 + >=x11-libs/libXxf86vm-1.1.3[${MULTILIB_USEDEP}]
84 + xinerama? ( >=x11-libs/libXinerama-1.1.3[${MULTILIB_USEDEP}] )
85 + xscreensaver? ( >=x11-libs/libXScrnSaver-1.2.2-r1[${MULTILIB_USEDEP}] )
86 + )"
87 +RDEPEND="${CDEPEND}
88 + vulkan? ( media-libs/vulkan-loader )"
89 +DEPEND="${CDEPEND}
90 + vulkan? ( dev-util/vulkan-headers )
91 + X? ( x11-base/xorg-proto )
92 +"
93 +BDEPEND="
94 + virtual/pkgconfig
95 +"
96 +
97 +MULTILIB_WRAPPED_HEADERS=(
98 + /usr/include/SDL2/SDL_config.h
99 + /usr/include/SDL2/SDL_platform.h
100 + /usr/include/SDL2/begin_code.h
101 + /usr/include/SDL2/close_code.h
102 +)
103 +
104 +PATCHES=(
105 + # https://bugzilla.libsdl.org/show_bug.cgi?id=1431
106 + "${FILESDIR}"/${PN}-2.0.10-static-libs.patch
107 +)
108 +
109 +S="${WORKDIR}/${MY_P}"
110 +
111 +src_prepare() {
112 + default
113 +
114 + # Unbundle some headers.
115 + rm -rv src/video/khronos || die
116 + ln -s "${SYSROOT}${EPREFIX}"/usr/include src/video/khronos || die
117 +
118 + AT_M4DIR="/usr/share/aclocal acinclude" eautoreconf
119 +}
120 +
121 +multilib_src_configure() {
122 + use custom-cflags || strip-flags
123 +
124 + # sorted by `./configure --help`
125 + local myeconfargs=(
126 + $(use_enable static-libs static)
127 + --enable-atomic
128 + $(use_enable sound audio)
129 + $(use_enable video)
130 + --enable-render
131 + --enable-events
132 + $(use_enable joystick)
133 + $(use_enable haptic)
134 + --enable-power
135 + --enable-filesystem
136 + $(use_enable threads)
137 + --enable-timers
138 + --enable-file
139 + --enable-loadso
140 + --enable-cpuinfo
141 + --enable-assembly
142 + $(use_enable cpu_flags_x86_sse ssemath)
143 + $(use_enable cpu_flags_x86_mmx mmx)
144 + $(use_enable cpu_flags_x86_3dnow 3dnow)
145 + $(use_enable cpu_flags_x86_sse sse)
146 + $(use_enable cpu_flags_x86_sse2 sse2)
147 + $(use_enable altivec)
148 + $(use_enable oss)
149 + $(use_enable alsa)
150 + --disable-alsa-shared
151 + $(use_enable jack)
152 + --disable-jack-shared
153 + --disable-esd
154 + $(use_enable pulseaudio)
155 + --disable-pulseaudio-shared
156 + --disable-arts
157 + $(use_enable libsamplerate)
158 + $(use_enable nas)
159 + --disable-nas-shared
160 + --disable-sndio
161 + --disable-sndio-shared
162 + $(use_enable sound diskaudio)
163 + $(use_enable sound dummyaudio)
164 + $(use_enable wayland video-wayland)
165 + --disable-wayland-shared
166 + $(use_enable video_cards_vc4 video-rpi)
167 + $(use_enable X video-x11)
168 + --disable-x11-shared
169 + $(use_enable X video-x11-xcursor)
170 + $(use_enable X video-x11-xdbe)
171 + $(use_enable xinerama video-x11-xinerama)
172 + $(use_enable X video-x11-xinput)
173 + $(use_enable X video-x11-xrandr)
174 + $(use_enable xscreensaver video-x11-scrnsaver)
175 + $(use_enable X video-x11-xshape)
176 + $(use_enable X video-x11-vm)
177 + $(use_enable aqua video-cocoa)
178 + --disable-video-directfb
179 + --disable-fusionsound
180 + --disable-fusionsound-shared
181 + $(use_enable kms video-kmsdrm)
182 + --disable-kmsdrm-shared
183 + $(use_enable video video-dummy)
184 + $(use_enable opengl video-opengl)
185 + --disable-video-opengles1
186 + $(use_enable gles video-opengles2)
187 + $(use_enable vulkan video-vulkan)
188 + $(use_enable udev libudev)
189 + $(use_enable dbus)
190 + --disable-ibus
191 + $(use_enable tslib input-tslib)
192 + --disable-directx
193 + --disable-rpath
194 + --disable-render-d3d
195 + $(use_with X x)
196 + )
197 +
198 + ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
199 +}
200 +
201 +multilib_src_compile() {
202 + emake V=1
203 +}
204 +
205 +multilib_src_install() {
206 + emake DESTDIR="${D}" install
207 +}
208 +
209 +multilib_src_install_all() {
210 + find "${ED}" -type f -name "*.la" -delete || die
211 + if ! use static-libs ; then
212 + find "${ED}" -type f -name "*.a" -delete || die
213 + fi
214 + dodoc {BUGS,CREDITS,README,README-SDL,TODO,WhatsNew}.txt docs/README*.md
215 +}