Date: Fri, 25 Jun 2021 20:43:10 GMT From: Guido Falsi <madpilot@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: 2dcaa8bee5e9 - main - textproc/snowballstemmer: New port Message-ID: <202106252043.15PKhAtg053470@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by madpilot: URL: https://cgit.FreeBSD.org/ports/commit/?id=2dcaa8bee5e9f3fcff601589c709e2734194b21e commit 2dcaa8bee5e9f3fcff601589c709e2734194b21e Author: Guido Falsi <madpilot@FreeBSD.org> AuthorDate: 2021-06-25 20:39:46 +0000 Commit: Guido Falsi <madpilot@FreeBSD.org> CommitDate: 2021-06-25 20:43:05 +0000 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. --- textproc/Makefile | 1 + textproc/snowballstemmer/Makefile | 36 ++++++++++++++++++++++ textproc/snowballstemmer/distinfo | 3 ++ textproc/snowballstemmer/files/patch-GNUmakefile | 26 ++++++++++++++++ .../files/patch-libstemmer_symbol.map | 9 ++++++ textproc/snowballstemmer/pkg-descr | 4 +++ 6 files changed, 79 insertions(+) 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/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202106252043.15PKhAtg053470>