mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-08-06 00:48:18 -07:00
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@gmail.com> Signed-off-by: Yixun Lan <dlan@gentoo.org>
This commit is contained in:
@@ -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
|
||||
|
||||
121
dev-libs/marisa/marisa-0.2.7.ebuild
Normal file
121
dev-libs/marisa/marisa-0.2.7.ebuild
Normal file
@@ -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
|
||||
}
|
||||
@@ -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>vowstar@gmail.com</email>
|
||||
<name>Huang Rui</name>
|
||||
</maintainer>
|
||||
<maintainer type="project">
|
||||
<email>cjk@gentoo.org</email>
|
||||
<name>Cjk</name>
|
||||
</maintainer>
|
||||
<maintainer type="project" proxied="proxy">
|
||||
<email>proxy-maint@gentoo.org</email>
|
||||
<name>Proxy Maintainers</name>
|
||||
</maintainer>
|
||||
<upstream>
|
||||
<remote-id type="github">s-yata/marisa-trie</remote-id>
|
||||
</upstream>
|
||||
|
||||
Reference in New Issue
Block a user