34 lines
1.2 KiB
Diff
34 lines
1.2 KiB
Diff
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:
|
|
+ *;
|
|
+};
|