From owner-dev-commits-ports-main@freebsd.org Wed May 26 15:08:32 2021 Return-Path: Delivered-To: dev-commits-ports-main@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 EC00663F8F4; Wed, 26 May 2021 15:08:32 +0000 (UTC) (envelope-from git@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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FqvTr0R4kz3PyZ; Wed, 26 May 2021 15:08:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DF1941328D; Wed, 26 May 2021 15:08:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 14QF8Vq4009917; Wed, 26 May 2021 15:08:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 14QF8VWn009916; Wed, 26 May 2021 15:08:31 GMT (envelope-from git) Date: Wed, 26 May 2021 15:08:31 GMT Message-Id: <202105261508.14QF8VWn009916@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Dmitry Marakasov Subject: git: 4c690987cad8 - main - chinese/sunpinyin: fix build with python3 scons MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: amdmi3 X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4c690987cad8a48974cc94682c2543c99495101e Auto-Submitted: auto-generated X-BeenThere: dev-commits-ports-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the main branch of the FreeBSD ports repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 May 2021 15:08:33 -0000 The branch main has been updated by amdmi3: URL: https://cgit.FreeBSD.org/ports/commit/?id=4c690987cad8a48974cc94682c2543c99495101e commit 4c690987cad8a48974cc94682c2543c99495101e Author: Dmitry Marakasov AuthorDate: 2021-05-26 14:27:25 +0000 Commit: Dmitry Marakasov CommitDate: 2021-05-26 15:05:36 +0000 chinese/sunpinyin: fix build with python3 scons Approved by: portmgr blanket --- chinese/sunpinyin/Makefile | 2 +- chinese/sunpinyin/files/patch-SConstruct | 23 ++++++++++++++++++++--- chinese/sunpinyin/files/patch-src_SConscript | 11 +++++++++++ 3 files changed, 32 insertions(+), 4 deletions(-) diff --git a/chinese/sunpinyin/Makefile b/chinese/sunpinyin/Makefile index d1653b64a375..238cf87beb5d 100644 --- a/chinese/sunpinyin/Makefile +++ b/chinese/sunpinyin/Makefile @@ -18,7 +18,7 @@ NOT_FOR_ARCHS_REASON= ./config.h:119:3: can not detect the endianness! LIB_DEPENDS= libsqlite3.so:databases/sqlite3 -USES= gmake iconv perl5 pkgconfig python:2.7 scons:python2 shebangfix +USES= gmake iconv perl5 pkgconfig python:2.7 scons shebangfix USE_GITHUB= yes GH_TAGNAME= a8bd811 diff --git a/chinese/sunpinyin/files/patch-SConstruct b/chinese/sunpinyin/files/patch-SConstruct index ffd859c026ff..561817e520f1 100644 --- a/chinese/sunpinyin/files/patch-SConstruct +++ b/chinese/sunpinyin/files/patch-SConstruct @@ -1,6 +1,14 @@ --- SConstruct.orig 2014-11-14 14:17:48 UTC +++ SConstruct -@@ -215,10 +215,11 @@ def CreateEnvironment(): +@@ -1,6 +1,7 @@ + import platform + import os + import sys ++from functools import reduce + + + version = "2.0.4" +@@ -215,10 +216,11 @@ def CreateEnvironment(): make = 'gmake' tar = 'gtar' libln_builder = Builder(action='cd ${TARGET.dir} && ln -s ${SOURCE.name} ${TARGET.name}') @@ -15,7 +23,16 @@ env.Append(BUILDERS={'InstallAsSymlink': libln_builder}) env['ENDIANNESS'] = "be" if sys.byteorder == "big" else "le" return env -@@ -375,7 +376,6 @@ def DoConfigure(): +@@ -227,7 +229,7 @@ def CreateEnvironment(): + def PassVariables(envvar, env): + for (x, y) in envvar: + if x in os.environ: +- print 'Warning: you\'ve set %s in the environmental variable!' % x ++ print('Warning: you\'ve set %s in the environmental variable!' % x) + env[y] = os.environ[x] + + env = CreateEnvironment() +@@ -375,7 +377,6 @@ def DoConfigure(): conf.CheckFunc('getopt_long') conf.CheckFunc('getpagesize') conf.CheckFunc('get_opt') @@ -23,7 +40,7 @@ conf.CheckCHeader('inttypes.h') conf.CheckCHeader('locale.h') conf.CheckCHeader('libintl.h') -@@ -463,7 +463,7 @@ def DoInstall(): +@@ -463,7 +464,7 @@ def DoInstall(): lib_target_bin), ] diff --git a/chinese/sunpinyin/files/patch-src_SConscript b/chinese/sunpinyin/files/patch-src_SConscript new file mode 100644 index 000000000000..b579ebd107b8 --- /dev/null +++ b/chinese/sunpinyin/files/patch-src_SConscript @@ -0,0 +1,11 @@ +--- src/SConscript.orig 2014-11-14 14:17:48 UTC ++++ src/SConscript +@@ -53,7 +53,7 @@ env.Substfile('sunpinyin-dictgen.mk.in', SUBST_DICT={ + }) + env.Command('sunpinyin-dictgen', 'sunpinyin-dictgen.mk', [ + Copy("$TARGET", "$SOURCE"), +- Chmod("$TARGET", 0755), ++ Chmod("$TARGET", 0o755), + ]) + + # -*- indent-tabs-mode: nil -*- vim:et:ts=4