diff options
author | tijl <tijl@FreeBSD.org> | 2013-10-25 01:31:54 +0800 |
---|---|---|
committer | tijl <tijl@FreeBSD.org> | 2013-10-25 01:31:54 +0800 |
commit | 7a8c065bd0a7f927f8813c896e670ce17b184297 (patch) | |
tree | b60d4d8a381ecf46b9f52468becf9c927567e8f7 /net-p2p | |
parent | 6a4f8b05f5d36541aae6a01ba42cfcd394abe936 (diff) | |
download | freebsd-ports-gnome-7a8c065bd0a7f927f8813c896e670ce17b184297.tar.gz freebsd-ports-gnome-7a8c065bd0a7f927f8813c896e670ce17b184297.tar.zst freebsd-ports-gnome-7a8c065bd0a7f927f8813c896e670ce17b184297.zip |
- Fix build on FreeBSD 10 (iconv, libc++).
- USES=scons.
- Add support for startup notifications.
PR: ports/183163
Submitted by: Vladimir Kondratiev <wulf@mail.mipt.ru>
Diffstat (limited to 'net-p2p')
-rw-r--r-- | net-p2p/linuxdcpp/Makefile | 26 | ||||
-rw-r--r-- | net-p2p/linuxdcpp/files/patch-SConstruct | 33 | ||||
-rw-r--r-- | net-p2p/linuxdcpp/files/patch-libc++ | 64 |
3 files changed, 115 insertions, 8 deletions
diff --git a/net-p2p/linuxdcpp/Makefile b/net-p2p/linuxdcpp/Makefile index a68a0216c2ea..95861188c583 100644 --- a/net-p2p/linuxdcpp/Makefile +++ b/net-p2p/linuxdcpp/Makefile @@ -2,12 +2,12 @@ PORTNAME= linuxdcpp PORTVERSION= 1.1.0 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= net-p2p MASTER_SITES= http://launchpadlibrarian.net/69733951/ MAINTAINER= ports@FreeBSD.org -COMMENT= A port of the DC++ Direct Connect client to Unix-like systems +COMMENT= Port of the DC++ Direct Connect client to Unix-like systems LICENSE= GPLv2 @@ -15,16 +15,28 @@ BUILD_DEPENDS= ${LOCALBASE}/include/boost/version.hpp:${PORTSDIR}/devel/boost-li USE_BZIP2= yes USE_GNOME= libglade2 -USES= iconv pkgconfig -USE_SCONS= yes +USES= iconv pkgconfig scons USE_OPENSSL= yes PORTDOCS= * +DESTDIRNAME= FAKE_ROOT -SCONS_BUILDENV= ${SCONS_ENV} +OPTIONS_DEFINE= NOTIFY +OPTIONS_DEFAULT=NOTIFY .if defined(WITH_DEBUG) -SCONS_ARGS= debug=1 +MAKE_ARGS+= debug=1 .endif -NO_STAGE= yes +.include <bsd.port.options.mk> + +.if ${PORT_OPTIONS:MNOTIFY} +LIB_DEPENDS+= libnotify.so:${PORTSDIR}/devel/libnotify +.else +MAKE_ARGS+= libnotify=0 +.endif + +post-patch: + @${REINPLACE_CMD} -e "s/'iconv'/'${ICONV_LIB:S/-l//}'/" \ + ${WRKSRC}/SConstruct + .include <bsd.port.mk> diff --git a/net-p2p/linuxdcpp/files/patch-SConstruct b/net-p2p/linuxdcpp/files/patch-SConstruct index 180836446633..360a88eeced2 100644 --- a/net-p2p/linuxdcpp/files/patch-SConstruct +++ b/net-p2p/linuxdcpp/files/patch-SConstruct @@ -9,7 +9,15 @@ } # ---------------------------------------------------------------------- -@@ -139,6 +139,12 @@ +@@ -106,6 +106,7 @@ + vars.AddVariables( + BoolVariable('debug', 'Compile the program with debug information', 0), + BoolVariable('release', 'Compile the program with optimizations', 0), ++ BoolVariable('libnotify', 'Enable notifications through libnotify', 1), + BoolVariable('profile', 'Compile the program with profiling information', 0), + PathVariable('PREFIX', 'Compile the program with PREFIX as the root for installation', '/usr/local', PathVariable.PathIsDir), + ('FAKE_ROOT', 'Make scons install the program under a fake root', '') +@@ -139,6 +140,12 @@ if os.environ.has_key('CFLAGS'): env['CFLAGS'] = os.environ['CFLAGS'].split() @@ -22,3 +30,26 @@ env['CPPDEFINES'] = [] # Initialize as a list so Append doesn't concat strings env.SConsignFile('build/sconf/.sconsign') +@@ -263,14 +270,15 @@ + conf.env.Append(CPPDEFINES = 'HAVE_IFADDRS_H') + + # TODO: Implement a plugin system so libnotify doesn't have compile-time dependencies +- if not conf.CheckPKG('libnotify >= 0.4.1'): +- print '\tlibnotify >= 0.4.1 not found, disabling notifications.' +- print '\tNote: You might have the lib but not the headers' +- else: +- conf.env.Append(CPPDEFINES = 'HAVE_LIBNOTIFY') +- conf.env.ParseConfig('pkg-config --libs libnotify') +- if conf.CheckPKG('libnotify >= 0.7'): +- conf.env.Append(CPPDEFINES = 'HAVE_LIBNOTIFY_0_7') ++ if conf.env.get('libnotify'): ++ if not conf.CheckPKG('libnotify >= 0.4.1'): ++ print '\tlibnotify >= 0.4.1 not found, disabling notifications.' ++ print '\tNote: You might have the lib but not the headers' ++ else: ++ conf.env.Append(CPPDEFINES = 'HAVE_LIBNOTIFY') ++ conf.env.ParseConfig('pkg-config --libs libnotify') ++ if conf.CheckPKG('libnotify >= 0.7'): ++ conf.env.Append(CPPDEFINES = 'HAVE_LIBNOTIFY_0_7') + + conf.CheckBZRRevision() diff --git a/net-p2p/linuxdcpp/files/patch-libc++ b/net-p2p/linuxdcpp/files/patch-libc++ new file mode 100644 index 000000000000..97091c88b6d9 --- /dev/null +++ b/net-p2p/linuxdcpp/files/patch-libc++ @@ -0,0 +1,64 @@ +--- dcpp/stdinc.h.orig ++++ dcpp/stdinc.h +@@ -123,7 +123,7 @@ + #include <boost/scoped_array.hpp> + #include <boost/noncopyable.hpp> + +-#if defined(_MSC_VER) || defined(_STLPORT_VERSION) ++#if defined(_MSC_VER) || defined(_STLPORT_VERSION) || defined(_LIBCPP_VERSION) + + #include <unordered_map> + #include <unordered_set> +@@ -139,5 +139,8 @@ + ++#ifdef _LIBCPP_VERSION ++namespace std { namespace tr1 { using namespace std; }} ++#endif + namespace dcpp { + using namespace std; + using namespace std::tr1; + } +--- dcpp/CID.h.orig 2011-04-17 21:57:09.000000000 +0400 ++++ dcpp/CID.h 2013-09-13 00:50:16.544145469 +0400 +@@ -57,7 +57,10 @@ + + } // namespace dcpp + +-namespace std { namespace tr1 { ++namespace std { ++#ifndef _LIBCPP_VERSION ++namespace tr1 { ++#endif + template<> + struct hash<dcpp::CID> { + size_t operator()(const dcpp::CID& rhs) const { +@@ -65,6 +68,8 @@ + } + }; ++#ifndef _LIBCPP_VERSION + } ++#endif + } + + #endif // !defined(CID_H) +--- dcpp/HashValue.h.orig 2011-04-17 21:57:09.000000000 +0400 ++++ dcpp/HashValue.h 2013-09-13 00:48:18.173057104 +0400 +@@ -46,12 +46,17 @@ + + } // namespace dcpp + +-namespace std { namespace tr1 { ++namespace std { ++#ifndef _LIBCPP_VERSION ++namespace tr1 { ++#endif + template<typename T> + struct hash<dcpp::HashValue<T> > { + size_t operator()(const dcpp::HashValue<T>& rhs) const { return *(size_t*)rhs.data; } + }; ++#ifndef _LIBCPP_VERSION + } ++#endif + } + + #endif // !defined(HASH_VALUE_H) |