Take 2, as i've already worked on it when ports-gcc-6 was out.
> error: struct std::tr1::array<long long int, 50> has no member > named fill There is already a set of patches to fix these issues. It was limited to clang so far, i removed this limitation. I've also removed the sparc64 workarounds as they are not needed anymore nowadays [0], it uses ports-gcc. This allows building libtorrent and rtorrent on macppc with ports-gcc-8. I'm not sure it would work with ports-gcc-4.9 and will wait until gcc-8 becomes officially the new ports-gcc to commit it if i have no feedback on this. Charlène. [0] https://github.com/rakshasa/rtorrent/issues/28#issuecomment-3754215 Index: Makefile =================================================================== RCS file: /cvs/ports/net/rtorrent/Makefile,v retrieving revision 1.63 diff -u -p -r1.63 Makefile --- Makefile 24 Oct 2018 14:28:09 -0000 1.63 +++ Makefile 15 Apr 2019 14:02:19 -0000 @@ -3,7 +3,7 @@ COMMENT= ncurses BitTorrent client based on libTorrent DISTNAME= rtorrent-0.9.6 -REVISION= 5 +REVISION= 6 EPOCH= 0 CATEGORIES= net @@ -21,13 +21,6 @@ COMPILER = base-clang ports-gcc base-gc MASTER_SITES= https://rtorrent.net/downloads/ -MODULES= gcc4 - -# SIGBUS during startup on sparc64 when built using gcc 4.2.1 -# https://github.com/rakshasa/rtorrent/issues/28 -MODGCC4_ARCHS= sparc64 -MODGCC4_LANGS= c++ - BUILD_DEPENDS= devel/cppunit LIB_DEPENDS= net/libtorrent>=0.13.4 \ net/curl @@ -37,18 +30,17 @@ AUTOCONF_VERSION= 2.69 CONFIGURE_ENV += LDFLAGS=-pthread CONFIGURE_ARGS= --disable-debug +CXXFLAGS += -std=c++11 + post-install: ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/rtorrent ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/rtorrent ${INSTALL_DATA} ${WRKSRC}/doc/rtorrent.rc \ ${PREFIX}/share/examples/rtorrent/rtorrent.rc -.include <bsd.port.arch.mk> -.if ${PROPERTIES:Mclang} # this patches *only* files containing tr1 to no longer refer to tr1 # we do it pre-patch, because autoconf passes right after us pre-patch: find ${WRKDIST} -type f|xargs fgrep -lw tr1|xargs sed -i.bak -e 's,<tr1/,<,' -e 's/std::tr1/std/g' -e 's/tr1::placeholders::/std::placeholders::/g' -e 's/tr1::bind/std::bind/g' -CXXFLAGS += -std=c++11 -.endif + .include <bsd.port.mk> Index: Makefile =================================================================== RCS file: /cvs/ports/net/libtorrent/Makefile,v retrieving revision 1.57 diff -u -p -r1.57 Makefile --- Makefile 11 Jan 2019 18:04:21 -0000 1.57 +++ Makefile 15 Apr 2019 14:02:05 -0000 @@ -10,7 +10,7 @@ NOT_FOR_ARCHS= ${GCC3_ARCHS} DISTNAME= libtorrent-0.13.6 EPOCH= 0 -REVISION= 5 +REVISION= 6 SHARED_LIBS += torrent 22.1 # .18.0 CATEGORIES= net devel @@ -37,14 +37,12 @@ CONFIGURE_ARGS= --enable-static \ --disable-mincore \ --disable-debug -.include <bsd.port.arch.mk> -.if ${PROPERTIES:Mclang} +CXXFLAGS += -std=c++11 +# some patches involve the tr1 stuff +PATCH_LIST = patch-* clangpatch-* + # this patches *only* files containing tr1 to no longer refer to tr1 # we do it pre-patch, because autoconf passes right after us pre-patch: find ${WRKDIST} -type f|xargs fgrep -lw tr1|xargs sed -i.bak -e 's,<tr1/,<,' -e 's/std::tr1/std/g' -CXXFLAGS += -std=c++11 -# some patches involve the tr1 stuff -PATCH_LIST = patch-* clangpatch-* -.endif .include <bsd.port.mk>