From owner-svn-ports-head@freebsd.org Wed Jan 29 19:13:35 2020 Return-Path: Delivered-To: svn-ports-head@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 DDDC61FA296; Wed, 29 Jan 2020 19:13:35 +0000 (UTC) (envelope-from sunpoet@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) server-signature RSA-PSS (4096 bits) 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 487CnW5CTrz401B; Wed, 29 Jan 2020 19:13:35 +0000 (UTC) (envelope-from sunpoet@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 7E9D918E26; Wed, 29 Jan 2020 19:13:35 +0000 (UTC) (envelope-from sunpoet@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 00TJDZRF014193; Wed, 29 Jan 2020 19:13:35 GMT (envelope-from sunpoet@FreeBSD.org) Received: (from sunpoet@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 00TJDYx1014188; Wed, 29 Jan 2020 19:13:34 GMT (envelope-from sunpoet@FreeBSD.org) Message-Id: <202001291913.00TJDYx1014188@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sunpoet set sender to sunpoet@FreeBSD.org using -f From: Sunpoet Po-Chuan Hsieh Date: Wed, 29 Jan 2020 19:13:34 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r524568 - in head: . converters converters/py-zfec converters/py-zfec/files X-SVN-Group: ports-head X-SVN-Commit-Author: sunpoet X-SVN-Commit-Paths: in head: . converters converters/py-zfec converters/py-zfec/files X-SVN-Commit-Revision: 524568 X-SVN-Commit-Repository: ports 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.29 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: Wed, 29 Jan 2020 19:13:36 -0000 Author: sunpoet Date: Wed Jan 29 19:13:34 2020 New Revision: 524568 URL: https://svnweb.freebsd.org/changeset/ports/524568 Log: Readd py-zfec 1.5.3 - Fix LICENSE - Fix RUN_DEPENDS - Relax USES=python by removing pyutil dependency - Bump PORTREVISION for dependency change - Take maintainership Obtained from: https://github.com/tahoe-lafs/zfec/commit/0441f248ffec150c9c27191b0b7a69a7364a5e7c https://github.com/tahoe-lafs/zfec/commit/7d159d3b6ebb28417b333b89b11c0d88cc069568 https://github.com/tahoe-lafs/zfec/commit/819ca0443fc71e33e61226aef9b0b3fd1a93dd41 Added: head/converters/py-zfec/ - copied from r524262, head/converters/py-zfec/ head/converters/py-zfec/files/ head/converters/py-zfec/files/patch-setup.py (contents, props changed) head/converters/py-zfec/files/patch-zfec-filefec.py (contents, props changed) Modified: head/MOVED head/converters/Makefile head/converters/py-zfec/Makefile Modified: head/MOVED ============================================================================== --- head/MOVED Wed Jan 29 19:13:28 2020 (r524567) +++ head/MOVED Wed Jan 29 19:13:34 2020 (r524568) @@ -13778,7 +13778,6 @@ chinese/bg5pdf||2020-01-27|Has expired: Unmaintained, comms/py-libimobiledevice||2020-01-27|Has expired: Unmaintained, uses EOLed python27 converters/py-bcode||2020-01-27|Has expired: Unmaintained, uses EOLed python27 converters/py-iconv||2020-01-27|Has expired: Unmaintained, uses EOLed python27 -converters/py-zfec||2020-01-27|Has expired: Unmaintained, uses EOLed python27 databases/gadfly||2020-01-27|Has expired: Unmaintained, uses EOLed python27 databases/metakit||2020-01-27|Has expired: Unmaintained, uses EOLed python27 databases/openark-kit||2020-01-27|Has expired: Unmaintained, uses EOLed python27 Modified: head/converters/Makefile ============================================================================== --- head/converters/Makefile Wed Jan 29 19:13:28 2020 (r524567) +++ head/converters/Makefile Wed Jan 29 19:13:34 2020 (r524568) @@ -156,6 +156,7 @@ SUBDIR += py-text-unidecode SUBDIR += py-unidecode SUBDIR += py-webencodings + SUBDIR += py-zfec SUBDIR += rcctools SUBDIR += recode SUBDIR += rubygem-base32 Modified: head/converters/py-zfec/Makefile ============================================================================== --- head/converters/py-zfec/Makefile Mon Jan 27 15:11:58 2020 (r524262) +++ head/converters/py-zfec/Makefile Wed Jan 29 19:13:34 2020 (r524568) @@ -3,38 +3,31 @@ PORTNAME= zfec DISTVERSION= 1.5.3 +PORTREVISION= 1 CATEGORIES= converters python MASTER_SITES= CHEESESHOP PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} -MAINTAINER= ports@FreeBSD.org -COMMENT= Fast erasure codec for Python +MAINTAINER= sunpoet@FreeBSD.org +COMMENT= Efficient, portable erasure coding tool -DEPRECATED= Unmaintained, uses EOLed python27 -EXPIRATION_DATE= 2020-01-27 +LICENSE= GPLv2+ TGGPL +LICENSE_COMB= dual +LICENSE_NAME_TGGPL= Transitive Grace Period Public Licence 1.0 +LICENSE_FILE_GPLv2+ = ${WRKSRC}/COPYING.GPL +LICENSE_FILE_TGGPL= ${WRKSRC}/COPYING.TGPPL.rst +LICENSE_PERMS_TGGPL= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept -LICENSE= GPLv2 -LICENSE_FILE= ${WRKSRC}/COPYING.GPL +USES= python +USE_PYTHON= autoplist concurrent distutils -RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}argparse>=0:devel/py-argparse@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}pyutil>=0:devel/py-pyutil@${PY_FLAVOR} - -USES= python:2.7 -USE_PYTHON= distutils autoplist concurrent - -DOCSDIR= ${PREFIX}/share/doc/${PKGNAMEPREFIX}${PORTNAME} - -OPTIONS_DEFINE= DOCS - -PORTDOCS= COPYING.TGPPL.rst README.rst TODO - post-install: - @${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/zfec/_fec.so + ${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/zfec/_fec.so -post-install-DOCS-on: - @${MKDIR} ${STAGEDIR}${DOCSDIR} -.for DOC in ${PORTDOCS} - ${INSTALL_DATA} ${WRKSRC}/${DOC} ${STAGEDIR}${DOCSDIR}/ -.endfor +.include -.include +.if ${PYTHON_REL} < 3000 +RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}argparse>=0.8:devel/py-argparse@${PY_FLAVOR} +.endif + +.include Added: head/converters/py-zfec/files/patch-setup.py ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/converters/py-zfec/files/patch-setup.py Wed Jan 29 19:13:34 2020 (r524568) @@ -0,0 +1,21 @@ +Obtained from: https://github.com/tahoe-lafs/zfec/commit/7d159d3b6ebb28417b333b89b11c0d88cc069568 + https://github.com/tahoe-lafs/zfec/commit/819ca0443fc71e33e61226aef9b0b3fd1a93dd41 + +--- setup.py.orig 2018-04-08 04:36:59 UTC ++++ setup.py +@@ -60,11 +60,14 @@ setup( + long_description=open('README.rst', 'rU').read(), + url="https://github.com/tahoe-lafs/zfec", + install_requires=[ +- "pyutil >= 3.0.0", + "argparse >= 0.8 ; python_version <= '2.7'", + # note to self: single-quotes on the '2.7' are ok: + # https://github.com/pypa/packaging/blob/16.8/packaging/markers.py#L121 + ], ++ extras_require={ ++ "bench": ["pyutil >= 3.0.0"], ++ "test": ["twisted", "setuptools_trial", "pyutil >= 3.0.0"], ++ }, + ext_modules=extensions, + cmdclass=versioneer.get_cmdclass(), + ) Added: head/converters/py-zfec/files/patch-zfec-filefec.py ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/converters/py-zfec/files/patch-zfec-filefec.py Wed Jan 29 19:13:34 2020 (r524568) @@ -0,0 +1,54 @@ +Obtained from: https://github.com/tahoe-lafs/zfec/commit/0441f248ffec150c9c27191b0b7a69a7364a5e7c + +--- zfec/filefec.py.orig 2018-02-06 21:53:51 UTC ++++ zfec/filefec.py +@@ -1,14 +1,35 @@ + from __future__ import print_function + import array, os, struct + from base64 import b32encode +-from pyutil import fileutil +-from pyutil.mathutil import pad_size, log_ceil + + import zfec + from zfec import easyfec + + CHUNKSIZE = 4096 + ++def pad_size(n, k): ++ """ ++ The smallest number that has to be added to n to equal a multiple of k. ++ """ ++ if n%k: ++ return k - n%k ++ else: ++ return 0 ++ ++def log_ceil(n, b): ++ """ ++ The smallest integer k such that b^k >= n. ++ ++ log_ceil(n, 2) is the number of bits needed to store any of n values, e.g. ++ the number of bits needed to store any of 128 possible values is 7. ++ """ ++ p = 1 ++ k = 0 ++ while p < n: ++ p *= b ++ k += 1 ++ return k ++ + def ab(x): # debuggery + if len(x) >= 3: + return "%s:%s" % (len(x), b32encode(x[-3:]),) +@@ -224,7 +245,10 @@ def encode_to_files(inf, fsize, dirname, prefix, k, m, + for fn in fns: + if verbose: + print("Cleaning up: trying to remove %r..." % (fn,)) +- fileutil.remove_if_possible(fn) ++ try: ++ os.remove(fn) ++ except EnvironmentError: ++ pass + return 1 + if verbose: + print()