[arch-commits] Commit in snowball/repos (3 files)

Antonio Rojas arojas at gemini.archlinux.org
Sun Nov 21 16:55:52 UTC 2021


    Date: Sunday, November 21, 2021 @ 16:55:51
  Author: arojas
Revision: 428760

archrelease: copy trunk to testing-x86_64

Added:
  snowball/repos/testing-x86_64/
  snowball/repos/testing-x86_64/PKGBUILD
    (from rev 428759, snowball/trunk/PKGBUILD)
  snowball/repos/testing-x86_64/dynamiclib.patch
    (from rev 428759, snowball/trunk/dynamiclib.patch)

------------------+
 PKGBUILD         |   62 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 dynamiclib.patch |   41 +++++++++++++++++++++++++++++++++++
 2 files changed, 103 insertions(+)

Copied: snowball/repos/testing-x86_64/PKGBUILD (from rev 428759, snowball/trunk/PKGBUILD)
===================================================================
--- testing-x86_64/PKGBUILD	                        (rev 0)
+++ testing-x86_64/PKGBUILD	2021-11-21 16:55:51 UTC (rev 428760)
@@ -0,0 +1,62 @@
+# Maintainer: Jan Alexander Steffens (heftig) <heftig at archlinux.org>
+
+pkgbase=snowball
+pkgname=(snowball libstemmer)
+pkgver=2.2.0
+pkgrel=1
+pkgdesc="String processing language for creating stemming algorithms"
+url="https://snowballstem.org/"
+arch=(x86_64)
+license=(BSD)
+depends=(glibc)
+makedepends=(git)
+_commit=48a67a2831005f49c48ec29a5837640e23e54e6b
+source=("git+https://github.com/snowballstem/snowball#commit=$_commit"
+        dynamiclib.patch)
+sha256sums=('SKIP'
+            '4620e8d90cdccfc89226e929bfee151bead14ee5f4a5778b873613b689b95416')
+
+pkgver() {
+  cd $pkgbase
+  git describe --tags | sed 's/^v//;s/-/+/g'
+}
+
+prepare() {
+  cd $pkgbase
+  git apply -3 ../dynamiclib.patch
+}
+
+build() {
+  cd $pkgbase
+  make
+}
+
+check() {
+  cd $pkgbase
+
+  # Disabled - needs external test data
+  #make check
+}
+
+package_snowball() {
+  cd $pkgbase
+
+  install -Dt "$pkgdir/usr/bin" snowball stemwords
+
+  install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 COPYING
+}
+
+package_libstemmer() {
+  pkgdesc="Stemming library supporting several languages"
+  provides=(libstemmer.so)
+
+  cd $pkgbase
+
+  install -Dt "$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/repos/testing-x86_64/dynamiclib.patch (from rev 428759, snowball/trunk/dynamiclib.patch)
===================================================================
--- testing-x86_64/dynamiclib.patch	                        (rev 0)
+++ testing-x86_64/dynamiclib.patch	2021-11-21 16:55:51 UTC (rev 428760)
@@ -0,0 +1,41 @@
+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:
++        *;
++};



More information about the arch-commits mailing list