commit: d2cd5d2928f5f63f681d5451cb81a196a5fe55cb Author: Huang Rui <vowstar <AT> gmail <DOT> com> AuthorDate: Sun Feb 8 16:32:41 2026 +0000 Commit: Yixun Lan <dlan <AT> gentoo <DOT> org> CommitDate: Wed Feb 11 21:42:37 2026 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d2cd5d29
dev-libs/marisa: add 0.2.7 - Add me and proxy-maint as maintainer - Add python_3.13 and python_3.14 COMPAT - Unlike 0.2.6 this version no longer needs arch-specific patches for MARISA_WORD_SIZE detection as upstream now uses UINTPTR_MAX which works portably on all architectures Closes: https://github.com/gentoo/gentoo/pull/45693 Signed-off-by: Huang Rui <vowstar <AT> gmail.com> Signed-off-by: Yixun Lan <dlan <AT> gentoo.org> dev-libs/marisa/Manifest | 1 + dev-libs/marisa/marisa-0.2.7.ebuild | 121 ++++++++++++++++++++++++++++++++++++ dev-libs/marisa/metadata.xml | 8 +++ 3 files changed, 130 insertions(+) diff --git a/dev-libs/marisa/Manifest b/dev-libs/marisa/Manifest index e6b7e3213805..495a3a8e0f46 100644 --- a/dev-libs/marisa/Manifest +++ b/dev-libs/marisa/Manifest @@ -1 +1,2 @@ DIST marisa-0.2.6.tar.gz 168332 BLAKE2B 3b8a89a9a0b344d9de96edb5bf17c50db07da373e75eba098f48c9064321d579ac104db622608119377084c79165bf558c804eaff591903b67330b13bc8acf55 SHA512 c094e4b22e1457efdd20f2b978ee421b53e36ed94e4fdbd8944136c0ba23da4f6ba9fe3a2c64729c1426aee4dbe8098bfa5eebb943ae7fdaa4eec760485c564d +DIST marisa-0.2.7.tar.gz 214468 BLAKE2B 58a3f5a38099e16aaccd523df4e3fa49a7222d41a3b242dc7d328eca6d3fae09aaaa092b94e5e83d8a21ee36be86abe37007860271369e3de95b722f556e0570 SHA512 5e162d1e4b6e78e60354c19dbb419088d1d832591a701ee5a844f9e61747b0ec0333732d2832a771e2a1bae7cc9e199a9eae5098e430ff331b4de372ccce4798 diff --git a/dev-libs/marisa/marisa-0.2.7.ebuild b/dev-libs/marisa/marisa-0.2.7.ebuild new file mode 100644 index 000000000000..25344ee3f190 --- /dev/null +++ b/dev-libs/marisa/marisa-0.2.7.ebuild @@ -0,0 +1,121 @@ +# Copyright 2014-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="8" +PYTHON_COMPAT=( python3_{12..14} ) +DISTUTILS_USE_PEP517="setuptools" +DISTUTILS_OPTIONAL="1" +DISTUTILS_EXT=1 + +inherit autotools distutils-r1 toolchain-funcs + +if [[ "${PV}" == "9999" ]]; then + inherit git-r3 + + EGIT_REPO_URI="https://github.com/s-yata/marisa-trie" +fi + +DESCRIPTION="Matching Algorithm with Recursively Implemented StorAge" +HOMEPAGE="https://github.com/s-yata/marisa-trie https://code.google.com/archive/p/marisa-trie/" +if [[ "${PV}" != "9999" ]]; then + SRC_URI="https://github.com/s-yata/marisa-trie/archive/v${PV}.tar.gz -> ${P}.tar.gz" +fi + +LICENSE="|| ( BSD-2 LGPL-2.1+ )" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86" +IUSE="python static-libs" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +BDEPEND="python? ( + ${PYTHON_DEPS} + ${DISTUTILS_DEPS} + dev-lang/swig + )" +DEPEND="python? ( ${PYTHON_DEPS} )" +RDEPEND="${DEPEND}" + +if [[ "${PV}" != "9999" ]]; then + S="${WORKDIR}/marisa-trie-${PV}" +fi + +src_prepare() { + default + eautoreconf + + sed -e "s:^\([[:space:]]*\)libraries=:\1include_dirs=[\"../../include\"],\n\1library_dirs=[\"../../lib/marisa/.libs\"],\n&:" \ + -i bindings/python/setup.py || die + + if use python; then + pushd bindings/python > /dev/null || die + distutils-r1_src_prepare + popd > /dev/null || die + fi +} + +src_configure() { + local -x CPPFLAGS="${CPPFLAGS} ${CXXFLAGS}" + + cpu_instructions_option() { + local option="${1}" + local macros="${2}" + local result="--enable-${option}" + local macro + for macro in ${macros}; do + if ! $(tc-getCC) ${CPPFLAGS} ${CFLAGS} -E -P -dM - < /dev/null 2> /dev/null \ + | grep -Eq "^#define ${macro}([[:space:]]|$)"; then + result="--disable-${option}" + fi + done + echo "${result}" + } + + local options=( + $(cpu_instructions_option sse2 __SSE2__) + $(cpu_instructions_option sse3 __SSE3__) + $(cpu_instructions_option ssse3 __SSSE3__) + $(cpu_instructions_option sse4.1 __SSE4_1__) + $(cpu_instructions_option sse4.2 __SSE4_2__) + $(cpu_instructions_option sse4 __POPCNT__ __SSE4_2__) + $(cpu_instructions_option sse4a __SSE4A__) + $(cpu_instructions_option popcnt __POPCNT__) + $(cpu_instructions_option bmi __BMI__) + $(cpu_instructions_option bmi2 __BMI2__) + $(use_enable static-libs static) + ) + + econf "${options[@]}" + + if use python; then + pushd bindings/python > /dev/null || die + distutils-r1_src_configure + popd > /dev/null || die + fi +} + +src_compile() { + default + + if use python; then + emake -C bindings swig-python + pushd bindings/python > /dev/null || die + distutils-r1_src_compile + popd > /dev/null || die + fi +} + +src_install() { + default + find "${ED}" -name "*.la" -delete || die + + ( + docinto html + dodoc docs/* + ) + + if use python; then + pushd bindings/python > /dev/null || die + distutils-r1_src_install + popd > /dev/null || die + fi +} diff --git a/dev-libs/marisa/metadata.xml b/dev-libs/marisa/metadata.xml index b23b7504566c..c320f1b595b0 100644 --- a/dev-libs/marisa/metadata.xml +++ b/dev-libs/marisa/metadata.xml @@ -1,10 +1,18 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> + <maintainer type="person" proxied="yes"> + <email>[email protected]</email> + <name>Huang Rui</name> + </maintainer> <maintainer type="project"> <email>[email protected]</email> <name>Cjk</name> </maintainer> + <maintainer type="project" proxied="proxy"> + <email>[email protected]</email> + <name>Proxy Maintainers</name> + </maintainer> <upstream> <remote-id type="github">s-yata/marisa-trie</remote-id> </upstream>
