Hi!

The port is BROKEN-powerpc due to libatomic not being linked, so i fixed
that already, but then met:

> http://build-failures.rhaalovely.net/sparc64/2019-11-08/graphics/openimageio.log

This is just a missing header.

I have been able to build openimageio on macppc [0] with these fixes,
without breaking amd64.

Comments/feedback are welcome,

Charlène. 


[0] https://bin.charlenew.xyz/openimageio.log


Index: Makefile
===================================================================
RCS file: /cvs/ports/graphics/openimageio/Makefile,v
retrieving revision 1.37
diff -u -p -u -p -r1.37 Makefile
--- Makefile    10 Nov 2019 15:32:55 -0000      1.37
+++ Makefile    13 Nov 2019 10:16:20 -0000
@@ -1,6 +1,5 @@
 # $OpenBSD: Makefile,v 1.37 2019/11/10 15:32:55 ajacoutot Exp $
 
-BROKEN-powerpc =       undefined reference to __atomic_fetch_add_8
 BROKEN-i386 =          clang segfault compiling imagebufalgo_pixelmath.cpp
 
 COMMENT =              library for reading and writing images
@@ -10,7 +9,7 @@ GH_PROJECT =           oiio
 V =                    1.8.6
 GH_TAGNAME =           Release-$V
 DISTNAME =             openimageio-${V}
-REVISION =             5
+REVISION =             6
 
 SHARED_LIBS +=         OpenImageIO             5.0 # 1.0
 SHARED_LIBS +=         OpenImageIO_Util        2.0 # 1.5
@@ -60,6 +59,12 @@ CXXFLAGS +=          -pthread
 CXXFLAGS +=            -march=i686
 .endif
 WRKDIST =              ${WRKDIR}/oiio-Release-$V
+
+# Fix undefined reference to __atomic_*
+.if ${MACHINE_ARCH:Mpowerpc} || ${MACHINE_ARCH:Mhppa}
+CONFIGURE_ENV +=       LDFLAGS="${LDFLAGS} -latomic"
+WANTLIB +=              atomic
+.endif
 
 post-install:
        find ${PREFIX} -name '*.orig' -exec rm -f {} \;
Index: patches/patch-src_include_OpenImageIO_strutil_h
===================================================================
RCS file: patches/patch-src_include_OpenImageIO_strutil_h
diff -N patches/patch-src_include_OpenImageIO_strutil_h
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_include_OpenImageIO_strutil_h     13 Nov 2019 10:16:20 
-0000
@@ -0,0 +1,15 @@
+$OpenBSD$
+
+Add missing header for ports-gcc
+
+Index: src/include/OpenImageIO/strutil.h
+--- src/include/OpenImageIO/strutil.h.orig
++++ src/include/OpenImageIO/strutil.h
+@@ -43,6 +43,7 @@
+ 
+ #include <string>
++#include <cstdarg>
+ #include <cstdio>
+ #include <vector>
+ #include <map>
+ 

Reply via email to