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: Sat, 03 Nov 2018 11:33:50
Message-Id: 1541244800.046604e293c61b449639b42f7f09da1bdc38c209.chewi@gentoo
1 commit: 046604e293c61b449639b42f7f09da1bdc38c209
2 Author: James Le Cuirot <chewi <AT> gentoo <DOT> org>
3 AuthorDate: Sat Nov 3 11:31:55 2018 +0000
4 Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org>
5 CommitDate: Sat Nov 3 11:33:20 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=046604e2
7
8 media-libs/libsdl2: Add vulkan support via USE flag
9
10 This now enables the "loadso" option unconditionally, partly because
11 both Vulkan and Windows require it, and partly because upstream insist
12 that it should be enabled. It is feasible that Vulkan could be made to
13 work without it and upstream have shown interest so if someone is
14 prepared to do the work then we can revisit this.
15
16 Closes: https://bugs.gentoo.org/644732
17 Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org>
18 Package-Manager: Portage-2.3.51, Repoman-2.3.11
19
20 media-libs/libsdl2/libsdl2-2.0.9.ebuild | 19 ++++++++++++++-----
21 media-libs/libsdl2/metadata.xml | 1 +
22 2 files changed, 15 insertions(+), 5 deletions(-)
23
24 diff --git a/media-libs/libsdl2/libsdl2-2.0.9.ebuild b/media-libs/libsdl2/libsdl2-2.0.9.ebuild
25 index 252b7b88f62..559a55814eb 100644
26 --- a/media-libs/libsdl2/libsdl2-2.0.9.ebuild
27 +++ b/media-libs/libsdl2/libsdl2-2.0.9.ebuild
28 @@ -13,18 +13,19 @@ LICENSE="ZLIB"
29 SLOT="0"
30 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
31
32 -IUSE="cpu_flags_x86_3dnow alsa altivec aqua custom-cflags dbus gles haptic libsamplerate +joystick kms cpu_flags_x86_mmx nas opengl oss pulseaudio +sound cpu_flags_x86_sse cpu_flags_x86_sse2 static-libs +threads tslib udev +video video_cards_vc4 wayland X xinerama xscreensaver"
33 +IUSE="cpu_flags_x86_3dnow alsa altivec aqua custom-cflags dbus gles haptic libsamplerate +joystick kms cpu_flags_x86_mmx nas opengl oss pulseaudio +sound cpu_flags_x86_sse cpu_flags_x86_sse2 static-libs +threads tslib udev +video video_cards_vc4 vulkan wayland X xinerama xscreensaver"
34 REQUIRED_USE="
35 alsa? ( sound )
36 gles? ( video )
37 nas? ( sound )
38 opengl? ( video )
39 pulseaudio? ( sound )
40 + vulkan? ( video )
41 wayland? ( gles )
42 xinerama? ( X )
43 xscreensaver? ( X )"
44
45 -RDEPEND="
46 +CDEPEND="
47 alsa? ( >=media-libs/alsa-lib-1.0.27.2[${MULTILIB_USEDEP}] )
48 dbus? ( >=sys-apps/dbus-1.6.18-r1[${MULTILIB_USEDEP}] )
49 gles? ( >=media-libs/mesa-9.1.6[${MULTILIB_USEDEP},gles2] )
50 @@ -59,7 +60,10 @@ RDEPEND="
51 xinerama? ( >=x11-libs/libXinerama-1.1.3[${MULTILIB_USEDEP}] )
52 xscreensaver? ( >=x11-libs/libXScrnSaver-1.2.2-r1[${MULTILIB_USEDEP}] )
53 )"
54 -DEPEND="${RDEPEND}
55 +RDEPEND="${CDEPEND}
56 + vulkan? ( media-libs/vulkan-loader )"
57 +DEPEND="${CDEPEND}
58 + vulkan? ( dev-util/vulkan-headers )
59 X? ( x11-base/xorg-proto )
60 virtual/pkgconfig"
61
62 @@ -79,6 +83,11 @@ S="${WORKDIR}/${MY_P}"
63
64 src_prepare() {
65 default
66 +
67 + # Unbundle some headers.
68 + rm -rv src/video/khronos || die
69 + ln -s "${SYSROOT}${EPREFIX}"/usr/include src/video/khronos || die
70 +
71 sed -i -e 's/configure.in/configure.ac/' Makefile.in || die
72 mv configure.{in,ac} || die
73 AT_M4DIR="/usr/share/aclocal acinclude" eautoreconf
74 @@ -102,7 +111,7 @@ multilib_src_configure() {
75 $(use_enable threads)
76 --enable-timers
77 --enable-file
78 - $(use_enable kernel_Winnt loadso)
79 + --enable-loadso
80 --enable-cpuinfo
81 --enable-assembly
82 $(use_enable cpu_flags_x86_sse ssemath)
83 @@ -149,7 +158,7 @@ multilib_src_configure() {
84 $(use_enable opengl video-opengl)
85 --disable-video-opengles1
86 $(use_enable gles video-opengles2)
87 - --disable-video-vulkan
88 + $(use_enable vulkan video-vulkan)
89 $(use_enable udev libudev)
90 $(use_enable dbus)
91 --disable-ibus
92
93 diff --git a/media-libs/libsdl2/metadata.xml b/media-libs/libsdl2/metadata.xml
94 index 66484c6e18e..253e9af8f2d 100644
95 --- a/media-libs/libsdl2/metadata.xml
96 +++ b/media-libs/libsdl2/metadata.xml
97 @@ -31,5 +31,6 @@
98 <flag name="sound">Control audio support (disable at your own risk)</flag>
99 <flag name="tslib">Build with tslib support for touchscreen devices</flag>
100 <flag name="video">Control video support (disable at your own risk)</flag>
101 + <flag name="vulkan">Enable Vulkan support</flag>
102 </use>
103 </pkgmetadata>