On Sun, 2 Dec 2018 22:15:43 -0500
George Koehler wrote:
> On Fri, 30 Nov 2018 05:59:48 +0100
> Charlene Wendling <julianaito@posteo.jp> wrote:
>
> > Hi David, ports,
> >
> > Here is a diff that unbreaks libtorrent [1], and thus rtorrent [2],
> > with gcc-6.4 as ports-gcc on my macppc box [3]. It may help for
> > sparc64 as well.
>
> Upstream libtorrent has different C++11 fixes. Their rak_cxx.m4 [1]
> checks the compiler. If it can `#include <unordered_map>`, then it's
> C++11, else if it can `#include <tr1/unordered_map>`, then it's TR1.
>
> I guess that gcc 4.9.4 would pass the C++11 check. Perhaps we can use
> ${PROPERTIES:Mgcc4} and don't need ${PROPERTIES:Mgcc6} yet. This
> might help because macppc and sparc64 still use gcc 4.9.4 by default,
> so it is wrong to add them to ${PROPERTIES:Mgcc6}.
I was totally unaware of what was involved by adding GCC6_ARCHS. I
zapped it.
> In lib/rtorrent/Makefile, it might be better (I'm not sure) to delete
> the gcc4 lines and use COMPILER to pick ports-gcc before base-gcc for
> sparc64. The SIGBUS comment might go above the COMPILER line.
>
> [1]
> https://github.com/rakshasa/libtorrent/blob/master/scripts/rak_cxx.m4#L44
>
I tried that way, it picks the right CHOSEN_COMPILER on macppc.
With your proposed changes, it builds and runs fine wether you're using
ports-gcc-4.9 or ports-gcc-6.4 on macppc :)
Thanks a lot!
Charlène.
Index: net/libtorrent/Makefile
===================================================================
RCS file: /cvs/ports/net/libtorrent/Makefile,v
retrieving revision 1.56
diff -u -p -r1.56 Makefile
--- net/libtorrent/Makefile 24 Oct 2018 14:28:09 -0000
1.56 +++ net/libtorrent/Makefile 4 Dec 2018 04:02:09 -0000
@@ -10,7 +10,7 @@ NOT_FOR_ARCHS= ${GCC3_ARCHS}
DISTNAME= libtorrent-0.13.6
EPOCH= 0
-REVISION= 4
+REVISION= 5
SHARED_LIBS += torrent 22.1 # .18.0
CATEGORIES= net devel
@@ -37,7 +37,7 @@ CONFIGURE_ARGS= --enable-static \
--disable-debug
.include <bsd.port.arch.mk>
-.if ${PROPERTIES:Mclang}
+.if ${PROPERTIES:Mclang} || ${PROPERTIES:Mgcc4}
# 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:
Index: net/rtorrent/Makefile
===================================================================
RCS file: /cvs/ports/net/rtorrent/Makefile,v
retrieving revision 1.63
diff -u -p -r1.63 Makefile
--- net/rtorrent/Makefile 24 Oct 2018 14:28:09 -0000 1.63
+++ net/rtorrent/Makefile 4 Dec 2018 04:02:09 -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,12 +21,11 @@ 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++
+.if ${MACHINE_ARCH} == "sparc64"
+COMPILER= ports-gcc
+.endif
BUILD_DEPENDS= devel/cppunit
LIB_DEPENDS= net/libtorrent>=0.13.4 \
@@ -44,7 +43,7 @@ post-install:
${PREFIX}/share/examples/rtorrent/rtorrent.rc
.include <bsd.port.arch.mk>
-.if ${PROPERTIES:Mclang}
+.if ${PROPERTIES:Mclang} || ${PROPERTIES:Mgcc4}
# 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:
No comments:
Post a Comment