From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 141A51582EF for ; Wed, 05 Mar 2025 04:51:03 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id 00211342FE8 for ; Wed, 05 Mar 2025 04:51:02 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id EA1A51102D0; Wed, 05 Mar 2025 04:51:01 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id DE6261102D0 for ; Wed, 05 Mar 2025 04:51:01 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 86A7C343026 for ; Wed, 05 Mar 2025 04:51:01 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id E1F362872 for ; Wed, 05 Mar 2025 04:50:59 +0000 (UTC) From: "Ionen Wolkens" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Ionen Wolkens" Message-ID: <1741150126.4685f8150932d2c04cfc8c415b567c7a6e550c15.ionen@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/libsdl3/ X-VCS-Repository: repo/gentoo X-VCS-Files: media-libs/libsdl3/Manifest media-libs/libsdl3/libsdl3-3.2.8.ebuild media-libs/libsdl3/metadata.xml X-VCS-Directories: media-libs/libsdl3/ X-VCS-Committer: ionen X-VCS-Committer-Name: Ionen Wolkens X-VCS-Revision: 4685f8150932d2c04cfc8c415b567c7a6e550c15 X-VCS-Branch: master Date: Wed, 05 Mar 2025 04:50:59 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: eca6592a-6d61-4d8c-961c-abf69d6d833d X-Archives-Hash: a5468fe346351a1d01ae1d6ef94172f5 commit: 4685f8150932d2c04cfc8c415b567c7a6e550c15 Author: Ionen Wolkens gentoo org> AuthorDate: Mon Mar 3 16:43:24 2025 +0000 Commit: Ionen Wolkens gentoo org> CommitDate: Wed Mar 5 04:48:46 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4685f815 media-libs/libsdl3: new package, add 3.2.8 Notable changes compared to libsdl2's ebuild: * drop USE=video/sound/joystick (enabled), very little sense in disabling support entirely incl. dummy outputs without deps, and it is annoying for revdeps to need [joystick,sound,video] everywhere (flipping these can also drop symbols and breaks packages, while with the dummy ones it stays the same) * drop USE=haptic (enabled), not *that* common of a requirement but is trivial and has no dependencies * drop USE=fcitx (ignored), fcitx does not need to be present at build time, and support works through USE=dbus (feels redundant, and ebuild does not need to pull/optfeature fcitx for fcitx users) * drop USE=xscreensaver (enabled), like other optional X libs it feels hardly worth a USE and being disabled by default felt subpar * drop MULTILIB_WRAPPED_HEADERS, unless missing something, this seems no longer seems needed * "tentatively" drop USE=custom-cflags, until recently there was still issues with flags but I believe most of these are resolved (not to mention most were LTO-related and strip-flags no longer filtered it anyway) * merge gles1/gles2/gles3/opengl into USE=opengl, they all have the same dependency and it saves very little to disable unused ones * to add to the above, drop dependency on mesa except for libgbm, it's not the job of the ebuild to check if drivers have support for each, unknown if user is even using mesa or nvidia There are more differences but only listing those due to choices and not due to e.g. SDL3 adding/dropping support for something. Other notes: * The [X?] in libglvnd[X?] is not *required* but it prevents automagic for the GLX support bits * Considered dropping multilib given modern SDL3-only prebuilt games would not be 32bit, but there's the sdl2->3 compat lib to consider when we'll want it in the future and Wine may also end up needing it until the ebuild drops multilib support in favour of USE=wow64 * Hoping have not overlooked cases where libglvnd+vulkan-headers are needed (due to the unbundling inherited from libsdl2), seems to be always needed to build tests for one Some changes may be worth backporting to libsdl2, but not planning to look at that, or at least not right now. Closes: https://bugs.gentoo.org/949110 Signed-off-by: Ionen Wolkens gentoo.org> media-libs/libsdl3/Manifest | 1 + media-libs/libsdl3/libsdl3-3.2.8.ebuild | 184 ++++++++++++++++++++++++++++++++ media-libs/libsdl3/metadata.xml | 17 +++ 3 files changed, 202 insertions(+) diff --git a/media-libs/libsdl3/Manifest b/media-libs/libsdl3/Manifest new file mode 100644 index 000000000000..74fc405b5272 --- /dev/null +++ b/media-libs/libsdl3/Manifest @@ -0,0 +1 @@ +DIST SDL3-3.2.8.tar.gz 15866007 BLAKE2B e89f240f9643305fb191049b9162f8adfe2f59b07464df28d08437130f8724b8ac8ab22075a6548cb6d8203ec289f3a8a917c08697047f3d39377af267d8187b SHA512 741550120f26fe983fa829d38d37ff4caeded31e899e4ded99ebb5b084eecebaa4081454b8e176e0103fa7faa6a230ad3f23f8c2453c6babfe59fab981cac6db diff --git a/media-libs/libsdl3/libsdl3-3.2.8.ebuild b/media-libs/libsdl3/libsdl3-3.2.8.ebuild new file mode 100644 index 000000000000..401240306f28 --- /dev/null +++ b/media-libs/libsdl3/libsdl3-3.2.8.ebuild @@ -0,0 +1,184 @@ +# Copyright 2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake-multilib + +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" + +IUSE=" + X alsa aqua dbus doc ibus io-uring jack kms opengl oss pipewire + pulseaudio sndio static-libs 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}] + ) + alsa? ( media-libs/alsa-lib[${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 ) +" + +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() { + local mycmakeargs=( + -DSDL_ASSERTIONS=disabled + -DSDL_DBUS=$(usex dbus) + -DSDL_DEPS_SHARED=no # link rather than dlopen() where possible + -DSDL_LIBURING=$(usex io-uring) + -DSDL_RPATH=no + -DSDL_STATIC=$(usex static-libs) + -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_OPENGL=$(usex opengl) + -DSDL_OPENGLES=$(usex opengl) + -DSDL_OPENVR=$(usex opengl) # only dependency is libglvnd + -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) + + # 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 + + 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 +} diff --git a/media-libs/libsdl3/metadata.xml b/media-libs/libsdl3/metadata.xml new file mode 100644 index 000000000000..2cea33e852d7 --- /dev/null +++ b/media-libs/libsdl3/metadata.xml @@ -0,0 +1,17 @@ + + + + + games@gentoo.org + Gentoo Games Project + + + Enable support for app-i18n/ibus + Enable support for direct Kernel Mode Setting video output + Enable support for media-sound/sndio + Enable support for media-video/pipewire + + + libsdl-org/SDL + +