pkgsrc-Users archive

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

Re: multimedia/mpv configure fails on netbsd-9/i386



Dear nia,

On 2020-12-24, nia wrote:
> Hi folks,
> 
> After freeze ends, I thought I'd introduce an atomic64.buildlink3.mk
> that can be included by packages that require 64-bit atomic operations
> that does the correct thing on architectures that don't natively support
> them. This saves us from having to scatter hacks over pkgsrc.
> 
> However, since we're in freeze, getting this popular package working
> again on i386 is the priority. So I committed the kludge to
> multimedia/mpv/Makefile.
> 
> There likely being a lot of 32-bit embedded x86 hardware from the 2000s
> with questionable CPU feature support running NetBSD puts us in an
> uncomfortable position regarding dropping 486-class CPU support.
> I had thought that most of this hardware was AMD Geode-ish, which is
> definitely at least 586-class - but I guess Soekris produced some
> even lower end stuff.

I was going to wait until after the freeze, but since mpv has been
fixed, should I fix print/qpdf as well? (And then update it to use
atomic64.buildlink3.mk when it is ready). For some reason I also
had to make the libtool tags explicit when building on NetBSD/i386.

-- 
Kind regards,

Yorick Hardy

? print/qpdf/hacks.mk
Index: print/qpdf/distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/print/qpdf/distinfo,v
retrieving revision 1.31
diff -u -r1.31 distinfo
--- print/qpdf/distinfo	30 Oct 2020 15:13:31 -0000	1.31
+++ print/qpdf/distinfo	24 Dec 2020 14:02:38 -0000
@@ -5,4 +5,4 @@
 SHA512 (qpdf-10.0.2.tar.gz) = f1eec57dc76d0300296a1ec2f2d04bea8a75395ac480b37953d0da6924f96d13a258e4523893ef4e2ee89965686ae48f320886bc95120640fd3103cc3aed7032
 Size (qpdf-10.0.2.tar.gz) = 18458344 bytes
 SHA1 (patch-libqpdf.pc.in) = f592899487bb958a01931afbe4ddf3c749ea103e
-SHA1 (patch-make_libtool.mk) = 8622d6a446da284269102dde38bf14271363dfdc
+SHA1 (patch-make_libtool.mk) = bb639bd38ceec45fef03899a0a6d17a2aeb7717e
Index: print/qpdf/patches/patch-make_libtool.mk
===================================================================
RCS file: /cvsroot/pkgsrc/print/qpdf/patches/patch-make_libtool.mk,v
retrieving revision 1.3
diff -u -r1.3 patch-make_libtool.mk
--- print/qpdf/patches/patch-make_libtool.mk	23 Oct 2013 09:07:27 -0000	1.3
+++ print/qpdf/patches/patch-make_libtool.mk	24 Dec 2020 14:02:38 -0000
@@ -2,7 +2,9 @@
 
 libtool does not need bash.
 
---- make/libtool.mk.orig	2013-01-17 14:51:04.000000000 +0000
+make the libtool tags explicit (fixes compiling on NetBSD/i386).
+
+--- make/libtool.mk.orig	2020-10-27 15:57:48.000000000 +0000
 +++ make/libtool.mk
 @@ -1,7 +1,7 @@
  # --- Required interface definitions ---
@@ -13,3 +15,21 @@
  
  OBJ=o
  LOBJ=lo
+@@ -60,7 +60,7 @@ endef
+ #                          1   2
+ # Usage: $(call libcompile,src,includes)
+ define libcompile
+-	$(LIBTOOL) --quiet --mode=compile \
++	$(LIBTOOL) --quiet --mode=compile --tag=CXX \
+ 		$(CXX) $(CXXFLAGS) \
+ 		$(call libdepflags,$(basename $(call src_to_obj,$(1)))) \
+ 		$(foreach I,$(2),-I$(I)) \
+@@ -72,7 +72,7 @@ endef
+ #                          1   2
+ # Usage: $(call libcompile,src,includes)
+ define c_libcompile
+-	$(LIBTOOL) --quiet --mode=compile \
++	$(LIBTOOL) --quiet --mode=compile --tag=CC \
+ 		$(CC) $(CFLAGS) \
+ 		$(call libdepflags,$(basename $(call c_src_to_obj,$(1)))) \
+ 		$(foreach I,$(2),-I$(I)) \
--- /dev/null	2020-12-24 16:00:10.817019286 +0200
+++ print/qpdf/hacks.mk	2020-12-24 16:02:16.041145485 +0200
@@ -0,0 +1,23 @@
+# $NetBSD$
+
+.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