summaryrefslogtreecommitdiff
path: root/dev-libs/tre
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-08-16 12:22:56 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-08-16 12:22:56 +0100
commit2ca31eebd5b7496656193e0aa6ae39200d69a017 (patch)
tree6cf0c8f4ce90a3960c27acf45011134fb674dd62 /dev-libs/tre
parent3ad1879f00b279af69d6b9cd3ef97a2a7496d734 (diff)
gentoo auto-resync : 16:08:2024 - 12:22:56
Diffstat (limited to 'dev-libs/tre')
-rw-r--r--dev-libs/tre/Manifest2
-rw-r--r--dev-libs/tre/files/tre-c99.patch23
-rw-r--r--dev-libs/tre/tre-0.8.0_p20210321-r4.ebuild108
3 files changed, 133 insertions, 0 deletions
diff --git a/dev-libs/tre/Manifest b/dev-libs/tre/Manifest
index b72fc0010501..670be58cfbd5 100644
--- a/dev-libs/tre/Manifest
+++ b/dev-libs/tre/Manifest
@@ -1,5 +1,6 @@
AUX 0.8.0-CVE-2016-8559.patch 2445 BLAKE2B 1bde61db5aa46213c6d5dbaf6b97ba91fe50eb9c4c315be08b2964c2c3e5a85c2dd8933e1b69fd48294b6dcf5af3be7e386e55717e34c3ada9d30eea4675e112 SHA512 bae516a86ef0290a79eca283e4e6cc831255d1653b65f13714530811d358d0775b17711c54b1efab0c9d60829926123c70309aed30767eb7ac2a00ace1411766
AUX 0.8.0-pkgcfg.patch 355 BLAKE2B 14b3ddb93249d827f64d1facd5d7f83d6d4b74d067b66bce405501a3195d230439dbc5036233c2242442e3fa56a771981be9c6e6cb8d668e5f0c293d4dcae1e4 SHA512 5c3df45b4c37d8923ed93ccd24e204fa42da7ac29fdcead81fffdd153d19fd71759ce4922cb55c09a34b21adbdf3d079339c15acc17b1c7d8e924db5b22a9e65
+AUX tre-c99.patch 771 BLAKE2B 99d725f920e9ec2b95ebb3ad87d25023dcd13e5259b3256ae4ef99edfe37fbca2f34858153555e89f0c8196ba88f2b498f97247de23feb06f6e1bbf01ee866ab SHA512 f832c49057c76edcc205395c9f8d860abef180bf6bb9fbafb93f99569d7493ebdfa6e17271a9a13ae8a54d777f371cf59960c68fbef2c176c913f288b2712602
AUX tre-chicken.patch 666 BLAKE2B 8f8f56a7a7cacb9bb0d43b993d51e6d936ffa09bbe866fee7e89299e6c6a3767147b8f340179c0f543da1b6d2554a6187b1a92ddf3bdc2b3d53abdbfb1d251de SHA512 6923a5ed08a2a9e08bc5e46028d2187deb5a62a756598125410a3c4704485b7bcbed2ad90002917474515065f2701f885c6ff462ebbf426135cced74343dfa74
AUX tre-issue37.patch 311 BLAKE2B 315577adae015abf2719509e84554bd3631f777d94dabba0ca9070429e2be5785edc3a3e6a7612dd6fc792a6b03c6c3871954e39363d8f9e91dbe34f5f2bb576 SHA512 41f270e197d254da2ee742722a60324020ea98b3fd6498b6244aebe310587293b4eff7d80a793861f616a772e3bc1058b2f3bee487066e0bc712fdb34aad0720
AUX tre-issue50.patch 419 BLAKE2B ffcbe398ed330a047ca3c9c011096261352885600a4e40399221681966d26f559df5242d5f6dac0076587680c71f54f4aa1a8d51abdb65071e917ccb8489f055 SHA512 dbadcc67b00992a0039ef927f3a756cd0425c082c926bd3e60cc9d137751508eca656ab8779bb05b27f0b0b891ea283208210e6a44dc7b06189d47491749c684
@@ -11,4 +12,5 @@ DIST tre-0.8.0_p20210321.tar.gz 146294 BLAKE2B d740bd0e99f50f5e4d8105f5260e43a81
EBUILD tre-0.8.0_p20210321-r1.ebuild 2390 BLAKE2B c6ab3e20d38246cf934263aca8887aa92937362932f9e15fbf22508fb8627a16a383070622f112f2a5c2d3d1bd5751e0dfee4ec2d20d97b87c79e1d2ceb3342d SHA512 61bd0bc8d09f1520ef3d9da8e68eab70db7979c28757d8cdaac023f427a3d709bd9e9d93eafe91cfc8e884cada261ad6da47197edfabe9006e6a9dd5bfefe9ec
EBUILD tre-0.8.0_p20210321-r2.ebuild 2169 BLAKE2B ec3690cac07aef346675006d44d5287337b86d37d177a98f12b404df9789191ad96d53c2adc9c8204794ec836c126cddfabb3609c0e20db4ceffbac91a98837e SHA512 557edb6ee8abac5e9f12b1ca014bc478738bc281642b186307b21c6132ac54d8ecfb318e38c9362391697691019394d95c65b40c0991cb1ccf04aadbf581db9c
EBUILD tre-0.8.0_p20210321-r3.ebuild 2261 BLAKE2B 963260785fdc641008e13e9974b5d9dbbe088d7a2dd9751babe6227c1869da9f7163783558da4b15117cdbacc8fc6549918d51ca461092d40eb4e79655cf49cf SHA512 a13969529cf2dcc124ef684585552301b10c314de2969c5ddb09c9a8b8f46ecf07247bc54172422aacf3255a869c66a4f20e5ce5caffa94a9504b5393806a06a
+EBUILD tre-0.8.0_p20210321-r4.ebuild 2261 BLAKE2B 0a061e8c720c50116dc18ca4c5b02bea125d8b1f71f36deee873a396db8f3043d632c2579391cbbe60794a905aa36d4d717776d6570ca298c215063d81092369 SHA512 39c806ddd43ede943d94598d4a5e76a4d083f88263f84b7654c2cadf272517b8dadb4a7a87a0e5c1ae8c0cc5a7260a5e2745ae77512a11ab5e7429b6147458b8
MISC metadata.xml 638 BLAKE2B 4e02f7673a19acc091ee21459551e6d40f6a78d5a25cbbffe877d46f0a181067e2163d1ac79d0f7d38ff383b8775abf6f69309ad97b25fd2af55b0ac2223ab40 SHA512 9f725eebbee4753cb05b0adcda1edec2aa50265257db359ca0ec4596761072ec335fffb5a5035cf5ec43c13b8c8a7dd7ed916bbf82acd57c6d8ee5e4c89cb622
diff --git a/dev-libs/tre/files/tre-c99.patch b/dev-libs/tre/files/tre-c99.patch
new file mode 100644
index 000000000000..75375139f6c8
--- /dev/null
+++ b/dev-libs/tre/files/tre-c99.patch
@@ -0,0 +1,23 @@
+https://github.com/laurikari/tre/pull/49/commits/9c049c8c50a50a4f101aa45dd34bd138af7ed3cf
+https://bugs.gentoo.org/932740
+
+--- a/python/tre-python.c
++++ b/python/tre-python.c
+@@ -365,7 +365,7 @@ PyTrePattern_search(TrePatternObject *self, PyObject *args)
+
+ if (PyUnicode_Check(pstring))
+ {
+- Py_ssize_t len = PyUnicode_GetSize(pstring);
++ Py_ssize_t len = PyUnicode_GET_LENGTH(pstring);
+ wchar_t *buf = calloc(sizeof(wchar_t), len);
+ if(!buf)
+ {
+@@ -502,7 +502,7 @@ PyTre_ncompile(PyObject *self, PyObject *args)
+
+ if (upattern != NULL)
+ {
+- Py_ssize_t len = PyUnicode_GetSize(upattern);
++ Py_ssize_t len = PyUnicode_GET_LENGTH(upattern);
+ wchar_t *buf = calloc(sizeof(wchar_t), len);
+ if(!buf)
+ {
diff --git a/dev-libs/tre/tre-0.8.0_p20210321-r4.ebuild b/dev-libs/tre/tre-0.8.0_p20210321-r4.ebuild
new file mode 100644
index 000000000000..fa489c2c58fb
--- /dev/null
+++ b/dev-libs/tre/tre-0.8.0_p20210321-r4.ebuild
@@ -0,0 +1,108 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+COMMIT="6092368aabdd0dbb0fbceb2766a37b98e0ff6911"
+PYTHON_COMPAT=( python3_{10..12} pypy3 )
+DISTUTILS_EXT=1
+DISTUTILS_OPTIONAL=1
+
+inherit autotools distutils-r1
+
+DESCRIPTION="Lightweight, robust, and efficient POSIX compliant regexp matching library"
+HOMEPAGE="
+ https://laurikari.net/tre/
+ https://github.com/laurikari/tre
+"
+SRC_URI="https://github.com/laurikari/tre/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/${PN}-${COMMIT}"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~x64-macos"
+IUSE="+agrep +alloca +approx debug nls profile python"
+
+RDEPEND="
+ agrep? (
+ !dev-ruby/amatch
+ )
+ python? ( ${PYTHON_DEPS} )
+"
+DEPEND="
+ ${RDEPEND}
+ nls? ( sys-devel/gettext )
+"
+BDEPEND="
+ python? ( ${DISTUTILS_DEPS} )
+ sys-devel/gettext
+ virtual/pkgconfig"
+
+REQUIRED_USE="
+ agrep? ( approx )
+ python? ( ${PYTHON_REQUIRED_USE} )
+"
+
+PATCHES=(
+ "${FILESDIR}/0.8.0-pkgcfg.patch"
+ "${FILESDIR}/0.8.0-CVE-2016-8559.patch"
+ "${FILESDIR}/${PN}-chicken.patch"
+ "${FILESDIR}/${PN}-issue37.patch"
+ "${FILESDIR}/${PN}-issue50.patch"
+ "${FILESDIR}/${PN}-issue55-part1.patch"
+ "${FILESDIR}/${PN}-issue55-part2.patch"
+ "${FILESDIR}/${PN}-python3.patch"
+ "${FILESDIR}/${PN}-tests.patch"
+ "${FILESDIR}/${PN}-c99.patch"
+)
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ local myconf=(
+ --disable-static
+ --disable-system-abi
+ --enable-multibyte
+ --enable-wchar
+ $(use_enable agrep)
+ $(use_enable approx)
+ $(use_enable debug)
+ $(use_enable nls)
+ $(use_enable profile)
+ $(use_with alloca)
+ )
+ econf "${myconf[@]}"
+}
+
+src_test() {
+ if locale -a | grep -iq en_US.iso88591; then
+ emake -j1 check
+ else
+ ewarn "If you like to run the test,"
+ ewarn "please make sure en_US.ISO-8859-1 is installed."
+ die "en_US.ISO-8859-1 locale is missing"
+ fi
+}
+
+src_compile() {
+ default
+
+ if use python; then
+ cd python || die
+ distutils-r1_src_compile
+ fi
+}
+
+src_install() {
+ local HTML_DOCS=( doc/*.{css,html} )
+
+ default
+
+ use python && distutils-r1_src_install
+
+ find "${ED}" -type f -name '*.la' -delete || die
+}