From owner-svn-ports-all@freebsd.org Fri Jan 1 12:24:01 2021 Return-Path: Delivered-To: svn-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D493D4C73E8; Fri, 1 Jan 2021 12:24:01 +0000 (UTC) (envelope-from danfe@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D6khx5cv0z4msN; Fri, 1 Jan 2021 12:24:01 +0000 (UTC) (envelope-from danfe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B3BA422844; Fri, 1 Jan 2021 12:24:01 +0000 (UTC) (envelope-from danfe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 101CO1hu084259; Fri, 1 Jan 2021 12:24:01 GMT (envelope-from danfe@FreeBSD.org) Received: (from danfe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 101CO1J5084257; Fri, 1 Jan 2021 12:24:01 GMT (envelope-from danfe@FreeBSD.org) Message-Id: <202101011224.101CO1J5084257@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: danfe set sender to danfe@FreeBSD.org using -f From: Alexey Dokuchaev Date: Fri, 1 Jan 2021 12:24:01 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r559826 - in head/net-p2p/linuxdcpp: . files X-SVN-Group: ports-head X-SVN-Commit-Author: danfe X-SVN-Commit-Paths: in head/net-p2p/linuxdcpp: . files X-SVN-Commit-Revision: 559826 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Jan 2021 12:24:01 -0000 Author: danfe Date: Fri Jan 1 12:24:00 2021 New Revision: 559826 URL: https://svnweb.freebsd.org/changeset/ports/559826 Log: - Convert to modern Python, take maintainership - Drop currently not useful `post-patch' target - Add `cairo' to USE_GNOME per stage Q/A report Modified: head/net-p2p/linuxdcpp/Makefile head/net-p2p/linuxdcpp/files/patch-SConstruct Modified: head/net-p2p/linuxdcpp/Makefile ============================================================================== --- head/net-p2p/linuxdcpp/Makefile Fri Jan 1 11:45:05 2021 (r559825) +++ head/net-p2p/linuxdcpp/Makefile Fri Jan 1 12:24:00 2021 (r559826) @@ -6,7 +6,7 @@ PORTREVISION= 17 CATEGORIES= net-p2p MASTER_SITES= http://launchpadlibrarian.net/69733951/ -MAINTAINER= ports@FreeBSD.org +MAINTAINER= danfe@FreeBSD.org COMMENT= Port of the DC++ Direct Connect client to Unix-like systems LICENSE= GPLv2+ @@ -15,8 +15,8 @@ LICENSE_FILE= ${WRKSRC}/License.txt BUILD_DEPENDS= ${LOCALBASE}/include/boost/version.hpp:devel/boost-libs USES= compiler:c++11-lang gettext gnome iconv localbase:ldflags \ - pkgconfig scons:python2 ssl tar:bzip2 -USE_GNOME= libglade2 + pkgconfig scons ssl tar:bzip2 +USE_GNOME= cairo libglade2 INSTALLS_ICONS= yes PORTDOCS= * DESTDIRNAME= FAKE_ROOT @@ -30,11 +30,6 @@ NOTIFY_MAKE_ARGS_OFF= libnotify=0 .if defined(WITH_DEBUG) MAKE_ARGS+= debug=1 .endif - -post-patch: - @${REINPLACE_CMD} -e "s/'iconv'/'${ICONV_LIB:S/-l//}'/" \ - ${WRKSRC}/SConstruct - @${REINPLACE_CMD} -e 's|g++|${CXX}|' ${WRKSRC}/SConstruct post-install: @${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/${PORTNAME} Modified: head/net-p2p/linuxdcpp/files/patch-SConstruct ============================================================================== --- head/net-p2p/linuxdcpp/files/patch-SConstruct Fri Jan 1 11:45:05 2021 (r559825) +++ head/net-p2p/linuxdcpp/files/patch-SConstruct Fri Jan 1 12:24:00 2021 (r559826) @@ -1,5 +1,21 @@ --- SConstruct.orig 2011-04-17 17:57:09 UTC +++ SConstruct +@@ -2,13 +2,13 @@ + # -*- coding: utf-8 -*- + + import os +-import commands ++import subprocess as commands + import string + + try: + from bzrlib import branch + except ImportError: +- print "bzrlib not installed" ++ print("bzrlib not installed") + + EnsureSConsVersion(0, 98, 1) + @@ -20,7 +20,7 @@ BUILD_LOCALE_PATH = BUILD_PATH + 'locale/' BUILD_FLAGS = { 'common' : ['-I#', '-D_GNU_SOURCE', '-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_BITS=64', '-D_REENTRANT'], @@ -9,6 +25,24 @@ } # ---------------------------------------------------------------------- +@@ -49,7 +49,7 @@ def check_cxx_version(context, name, major, minor): + or (string.atoi(ret[0]) > major)): + retval = 1 + except ValueError: +- print "No C++ compiler found!" ++ print("No C++ compiler found!") + + context.Result(retval) + return retval +@@ -62,7 +62,7 @@ def check_bzr_revision(context): + b = branch.Branch.open('.') + revision = str(b.revno()) + except: +- print "failed" ++ print("failed") + + context.env['BZR_REVISION'] = revision + context.Result(revision) @@ -106,6 +106,7 @@ else: vars.AddVariables( BoolVariable('debug', 'Compile the program with debug information', 0), @@ -17,32 +51,48 @@ 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', '') -@@ -131,14 +132,23 @@ if os.environ.has_key('CC'): +@@ -121,24 +122,33 @@ env = Environment(ENV = os.environ, variables = vars, + env['mode'] = 'debug' if env.get('debug') else 'release' + env['build_path'] = BUILD_PATH + env['mode'] + '/' + +-if os.environ.has_key('CXX'): ++if 'CXX' in os.environ: + env['CXX'] = os.environ['CXX'] + else: +- print 'CXX env variable is not set, attempting to use g++' ++ print('CXX env variable is not set, attempting to use g++') + env['CXX'] = 'g++' + +-if os.environ.has_key('CC'): ++if 'CC' in os.environ: env['CC'] = os.environ['CC'] - if os.environ.has_key('CXXFLAGS'): +-if os.environ.has_key('CXXFLAGS'): - env['CPPFLAGS'] = env['CXXFLAGS'] = os.environ['CXXFLAGS'].split() ++if 'CXXFLAGS' in os.environ: + env['CXXFLAGS'] = os.environ['CXXFLAGS'].split() -+if os.environ.has_key('CPPFLAGS'): +-if os.environ.has_key('LDFLAGS'): ++if 'CPPFLAGS' in os.environ: + env['CPPFLAGS'] = os.environ['CPPFLAGS'].split() + - if os.environ.has_key('LDFLAGS'): ++if 'LDFLAGS' in os.environ: env['LINKFLAGS'] = os.environ['LDFLAGS'].split() - if os.environ.has_key('CFLAGS'): +-if os.environ.has_key('CFLAGS'): ++if 'CFLAGS' in os.environ: env['CFLAGS'] = os.environ['CFLAGS'].split() -+if os.environ.has_key('CPPPATH'): ++if 'CPPPATH' in os.environ: + env['CPPPATH'] = os.environ['CPPPATH'].split() + -+if os.environ.has_key('LIBPATH'): ++if 'LIBPATH' in os.environ: + env['LIBPATH'] = os.environ['LIBPATH'].split() + env['CPPDEFINES'] = [] # Initialize as a list so Append doesn't concat strings env.SConsignFile('build/sconf/.sconsign') -@@ -185,10 +195,6 @@ conf = env.Configure( +@@ -185,33 +195,29 @@ conf = env.Configure( if not 'install' in COMMAND_LINE_TARGETS: @@ -51,10 +101,85 @@ - Exit(1) - if not conf.CheckPKGConfig(): - print '\tpkg-config not found.' +- print '\tpkg-config not found.' ++ print('\tpkg-config not found.') Exit(1) -@@ -256,21 +262,20 @@ if not 'install' in COMMAND_LINE_TARGETS: + if not conf.CheckPKG('gtk+-2.0 >= 2.12'): +- print '\tgtk+ >= 2.12 not found.' +- print '\tNote: You might have the lib but not the headers' ++ print('\tgtk+ >= 2.12 not found.') ++ print('\tNote: You might have the lib but not the headers') + Exit(1) + + if not conf.CheckPKG('gthread-2.0 >= 2.4'): +- print '\tgthread >= 2.4 not found.' +- print '\tNote: You might have the lib but not the headers' ++ print('\tgthread >= 2.4 not found.') ++ print('\tNote: You might have the lib but not the headers') + Exit(1) + + if not conf.CheckPKG('libglade-2.0 >= 2.4'): +- print '\tlibglade-2.0 >= 2.4 not found.' +- print '\tNote: You might have the lib but not the headers' ++ print('\tlibglade-2.0 >= 2.4 not found.') ++ print('\tNote: You might have the lib but not the headers') + Exit(1) + + + if not conf.CheckCXXHeader('boost/version.hpp', '<>'): +- print '\tboost not found.' +- print '\tNote: You might have the lib but not the headers' ++ print('\tboost not found.') ++ print('\tNote: You might have the lib but not the headers') + Exit(1) + + if not conf.CheckHeader('time.h'): +@@ -224,53 +230,52 @@ if not 'install' in COMMAND_LINE_TARGETS: + Exit(1) + + if not conf.CheckLibWithHeader('pthread', 'pthread.h', 'c'): +- print '\tpthread library not found' +- print '\tNote: You might have the lib but not the headers' ++ print('\tpthread library not found') ++ print('\tNote: You might have the lib but not the headers') + Exit(1) + + if not conf.CheckLibWithHeader('z', 'zlib.h', 'c'): +- print '\tz library (gzip/z compression) not found' +- print '\tNote: You might have the lib but not the headers' ++ print('\tz library (gzip/z compression) not found') ++ print('\tNote: You might have the lib but not the headers') + Exit(1) + + if not conf.CheckLibWithHeader('bz2', 'bzlib.h', 'c'): +- print '\tbz2 library (bz2 compression) not found' +- print '\tNote: You might have the lib but not the headers' ++ print('\tbz2 library (bz2 compression) not found') ++ print('\tNote: You might have the lib but not the headers') + Exit(1) + + # This needs to be before ssl check on *BSD systems + if not conf.CheckLib('crypto'): +- print '\tcrypto library not found' +- print '\tNote: This library may be a part of libssl on your system' ++ print('\tcrypto library not found') ++ print('\tNote: This library may be a part of libssl on your system') + Exit(1) + + if not conf.CheckLibWithHeader('ssl', 'openssl/ssl.h', 'c'): +- print '\tOpenSSL library (libssl) not found' +- print '\tNote: You might have the lib but not the headers' ++ print('\tOpenSSL library (libssl) not found') ++ print('\tNote: You might have the lib but not the headers') + Exit(1) + + # Needed for XFlush(). Headers shouldn't be needed since we include gdk/gdkx.h + if not conf.CheckLib('X11'): +- print '\tX11 library not found' ++ print('\tX11 library not found') + Exit(1) + if not conf.CheckHeader('iconv.h'): Exit(1) - elif conf.CheckLibWithHeader('iconv', 'iconv.h', 'c', 'iconv(0, (const char **)0, 0, (char**)0, 0);'): @@ -74,8 +199,8 @@ - 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' ++ 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')