blob: e2953adabd514f5f9379485553ca3e4b39cbabcb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit toolchain-funcs
MY_TESTDATA_COMMIT="887fb7a3e006f32b4979e0d55f2543abe78a42f1"
DESCRIPTION="Snowball compiler and stemming algorithms"
HOMEPAGE="https://snowballstem.org/ https://github.com/snowballstem/snowball/"
SRC_URI="https://github.com/snowballstem/snowball/archive/v${PV}.tar.gz -> ${P}.tar.gz
test? ( https://github.com/snowballstem/snowball-data/archive/${MY_TESTDATA_COMMIT}.tar.gz -> snowball-data-${MY_TESTDATA_COMMIT}.tar.gz )"
LICENSE="BSD"
SLOT="0/$(ver_cut 1)"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~ppc-macos ~sparc-solaris ~sparc64-solaris"
IUSE="static-libs test"
DEPEND=""
RDEPEND="${DEPEND}"
BDEPEND="dev-lang/perl
test? ( virtual/libiconv )"
RESTRICT="!test? ( test )"
S="${WORKDIR}/snowball-${PV}"
PATCHES=(
"${FILESDIR}/${P}-shared-library.patch"
)
src_compile() {
export CC="$(tc-getCC)"
export AR="$(tc-getAR)"
default
}
src_install() {
dodoc README.rst NEWS
dobin stemwords
doheader include/libstemmer.h
dolib.so libstemmer.so.${PV}
dolib.so libstemmer.so.$(ver_cut 1)
dolib.so libstemmer.so
use static-libs && dolib.a libstemmer.a
}
src_test() {
emake -j1 STEMMING_DATA="${WORKDIR}/snowball-data-${MY_TESTDATA_COMMIT}" check
}
|