pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/print/qpdf print/qpdf: Requires 64-bit atomic operations



details:   https://anonhg.NetBSD.org/pkgsrc/rev/2941d59812ad
branches:  trunk
changeset: 443818:2941d59812ad
user:      yhardy <yhardy%pkgsrc.org@localhost>
date:      Thu Dec 24 20:29:14 2020 +0000

description:
print/qpdf: Requires 64-bit atomic operations

This (partially) fixes the build on NetBSD/i386 for i586 class processors
and NetBSD/powerpc.

diffstat:

 print/qpdf/hacks.mk |  23 +++++++++++++++++++++++
 1 files changed, 23 insertions(+), 0 deletions(-)

diffs (27 lines):

diff -r 668a89bf908d -r 2941d59812ad print/qpdf/hacks.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/print/qpdf/hacks.mk       Thu Dec 24 20:29:14 2020 +0000
@@ -0,0 +1,23 @@
+# $NetBSD: hacks.mk,v 1.1 2020/12/24 20:29:14 yhardy Exp $
+
+.if !defined(QPDF_HACKS_MK)
+QPDF_HACKS_MK= defined
+
+# [Tue Dec 15 15:49:14 SAST 2020 : yhardy]
+# On i386 archs libqpdf/QPDF.cc fails to compile because 64-bit atomic
+# operations are needed.  Forcing -march=i586 (or better) avoids that
+# (i[56]86 provide required).
+.if ${MACHINE_ARCH} == "i386"
+PKG_HACKS+=    i386-atomicops
+CXXFLAGS+=     -march=i586
+.endif
+
+# [Tue Dec 15 15:49:14 SAST 2020 : yhardy]
+# On NetBSD/powerpc, we don't have native 8-byte atomics, but qpdf
+# needs it for a global long long counter, so here we need libatomic.
+.if ${MACHINE_ARCH} == "powerpc"
+PKG_HACKS+=     powerpc-libatomic
+.include "../../devel/libatomic/buildlink3.mk"
+.endif
+
+.endif # QPDF_HACKS_MK



Home | Main Index | Thread Index | Old Index