pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/print/poppler print/poppler: avoid build break with g+...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/a2c1ac43e2ba
branches:  trunk
changeset: 372762:a2c1ac43e2ba
user:      rhialto <rhialto%pkgsrc.org@localhost>
date:      Sun Jan 30 12:07:02 2022 +0000

description:
print/poppler: avoid build break with g++ 8.

[ 98%] Linking CXX executable poppler-render
/usr/bin/ld: ../../libpoppler.so.117.0.0: undefined reference to `std::filesystem::__cxx11::path::_M_split_cmpts()'
/usr/bin/ld: ../../libpoppler.so.117.0.0: undefined reference to `std::filesystem::remove(std::filesystem::__cxx11::path const&, std::error_code&)'
collect2: error: ld returned 1 exit status

Patch is similar to upstream's
https://gitlab.freedesktop.org/poppler/poppler/-/issues/1203

diffstat:

 print/poppler/Makefile.common                        |   3 +-
 print/poppler/distinfo                               |   3 +-
 print/poppler/patches/patch-splash_SplashFontFile.cc |  41 ++++++++++++++++++++
 3 files changed, 45 insertions(+), 2 deletions(-)

diffs (74 lines):

diff -r 0d4af6c8029d -r a2c1ac43e2ba print/poppler/Makefile.common
--- a/print/poppler/Makefile.common     Sun Jan 30 11:17:10 2022 +0000
+++ b/print/poppler/Makefile.common     Sun Jan 30 12:07:02 2022 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.128 2022/01/08 11:31:49 wiz Exp $
+# $NetBSD: Makefile.common,v 1.129 2022/01/30 12:07:02 rhialto Exp $
 #
 # used by print/poppler/Makefile
 # used by print/poppler-cpp/Makefile
@@ -8,6 +8,7 @@
 # used by print/poppler-utils/Makefile
 
 POPPLER_VERS=  22.01.0
+PKGVERSION=    1
 DISTNAME=      poppler-${POPPLER_VERS}
 CATEGORIES=    print
 MASTER_SITES=  https://poppler.freedesktop.org/
diff -r 0d4af6c8029d -r a2c1ac43e2ba print/poppler/distinfo
--- a/print/poppler/distinfo    Sun Jan 30 11:17:10 2022 +0000
+++ b/print/poppler/distinfo    Sun Jan 30 12:07:02 2022 +0000
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.158 2022/01/08 11:16:05 wiz Exp $
+$NetBSD: distinfo,v 1.159 2022/01/30 12:07:02 rhialto Exp $
 
 BLAKE2s (poppler-22.01.0.tar.xz) = cced69fa9241f7aa0c6cc5af2ccbdf8457724f97a7e54f9c755b7b51416ce1d1
 SHA512 (poppler-22.01.0.tar.xz) = c6ea908a9188483ca588ac81d3e92dd15a405f90d36cc7059e618c8a7e3e9faeda82717aba5df34adb4a0a94e2fbecd472acec44972272349cc8d5a57b7405d1
 Size (poppler-22.01.0.tar.xz) = 1801984 bytes
 SHA1 (patch-poppler_poppler-config.h.cmake) = d2a67beb1275f10f19468421f203806ead6fa8ff
+SHA1 (patch-splash_SplashFontFile.cc) = f57e5bd727fdba6e769802eb2bb5a0ca0f960f0c
diff -r 0d4af6c8029d -r a2c1ac43e2ba print/poppler/patches/patch-splash_SplashFontFile.cc
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/print/poppler/patches/patch-splash_SplashFontFile.cc      Sun Jan 30 12:07:02 2022 +0000
@@ -0,0 +1,41 @@
+$NetBSD: patch-splash_SplashFontFile.cc,v 1.1 2022/01/30 12:07:02 rhialto Exp $
+
+Avoid build break with g++ 8:
+
+[ 98%] Linking CXX executable poppler-render
+/usr/bin/ld: ../../libpoppler.so.117.0.0: undefined reference to `std::filesystem::__cxx11::path::_M_split_cmpts()'
+/usr/bin/ld: ../../libpoppler.so.117.0.0: undefined reference to `std::filesystem::remove(std::filesystem::__cxx11::path const&, std::error_code&)'
+collect2: error: ld returned 1 exit status
+
+Patch is similar to upstream's issue 1203:
+https://gitlab.freedesktop.org/poppler/poppler/-/issues/1203
+
+--- splash/SplashFontFile.cc.orig      2022-01-05 12:53:41.000000000 +0000
++++ splash/SplashFontFile.cc
+@@ -23,12 +23,7 @@
+ #include <config.h>
+ 
+ #include <cstdio>
+-// TODO remove here and below once we depend on a new enough gcc in our CI
+-#if __has_include(<filesystem>)
+-#    include <filesystem>
+-#else
+ #    include <unistd.h>
+-#endif
+ #include "goo/gmem.h"
+ #include "goo/GooString.h"
+ #include "SplashFontFile.h"
+@@ -81,13 +76,7 @@ SplashFontSrc::~SplashFontSrc()
+     if (deleteSrc) {
+         if (isFile) {
+             if (fileName) {
+-#if __has_include(<filesystem>)
+-                // We don't care about any error, but we don't want it to throw
+-                std::error_code error_code;
+-                std::filesystem::remove(fileName->c_str(), error_code);
+-#else
+                 unlink(fileName->c_str());
+-#endif
+             }
+         } else {
+             if (buf)



Home | Main Index | Thread Index | Old Index