From nobody Mon Jul 31 16:46:06 2023 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RF3zq6ppVz4pGbc; Mon, 31 Jul 2023 16:46:47 +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 4RF3z32M0Rz3Ghp; Mon, 31 Jul 2023 16:46:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690821967; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ojYekJJVuFnyWj16PBgL9q4XZ+YOGepYdXAVQ6zPPpk=; b=KEioAAbMYUhK1RKxgA5yGCxOAqt6G9NZqGVTdsFEZAEVC2i556HJul9tEfMJ8Oh3GlW2aj O2Jne6jjx+Uo5N8nY2TmMuHfC9k38ygrDv8hTtG5VbgoFMV2X5HPMc67+MT/qszABCNfY5 3EVE7vTPpYpeTdv45n5vfKMzk1QO8yETNP3kCaP9KzrmqfID8WURWVGGO4czMxYBlqG+EP kIup8hnbirbIjpwUy/3pu8+JXor4AVbVOnpBbIYx+Yihe8OWwty8ck+e87q3wpV3BS3DtZ KiglBCc2QhUiTZKpIiZvrZUuc9YSFT9HTT6XKtOGJN1z3AIx2IbMdl7pkyG/9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690821967; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ojYekJJVuFnyWj16PBgL9q4XZ+YOGepYdXAVQ6zPPpk=; b=PbUi6/aMAScNeVJtpVfnN0rGFQwRpjx8l56t7yZFpE8YzKw/5B1lLLWD5n9WdstpWAuGlv ql67eulb6GdH1dk2rAdPuDuhEektlRMrzY0cIMWqC4EtDqGH6CpJRoxyQt2G/D69Rl7XB8 7qbf7SLU63/85ulR2w4nRt+zPpW8UtLWB1PI6GRICBKD19C6zflGDOx3Bc8tPDdjxx0FYb XXBdlpAJI55pFwnvBVEsrAuBjB5IEihG1WpX/88drXuXjGOdTvDD06GYTRWiF4U513K2L6 TmVQ5orqAq5ElkQGY9Slm0Fzw4xCkdzQHH8ASi21RHGkn1LPHMNerkLGMN9LVg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690821967; a=rsa-sha256; cv=none; b=EE+z8vx30D/s6FMQGBk5y2V1VhDhXoM95Fy9Rf6FS4XVGrtFww/WqbhYIfY8Gst8q8aFIW /sfF7eTI7gRX519Ihxnrc/MWRT6KmqvkscpIyU2Yv8hWvlmpi76JG7EtotrShEXclY//OY EwNe18yC8lEq6mB1CcK7ZJx+bPc24KM5oCPM3yEv1TZPB/8G8dsnlKRng5ogEtUXXZWunz siZ2ZUDNkeR9hRiHmeeLpnqJ9hViP5rM/uYq4jF7SS7fvDPegEiytNmnoAIYGnAkAIpzAz +ebITnvPVm3DBheJ7kK9g3eiv+hJH6wy4hHwzf5vOFOD+XMWwjGRMOPqcgPQdg== 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 4RF3z31Cmkz13Bt; Mon, 31 Jul 2023 16:46:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 36VGk6CP079646; Mon, 31 Jul 2023 16:46:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 36VGk6P2079645; Mon, 31 Jul 2023 16:46:06 GMT (envelope-from git) Date: Mon, 31 Jul 2023 16:46:06 GMT Message-Id: <202307311646.36VGk6P2079645@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Po-Chuan Hsieh Subject: git: 6c6ce4749990 - main - archivers/py-brotli: Use archivers/brotli instead of bundled one List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sunpoet X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6c6ce4749990e9c4ed040e5998cca625009a0e4a Auto-Submitted: auto-generated The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=6c6ce4749990e9c4ed040e5998cca625009a0e4a commit 6c6ce4749990e9c4ed040e5998cca625009a0e4a Author: Po-Chuan Hsieh AuthorDate: 2023-07-31 16:31:03 +0000 Commit: Po-Chuan Hsieh CommitDate: 2023-07-31 16:39:55 +0000 archivers/py-brotli: Use archivers/brotli instead of bundled one - Bump PORTREVISION for dependency and package change --- archivers/py-brotli/Makefile | 15 ++++- archivers/py-brotli/files/patch-setup.py | 111 +++++++++++++++++++++++++++++++ 2 files changed, 125 insertions(+), 1 deletion(-) diff --git a/archivers/py-brotli/Makefile b/archivers/py-brotli/Makefile index 7fabda7a36e3..6138c5a79e01 100644 --- a/archivers/py-brotli/Makefile +++ b/archivers/py-brotli/Makefile @@ -1,5 +1,6 @@ PORTNAME= brotli PORTVERSION= 1.0.9 +PORTREVISION= 1 CATEGORIES= archivers python MASTER_SITES= PYPI PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} @@ -12,13 +13,25 @@ WWW= https://github.com/google/brotli LICENSE= MIT LICENSE_FILE= ${WRKSRC}/LICENSE -USES= compiler:c++0x cpe python shebangfix zip +BUILD_DEPENDS= brotli>=${PORTVERSION}:archivers/brotli +LIB_DEPENDS= libbrotlicommon.so:archivers/brotli + +USES= compiler:c++0x cpe pkgconfig python shebangfix zip USE_PYTHON= autoplist concurrent distutils CPE_VENDOR= google SHEBANG_FILES= python/bro.py +post-patch: + @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|' ${WRKSRC}/setup.py + @${MKDIR} ${WRKSRC}/common/ +# Clean up bundled libraries + @${RM} -r ${WRKSRC}/c/ + +pre-configure: + @${PRINTF} "#define BROTLI_VERSION 0x%x%03x%03x\n" `pkgconf --modversion libbrotlicommon | sed 's|\.| |g'` > ${WRKSRC}/common/version.h + post-install: ${FIND} ${STAGEDIR}${PYTHON_SITELIBDIR} -name '*.so' -exec ${STRIP_CMD} {} + diff --git a/archivers/py-brotli/files/patch-setup.py b/archivers/py-brotli/files/patch-setup.py new file mode 100644 index 000000000000..9f97287a706f --- /dev/null +++ b/archivers/py-brotli/files/patch-setup.py @@ -0,0 +1,111 @@ +--- setup.py.orig 2020-08-27 06:24:08 UTC ++++ setup.py +@@ -25,7 +25,7 @@ CURR_DIR = os.path.abspath(os.path.dirname(os.path.rea + + def get_version(): + """ Return BROTLI_VERSION string as defined in 'common/version.h' file. """ +- version_file_path = os.path.join(CURR_DIR, 'c', 'common', 'version.h') ++ version_file_path = os.path.join(CURR_DIR, 'common', 'version.h') + version = 0 + with open(version_file_path, 'r') as f: + for line in f: +@@ -181,92 +181,17 @@ EXT_MODULES = [ + '_brotli', + sources=[ + 'python/_brotli.cc', +- 'c/common/constants.c', +- 'c/common/context.c', +- 'c/common/dictionary.c', +- 'c/common/platform.c', +- 'c/common/transform.c', +- 'c/dec/bit_reader.c', +- 'c/dec/decode.c', +- 'c/dec/huffman.c', +- 'c/dec/state.c', +- 'c/enc/backward_references.c', +- 'c/enc/backward_references_hq.c', +- 'c/enc/bit_cost.c', +- 'c/enc/block_splitter.c', +- 'c/enc/brotli_bit_stream.c', +- 'c/enc/cluster.c', +- 'c/enc/command.c', +- 'c/enc/compress_fragment.c', +- 'c/enc/compress_fragment_two_pass.c', +- 'c/enc/dictionary_hash.c', +- 'c/enc/encode.c', +- 'c/enc/encoder_dict.c', +- 'c/enc/entropy_encode.c', +- 'c/enc/fast_log.c', +- 'c/enc/histogram.c', +- 'c/enc/literal_cost.c', +- 'c/enc/memory.c', +- 'c/enc/metablock.c', +- 'c/enc/static_dict.c', +- 'c/enc/utf8_util.c', + ], + depends=[ +- 'c/common/constants.h', +- 'c/common/context.h', +- 'c/common/dictionary.h', +- 'c/common/platform.h', +- 'c/common/transform.h', +- 'c/common/version.h', +- 'c/dec/bit_reader.h', +- 'c/dec/huffman.h', +- 'c/dec/prefix.h', +- 'c/dec/state.h', +- 'c/enc/backward_references.h', +- 'c/enc/backward_references_hq.h', +- 'c/enc/backward_references_inc.h', +- 'c/enc/bit_cost.h', +- 'c/enc/bit_cost_inc.h', +- 'c/enc/block_encoder_inc.h', +- 'c/enc/block_splitter.h', +- 'c/enc/block_splitter_inc.h', +- 'c/enc/brotli_bit_stream.h', +- 'c/enc/cluster.h', +- 'c/enc/cluster_inc.h', +- 'c/enc/command.h', +- 'c/enc/compress_fragment.h', +- 'c/enc/compress_fragment_two_pass.h', +- 'c/enc/dictionary_hash.h', +- 'c/enc/encoder_dict.h', +- 'c/enc/entropy_encode.h', +- 'c/enc/entropy_encode_static.h', +- 'c/enc/fast_log.h', +- 'c/enc/find_match_length.h', +- 'c/enc/hash.h', +- 'c/enc/hash_composite_inc.h', +- 'c/enc/hash_forgetful_chain_inc.h', +- 'c/enc/hash_longest_match64_inc.h', +- 'c/enc/hash_longest_match_inc.h', +- 'c/enc/hash_longest_match_quickly_inc.h', +- 'c/enc/hash_rolling_inc.h', +- 'c/enc/hash_to_binary_tree_inc.h', +- 'c/enc/histogram.h', +- 'c/enc/histogram_inc.h', +- 'c/enc/literal_cost.h', +- 'c/enc/memory.h', +- 'c/enc/metablock.h', +- 'c/enc/metablock_inc.h', +- 'c/enc/params.h', +- 'c/enc/prefix.h', +- 'c/enc/quality.h', +- 'c/enc/ringbuffer.h', +- 'c/enc/static_dict.h', +- 'c/enc/static_dict_lut.h', +- 'c/enc/utf8_util.h', +- 'c/enc/write_bits.h', + ], + include_dirs=[ +- 'c/include', ++ '%%LOCALBASE%%/include', ++ ], ++ libraries=[ ++ 'brotlicommon', 'brotlidec', 'brotlienc', ++ ], ++ library_dirs=[ ++ '%%LOCALBASE%%/lib', + ], + language='c++'), + ]