snowball: update to 2.2.0.

This commit is contained in:
Michal Vasilek 2021-11-26 00:26:34 +01:00 committed by paper
parent 7f4e198827
commit 2b45147afe
2 changed files with 14 additions and 17 deletions

View File

@ -3,24 +3,24 @@ https://gitlab.alpinelinux.org/alpine/aports/-/blob/d16eed94064539a7a1f0242709e8
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -165,7 +165,7 @@
CFLAGS=-O2 -W -Wall -Wmissing-prototypes -Wmissing-declarations
CPPFLAGS=-Iinclude
@@ -175,7 +175,7 @@
-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)
INCLUDES=-Iinclude
clean:
rm -f $(COMPILER_OBJECTS) $(RUNTIME_OBJECTS) \
@@ -212,6 +212,9 @@
libstemmer.o: libstemmer/libstemmer.o $(RUNTIME_OBJECTS) $(C_LIB_OBJECTS)
-all: snowball$(EXEEXT) libstemmer.a stemwords$(EXEEXT) $(C_OTHER_SOURCES) $(C_OTHER_HEADERS) $(C_OTHER_OBJECTS)
+all: snowball$(EXEEXT) libstemmer.a libstemmer.so stemwords$(EXEEXT) $(C_OTHER_SOURCES) $(C_OTHER_HEADERS) $(C_OTHER_OBJECTS)
algorithms.mk: libstemmer/mkalgorithms.pl libstemmer/modules.txt
libstemmer/mkalgorithms.pl algorithms.mk libstemmer/modules.txt
@@ -225,6 +225,9 @@
libstemmer.a: 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 $@ $^
examples/%.o: examples/%.c
$(CC) $(CFLAGS) $(INCLUDES) $(CPPFLAGS) -c -o $@ $<
--- /dev/null
+++ b/libstemmer/symbol.map

View File

@ -1,6 +1,6 @@
# Template file for 'snowball'
pkgname=snowball
version=2.1.0
version=2.2.0
revision=1
build_style=gnu-makefile
build_helper=qemu
@ -11,7 +11,7 @@ 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
checksum=425cdb5fba13a01db59a1713780f0662e984204f402d3dae1525bda9e6d30f1a
post_patch() {
if [ -n "$CROSS_BUILD" ]; then
@ -25,14 +25,11 @@ do_install() {
vbin stemwords
vinstall include/libstemmer.h 644 usr/include
vinstall libstemmer.a 644 usr/lib
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
}