diff --git a/graphics/dust3d/Makefile b/graphics/dust3d/Makefile index 33544500a1bb..16f117615b79 100644 --- a/graphics/dust3d/Makefile +++ b/graphics/dust3d/Makefile @@ -1,47 +1,53 @@ # Created by: Alexey Dokuchaev PORTNAME= dust3d DISTVERSION= 1.0.0-rc.6 CATEGORIES= graphics PATCH_SITES= https://github.com/${GH_ACCOUNT}/${PORTNAME}/commit/ PATCHFILES= f8339d25ddb79f893413.diff:-p1 821285de824baf01ae99.diff:-p1 MAINTAINER= danfe@FreeBSD.org COMMENT= Open-source 3D modeling software LICENSE= MIT LICENSE_FILE= ${WRKSRC}/LICENSE BUILD_DEPENDS= ${LOCALBASE}/include/boost/config.hpp:devel/boost-libs \ ${LOCALBASE}/include/CGAL/Polygon_mesh_processing/corefinement.h:math/cgal \ cmake:devel/cmake LIB_DEPENDS= libgmp.so:math/gmp libmpfr.so:math/mpfr USES= compiler:c++14-lang gmake qt:5 USE_GITHUB= yes GH_ACCOUNT= huxingyi USE_QT= buildtools_build linguisttools_build qmake_build \ core gui network opengl widgets ALL_TARGET= all DESKTOP_ENTRIES="Dust3D" "${COMMENT}" "${PORTNAME}" "${PORTNAME}" \ "Application;" false PLIST_FILES= bin/${PORTNAME} +.include + +.if ${ARCH} == powerpc || ${ARCH} == riscv64 +EXTRA_PATCHES= ${FILESDIR}/extra-patch-thirdparty_instant-meshes_instant-meshes-dust3d_ext_tbb_src_tbb_tools__api_ittnotify__config.h +.endif + post-patch: @${REINPLACE_CMD} -e '/PLATFORM =/s,Linux,${OPSYS},' \ ${WRKSRC}/${PORTNAME}.pro do-configure: cd ${CONFIGURE_WRKSRC} && ${QMAKE_ENV} ${QMAKE} ${QMAKE_ARGS} pre-build: cd ${BUILD_WRKSRC}/thirdparty/instant-meshes && cmake -B build ${MAKE_CMD} -C ${BUILD_WRKSRC}/thirdparty/instant-meshes/build do-install: ${INSTALL_PROGRAM} ${INSTALL_WRKSRC}/${PORTNAME} \ ${STAGEDIR}${PREFIX}/bin .include diff --git a/graphics/dust3d/files/extra-patch-thirdparty_instant-meshes_instant-meshes-dust3d_ext_tbb_src_tbb_tools__api_ittnotify__config.h b/graphics/dust3d/files/extra-patch-thirdparty_instant-meshes_instant-meshes-dust3d_ext_tbb_src_tbb_tools__api_ittnotify__config.h new file mode 100644 index 000000000000..cb95787669b4 --- /dev/null +++ b/graphics/dust3d/files/extra-patch-thirdparty_instant-meshes_instant-meshes-dust3d_ext_tbb_src_tbb_tools__api_ittnotify__config.h @@ -0,0 +1,11 @@ +--- thirdparty/instant-meshes/instant-meshes-dust3d/ext/tbb/src/tbb/tools_api/ittnotify_config.h.orig 2021-06-30 18:42:09 UTC ++++ thirdparty/instant-meshes/instant-meshes-dust3d/ext/tbb/src/tbb/tools_api/ittnotify_config.h +@@ -335,7 +335,7 @@ ITT_INLINE long + __itt_interlocked_increment(volatile long* ptr) ITT_INLINE_ATTRIBUTE; + ITT_INLINE long __itt_interlocked_increment(volatile long* ptr) + { +- return __TBB_machine_fetchadd4(ptr, 1) + 1L; ++ return __atomic_fetch_add(ptr, 1L, __ATOMIC_SEQ_CST) + 1L; + } + #endif /* ITT_SIMPLE_INIT */ +