I'm having an argument whether to bump REVISION or not. Moving pre-configure to post-extract makes it possible to apply patches to libatomic_ops. Doesn't change the package.
The patch affects both sparc and sparc64, but I argue it has no effect on sparc64. __sparc64__ is always defined, while AO_NO_SPARC_V9 was never defined (nor would it make any sense). The test changes from always true to always true on sparc64. Tested on sparc and sparc64. Comments? Index: Makefile =================================================================== RCS file: /home/vcs/cvs/openbsd/ports/devel/boehm-gc/Makefile,v retrieving revision 1.59 diff -u -p -r1.59 Makefile --- Makefile 27 Jun 2015 13:21:29 -0000 1.59 +++ Makefile 20 Feb 2016 00:44:37 -0000 @@ -48,7 +48,7 @@ CONFIGURE_ARGS= ${CONFIGURE_SHARED} \ --enable-cplusplus \ --enable-threads=pthreads -pre-configure: +post-extract: @perl -pi -e "s,/usr/local,${PREFIX},g" ${WRKSRC}/doc/gc.man @mv ${WRKDIR}/libatomic_ops-${LIBAO_VERSION} ${WRKBUILD}/libatomic_ops Index: patches/patch-libatomic_ops_src_atomic_ops_sysdeps_gcc_sparc_h =================================================================== RCS file: patches/patch-libatomic_ops_src_atomic_ops_sysdeps_gcc_sparc_h diff -N patches/patch-libatomic_ops_src_atomic_ops_sysdeps_gcc_sparc_h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-libatomic_ops_src_atomic_ops_sysdeps_gcc_sparc_h 20 Feb 2016 00:44:37 -0000 @@ -0,0 +1,28 @@ +$OpenBSD$ + +No easy way to set AO_NO_SPARC_V9 permanently on sparc32. It must be defined +in every libatomic_ops user on sparc. +This is meant to help operating systems that support sparcv9 in 32bit mode, +multilib, etc. +We don't have to worry about these setups and can just do the obvious fix. + +--- libatomic_ops/src/atomic_ops/sysdeps/gcc/sparc.h.orig Sat Feb 20 01:05:41 2016 ++++ libatomic_ops/src/atomic_ops/sysdeps/gcc/sparc.h Sat Feb 20 01:06:25 2016 +@@ -37,7 +37,7 @@ AO_test_and_set_full(volatile AO_TS_t *addr) { + } + #define AO_HAVE_test_and_set_full + +-#ifndef AO_NO_SPARC_V9 ++#ifdef __sparc64__ + /* Returns nonzero if the comparison succeeded. */ + AO_INLINE int + AO_compare_and_swap_full(volatile AO_t *addr, AO_t old, AO_t new_val) { +@@ -62,7 +62,7 @@ AO_compare_and_swap_full(volatile AO_t *addr, AO_t old + #define AO_HAVE_compare_and_swap_full + + /* TODO: implement AO_fetch_compare_and_swap. */ +-#endif /* !AO_NO_SPARC_V9 */ ++#endif /* __sparc64__ */ + + /* TODO: Extend this for SPARC v8 and v9 (V8 also has swap, V9 has CAS, */ + /* there are barriers like membar #LoadStore, CASA (32-bit) and */