From 7a7daa06a06110abc743b5ebd9da85620a5679b4 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Tue, 1 Aug 2023 22:48:35 +0100 Subject: gentoo auto-resync : 01:08:2023 - 22:48:35 --- media-libs/libsfml/Manifest | 2 + .../files/libsfml-2.5.1-clang-16-auto_ptr.patch | 50 +++++++++++++++ media-libs/libsfml/libsfml-2.5.1-r2.ebuild | 75 ++++++++++++++++++++++ 3 files changed, 127 insertions(+) create mode 100644 media-libs/libsfml/files/libsfml-2.5.1-clang-16-auto_ptr.patch create mode 100644 media-libs/libsfml/libsfml-2.5.1-r2.ebuild (limited to 'media-libs/libsfml') diff --git a/media-libs/libsfml/Manifest b/media-libs/libsfml/Manifest index 1eb27977a968..6dc964e11d67 100644 --- a/media-libs/libsfml/Manifest +++ b/media-libs/libsfml/Manifest @@ -1,4 +1,6 @@ +AUX libsfml-2.5.1-clang-16-auto_ptr.patch 2070 BLAKE2B e443d1a19b89de878da4bc65f4b0fe70d9109f249b97efdbd6c12f14acb0bb10be39b986fab42b49cd2fe98bfd4fe230c7b6931ecaf4bf883f67ff873e00aa88 SHA512 30d8fe083c1243c7f418f291cd6fd7eeec95ae5670d75f8453059b1e93befb97b1290b1620a21768e975397abe9336169cf1ff8525f19517f4782d3e9b329085 AUX libsfml-2.5.1-musl-1.2.3-nullptr.patch 626 BLAKE2B dac65018937df6088b5f44f57678b6acde4f67a4f03180428374f26c7248181058185bce053bb79fdd4d4044c6369740daed5db95f803965d2b15a3250bedd1c SHA512 76535c8d01f21cc32df1c66ba1567356737a9c14b73be1c03606305f905d31a615759054b60fbf3347a57d3b24ab9b3978c96f898262000fe4c58af697b7dac7 DIST libsfml-2.5.1.tar.gz 22868556 BLAKE2B b6c70b75a778ffeb141438153fb1e5693c3e92e277919b8f8befe98f55dfd519a67c86504bb5656961b947fcf60758b16a18d5a4ae7585c7c5256f327529ae31 SHA512 7aed2fc29d1da98e6c4d598d5c86cf536cb4eb5c2079cdc23bb8e502288833c052579dadbe0ce13ad6461792d959bf6d9660229f54c54cf90a541c88c6b03d59 EBUILD libsfml-2.5.1-r1.ebuild 1488 BLAKE2B 369b7e91f80616f2d9ebd54f780c4284b6ac76e9da487e40949cc15f0538192e73c803761aa3b6b96baab88678b1933df7bf77936dd9a973095207f040097058 SHA512 2d43769822c5275bfd56f5a657dfc81d2b9187b11fe07b71636d9ad2d5888a9c9f620b586dac166a5cfa0b24e25d6d4b50be7f8037cb827012958abf0356f11b +EBUILD libsfml-2.5.1-r2.ebuild 1534 BLAKE2B 0759ff18d33cc7d2ab8410f4228e2c8cb45ea66497297d11bfe2c43be5e5cbc16fa88b19464ae41cc804ffd1e4765b1a34a7471982ba018ac482b889c958b49b SHA512 bb447e735cfe54eb72da8de2865b4a8be6c7f00aa3192dafae4eb5b18847d5c7bd1fb24997703679de561243ac13b7c8b315c7e5da691546d5b1b4558d4dfa8e MISC metadata.xml 733 BLAKE2B c5b2bf1cea8b01c89531f68544f8b82dc3f8b8e26327ec868cf2ce1beabd6b1b0e977ad4a5dd3cdcbe3ae0fd66930f0c411023d77f9c4a5f7464d90209fa6f6d SHA512 ffb4954d9d55f0ab147c8ef2d5e970ef728b0dd1ad78f04aac16346583a9b858d3861f6f3bfe0940ca4b41c23abf8904bf3e0160d347d9e007efa047e663ccda diff --git a/media-libs/libsfml/files/libsfml-2.5.1-clang-16-auto_ptr.patch b/media-libs/libsfml/files/libsfml-2.5.1-clang-16-auto_ptr.patch new file mode 100644 index 000000000000..ba4f90e4c465 --- /dev/null +++ b/media-libs/libsfml/files/libsfml-2.5.1-clang-16-auto_ptr.patch @@ -0,0 +1,50 @@ +https://github.com/SFML/SFML/commit/bf92efe9a4035fee0258386173d53556aa196e49 +Bug: https://bugs.gentoo.org/910519 +From: Tobias Widlund +Date: Fri, 18 Jan 2019 14:12:14 +0100 +Subject: [PATCH] Remove usages of std::auto_ptr to get rid of warnings when + building with gcc 8.2+ + +--- a/src/SFML/Audio/AudioDevice.cpp ++++ b/src/SFML/Audio/AudioDevice.cpp +@@ -29,7 +29,7 @@ + #include + #include + #include +-#include ++#include + + + namespace +@@ -107,9 +107,13 @@ bool AudioDevice::isExtensionSupported(const std::string& extension) + // This device will not be used in this function and merely + // makes sure there is a valid OpenAL device for extension + // queries if none has been created yet. +- std::auto_ptr device; ++ // ++ // Using an std::vector for this since auto_ptr is deprecated ++ // and we have no better STL facility for dynamically allocating ++ // a temporary instance with strong exception guarantee. ++ std::vector device; + if (!audioDevice) +- device.reset(new AudioDevice); ++ device.resize(1); + + if ((extension.length() > 2) && (extension.substr(0, 3) == "ALC")) + return alcIsExtensionPresent(audioDevice, extension.c_str()) != AL_FALSE; +@@ -125,9 +129,13 @@ int AudioDevice::getFormatFromChannelCount(unsigned int channelCount) + // This device will not be used in this function and merely + // makes sure there is a valid OpenAL device for format + // queries if none has been created yet. +- std::auto_ptr device; ++ // ++ // Using an std::vector for this since auto_ptr is deprecated ++ // and we have no better STL facility for dynamically allocating ++ // a temporary instance with strong exception guarantee. ++ std::vector device; + if (!audioDevice) +- device.reset(new AudioDevice); ++ device.resize(1); + + // Find the good format according to the number of channels + int format = 0; diff --git a/media-libs/libsfml/libsfml-2.5.1-r2.ebuild b/media-libs/libsfml/libsfml-2.5.1-r2.ebuild new file mode 100644 index 000000000000..d6b70ddf935e --- /dev/null +++ b/media-libs/libsfml/libsfml-2.5.1-r2.ebuild @@ -0,0 +1,75 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake + +DESCRIPTION="Simple and Fast Multimedia Library (SFML)" +HOMEPAGE="https://www.sfml-dev.org/ https://github.com/SFML/SFML" +SRC_URI="https://github.com/SFML/SFML/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="ZLIB" +SLOT="0/$(ver_cut 1-2)" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86" +IUSE="debug doc examples" + +RDEPEND=" + media-libs/flac:= + media-libs/freetype:2 + media-libs/libjpeg-turbo:= + media-libs/libpng:= + media-libs/libogg + media-libs/libvorbis + media-libs/openal + sys-libs/zlib + virtual/opengl + x11-libs/libX11 + x11-libs/libXrandr + x11-libs/libxcb + x11-libs/xcb-util-image + kernel_linux? ( virtual/libudev:= ) +" +DEPEND="${RDEPEND}" +BDEPEND=" + doc? ( app-doc/doxygen ) +" + +DOCS=( changelog.md readme.md ) + +S="${WORKDIR}/SFML-${PV}" + +PATCHES=( + "${FILESDIR}"/${P}-musl-1.2.3-nullptr.patch + "${FILESDIR}"/${P}-clang-16-auto_ptr.patch +) + +src_prepare() { + sed -i "s:DESTINATION .*:DESTINATION /usr/share/doc/${PF}:" \ + doc/CMakeLists.txt || die + + find examples -name CMakeLists.txt -delete || die + cmake_src_prepare +} + +src_configure() { + local mycmakeargs=( + -DSFML_BUILD_DOC=$(usex doc) + -DSFML_INSTALL_PKGCONFIG_FILES=TRUE + ) + + cmake_src_configure +} + +src_install() { + cmake_src_install + + insinto /usr/share/cmake/Modules + doins cmake/SFMLConfig.cmake.in + doins cmake/SFMLConfigDependencies.cmake.in + + if use examples ; then + docompress -x /usr/share/doc/${PF}/examples + dodoc -r examples + fi +} -- cgit v1.2.3