summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Le Cuirot <chewi@gentoo.org>2018-11-03 11:31:55 +0000
committerJames Le Cuirot <chewi@gentoo.org>2018-11-03 11:33:20 +0000
commit046604e293c61b449639b42f7f09da1bdc38c209 (patch)
tree1923f9d7a54687ba3aae19d3fb1f8be94e4f1c7b
parentprofiles: Mask media-libs/libsdl2[vulkan] on all but amd64 (diff)
downloadgentoo-046604e293c61b449639b42f7f09da1bdc38c209.tar.gz
gentoo-046604e293c61b449639b42f7f09da1bdc38c209.tar.bz2
gentoo-046604e293c61b449639b42f7f09da1bdc38c209.zip
media-libs/libsdl2: Add vulkan support via USE flag
This now enables the "loadso" option unconditionally, partly because both Vulkan and Windows require it, and partly because upstream insist that it should be enabled. It is feasible that Vulkan could be made to work without it and upstream have shown interest so if someone is prepared to do the work then we can revisit this. Closes: https://bugs.gentoo.org/644732 Signed-off-by: James Le Cuirot <chewi@gentoo.org> Package-Manager: Portage-2.3.51, Repoman-2.3.11
-rw-r--r--media-libs/libsdl2/libsdl2-2.0.9.ebuild19
-rw-r--r--media-libs/libsdl2/metadata.xml1
2 files changed, 15 insertions, 5 deletions
diff --git a/media-libs/libsdl2/libsdl2-2.0.9.ebuild b/media-libs/libsdl2/libsdl2-2.0.9.ebuild
index 252b7b88f628..559a55814eb2 100644
--- a/media-libs/libsdl2/libsdl2-2.0.9.ebuild
+++ b/media-libs/libsdl2/libsdl2-2.0.9.ebuild
@@ -13,18 +13,19 @@ LICENSE="ZLIB"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
-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"
+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"
REQUIRED_USE="
alsa? ( sound )
gles? ( video )
nas? ( sound )
opengl? ( video )
pulseaudio? ( sound )
+ vulkan? ( video )
wayland? ( gles )
xinerama? ( X )
xscreensaver? ( X )"
-RDEPEND="
+CDEPEND="
alsa? ( >=media-libs/alsa-lib-1.0.27.2[${MULTILIB_USEDEP}] )
dbus? ( >=sys-apps/dbus-1.6.18-r1[${MULTILIB_USEDEP}] )
gles? ( >=media-libs/mesa-9.1.6[${MULTILIB_USEDEP},gles2] )
@@ -59,7 +60,10 @@ RDEPEND="
xinerama? ( >=x11-libs/libXinerama-1.1.3[${MULTILIB_USEDEP}] )
xscreensaver? ( >=x11-libs/libXScrnSaver-1.2.2-r1[${MULTILIB_USEDEP}] )
)"
-DEPEND="${RDEPEND}
+RDEPEND="${CDEPEND}
+ vulkan? ( media-libs/vulkan-loader )"
+DEPEND="${CDEPEND}
+ vulkan? ( dev-util/vulkan-headers )
X? ( x11-base/xorg-proto )
virtual/pkgconfig"
@@ -79,6 +83,11 @@ S="${WORKDIR}/${MY_P}"
src_prepare() {
default
+
+ # Unbundle some headers.
+ rm -rv src/video/khronos || die
+ ln -s "${SYSROOT}${EPREFIX}"/usr/include src/video/khronos || die
+
sed -i -e 's/configure.in/configure.ac/' Makefile.in || die
mv configure.{in,ac} || die
AT_M4DIR="/usr/share/aclocal acinclude" eautoreconf
@@ -102,7 +111,7 @@ multilib_src_configure() {
$(use_enable threads)
--enable-timers
--enable-file
- $(use_enable kernel_Winnt loadso)
+ --enable-loadso
--enable-cpuinfo
--enable-assembly
$(use_enable cpu_flags_x86_sse ssemath)
@@ -149,7 +158,7 @@ multilib_src_configure() {
$(use_enable opengl video-opengl)
--disable-video-opengles1
$(use_enable gles video-opengles2)
- --disable-video-vulkan
+ $(use_enable vulkan video-vulkan)
$(use_enable udev libudev)
$(use_enable dbus)
--disable-ibus
diff --git a/media-libs/libsdl2/metadata.xml b/media-libs/libsdl2/metadata.xml
index 66484c6e18e3..253e9af8f2d9 100644
--- a/media-libs/libsdl2/metadata.xml
+++ b/media-libs/libsdl2/metadata.xml
@@ -31,5 +31,6 @@
<flag name="sound">Control audio support (disable at your own risk)</flag>
<flag name="tslib">Build with tslib support for touchscreen devices</flag>
<flag name="video">Control video support (disable at your own risk)</flag>
+ <flag name="vulkan">Enable Vulkan support</flag>
</use>
</pkgmetadata>