Date: Friday, April 1, 2022 @ 19:55:54 Author: heftig Revision: 441200
2.2.0-2: dynamically link stemwords, debug on Added: snowball/trunk/dynamiclib.diff (from rev 441199, snowball/trunk/dynamiclib.patch) Modified: snowball/trunk/PKGBUILD Deleted: snowball/trunk/dynamiclib.patch ------------------+ PKGBUILD | 39 ++++++++++++++---------------- dynamiclib.diff | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++++ dynamiclib.patch | 41 ------------------------------- 3 files changed, 86 insertions(+), 62 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2022-04-01 19:36:45 UTC (rev 441199) +++ PKGBUILD 2022-04-01 19:55:54 UTC (rev 441200) @@ -3,44 +3,41 @@ pkgbase=snowball pkgname=(snowball libstemmer) pkgver=2.2.0 -pkgrel=1 +pkgrel=2 pkgdesc="String processing language for creating stemming algorithms" url="https://snowballstem.org/" arch=(x86_64) license=(BSD) -depends=(glibc) makedepends=(git) -_commit=48a67a2831005f49c48ec29a5837640e23e54e6b +options=(debug) +_commit=48a67a2831005f49c48ec29a5837640e23e54e6b # tags/v2.2.0^0 source=("git+https://github.com/snowballstem/snowball#commit=$_commit" - dynamiclib.patch) + dynamiclib.diff) sha256sums=('SKIP' - '4620e8d90cdccfc89226e929bfee151bead14ee5f4a5778b873613b689b95416') + 'c031da5a11bafa079df6c33b38b8795b65cf2c91cc6b452dcf2b10612288a3e6') pkgver() { - cd $pkgbase - git describe --tags | sed 's/^v//;s/-/+/g' + cd snowball + git describe --tags | sed 's/^v//;s/[^-]*-g/r&/;s/-/+/g' } prepare() { - cd $pkgbase - git apply -3 ../dynamiclib.patch + cd snowball + git apply -3 ../dynamiclib.diff } build() { - cd $pkgbase + cd snowball make } -check() { - cd $pkgbase +# No check - needs external test data - # Disabled - needs external test data - #make check -} - package_snowball() { - cd $pkgbase + depends=(libstemmer) + cd snowball + install -Dt "$pkgdir/usr/bin" snowball stemwords install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 COPYING @@ -48,15 +45,15 @@ package_libstemmer() { pkgdesc="Stemming library supporting several languages" + depends=(glibc) provides=(libstemmer.so) - cd $pkgbase + cd snowball - install -Dt "$pkgdir/usr/lib" libstemmer.so.0.0.0 + install -Dt "$pkgdir/usr/include" -m644 include/libstemmer.h + install -Dm644 libstemmer.so.0 "$pkgdir/usr/lib/libstemmer.so.0.0.0" ln -s libstemmer.so.0.0.0 "$pkgdir/usr/lib/libstemmer.so.0" ln -s libstemmer.so.0 "$pkgdir/usr/lib/libstemmer.so" - install -Dt "$pkgdir/usr/include" -m644 include/libstemmer.h - install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 COPYING } Copied: snowball/trunk/dynamiclib.diff (from rev 441199, snowball/trunk/dynamiclib.patch) =================================================================== --- dynamiclib.diff (rev 0) +++ dynamiclib.diff 2022-04-01 19:55:54 UTC (rev 441200) @@ -0,0 +1,68 @@ + GNUmakefile | 15 +++++++-------- + libstemmer/symbol.map | 6 ++++++ + 2 files changed, 13 insertions(+), 8 deletions(-) + +diff --git c/GNUmakefile i/GNUmakefile +index 98eb1fa..86e4855 100644 +--- c/GNUmakefile ++++ i/GNUmakefile +@@ -170,20 +170,19 @@ C_OTHER_OBJECTS = $(C_OTHER_SOURCES:.c=.o) + JAVA_CLASSES = $(JAVA_SOURCES:.java=.class) + JAVA_RUNTIME_CLASSES=$(JAVARUNTIME_SOURCES:.java=.class) + +-CFLAGS=-O2 -W -Wall -Wmissing-prototypes -Wmissing-declarations +-CPPFLAGS= ++CFLAGS+=-fPIC -W -Wall -Wmissing-prototypes -Wmissing-declarations + + INCLUDES=-Iinclude + +-all: snowball$(EXEEXT) libstemmer.a stemwords$(EXEEXT) $(C_OTHER_SOURCES) $(C_OTHER_HEADERS) $(C_OTHER_OBJECTS) ++all: snowball$(EXEEXT) libstemmer.so.0 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 + + clean: + rm -f $(COMPILER_OBJECTS) $(RUNTIME_OBJECTS) \ + $(LIBSTEMMER_OBJECTS) $(LIBSTEMMER_UTF8_OBJECTS) $(STEMWORDS_OBJECTS) snowball$(EXEEXT) \ +- libstemmer.a stemwords$(EXEEXT) \ ++ libstemmer.so.0 stemwords$(EXEEXT) \ + libstemmer/modules.h \ + libstemmer/modules_utf8.h \ + $(C_LIB_SOURCES) $(C_LIB_HEADERS) $(C_LIB_OBJECTS) \ +@@ -222,19 +221,19 @@ libstemmer/modules_utf8.h libstemmer/mkinc_utf8.mak: libstemmer/mkmodules.pl lib + + libstemmer/libstemmer.o: libstemmer/modules.h $(C_LIB_HEADERS) + +-libstemmer.a: libstemmer/libstemmer.o $(RUNTIME_OBJECTS) $(C_LIB_OBJECTS) +- $(AR) -cru $@ $^ ++libstemmer.so.0: libstemmer/libstemmer.o $(RUNTIME_OBJECTS) $(C_LIB_OBJECTS) ++ $(CC) $(CFLAGS) -shared $(LDFLAGS) -Wl,-soname,$@,-version-script,libstemmer/symbol.map -o $@ $^ + + examples/%.o: examples/%.c + $(CC) $(CFLAGS) $(INCLUDES) $(CPPFLAGS) -c -o $@ $< + +-stemwords$(EXEEXT): $(STEMWORDS_OBJECTS) libstemmer.a ++stemwords$(EXEEXT): $(STEMWORDS_OBJECTS) libstemmer.so.0 + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ + + tests/%.o: tests/%.c + $(CC) $(CFLAGS) $(INCLUDES) $(CPPFLAGS) -c -o $@ $< + +-stemtest$(EXEEXT): $(STEMTEST_OBJECTS) libstemmer.a ++stemtest$(EXEEXT): $(STEMTEST_OBJECTS) libstemmer.so.0 + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ + + csharp_stemwords$(EXEEXT): $(CSHARP_STEMWORDS_SOURCES) $(CSHARP_RUNTIME_SOURCES) $(CSHARP_SOURCES) +diff --git c/libstemmer/symbol.map i/libstemmer/symbol.map +new file mode 100644 +index 0000000..7a3d423 +--- /dev/null ++++ i/libstemmer/symbol.map +@@ -0,0 +1,6 @@ ++SB_STEMMER_0 { ++ global: ++ sb_stemmer_*; ++ local: ++ *; ++}; Deleted: dynamiclib.patch =================================================================== --- dynamiclib.patch 2022-04-01 19:36:45 UTC (rev 441199) +++ dynamiclib.patch 2022-04-01 19:55:54 UTC (rev 441200) @@ -1,41 +0,0 @@ -diff --git a/GNUmakefile b/GNUmakefile -index 98eb1fa..40ebc38 100644 ---- a/GNUmakefile -+++ b/GNUmakefile -@@ -170,12 +170,11 @@ C_OTHER_OBJECTS = $(C_OTHER_SOURCES:.c=.o) - JAVA_CLASSES = $(JAVA_SOURCES:.java=.class) - JAVA_RUNTIME_CLASSES=$(JAVARUNTIME_SOURCES:.java=.class) - --CFLAGS=-O2 -W -Wall -Wmissing-prototypes -Wmissing-declarations --CPPFLAGS= -+CFLAGS+=-fPIC -W -Wall -Wmissing-prototypes -Wmissing-declarations - - INCLUDES=-Iinclude - --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 -@@ -212,6 +212,9 @@ libstemmer/libstemmer.o: libstemmer/modules.h $(C_LIB_HEADERS) - 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,libstemmer.so.0,-version-script,libstemmer/symbol.map -o $@.0.0.0 $^ -+ - examples/%.o: examples/%.c - $(CC) $(CFLAGS) $(INCLUDES) $(CPPFLAGS) -c -o $@ $< - -diff --git a/libstemmer/symbol.map b/libstemmer/symbol.map -new file mode 100644 -index 0000000..7a3d423 ---- /dev/null -+++ i/libstemmer/symbol.map -@@ -0,0 +1,6 @@ -+SB_STEMMER_0 { -+ global: -+ sb_stemmer_*; -+ local: -+ *; -+};