New package: snowball-2.1.0
This commit is contained in:
parent
7db0172fdf
commit
b2732b4b7d
|
@ -4027,3 +4027,4 @@ librnnoise.so.0 rnnoise-0.4.1_1
|
|||
liblhasa.so.0 lhasa-0.3.1_2
|
||||
libmt32emu.so.2 libmt32emu-2.5.1_1
|
||||
libqrtr-glib.so.0 libqrtr-glib-1.0.0_1
|
||||
libstemmer.so.2 libstemmer-2.1.0_1
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
snowball
|
|
@ -0,0 +1 @@
|
|||
snowball
|
|
@ -0,0 +1,33 @@
|
|||
based on alpine patches which are based on gentoo patches
|
||||
https://gitlab.alpinelinux.org/alpine/aports/-/blob/d16eed94064539a7a1f0242709e8d7b76448c51a/community/snowball/libstemmer-library.patch
|
||||
|
||||
--- a/GNUmakefile
|
||||
+++ b/GNUmakefile
|
||||
@@ -165,7 +165,7 @@
|
||||
CFLAGS=-O2 -W -Wall -Wmissing-prototypes -Wmissing-declarations
|
||||
CPPFLAGS=-Iinclude
|
||||
|
||||
-all: snowball libstemmer.o stemwords $(C_OTHER_SOURCES) $(C_OTHER_HEADERS) $(C_OTHER_OBJECTS)
|
||||
+all: snowball libstemmer.so libstemmer.o stemwords $(C_OTHER_SOURCES) $(C_OTHER_HEADERS) $(C_OTHER_OBJECTS)
|
||||
|
||||
clean:
|
||||
rm -f $(COMPILER_OBJECTS) $(RUNTIME_OBJECTS) \
|
||||
@@ -212,6 +212,9 @@
|
||||
libstemmer.o: libstemmer/libstemmer.o $(RUNTIME_OBJECTS) $(C_LIB_OBJECTS)
|
||||
$(AR) -cru $@ $^
|
||||
|
||||
+libstemmer.so: libstemmer/libstemmer.o $(RUNTIME_OBJECTS) $(C_LIB_OBJECTS)
|
||||
+ $(CC) $(CFLAGS) -shared $(LDFLAGS) -Wl,-soname,$@.$(shell echo $(SNOWBALL_VERSION) | cut -d. -f1),-version-script,libstemmer/symbol.map -o $@.$(SNOWBALL_VERSION) $^
|
||||
+
|
||||
stemwords: $(STEMWORDS_OBJECTS) libstemmer.o
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
|
||||
|
||||
--- /dev/null
|
||||
+++ b/libstemmer/symbol.map
|
||||
@@ -0,0 +1,6 @@
|
||||
+SB_STEMMER_0 {
|
||||
+ global:
|
||||
+ sb_stemmer_*;
|
||||
+ local:
|
||||
+ *;
|
||||
+};
|
|
@ -0,0 +1,60 @@
|
|||
# Template file for 'snowball'
|
||||
pkgname=snowball
|
||||
version=2.1.0
|
||||
revision=1
|
||||
build_style=gnu-makefile
|
||||
build_helper=qemu
|
||||
make_check_target=check_stemtest # other checks are missing targets in the makefile
|
||||
hostmakedepends="perl"
|
||||
short_desc="Small string processing language for creating stemming algorithms"
|
||||
maintainer="Michal Vasilek <michal@vasilek.cz>"
|
||||
license="BSD-3-Clause"
|
||||
homepage="https://snowballstem.org/"
|
||||
distfiles="https://github.com/snowballstem/snowball/archive/refs/tags/v${version}.tar.gz"
|
||||
checksum=24ae0b28d6531190c2cd960d515ec9374d3a3d9420c4a0accdf89b7f02fc9caa
|
||||
|
||||
post_patch() {
|
||||
if [ -n "$CROSS_BUILD" ]; then
|
||||
vsed -i GNUmakefile \
|
||||
-e 's|\t\./snowball|\tqemu-${XBPS_TARGET_QEMU_MACHINE}-static ./snowball|'
|
||||
fi
|
||||
}
|
||||
|
||||
do_install() {
|
||||
vbin snowball
|
||||
vbin stemwords
|
||||
|
||||
vinstall include/libstemmer.h 644 usr/include
|
||||
vinstall libstemmer.so.$version 644 usr/lib
|
||||
ln -s libstemmer.so.$version ${DESTDIR}/usr/lib/libstemmer.so
|
||||
ln -s libstemmer.so.$version ${DESTDIR}/usr/lib/libstemmer.so.${version%.*.*}
|
||||
|
||||
# the static library has .o suffix
|
||||
# https://github.com/snowballstem/snowball/pull/150
|
||||
vinstall libstemmer.o 644 usr/lib libstemmer.a
|
||||
|
||||
vlicense COPYING
|
||||
}
|
||||
|
||||
# XXX: upstream doesn't generate a dynamic library for libstemmer
|
||||
# each distribution patches this on their own:
|
||||
# Arch: https://github.com/archlinux/svntogit-packages/tree/packages/snowball/trunk
|
||||
# Alpine: https://gitlab.alpinelinux.org/alpine/aports/-/tree/master/community/snowball
|
||||
# Gentoo: https://gitweb.gentoo.org/repo/gentoo.git/tree/dev-libs/snowball-stemmer
|
||||
|
||||
libstemmer_package() {
|
||||
short_desc="Stemming algorithm library"
|
||||
pkg_install() {
|
||||
vmove "usr/lib/libstemmer.so.*"
|
||||
}
|
||||
}
|
||||
|
||||
libstemmer-devel_package() {
|
||||
depends="libstemmer>=${version}_${revision}"
|
||||
short_desc="Stemming algorithm library - development files"
|
||||
pkg_install() {
|
||||
vmove usr/lib/libstemmer.a
|
||||
vmove usr/lib/libstemmer.so
|
||||
vmove usr/include
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue