commit:     de6e62fbdc9a747e6d0ce5de228820b7554c21ec
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Tue Jan  6 20:00:40 2026 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Tue Jan  6 20:18:59 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=de6e62fb

media-gfx/povray: Fix build w/ boost-1.89, fix VariableScope warning

This is just shaving off boost::system dependency that was only added by
the original patch in the first place.

don't rm -f
double brackets
less line wraps

Closes: https://bugs.gentoo.org/836071
Closes: https://bugs.gentoo.org/963412
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 ...-1.50.patch => povray-3.7.0.0-boost-1.69.patch} | 42 +++++++---------------
 media-gfx/povray/povray-3.7.0.0-r6.ebuild          | 19 ++++------
 2 files changed, 20 insertions(+), 41 deletions(-)

diff --git a/media-gfx/povray/files/povray-3.7.0.0-r1-boost-1.50.patch 
b/media-gfx/povray/files/povray-3.7.0.0-boost-1.69.patch
similarity index 71%
rename from media-gfx/povray/files/povray-3.7.0.0-r1-boost-1.50.patch
rename to media-gfx/povray/files/povray-3.7.0.0-boost-1.69.patch
index b46c9b4292e4..0e69fffd2bab 100644
--- a/media-gfx/povray/files/povray-3.7.0.0-r1-boost-1.50.patch
+++ b/media-gfx/povray/files/povray-3.7.0.0-boost-1.69.patch
@@ -1,10 +1,13 @@
-Remove bundled m4 macros, instead use system ones from
-dev-build/autoconf-archive. Use AX_BOOST_SYSTEM to prevent
-underlinking issues with more recent boost versions.
-See also: https://bugs.gentoo.org/show_bug.cgi?id=550018
+Remove bundled m4 macros, use system's instead from dev-build/autoconf-archive.
+The previous version of this patch required linking to boost::system to prevent
+underlinking issues, but that is header-only since 1.69 with boost::system only
+remaining as a stub library, and became fatal with Boost 1.89.
+See also:
+https://bugs.gentoo.org/550018
+https://bugs.gentoo.org/963412
 
---- povray-3.7.0.0/unix/configure.ac
-+++ povray-3.7.0.0/unix/configure.ac
+--- a/unix/configure.ac
++++ b/unix/configure.ac
 @@ -54,23 +54,7 @@
  AC_CONFIG_SRCDIR([unix/disp_text.cpp])
  
@@ -47,7 +50,7 @@ See also: https://bugs.gentoo.org/show_bug.cgi?id=550018
  
  # Force checking essential (ANSI-compliant) headers.
  AC_CHECK_HEADERS([stdlib.h])
-@@ -292,13 +277,14 @@
+@@ -292,7 +277,7 @@
  fi
  
  # Posix threads
@@ -56,14 +59,7 @@ See also: https://bugs.gentoo.org/show_bug.cgi?id=550018
  CXXFLAGS="$CXXFLAGS $PTHREAD_CFLAGS"  # append
  LIBS="$LIBS $PTHREAD_CFLAGS $PTHREAD_LIBS"  # append
  
- # Boost; required library
- # the following macro stops with error when boost is not found
- AX_BOOST_BASE([$required_libboost_version])
-+AX_BOOST_SYSTEM
- AX_BOOST_THREAD
- if test x"$ax_cv_boost_thread" != x"yes"; then
-   AC_MSG_ERROR([cannot find a suitable boost thread library])
-@@ -307,19 +293,6 @@
+@@ -307,19 +292,6 @@
    LDFLAGS="$LDFLAGS $BOOST_LDFLAGS"     # append
    LIBS="$BOOST_THREAD_LIB $LIBS"
  fi
@@ -83,20 +79,8 @@ See also: https://bugs.gentoo.org/show_bug.cgi?id=550018
  AC_DEFINE([USE_OFFICIAL_BOOST], [], [Use the official Boost libraries.])
  
  # Intel Math Kernel library
---- povray-3.7.0.0/unix/prebuild.sh
-+++ povray-3.7.0.0/unix/prebuild.sh
-@@ -439,7 +439,8 @@
- # Beware: order does matter!
- LDADD = \\
-   \$(top_builddir)/vfe/libvfe.a \\
--  \$(top_builddir)/source/libpovray.a
-+  \$(top_builddir)/source/libpovray.a \\
-+  @BOOST_SYSTEM_LIB@
- pbEOF
-   ;;
- esac
---- povray-3.7.0.0/vfe/unix/platformbase.cpp
-+++ povray-3.7.0.0/vfe/unix/platformbase.cpp
+--- a/vfe/unix/platformbase.cpp
++++ b/vfe/unix/platformbase.cpp
 @@ -68,7 +68,7 @@
  #else
                // taken from source/base/timer.cpp

diff --git a/media-gfx/povray/povray-3.7.0.0-r6.ebuild 
b/media-gfx/povray/povray-3.7.0.0-r6.ebuild
index f4b6c31be974..4da7ff62d570 100644
--- a/media-gfx/povray/povray-3.7.0.0-r6.ebuild
+++ b/media-gfx/povray/povray-3.7.0.0-r6.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2025 Gentoo Authors
+# Copyright 1999-2026 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
@@ -48,22 +48,17 @@ PATCHES=(
 src_prepare() {
        [[ ${CHOST} == *-darwin* ]] && \
                PATCHES+=( "${FILESDIR}"/${PN}-3.7.0_rc6-darwin-defaults.patch )
-       eapply "${FILESDIR}"/${P}-r1-boost-1.50.patch
+       eapply "${FILESDIR}"/${P}-boost-1.69.patch
 
        pushd unix &>/dev/null || die
                pushd config &>/dev/null || die
-               rm -rf \
-                       acx_pthread.m4 \
-                       ax_boost_base.m4 \
-                       ax_boost_thread.m4 \
-                       ax_compare_version.m4 \
-                       ax_compiler_vendor.m4 \
-                       ax_compiler_version.m4 || die
+               rm acx_pthread.m4 ax_boost_{base,thread}.m4 \
+                       ax_compare_version.m4 ax_compiler_{vendor,version}.m4 
|| die
                popd &>/dev/null || die
        bash -x prebuild.sh || die
        popd &>/dev/null || die
 
-       rm -rf libraries || die
+       rm -r libraries || die
 
        # Change some directories that cannot be adjusted via configure
        sed \
@@ -108,7 +103,7 @@ src_configure() {
        # but the code compiles using incorrect [default] paths
        # (based on /usr/local...), so povray will not find the system
        # config files without the following fix:
-       append-cppflags -DPOVLIBDIR=\\\""${EROOT}"/usr/share/${PN}\\\" 
-DPOVCONFDIR=\\\""${EROOT}"/etc/${PN}\\\"
+       append-cppflags -DPOVLIBDIR=\\\""${EPREFIX}"/usr/share/${PN}\\\" 
-DPOVCONFDIR=\\\""${EPREFIX}"/etc/${PN}\\\"
 
        # TODO: Restore OpenEXR if upstream start to support OpenEXR 3/imath
        local myeconfargs=(
@@ -142,7 +137,7 @@ pkg_preinst() {
        for conf_file in "${ED}"/etc/"${PN}"/*; do
                if [[ ! -e "${EROOT}/etc/${PN}/${conf_file}" ]]; then
                        for version_dir in $(echo "${EROOT}"/etc/"${PN}"/* | 
grep "^[0-9]" | sort -rn); do
-                               if [ -e 
"${EROOT}/etc/${PN}/${version_dir}/${conf_file}" ]; then
+                               if [[ -e 
"${EROOT}/etc/${PN}/${version_dir}/${conf_file}" ]]; then
                                        mv 
"${EROOT}/etc/${PN}/${version_dir}/${conf_file}" "${EROOT}/etc/${PN}" || die
                                        elog "Note: ${conf_file} moved from 
${EROOT}/etc/povray/${version_dir}/ to ${EROOT}/etc/povray/"
                                        break

Reply via email to