From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 3BE9E15823F for ; Mon, 20 Nov 2023 06:00:57 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1DB982BC019; Mon, 20 Nov 2023 06:00:56 +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 pigeon.gentoo.org (Postfix) with ESMTPS id F14842BC019 for ; Mon, 20 Nov 2023 06:00:55 +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 BE58C335D0E for ; Mon, 20 Nov 2023 06:00:54 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 164E9F1A for ; Mon, 20 Nov 2023 06:00:53 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1700459809.848b64f38b4d7459c3cd58fcbc88125d93b54a2d.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/libsdl2/ X-VCS-Repository: repo/gentoo X-VCS-Files: media-libs/libsdl2/libsdl2-2.28.5.ebuild X-VCS-Directories: media-libs/libsdl2/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 848b64f38b4d7459c3cd58fcbc88125d93b54a2d X-VCS-Branch: master Date: Mon, 20 Nov 2023 06:00:53 +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: f321a460-1c14-4e74-813a-15ebc8ada0e0 X-Archives-Hash: 9facdd5beaeaf0ac5ac8fb9537fb132f commit: 848b64f38b4d7459c3cd58fcbc88125d93b54a2d Author: Matoro Mahri matoro tk> AuthorDate: Sun Nov 19 03:54:56 2023 +0000 Commit: Michał Górny gentoo org> CommitDate: Mon Nov 20 05:56:49 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=848b64f3 media-libs/libsdl2: wire up tests Bug: https://bugs.gentoo.org/896130 Signed-off-by: Matoro Mahri matoro.tk> Closes: https://github.com/gentoo/gentoo/pull/33898 Signed-off-by: Michał Górny gentoo.org> media-libs/libsdl2/libsdl2-2.28.5.ebuild | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/media-libs/libsdl2/libsdl2-2.28.5.ebuild b/media-libs/libsdl2/libsdl2-2.28.5.ebuild index e01e4f109cd0..b37d436cf46e 100644 --- a/media-libs/libsdl2/libsdl2-2.28.5.ebuild +++ b/media-libs/libsdl2/libsdl2-2.28.5.ebuild @@ -15,7 +15,8 @@ LICENSE="ZLIB" SLOT="0" KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86" -IUSE="alsa aqua cpu_flags_ppc_altivec cpu_flags_x86_3dnow cpu_flags_x86_mmx cpu_flags_x86_sse cpu_flags_x86_sse2 custom-cflags dbus doc fcitx4 gles1 gles2 haptic ibus jack +joystick kms libsamplerate nas opengl oss pipewire pulseaudio sndio +sound static-libs +threads udev +video video_cards_vc4 vulkan wayland X xscreensaver" +IUSE="alsa aqua cpu_flags_ppc_altivec cpu_flags_x86_3dnow cpu_flags_x86_mmx cpu_flags_x86_sse cpu_flags_x86_sse2 custom-cflags dbus doc fcitx4 gles1 gles2 haptic ibus jack +joystick kms libsamplerate nas opengl oss pipewire pulseaudio sndio +sound static-libs test +threads udev +video video_cards_vc4 vulkan wayland X xscreensaver" +RESTRICT="!test? ( test )" REQUIRED_USE=" alsa? ( sound ) fcitx4? ( dbus ) @@ -110,6 +111,10 @@ src_prepare() { # Unbundle some headers. rm -r src/video/khronos || die ln -s "${ESYSROOT}/usr/include" src/video/khronos || die + if ! use vulkan + then + sed -i '/testvulkan$(EXE) \\/d' "test/Makefile.in" || die + fi # SDL seems to customize SDL_config.h.in to remove macros like # PACKAGE_NAME. Add AT_NOEAUTOHEADER="yes" to prevent those macros from @@ -202,13 +207,32 @@ multilib_src_configure() { --disable-rpath --disable-render-d3d $(use_with X x) + ac_cv_header_libunwind_h=no ) ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" + + if use test; then + # Most of these workarounds courtesy Debian + # https://salsa.debian.org/sdl-team/libsdl2/-/blob/debian/latest/debian/rules + local mytestargs=( + --x-includes="/usr/include" + --x-libraries="/usr/$(get_libdir)" + SDL_CFLAGS="-I${S}/include" + SDL_LIBS="-L${BUILD_DIR}/build/.libs -lSDL2" + ac_cv_lib_SDL2_ttf_TTF_Init=no + CFLAGS="${CPPFLAGS} ${CFLAGS} ${LDFLAGS}" + ) + + mkdir "${BUILD_DIR}/test" || die + cd "${BUILD_DIR}/test" || die + ECONF_SOURCE="${S}/test" econf "${mytestargs[@]}" + fi } multilib_src_compile() { - emake V=1 + emake all V=1 + use test && emake -C test all V=1 } src_compile() { @@ -220,6 +244,10 @@ src_compile() { fi } +multilib_src_test() { + LD_LIBRARY_PATH="${BUILD_DIR}/build/.libs" emake -C test check V=1 +} + multilib_src_install() { emake DESTDIR="${D}" install }