public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/sdl2-image/
Date: Wed, 19 Feb 2025 17:58:20 +0000 (UTC)	[thread overview]
Message-ID: <1739987858.7113def3facef3c6a9458f7e0d5d810d4261dfb9.sam@gentoo> (raw)

commit:     7113def3facef3c6a9458f7e0d5d810d4261dfb9
Author:     Alfred Wingate <parona <AT> protonmail <DOT> com>
AuthorDate: Wed Feb 19 16:51:27 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Feb 19 17:57:38 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7113def3

media-libs/sdl2-image: add 2.8.5

Move to cmake fixing tests if libSDL2_test.a is linked to libunwind.

Signed-off-by: Alfred Wingate <parona <AT> protonmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 media-libs/sdl2-image/Manifest                |   1 +
 media-libs/sdl2-image/metadata.xml            |   3 +
 media-libs/sdl2-image/sdl2-image-2.8.5.ebuild | 111 ++++++++++++++++++++++++++
 3 files changed, 115 insertions(+)

diff --git a/media-libs/sdl2-image/Manifest b/media-libs/sdl2-image/Manifest
index e580db1e41da..3f9b197e7542 100644
--- a/media-libs/sdl2-image/Manifest
+++ b/media-libs/sdl2-image/Manifest
@@ -1,3 +1,4 @@
 DIST SDL2_image-2.0.5_p20210328.tar.gz 12397062 BLAKE2B ae4fe8c30b21bc7dca87e2e78cab43c83e891630962eb020c29ba84c2b206bb749491dccddd8bcc212f2fd07da651691151baf41212fb5ea954427543e3bf994 SHA512 9ba0b671dedfb7bde072424cebfa7d65e79d2d58416833d84548777aff6bf0edda8dbe30c3e423bbb724f794b4b191e609b148f38573b4166eef31203ab0005d
 DIST SDL2_image-2.6.3.tar.gz 9816720 BLAKE2B 24662637e4f621af83d9a66d1cca954549030be97fa47f4b8fc711b2a941eaa409cf99ede137eb91d25999af253791dcfb2d9229080d30ede84cc32d5c5ae997 SHA512 11f1d041a052829708560b6211a2a00b3a1ce26a6f23cb389f57fa5254372027e97d3a6ffe551134a77bc33718c3acea3df21fe8426e93a2b1955176c47c7647
 DIST SDL2_image-2.8.2.tar.gz 11362515 BLAKE2B 8bc8967eed7203ddbd23062e257ae8768eeb28e8efa57bac86db0224a7cdc94dfbb10c6da77dab9c1847f216ec761fae5b7bd5d8ed25c6b3c69ad972dc93ddf5 SHA512 0ff345824f95158dfa72f83f9d4a540601c178cd759334bf849c14a2920b5330d0763413b58c08b3deba8d3a4ccb6ea2a8159f87efe4cbb0e8ea850f63d09454
+DIST SDL2_image-2.8.5.tar.gz 6874736 BLAKE2B 3907daa3531fc6188c1991ecd6710634b9dfe5567cf73fbb3e84ec79a74b821fdabdf7c716da84d4f25dcb64a44bf2961063f069f57420f4dc94cae724caab49 SHA512 593f881aeaab0920df5767e77c1f7ae6daa5ea7682810f1b649645761c00ceff0533a887bdcfe2c5b226e838b19ffa7fb12df8c904746c318bd4bface96dac43

diff --git a/media-libs/sdl2-image/metadata.xml b/media-libs/sdl2-image/metadata.xml
index ba95051be881..7bc0ccaf0f65 100644
--- a/media-libs/sdl2-image/metadata.xml
+++ b/media-libs/sdl2-image/metadata.xml
@@ -5,6 +5,9 @@
 		<email>games@gentoo.org</email>
 		<name>Gentoo Games Project</name>
 	</maintainer>
+	<use>
+		<flag name="samples">Install sample programs</flag>
+	</use>
 	<upstream>
 		<remote-id type="github">libsdl-org/SDL_image</remote-id>
 		<bugs-to>https://github.com/libsdl-org/SDL_image/issues</bugs-to>

diff --git a/media-libs/sdl2-image/sdl2-image-2.8.5.ebuild b/media-libs/sdl2-image/sdl2-image-2.8.5.ebuild
new file mode 100644
index 000000000000..e2a2384fc854
--- /dev/null
+++ b/media-libs/sdl2-image/sdl2-image-2.8.5.ebuild
@@ -0,0 +1,111 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake-multilib multibuild
+
+MY_P="SDL2_image-${PV}"
+DESCRIPTION="Image file loading library"
+HOMEPAGE="https://www.libsdl.org/projects/SDL_image/"
+SRC_URI="https://github.com/libsdl-org/SDL_image/releases/download/release-${PV}/${MY_P}.tar.gz"
+S="${WORKDIR}"/${MY_P}
+
+LICENSE="ZLIB"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~ppc64 ~riscv ~sparc ~x86"
+IUSE="avif gif jpeg jpegxl png samples static-libs test tiff webp"
+RESTRICT="!test? ( test )"
+REQUIRED_USE="test? ( jpeg png )"
+
+RDEPEND="
+	>=media-libs/libsdl2-2.0.9[${MULTILIB_USEDEP}]
+	>=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
+	avif? ( >=media-libs/libavif-1.0.0:=[${MULTILIB_USEDEP}] )
+	png? ( >=media-libs/libpng-1.6.10:0=[${MULTILIB_USEDEP}] )
+	jpeg? ( media-libs/libjpeg-turbo:=[${MULTILIB_USEDEP}] )
+	jpegxl? ( media-libs/libjxl:=[${MULTILIB_USEDEP}] )
+	tiff? ( >=media-libs/tiff-3.9.7-r1:=[${MULTILIB_USEDEP}] )
+	webp? ( >=media-libs/libwebp-0.3.0:=[${MULTILIB_USEDEP}] )
+"
+DEPEND="${RDEPEND}"
+
+pkg_setup() {
+	MULTIBUILD_VARIANTS=( shared-libs $(usev static-libs) )
+}
+
+src_prepare() {
+	cmake_src_prepare
+
+	# 1. Install non standard license installation
+	# 2/3. Add suffixes to sample programs
+	sed -i \
+		-e '/install(FILES "LICENSE.txt"/,/\s)$/d' \
+		-e 's/\(\W\)showanim\(\W\)/\1showanim2\2/' \
+		-e 's/\(\W\)showimage\(\W\)/\1showimage2\2/' \
+		CMakeLists.txt || die
+}
+
+multilib_src_configure() {
+	# hack because because of layered multibuilds
+	if [[ -n ${is_shared} ]]; then
+		mycmakeargs+=( -DSDL2IMAGE_SAMPLES=$(multilib_native_usex samples) )
+	fi
+	cmake_src_configure
+}
+
+src_configure() {
+	myconfigure() {
+		local mycmakeargs=(
+			-DSDL2IMAGE_AVIF=$(usex avif)
+			-DSDL2IMAGE_BMP=ON
+			-DSDL2IMAGE_GIF=$(usex gif)
+			-DSDL2IMAGE_JPG=$(usex jpeg)
+			-DSDL2IMAGE_JXL=$(usex jpegxl)
+			-DSDL2IMAGE_LBM=ON
+			-DSDL2IMAGE_PCX=ON
+			-DSDL2IMAGE_PNG=$(usex png)
+			-DSDL2IMAGE_PNM=ON
+			-DSDL2IMAGE_QOI=ON
+			-DSDL2IMAGE_SVG=ON
+			-DSDL2IMAGE_TGA=ON
+			-DSDL2IMAGE_TIF=$(usex tiff)
+			-DSDL2IMAGE_WEBP=$(usex webp)
+			-DSDL2IMAGE_XCF=ON
+			-DSDL2IMAGE_XPM=ON
+			-DSDL2IMAGE_XV=ON
+
+			# change?
+			-DSDL2IMAGE_BACKEND_STB=OFF
+			-DSDL2IMAGE_DEPS_SHARED=OFF
+			-DSDL2IMAGE_SAMPLES_INSTALL=ON
+			-DSDL2IMAGE_TESTS=$(usex test)
+			-DSDL2IMAGE_TESTS_INSTALL=OFF
+			-DSDL2IMAGE_VENDORED=OFF
+		)
+		if [[ "${MULTIBUILD_VARIANT}" == "shared-libs" ]]; then
+			mycmakeargs+=( -DBUILD_SHARED_LIBS=ON )
+			local is_shared=1
+		else
+			mycmakeargs+=(
+				-DBUILD_SHARED_LIBS=OFF
+				-DSDL2IMAGE_SAMPLES=OFF
+			)
+		fi
+
+		cmake-multilib_src_configure
+	}
+	multibuild_foreach_variant myconfigure
+}
+
+src_compile() {
+	multibuild_foreach_variant cmake-multilib_src_compile
+}
+
+src_test() {
+	multibuild_foreach_variant cmake-multilib_src_test
+}
+
+src_install() {
+	multibuild_foreach_variant cmake-multilib_src_install
+}


             reply	other threads:[~2025-02-19 17:58 UTC|newest]

Thread overview: 61+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-19 17:58 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-02-19 17:58 [gentoo-commits] repo/gentoo:master commit in: media-libs/sdl2-image/ Sam James
2024-03-18 16:26 Sam James
2024-03-18  7:20 Sam James
2024-01-23  5:07 Ionen Wolkens
2023-12-25 17:26 Sam James
2023-12-12  6:30 Viorel Munteanu
2023-12-01 14:33 Arthur Zamarin
2023-10-27 15:20 Michał Górny
2023-10-22 17:31 Michał Górny
2023-10-22 17:31 Michał Górny
2023-10-22 17:31 Michał Górny
2023-10-22 17:31 Michał Górny
2023-09-28  6:17 Sam James
2023-09-27  8:27 Sam James
2023-09-27  5:45 Sam James
2023-09-27  5:00 Sam James
2023-09-27  4:58 Sam James
2023-02-12  6:22 Sam James
2022-05-19 12:19 WANG Xuerui
2021-11-29  7:39 Arthur Zamarin
2021-09-12 20:20 Ionen Wolkens
2021-07-25  1:36 Ionen Wolkens
2021-05-18 20:40 Ulrich Müller
2021-05-18 20:05 Ulrich Müller
2021-05-18 17:16 Sam James
2021-05-17  1:36 Sam James
2021-05-17  1:09 Sam James
2021-05-16 19:35 Sam James
2021-05-16 18:59 Sam James
2021-05-16 18:54 Sam James
2021-05-16 18:53 Sam James
2021-04-05 21:28 James Le Cuirot
2021-01-23 21:13 Andreas Sturmlechner
2020-12-17  3:58 Sam James
2020-10-09  8:31 Agostino Sarubbo
2020-10-06 13:16 Sam James
2020-10-03 12:16 Sergei Trofimovich
2020-09-30 21:15 Sam James
2020-06-10  3:21 Matt Turner
2020-06-09 17:07 Sergei Trofimovich
2020-06-08 14:18 Michał Górny
2020-06-08 13:18 Michał Górny
2020-04-13 21:37 James Le Cuirot
2020-01-26 10:26 Georgy Yakovlev
2019-07-05  8:14 Lars Wendler
2019-03-10 10:22 James Le Cuirot
2019-02-19 18:04 Andreas Sturmlechner
2019-01-28  7:35 Robin H. Johnson
2019-01-02 10:04 Mikle Kolyada
2018-12-31 16:43 Thomas Deutschmann
2018-11-02 16:11 Lars Wendler
2018-09-16 18:55 Andreas Sturmlechner
2018-09-16 13:15 Mikle Kolyada
2018-09-09  1:12 Thomas Deutschmann
2018-03-05  8:47 Lars Wendler
2017-10-25  7:47 Lars Wendler
2017-05-20  7:45 James Le Cuirot
2016-02-16  1:38 Michael Sterrett
2016-02-13 15:33 Agostino Sarubbo
2016-01-04  2:51 Michael Sterrett

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1739987858.7113def3facef3c6a9458f7e0d5d810d4261dfb9.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox