commit: bc661486bdb85873a6cd56097a12d1e06d30e01e Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org> AuthorDate: Thu Jan 1 05:08:38 2026 +0000 Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org> CommitDate: Thu Jan 1 05:45:13 2026 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bc661486
media-libs/libsdl3: add 3.4.0 For the record, not planning to stabilize this one and instead wait for (at least) 3.4.1+ despite not known issues -- 3.2.30 was released at same time and that's a better stable candidate right now. Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org> media-libs/libsdl3/Manifest | 1 + media-libs/libsdl3/libsdl3-3.4.0.ebuild | 196 ++++++++++++++++++++++++++++++++ 2 files changed, 197 insertions(+) diff --git a/media-libs/libsdl3/Manifest b/media-libs/libsdl3/Manifest index 9b3412b28919..012654be427a 100644 --- a/media-libs/libsdl3/Manifest +++ b/media-libs/libsdl3/Manifest @@ -1,2 +1,3 @@ DIST SDL3-3.2.28.tar.gz 15904256 BLAKE2B 076af30a92bf866532afdd045f7b9efeb35a20225217d9597e0413bbc2c4b02eef97aa763ba57f534b7c651b6d3eeb835a0847d601780e19686e5ad256ecfc8b SHA512 9d7d54cd91a30d7a1f2999d98ff155232a629ff082d1b3a00b00c32ee3ff009820a1b0d9daf981a2f454bcf667cdb687948050c9b6f2ca98cb34f68754812b8a DIST SDL3-3.2.30.tar.gz 15908113 BLAKE2B 3c0c1435662ce7a5891d28f476c92c4113b3967a9c3a0e36f8fd46069c8352c9b8f518122a761af4e64c374f3afc8476e57b19b7cb02ba282911f304ee21782a SHA512 ccb24c98095013404a7b470591aab6f7d45511580d895d6ce393df669a91d8faa1bf987a52b948fdf2c114ac41805cf6fa20eddacd470172029e1ebb7405e317 +DIST SDL3-3.4.0.tar.gz 15567602 BLAKE2B 4f878b13cdc139b643e04ee278d7d83aadbb6bf8aba5babc9622a8d1ea233452982232001c5d4cb72f0e8ec20f3d797f9cd07d1531829412a6dacde2146a2447 SHA512 b7803fc1a7260a0594644bf81df8c300d63c30c436a2b8c8217d58cd25814faf44e2945a4979c860f81cddc367913cc8c03f0bf6745da2918121f379fd9cb27b diff --git a/media-libs/libsdl3/libsdl3-3.4.0.ebuild b/media-libs/libsdl3/libsdl3-3.4.0.ebuild new file mode 100644 index 000000000000..f264513b65e9 --- /dev/null +++ b/media-libs/libsdl3/libsdl3-3.4.0.ebuild @@ -0,0 +1,196 @@ +# Copyright 2025-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake-multilib dot-a + +DESCRIPTION="Simple Direct Media Layer" +HOMEPAGE="https://www.libsdl.org/" +SRC_URI="https://www.libsdl.org/release/SDL3-${PV}.tar.gz" +S=${WORKDIR}/SDL3-${PV} + +LICENSE="ZLIB" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86" + +IUSE=" + X alsa aqua bidi dbus doc ibus io-uring jack kms opengl oss + pipewire pulseaudio sndio test udev usb vulkan wayland + cpu_flags_ppc_altivec cpu_flags_x86_avx cpu_flags_x86_avx2 + cpu_flags_x86_avx512f cpu_flags_x86_mmx cpu_flags_x86_sse + cpu_flags_x86_sse2 cpu_flags_x86_sse3 cpu_flags_x86_sse4_1 + cpu_flags_x86_sse4_2 +" +REQUIRED_USE=" + ibus? ( dbus ) + kms? ( opengl ) + wayland? ( opengl ) +" +RESTRICT="!test? ( test )" + +# dlopen/dbus-only: dbus, ibus, libudev, liburing, vulkan-loader +RDEPEND=" + virtual/libiconv[${MULTILIB_USEDEP}] + X? ( + x11-libs/libX11[${MULTILIB_USEDEP}] + x11-libs/libXScrnSaver[${MULTILIB_USEDEP}] + x11-libs/libXcursor[${MULTILIB_USEDEP}] + x11-libs/libXext[${MULTILIB_USEDEP}] + x11-libs/libXfixes[${MULTILIB_USEDEP}] + x11-libs/libXi[${MULTILIB_USEDEP}] + x11-libs/libXrandr[${MULTILIB_USEDEP}] + x11-libs/libXtst[${MULTILIB_USEDEP}] + ) + alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] ) + bidi? ( dev-libs/fribidi[${MULTILIB_USEDEP}] ) + dbus? ( sys-apps/dbus[${MULTILIB_USEDEP}] ) + ibus? ( app-i18n/ibus ) + io-uring? ( sys-libs/liburing:=[${MULTILIB_USEDEP}] ) + jack? ( virtual/jack[${MULTILIB_USEDEP}] ) + kms? ( + media-libs/mesa[gbm(+),${MULTILIB_USEDEP}] + x11-libs/libdrm[${MULTILIB_USEDEP}] + ) + opengl? ( media-libs/libglvnd[X?,${MULTILIB_USEDEP}] ) + pipewire? ( media-video/pipewire:=[${MULTILIB_USEDEP}] ) + pulseaudio? ( media-libs/libpulse[${MULTILIB_USEDEP}] ) + sndio? ( media-sound/sndio:=[${MULTILIB_USEDEP}] ) + udev? ( virtual/libudev:=[${MULTILIB_USEDEP}] ) + usb? ( virtual/libusb:1[${MULTILIB_USEDEP}] ) + wayland? ( + dev-libs/wayland[${MULTILIB_USEDEP}] + gui-libs/libdecor[${MULTILIB_USEDEP}] + x11-libs/libxkbcommon[${MULTILIB_USEDEP}] + ) + vulkan? ( media-libs/vulkan-loader[${MULTILIB_USEDEP}] ) +" +DEPEND=" + ${RDEPEND} + X? ( x11-base/xorg-proto ) + test? ( + dev-util/vulkan-headers + media-libs/libglvnd + ) + vulkan? ( dev-util/vulkan-headers ) +" +BDEPEND=" + doc? ( + app-text/doxygen + media-gfx/graphviz + ) + wayland? ( dev-util/wayland-scanner ) +" + +CMAKE_QA_COMPAT_SKIP=1 #964577 + +src_prepare() { + cmake_src_prepare + + # unbundle libglvnd and vulkan headers + rm -r src/video/khronos || die + ln -s -- "${ESYSROOT}"/usr/include src/video/khronos || die +} + +src_configure() { + lto-guarantee-fat + + local mycmakeargs=( + -DSDL_ASSERTIONS=disabled + -DSDL_DEPS_SHARED=no # link rather than dlopen() where possible + -DSDL_RPATH=no + -DSDL_STATIC=no + -DSDL_TESTS=$(usex test) + + # audio + -DSDL_ALSA=$(usex alsa) + -DSDL_JACK=$(usex jack) + -DSDL_OSS=$(usex oss) + -DSDL_PIPEWIRE=$(usex pipewire) + -DSDL_PULSEAUDIO=$(usex pulseaudio) + -DSDL_SNDIO=$(usex sndio) + + # input + -DSDL_HIDAPI_LIBUSB=$(usex usb) + -DSDL_IBUS=$(use ibus) + -DSDL_LIBUDEV=$(usex udev) + + # video + -DSDL_COCOA=$(usex aqua) + -DSDL_DIRECTX=no + -DSDL_KMSDRM=$(usex kms) + -DSDL_LIBTHAI=no # not packaged + -DSDL_OPENGL=$(usex opengl) + -DSDL_OPENGLES=$(usex opengl) + -DSDL_OPENVR=no # not packaged, note needs opengl REQUIRED_USE if added + -DSDL_ROCKCHIP=no + -DSDL_RPI=no + -DSDL_VIVANTE=no + -DSDL_VULKAN=$(usex vulkan) + -DSDL_WAYLAND=$(usex wayland) + -DSDL_X11=$(usex X) + # SDL disallows this by default, allow it but warn in pkg_postinst + $(use !X && use !wayland && echo -DSDL_UNIX_CONSOLE_BUILD=yes) + + # misc + -DSDL_DBUS=$(usex dbus) + -DSDL_FRIBIDI=$(usex bidi) + -DSDL_LIBURING=$(usex io-uring) + + # cpu instruction sets + -DSDL_ALTIVEC=$(usex cpu_flags_ppc_altivec) + -DSDL_AVX=$(usex cpu_flags_x86_avx) + -DSDL_AVX2=$(usex cpu_flags_x86_avx2) + -DSDL_AVX512F=$(usex cpu_flags_x86_avx512f) + -DSDL_MMX=$(usex cpu_flags_x86_mmx) + -DSDL_SSE=$(usex cpu_flags_x86_sse) + -DSDL_SSE2=$(usex cpu_flags_x86_sse2) + -DSDL_SSE3=$(usex cpu_flags_x86_sse3) + -DSDL_SSE4_1=$(usex cpu_flags_x86_sse4_1) + -DSDL_SSE4_2=$(usex cpu_flags_x86_sse4_2) + ) + + cmake-multilib_src_configure +} + +src_compile() { + cmake-multilib_src_compile + + if use doc; then + cd docs && doxygen || die + fi +} + +src_test() { + unset "${!SDL_@}" # ignore users' preferences for tests + + cmake-multilib_src_test +} + +src_install() { + local DOCS=( {BUGS,WhatsNew}.txt {CREDITS,README}.md docs/*.md ) + cmake-multilib_src_install + + strip-lto-bytecode + + rm -r -- "${ED}"/usr/share/licenses || die + + use doc && dodoc -r docs/output/html/ +} + +pkg_postinst() { + # skipping audio/video can make sense given many packages only use SDL + # for input, but still warn given off-by-default and may be unexpected + if use !X && use !aqua && use !kms && use !wayland; then + ewarn + ewarn "All typical display drivers (e.g. USE=wayland) are disabled," + ewarn "applications using SDL for display may not function properly." + fi + + if use !alsa && use !jack && use !oss && use !pipewire && + use !pulseaudio && use !sndio; then + ewarn + ewarn "All typical audio drivers (e.g. USE=pipewire) are disabled," + ewarn "applications using SDL for audio may not function properly." + fi +}
