commit:     87e57d47db8c7c68acb2dec534e70015d8b1d61e
Author:     Holger Hoffstätte <holger <AT> applied-asynchrony <DOT> com>
AuthorDate: Thu Oct 16 17:13:33 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Oct 18 15:07:58 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=87e57d47

media-gfx/apngasm: fix build with boost-1.89

Closes: https://bugs.gentoo.org/963178
Signed-off-by: Holger Hoffstätte <holger <AT> applied-asynchrony.com>
Part-of: https://github.com/gentoo/gentoo/pull/44203
Closes: https://github.com/gentoo/gentoo/pull/44203
Signed-off-by: Sam James <sam <AT> gentoo.org>

 media-gfx/apngasm/apngasm-3.1.10-r1.ebuild         | 41 ++++++++++++++++++++++
 .../apngasm/files/apngasm-3.1.10-boost-1.89.patch  | 33 +++++++++++++++++
 2 files changed, 74 insertions(+)

diff --git a/media-gfx/apngasm/apngasm-3.1.10-r1.ebuild 
b/media-gfx/apngasm/apngasm-3.1.10-r1.ebuild
new file mode 100644
index 000000000000..361e6c8575a1
--- /dev/null
+++ b/media-gfx/apngasm/apngasm-3.1.10-r1.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake
+
+DESCRIPTION="create an APNG from multiple PNG files"
+HOMEPAGE="https://github.com/apngasm/apngasm";
+SRC_URI="https://github.com/${PN}/${PN}/archive/refs/tags/${PV}.tar.gz -> 
${P}.tar.gz"
+
+LICENSE="ZLIB"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="
+       dev-libs/boost:=
+       media-libs/libpng:0=
+       sys-libs/zlib:=
+"
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+       "${FILESDIR}/${PN}-3.1.10-static.patch"
+       "${FILESDIR}/${PN}-3.1.10-boost-1.89.patch"
+)
+
+src_prepare() {
+       sed -i -e 's|man/man1|share/man/man1|g' cli/CMakeLists.txt || die
+
+       cmake_src_prepare
+}
+
+src_configure() {
+       local mycmakeargs=(
+               -DLIB_INSTALL_DIR=$(get_libdir)
+               -DJAVA=OFF
+               -DRUBY=OFF
+       )
+       cmake_src_configure
+}

diff --git a/media-gfx/apngasm/files/apngasm-3.1.10-boost-1.89.patch 
b/media-gfx/apngasm/files/apngasm-3.1.10-boost-1.89.patch
new file mode 100644
index 000000000000..6586215e1591
--- /dev/null
+++ b/media-gfx/apngasm/files/apngasm-3.1.10-boost-1.89.patch
@@ -0,0 +1,33 @@
+Backported from: https://github.com/apngasm/apngasm/pull/111
+Manually fixed up for differences in lib/CMakeLists.txt due to
+our dynamic linking patch.
+
+From: Michael Cho <[email protected]>
+Date: Sun, 10 Aug 2025 19:23:29 -0400
+Subject: [PATCH] Fix build with Boost 1.89.0
+
+--- a/cli/CMakeLists.txt
++++ b/cli/CMakeLists.txt
+@@ -34,7 +34,7 @@ endif ()
+ if (APPLE OR WIN32)
+   set(Boost_USE_STATIC_LIBS ON)
+ endif ()
+-find_package(Boost REQUIRED COMPONENTS program_options regex system)
++find_package(Boost REQUIRED COMPONENTS program_options regex 
OPTIONAL_COMPONENTS system)
+ include_directories(${Boost_INCLUDE_DIRS})
+ 
+ # Generate executable
+--- a/lib/CMakeLists.txt
++++ b/lib/CMakeLists.txt
+@@ -71,9 +71,9 @@ target_link_libraries(${APNGASM_STATIC_LIB_TARGET} 
${ZLIB_LIBRARIES})
+ #endif ()
+ #set(Boost_USE_STATIC_LIBS OFF)
+ #SET(CMAKE_FIND_LIBRARY_SUFFIXES .dll.a .a .lib 
${CMAKE_FIND_LIBRARY_SUFFIXES})
+-find_package(Boost REQUIRED COMPONENTS program_options regex system)
++find_package(Boost REQUIRED COMPONENTS program_options regex 
OPTIONAL_COMPONENTS system)
+ include_directories(SYSTEM ${Boost_INCLUDE_DIRS})
+-target_link_libraries(${APNGASM_DYNAMIC_LIB_TARGET} Boost::program_options 
Boost::regex Boost::system)
++target_link_libraries(${APNGASM_DYNAMIC_LIB_TARGET} ${Boost_LIBRARIES})
+ 
+ get_target_property(APNGASM_DYNAMIC_LIB_TARGET_NAME 
${APNGASM_DYNAMIC_LIB_TARGET} OUTPUT_NAME)
+ set(APNGASM_LIBRARIES

Reply via email to