[arch-commits] Commit in snowball/trunk (PKGBUILD dynamiclib.patch)

Jan Steffens heftig at gemini.archlinux.org
Fri Aug 13 19:08:16 UTC 2021


    Date: Friday, August 13, 2021 @ 19:08:16
  Author: heftig
Revision: 422071

2.1.0-1

Modified:
  snowball/trunk/PKGBUILD
  snowball/trunk/dynamiclib.patch

------------------+
 PKGBUILD         |   35 +++++++++++++++++++-------------
 dynamiclib.patch |   57 ++++++-----------------------------------------------
 2 files changed, 28 insertions(+), 64 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2021-08-13 17:49:13 UTC (rev 422070)
+++ PKGBUILD	2021-08-13 19:08:16 UTC (rev 422071)
@@ -1,29 +1,29 @@
-# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens at gmail.com>
+# Maintainer: Jan Alexander Steffens (heftig) <heftig at archlinux.org>
 
 pkgbase=snowball
 pkgname=(snowball libstemmer)
-pkgver=0+713
-pkgrel=2
+pkgver=2.1.0
+pkgrel=1
 pkgdesc="String processing language for creating stemming algorithms"
+url="https://snowballstem.org/"
 arch=(x86_64)
-url="https://snowballstem.org/"
 license=(BSD)
 depends=(glibc)
 makedepends=(git)
-_commit=8c73aa900e168a96e046ec9ed6f13739c3dfacb0  # master
+_commit=4764395431c8f2a0b4fe18b816ab1fc966a45837  # tags/v2.1.0^0
 source=("git+https://github.com/snowballstem/snowball#commit=$_commit"
         dynamiclib.patch)
 sha256sums=('SKIP'
-            'ea34c201bf619d14b0eb1207589641ca1f1cb8131efb4b422b3dd3501c49231e')
+            'fb8069aa4d1b5194fb8be231f87269f7a8fefdb3de0c20e2f0537fb4c9260328')
 
 pkgver() {
   cd $pkgbase
-  echo "0+$(git rev-list --count HEAD)"
+  git describe --tags | sed 's/^v//;s/-/+/g'
 }
 
 prepare() {
   cd $pkgbase
-  patch -Np1 -i ../dynamiclib.patch
+  git apply -3 ../dynamiclib.patch
 }
 
 build() {
@@ -33,6 +33,7 @@
 
 check() {
   cd $pkgbase
+
   # Disabled - needs external test data
   #make check
 }
@@ -39,17 +40,23 @@
 
 package_snowball() {
   cd $pkgbase
-  install -d "$pkgdir/usr/bin"
-  install -t "$pkgdir/usr/bin" snowball stemwords
-  install -Dm644 COPYING "$pkgdir/usr/share/licenses/snowball/LICENSE"
+
+  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 -Dm644 {.,"$pkgdir"/usr}/include/libstemmer.h
-  install -D {.,"$pkgdir"/usr/lib}/libstemmer.so.0.0.0
+
+  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 -Dm644 COPYING "$pkgdir/usr/share/licenses/libstemmer/LICENSE"
+
+  install -Dt "$pkgdir/usr/include" -m644 include/libstemmer.h
+
+  install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 COPYING
 }

Modified: dynamiclib.patch
===================================================================
--- dynamiclib.patch	2021-08-13 17:49:13 UTC (rev 422070)
+++ dynamiclib.patch	2021-08-13 19:08:16 UTC (rev 422071)
@@ -1,12 +1,12 @@
- GNUmakefile           | 13 ++++++++-----
- libstemmer/symbol.map |  6 ++++++
- 2 files changed, 14 insertions(+), 5 deletions(-)
+ GNUmakefile           | 9 ++++++---
+ libstemmer/symbol.map | 6 ++++++
+ 2 files changed, 12 insertions(+), 3 deletions(-)
 
 diff --git c/GNUmakefile i/GNUmakefile
-index d100917..d9eb543 100644
+index 5cb2179..e66176b 100644
 --- c/GNUmakefile
 +++ i/GNUmakefile
-@@ -144,58 +144,61 @@ C_OTHER_OBJECTS = $(C_OTHER_SOURCES:.c=.o)
+@@ -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)
  
@@ -20,47 +20,7 @@
  
  clean:
  	rm -f $(COMPILER_OBJECTS) $(RUNTIME_OBJECTS) \
- 	      $(LIBSTEMMER_OBJECTS) $(LIBSTEMMER_UTF8_OBJECTS) $(STEMWORDS_OBJECTS) snowball \
- 	      libstemmer.o stemwords \
-               libstemmer/modules.h \
-               libstemmer/modules_utf8.h \
-               snowball.splint \
- 	      $(C_LIB_SOURCES) $(C_LIB_HEADERS) $(C_LIB_OBJECTS) \
- 	      $(C_OTHER_SOURCES) $(C_OTHER_HEADERS) $(C_OTHER_OBJECTS) \
- 	      $(JAVA_SOURCES) $(JAVA_CLASSES) $(JAVA_RUNTIME_CLASSES) \
- 	      $(CSHARP_SOURCES) \
- 	      $(PASCAL_SOURCES) pascal/stemwords.dpr pascal/stemwords pascal/*.o pascal/*.ppu \
- 	      $(PYTHON_SOURCES) \
- 	      $(JS_SOURCES) \
- 	      $(RUST_SOURCES) \
-               libstemmer/mkinc.mak libstemmer/mkinc_utf8.mak \
-               libstemmer/libstemmer.c libstemmer/libstemmer_utf8.c \
- 	      algorithms.mk
- 	rm -rf dist
- 	rmdir $(c_src_dir) || true
- 	rmdir $(python_output_dir) || true
- 	rmdir $(js_output_dir) || true
- 
- snowball: $(COMPILER_OBJECTS)
--	$(CC) $(CFLAGS) -o $@ $^
-+	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
- 
- $(COMPILER_OBJECTS): $(COMPILER_HEADERS)
- 
- libstemmer/libstemmer.c: libstemmer/libstemmer_c.in
- 	sed 's/@MODULES_H@/modules.h/' $^ >$@
- 
- libstemmer/libstemmer_utf8.c: libstemmer/libstemmer_c.in
- 	sed 's/@MODULES_H@/modules_utf8.h/' $^ >$@
- 
- libstemmer/modules.h libstemmer/mkinc.mak: libstemmer/mkmodules.pl libstemmer/modules.txt
- 	libstemmer/mkmodules.pl $@ $(c_src_dir) libstemmer/modules.txt libstemmer/mkinc.mak
- 
- libstemmer/modules_utf8.h libstemmer/mkinc_utf8.mak: libstemmer/mkmodules.pl libstemmer/modules.txt
- 	libstemmer/mkmodules.pl $@ $(c_src_dir) libstemmer/modules.txt libstemmer/mkinc_utf8.mak utf8
- 
- libstemmer/libstemmer.o: libstemmer/modules.h $(C_LIB_HEADERS)
- 
+@@ -212,6 +212,9 @@ libstemmer/libstemmer.o: libstemmer/modules.h $(C_LIB_HEADERS)
  libstemmer.o: libstemmer/libstemmer.o $(RUNTIME_OBJECTS) $(C_LIB_OBJECTS)
  	$(AR) -cru $@ $^
  
@@ -68,11 +28,8 @@
 +	$(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) -o $@ $^
-+	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
+ 	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
  
- csharp_stemwords: $(CSHARP_STEMWORDS_SOURCES) $(CSHARP_RUNTIME_SOURCES) $(CSHARP_SOURCES)
- 	$(MCS) -unsafe -target:exe -out:$@ $(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



More information about the arch-commits mailing list