-
-
Notifications
You must be signed in to change notification settings - Fork 695
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The included patch for enabling dynamic lib is an upstream issue: snowballstem/snowball#34
- Loading branch information
Showing
2 changed files
with
91 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
From e75b51ea8d57db8b8752a2e2676e914d369889a6 Mon Sep 17 00:00:00 2001 | ||
From: Clayton Craft <[email protected]> | ||
Date: Mon, 26 Oct 2020 05:57:42 +0000 | ||
Subject: [PATCH] Compile dynamic lib | ||
|
||
enabling dynamic lib is an upstream issue: | ||
https://github.com/snowballstem/snowball/issues/34 | ||
|
||
--- | ||
GNUmakefile | 9 ++++++--- | ||
libstemmer/symbol.map | 6 ++++++ | ||
2 files changed, 12 insertions(+), 3 deletions(-) | ||
create mode 100644 libstemmer/symbol.map | ||
|
||
diff --git a/GNUmakefile b/GNUmakefile | ||
index 1487001..053067d 100644 | ||
--- a/GNUmakefile | ||
+++ b/GNUmakefile | ||
@@ -150,10 +150,10 @@ 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=-Iinclude | ||
+CFLAGS+=-fPIC -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.o libstemmer.so stemwords $(C_OTHER_SOURCES) $(C_OTHER_HEADERS) $(C_OTHER_OBJECTS) | ||
|
||
clean: | ||
rm -f $(COMPILER_OBJECTS) $(RUNTIME_OBJECTS) \ | ||
@@ -199,6 +199,9 @@ libstemmer/libstemmer.o: libstemmer/modules.h $(C_LIB_HEADERS) | ||
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,libstemmer.so.0,-version-script,libstemmer/symbol.map -o [email protected] $^ | ||
+ | ||
stemwords: $(STEMWORDS_OBJECTS) libstemmer.o | ||
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ | ||
|
||
diff --git a/libstemmer/symbol.map b/libstemmer/symbol.map | ||
new file mode 100644 | ||
index 0000000..7a3d423 | ||
--- /dev/null | ||
+++ b/libstemmer/symbol.map | ||
@@ -0,0 +1,6 @@ | ||
+SB_STEMMER_0 { | ||
+ global: | ||
+ sb_stemmer_*; | ||
+ local: | ||
+ *; | ||
+}; | ||
-- | ||
2.29.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Contributor: Clayton Craft <[email protected]> | ||
# Maintainer: Clayton Craft <[email protected]> | ||
pkgname=libstemmer | ||
pkgver=0_git20201025 | ||
pkgrel=0 | ||
_commit="04913def2b38a6f33c58b2d6704bcbd93b88220f" | ||
pkgdesc="A small string processing language for creating stemming algorithms for use in Information Retrieval" | ||
url="https://github.com/snowballstem/snowball" | ||
arch="all" | ||
license="BSD-3-Clause" | ||
makedepends="perl" | ||
options="!check" # no tests | ||
subpackages="$pkgname-dev" | ||
source=" | ||
https://github.com/snowballstem/snowball/archive/$_commit.tar.gz | ||
0001-Compile-dynamic-lib.patch | ||
" | ||
builddir=$srcdir/snowball-$_commit | ||
|
||
build() { | ||
make | ||
} | ||
|
||
package() { | ||
install -Dm644 include/libstemmer.h "$pkgdir"/usr/include/libstemmer.h | ||
install -Dm644 libstemmer.so.0.0.0 "$pkgdir"/usr/lib/libstemmer.so.0.0.0 | ||
ln -s libstemmer.so.0.0.0 "$pkgdir"/usr/lib/libstemmer.so | ||
ln -s libstemmer.so "$pkgdir"/usr/lib/libstemmer.so.0 | ||
install -Dm644 COPYING "$pkgdir/usr/share/licenses/libstemmer/LICENSE" | ||
} | ||
|
||
|
||
sha512sums="184c381bc8592ecc4df7935b65c767c5271942d0ebbf48c6cae4cd35327a20bcf965003a31800942e4bc6abc539a2d319bce0708610af610a804e57b43125b56 04913def2b38a6f33c58b2d6704bcbd93b88220f.tar.gz | ||
e0c72a31526678199e4b1cdd8686a9bd87352848ae61406af319bb7d5c4d96115882ef1d524359a762b889e0dbff6210874389a3c45b2a4bf3fd41d8d143c4e3 0001-Compile-dynamic-lib.patch" |