From owner-svn-ports-head@FreeBSD.ORG Thu Oct 24 17:31:56 2013 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 07784D78; Thu, 24 Oct 2013 17:31:56 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DA9822DD8; Thu, 24 Oct 2013 17:31:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r9OHVtYl064103; Thu, 24 Oct 2013 17:31:55 GMT (envelope-from tijl@svn.freebsd.org) Received: (from tijl@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r9OHVtUK064100; Thu, 24 Oct 2013 17:31:55 GMT (envelope-from tijl@svn.freebsd.org) Message-Id: <201310241731.r9OHVtUK064100@svn.freebsd.org> From: Tijl Coosemans Date: Thu, 24 Oct 2013 17:31:55 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r331503 - in head/net-p2p/linuxdcpp: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Oct 2013 17:31:56 -0000 Author: tijl Date: Thu Oct 24 17:31:54 2013 New Revision: 331503 URL: http://svnweb.freebsd.org/changeset/ports/331503 Log: - Fix build on FreeBSD 10 (iconv, libc++). - USES=scons. - Add support for startup notifications. PR: ports/183163 Submitted by: Vladimir Kondratiev Added: head/net-p2p/linuxdcpp/files/patch-libc++ (contents, props changed) Modified: head/net-p2p/linuxdcpp/Makefile head/net-p2p/linuxdcpp/files/patch-SConstruct (contents, props changed) Modified: head/net-p2p/linuxdcpp/Makefile ============================================================================== --- head/net-p2p/linuxdcpp/Makefile Thu Oct 24 17:27:26 2013 (r331502) +++ head/net-p2p/linuxdcpp/Makefile Thu Oct 24 17:31:54 2013 (r331503) @@ -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/boos 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 + +.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 Modified: head/net-p2p/linuxdcpp/files/patch-SConstruct ============================================================================== --- head/net-p2p/linuxdcpp/files/patch-SConstruct Thu Oct 24 17:27:26 2013 (r331502) +++ head/net-p2p/linuxdcpp/files/patch-SConstruct Thu Oct 24 17:31:54 2013 (r331503) @@ -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() Added: head/net-p2p/linuxdcpp/files/patch-libc++ ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-p2p/linuxdcpp/files/patch-libc++ Thu Oct 24 17:31:54 2013 (r331503) @@ -0,0 +1,64 @@ +--- dcpp/stdinc.h.orig ++++ dcpp/stdinc.h +@@ -123,7 +123,7 @@ + #include + #include + +-#if defined(_MSC_VER) || defined(_STLPORT_VERSION) ++#if defined(_MSC_VER) || defined(_STLPORT_VERSION) || defined(_LIBCPP_VERSION) + + #include + #include +@@ -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 { + 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 + struct hash > { + size_t operator()(const dcpp::HashValue& rhs) const { return *(size_t*)rhs.data; } + }; ++#ifndef _LIBCPP_VERSION + } ++#endif + } + + #endif // !defined(HASH_VALUE_H)