diff options
author | Guido Falsi <madpilot@FreeBSD.org> | 2021-06-25 20:39:46 +0000 |
---|---|---|
committer | Guido Falsi <madpilot@FreeBSD.org> | 2021-06-25 20:43:05 +0000 |
commit | 2dcaa8bee5e9f3fcff601589c709e2734194b21e (patch) | |
tree | e261a753a4448f4269a858a85de05e705b5122c1 | |
parent | 00d2edb618c8cb85a4ddbd1784d8563aa8daf8a9 (diff) | |
download | ports-2dcaa8bee5e9f3fcff601589c709e2734194b21e.tar.gz ports-2dcaa8bee5e9f3fcff601589c709e2734194b21e.zip |
textproc/snowballstemmer: New port
Stemming algorithms library for the C language provided by the
snowball project.
WWW: https://snowballstem.org/
Port structure inspired by NetBSD and OpenBSD ones.
This is a new requirement of future deskutils/calibre versions.
-rw-r--r-- | textproc/Makefile | 1 | ||||
-rw-r--r-- | textproc/snowballstemmer/Makefile | 36 | ||||
-rw-r--r-- | textproc/snowballstemmer/distinfo | 3 | ||||
-rw-r--r-- | textproc/snowballstemmer/files/patch-GNUmakefile | 26 | ||||
-rw-r--r-- | textproc/snowballstemmer/files/patch-libstemmer_symbol.map | 9 | ||||
-rw-r--r-- | textproc/snowballstemmer/pkg-descr | 4 |
6 files changed, 79 insertions, 0 deletions
diff --git a/textproc/Makefile b/textproc/Makefile index 2097709feb57..abdc8f03ce23 100644 --- a/textproc/Makefile +++ b/textproc/Makefile @@ -1804,6 +1804,7 @@ SUBDIR += slowcat SUBDIR += smi SUBDIR += smu + SUBDIR += snowballstemmer SUBDIR += so-hunspell SUBDIR += sonic SUBDIR += soothsayer diff --git a/textproc/snowballstemmer/Makefile b/textproc/snowballstemmer/Makefile new file mode 100644 index 000000000000..bac448feb436 --- /dev/null +++ b/textproc/snowballstemmer/Makefile @@ -0,0 +1,36 @@ +PORTNAME= snowballstemmer +PORTVERSION= 2.1.0 +DISTVERSIONPREFIX= v +CATEGORIES= textproc + +MAINTAINER= madpilot@FreeBSD.org +COMMENT= Snowball stemmer library for C + +LICENSE= BSD3CLAUSE + +USES= gmake perl5 +USE_PERL5= build +USE_LDCONFIG= yes + +MAKEFILE= GNUmakefile + +USE_GITHUB= yes +GH_ACCOUNT= snowballstem +GH_PROJECT= snowball + +PLIST_FILES= bin/stemwords \ + include/libstemmer.h \ + lib/libstemmer.so \ + lib/libstemmer.so.0 \ + lib/libstemmer.so.0.0.0 + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/stemwords ${STAGEDIR}${PREFIX}/bin + ${INSTALL_DATA} ${WRKSRC}/include/libstemmer.h ${STAGEDIR}${PREFIX}/include + ${INSTALL_LIB} ${WRKSRC}/libstemmer.so.0.0.0 ${STAGEDIR}${PREFIX}/lib + ${RLN} ${STAGEDIR}${PREFIX}/lib/libstemmer.so.0.0.0 \ + ${STAGEDIR}${PREFIX}/lib/libstemmer.so.0 + ${RLN} ${STAGEDIR}${PREFIX}/lib/libstemmer.so.0.0.0 \ + ${STAGEDIR}${PREFIX}/lib/libstemmer.so + +.include <bsd.port.mk> diff --git a/textproc/snowballstemmer/distinfo b/textproc/snowballstemmer/distinfo new file mode 100644 index 000000000000..e855d881d73f --- /dev/null +++ b/textproc/snowballstemmer/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1624638772 +SHA256 (snowballstem-snowball-v2.1.0_GH0.tar.gz) = 24ae0b28d6531190c2cd960d515ec9374d3a3d9420c4a0accdf89b7f02fc9caa +SIZE (snowballstem-snowball-v2.1.0_GH0.tar.gz) = 220324 diff --git a/textproc/snowballstemmer/files/patch-GNUmakefile b/textproc/snowballstemmer/files/patch-GNUmakefile new file mode 100644 index 000000000000..0e24e6627d92 --- /dev/null +++ b/textproc/snowballstemmer/files/patch-GNUmakefile @@ -0,0 +1,26 @@ +--- GNUmakefile.orig 2021-01-21 04:50:09 UTC ++++ GNUmakefile +@@ -162,10 +162,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 -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.o libstemmer.so stemwords $(C_OTHER_SOURCES) $(C_OTHER_HEADERS) $(C_OTHER_OBJECTS) + + clean: + rm -f $(COMPILER_OBJECTS) $(RUNTIME_OBJECTS) \ +@@ -211,6 +211,9 @@ libstemmer/libstemmer.o: libstemmer/modules.h $(C_LIB_ + + 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 $@.0.0.0 $^ + + stemwords: $(STEMWORDS_OBJECTS) libstemmer.o + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ diff --git a/textproc/snowballstemmer/files/patch-libstemmer_symbol.map b/textproc/snowballstemmer/files/patch-libstemmer_symbol.map new file mode 100644 index 000000000000..525ca823557e --- /dev/null +++ b/textproc/snowballstemmer/files/patch-libstemmer_symbol.map @@ -0,0 +1,9 @@ +--- libstemmer/symbol.map.orig 2021-06-25 16:40:40 UTC ++++ libstemmer/symbol.map +@@ -0,0 +1,6 @@ ++SB_STEMMER_0 { ++ global: ++ sb_stemmer_*; ++ local: ++ *; ++}; diff --git a/textproc/snowballstemmer/pkg-descr b/textproc/snowballstemmer/pkg-descr new file mode 100644 index 000000000000..0f4729365302 --- /dev/null +++ b/textproc/snowballstemmer/pkg-descr @@ -0,0 +1,4 @@ +Stemming algorithms library for the C language provided by the +snowball project. + +WWW: https://snowballstem.org/ |