Improve GCC version handling: 1.) Set minimum required GCC version to 4.1.3 because that is what has been tested. Based on the bug-report it also seems that GCC 4.0.1 doesn't work. 2.) GCC 4.1.3 (as distributed with NetBSD 5.*) works fine under NetBSD/macppc as reported by Matthias Kretschmer on IRCnet. So don't insist on GCC 4.2.1 for this platform. This fixes seems to fix the build as the GCC 4.4.6 package doesn't build for this platform.diff -r1.42 -r1.43 pkgsrc/net/libtorrent/Makefile
(tron)
@@ -1,57 +1,58 @@ | @@ -1,57 +1,58 @@ | |||
1 | # $NetBSD: Makefile,v 1.42 2011/11/07 13:10:31 hans Exp $ | 1 | # $NetBSD: Makefile,v 1.43 2012/01/11 22:41:46 tron Exp $ | |
2 | 2 | |||
3 | DISTNAME= libtorrent-0.12.9 | 3 | DISTNAME= libtorrent-0.12.9 | |
4 | CATEGORIES= net | 4 | CATEGORIES= net | |
5 | MASTER_SITES= ${HOMEPAGE:=downloads/} | 5 | MASTER_SITES= ${HOMEPAGE:=downloads/} | |
6 | 6 | |||
7 | OWNER= tron@NetBSD.org | 7 | OWNER= tron@NetBSD.org | |
8 | HOMEPAGE= http://libtorrent.rakshasa.no/ | 8 | HOMEPAGE= http://libtorrent.rakshasa.no/ | |
9 | COMMENT= BitTorrent library written in C++ for *nix | 9 | COMMENT= BitTorrent library written in C++ for *nix | |
10 | LICENSE= gnu-gpl-v2 | 10 | LICENSE= gnu-gpl-v2 | |
11 | 11 | |||
12 | PKG_DESTDIR_SUPPORT= user-destdir | 12 | PKG_DESTDIR_SUPPORT= user-destdir | |
13 | 13 | |||
14 | USE_LANGUAGES= c c++ | 14 | USE_LANGUAGES= c c++ | |
15 | USE_LIBTOOL= yes | 15 | USE_LIBTOOL= yes | |
16 | USE_TOOLS+= gmake pkg-config | 16 | USE_TOOLS+= gmake pkg-config | |
17 | GNU_CONFIGURE= yes | 17 | GNU_CONFIGURE= yes | |
18 | CONFIGURE_ARGS+= --disable-debug | 18 | CONFIGURE_ARGS+= --disable-debug | |
19 | 19 | |||
20 | .include "../../mk/bsd.prefs.mk" | 20 | .include "../../mk/bsd.prefs.mk" | |
21 | .if ${MACHINE_ARCH} == "alpha" || \ | 21 | .if ${MACHINE_ARCH} == "alpha" || \ | |
22 | ${MACHINE_ARCH} == "i386" || \ | 22 | ${MACHINE_ARCH} == "i386" || \ | |
23 | ${MACHINE_ARCH} == "powerpc" || \ | |||
23 | ${MACHINE_ARCH} == "x86_64" | 24 | ${MACHINE_ARCH} == "x86_64" | |
24 | GCC_REQD+= 3.3 | 25 | GCC_REQD+= 4.1.3 | |
25 | .else | 26 | .else | |
26 | GCC_REQD+= 4.2.1 | 27 | GCC_REQD+= 4.2.1 | |
27 | .endif | 28 | .endif | |
28 | 29 | |||
29 | # configure check is fooled by trap & emulate of unaligned access on alpha | 30 | # configure check is fooled by trap & emulate of unaligned access on alpha | |
30 | .if (${MACHINE_ARCH} == "alpha") | 31 | .if (${MACHINE_ARCH} == "alpha") | |
31 | CONFIGURE_ARGS+= --enable-aligned | 32 | CONFIGURE_ARGS+= --enable-aligned | |
32 | .endif | 33 | .endif | |
33 | 34 | |||
34 | .if !empty(OPSYS:M*BSD) || ${OPSYS} == "DragonFly" || ${OPSYS} == "Darwin" | 35 | .if !empty(OPSYS:M*BSD) || ${OPSYS} == "DragonFly" || ${OPSYS} == "Darwin" | |
35 | CONFIGURE_ARGS+= --with-kqueue | 36 | CONFIGURE_ARGS+= --with-kqueue | |
36 | .endif | 37 | .endif | |
37 | 38 | |||
38 | .include "../../mk/compiler.mk" | 39 | .include "../../mk/compiler.mk" | |
39 | 40 | |||
40 | # See http://libtorrent.rakshasa.no/ticket/96 | 41 | # See http://libtorrent.rakshasa.no/ticket/96 | |
41 | .if !empty(CC_VERSION:Mgcc-4.*) | 42 | .if !empty(CC_VERSION:Mgcc-4.*) | |
42 | CXXFLAGS+= -fpermissive -fno-strength-reduce -fno-thread-jumps \ | 43 | CXXFLAGS+= -fpermissive -fno-strength-reduce -fno-thread-jumps \ | |
43 | -fno-inline -fforce-addr | 44 | -fno-inline -fforce-addr | |
44 | .endif | 45 | .endif | |
45 | 46 | |||
46 | .include "../../security/openssl/buildlink3.mk" | 47 | .include "../../security/openssl/buildlink3.mk" | |
47 | .if !exists(${BUILDLINK_PREFIX.openssl}/lib/pkgconfig/openssl.pc) | 48 | .if !exists(${BUILDLINK_PREFIX.openssl}/lib/pkgconfig/openssl.pc) | |
48 | OPENSSL_CFLAGS= -I${BUILDLINK_PREFIX.openssl}/include | 49 | OPENSSL_CFLAGS= -I${BUILDLINK_PREFIX.openssl}/include | |
49 | OPENSSL_LIBS= -L${BUILDLINK_PREFIX.openssl}/lib \ | 50 | OPENSSL_LIBS= -L${BUILDLINK_PREFIX.openssl}/lib \ | |
50 | -W,-lR${BUILDLINK_PREFIX.openssl}/lib | 51 | -W,-lR${BUILDLINK_PREFIX.openssl}/lib | |
51 | 52 | |||
52 | CONFIGURE_ENV+= OPENSSL_CFLAGS=${OPENSSL_CFLAGS:Q} | 53 | CONFIGURE_ENV+= OPENSSL_CFLAGS=${OPENSSL_CFLAGS:Q} | |
53 | CONFIGURE_ENV+= OPENSSL_LIBS=${OPENSSL_LIBS:Q} | 54 | CONFIGURE_ENV+= OPENSSL_LIBS=${OPENSSL_LIBS:Q} | |
54 | .endif | 55 | .endif | |
55 | 56 | |||
56 | .include "../../devel/libsigc++/buildlink3.mk" | 57 | .include "../../devel/libsigc++/buildlink3.mk" | |
57 | .include "../../mk/bsd.pkg.mk" | 58 | .include "../../mk/bsd.pkg.mk" |
@@ -1,59 +1,60 @@ | @@ -1,59 +1,60 @@ | |||
1 | # $NetBSD: Makefile,v 1.46 2011/11/07 13:10:31 hans Exp $ | 1 | # $NetBSD: Makefile,v 1.47 2012/01/11 22:41:46 tron Exp $ | |
2 | 2 | |||
3 | DISTNAME= rtorrent-0.8.9 | 3 | DISTNAME= rtorrent-0.8.9 | |
4 | PKGREVISION= 2 | 4 | PKGREVISION= 2 | |
5 | CATEGORIES= net | 5 | CATEGORIES= net | |
6 | MASTER_SITES= ${HOMEPAGE:=downloads/} | 6 | MASTER_SITES= ${HOMEPAGE:=downloads/} | |
7 | 7 | |||
8 | OWNER= tron@NetBSD.org | 8 | OWNER= tron@NetBSD.org | |
9 | HOMEPAGE= http://libtorrent.rakshasa.no/ | 9 | HOMEPAGE= http://libtorrent.rakshasa.no/ | |
10 | COMMENT= Ncurses based torrent client with support for sessions | 10 | COMMENT= Ncurses based torrent client with support for sessions | |
11 | LICENSE= gnu-gpl-v2 | 11 | LICENSE= gnu-gpl-v2 | |
12 | 12 | |||
13 | PKG_DESTDIR_SUPPORT= user-destdir | 13 | PKG_DESTDIR_SUPPORT= user-destdir | |
14 | 14 | |||
15 | USE_LANGUAGES= c c++ | 15 | USE_LANGUAGES= c c++ | |
16 | USE_LIBTOOL= yes | 16 | USE_LIBTOOL= yes | |
17 | USE_NCURSES= yes # chgat | 17 | USE_NCURSES= yes # chgat | |
18 | USE_TOOLS+= gmake pkg-config | 18 | USE_TOOLS+= gmake pkg-config | |
19 | GNU_CONFIGURE= yes | 19 | GNU_CONFIGURE= yes | |
20 | 20 | |||
21 | .include "../../mk/bsd.prefs.mk" | 21 | .include "../../mk/bsd.prefs.mk" | |
22 | .if ${MACHINE_ARCH} == "alpha" || \ | 22 | .if ${MACHINE_ARCH} == "alpha" || \ | |
23 | ${MACHINE_ARCH} == "i386" || \ | 23 | ${MACHINE_ARCH} == "i386" || \ | |
24 | ${MACHINE_ARCH} == "powerpc" || \ | |||
24 | ${MACHINE_ARCH} == "x86_64" | 25 | ${MACHINE_ARCH} == "x86_64" | |
25 | GCC_REQD+= 3.3 | 26 | GCC_REQD+= 4.1.3 | |
26 | .else | 27 | .else | |
27 | GCC_REQD+= 4.2.1 | 28 | GCC_REQD+= 4.2.1 | |
28 | .endif | 29 | .endif | |
29 | 30 | |||
30 | .include "../../mk/pthread.buildlink3.mk" | 31 | .include "../../mk/pthread.buildlink3.mk" | |
31 | LDFLAGS+= ${PTHREAD_LDFLAGS} | 32 | LDFLAGS+= ${PTHREAD_LDFLAGS} | |
32 | 33 | |||
33 | .include "options.mk" | 34 | .include "options.mk" | |
34 | 35 | |||
35 | .if !empty(OPSYS:M*BSD) || ${OPSYS} == "Darwin" || ${OPSYS} == "DragonFly" | 36 | .if !empty(OPSYS:M*BSD) || ${OPSYS} == "Darwin" || ${OPSYS} == "DragonFly" | |
36 | MESSAGE_SRC= ${PKGDIR}/MESSAGE.BSD | 37 | MESSAGE_SRC= ${PKGDIR}/MESSAGE.BSD | |
37 | .endif | 38 | .endif | |
38 | 39 | |||
39 | # See http://libtorrent.rakshasa.no/ticket/77 | 40 | # See http://libtorrent.rakshasa.no/ticket/77 | |
40 | .include "../../mk/compiler.mk" | 41 | .include "../../mk/compiler.mk" | |
41 | .if !empty(CC_VERSION:Mgcc-4.0.*) | 42 | .if !empty(CC_VERSION:Mgcc-4.0.*) | |
42 | CXXFLAGS+= -fpermissive -fno-strength-reduce -fno-thread-jumps \ | 43 | CXXFLAGS+= -fpermissive -fno-strength-reduce -fno-thread-jumps \ | |
43 | -fno-inline -fforce-addr | 44 | -fno-inline -fforce-addr | |
44 | .endif | 45 | .endif | |
45 | 46 | |||
46 | .if !empty(CC_VERSION:Mgcc-*) && !empty(MACHINE_ARCH:Mi?86) | 47 | .if !empty(CC_VERSION:Mgcc-*) && !empty(MACHINE_ARCH:Mi?86) | |
47 | CXXFLAGS+= -march=i486 | 48 | CXXFLAGS+= -march=i486 | |
48 | .endif | 49 | .endif | |
49 | 50 | |||
50 | INSTALLATION_DIRS= share/examples/rtorrent | 51 | INSTALLATION_DIRS= share/examples/rtorrent | |
51 | 52 | |||
52 | post-install: | 53 | post-install: | |
53 | ${INSTALL_DATA} ${WRKSRC}/doc/rtorrent.rc \ | 54 | ${INSTALL_DATA} ${WRKSRC}/doc/rtorrent.rc \ | |
54 | ${DESTDIR}${PREFIX}/share/examples/rtorrent | 55 | ${DESTDIR}${PREFIX}/share/examples/rtorrent | |
55 | 56 | |||
56 | .include "../../devel/ncurses/buildlink3.mk" | 57 | .include "../../devel/ncurses/buildlink3.mk" | |
57 | .include "../../net/libtorrent/buildlink3.mk" | 58 | .include "../../net/libtorrent/buildlink3.mk" | |
58 | .include "../../www/curl/buildlink3.mk" | 59 | .include "../../www/curl/buildlink3.mk" | |
59 | .include "../../mk/bsd.pkg.mk" | 60 | .include "../../mk/bsd.pkg.mk" |