[arch-commits] Commit in snowball/trunk (PKGBUILD dynamiclib.patch)
Jan Steffens
heftig at archlinux.org
Wed Mar 30 21:57:26 UTC 2016
Date: Wednesday, March 30, 2016 @ 23:57:26
Author: heftig
Revision: 263445
Properly export symbols from lib
Added:
snowball/trunk/dynamiclib.patch
Modified:
snowball/trunk/PKGBUILD
------------------+
PKGBUILD | 17 +++++++++++------
dynamiclib.patch | 39 +++++++++++++++++++++++++++++++++++++++
2 files changed, 50 insertions(+), 6 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2016-03-30 21:24:18 UTC (rev 263444)
+++ PKGBUILD 2016-03-30 21:57:26 UTC (rev 263445)
@@ -4,7 +4,7 @@
pkgbase=snowball
pkgname=(snowball libstemmer)
pkgver=0+337
-pkgrel=1
+pkgrel=2
pkgdesc="String processing language for creating stemming algorithms"
arch=(i686 x86_64)
url="http://snowballstem.org/"
@@ -12,9 +12,16 @@
depends=(glibc)
makedepends=(git)
_commit=fc2adaa96b0561506e6c1a80d73de7f4e0fa9663
-source=("git+https://github.com/snowballstem/snowball#commit=$_commit")
-sha256sums=('SKIP')
+source=("git+https://github.com/snowballstem/snowball#commit=$_commit"
+ dynamiclib.patch)
+sha256sums=('SKIP'
+ '99511a11cdeeb1ef1eaa9d7b777f6934693d4696ba9523de40b886f7d898058e')
+prepare() {
+ cd $pkgbase
+ patch -Np1 -i ../dynamiclib.patch
+}
+
pkgver() {
cd $pkgbase
echo "0+$(git rev-list --count HEAD)"
@@ -23,8 +30,6 @@
build() {
cd $pkgbase
make
- ${CC:-cc} ${CFLAGS} -shared ${LDFLAGS} -Wl,-soname,libstemmer.so.0 \
- -o libstemmer.so.0.0.0 libstemmer.o
}
check() {
@@ -44,7 +49,7 @@
pkgdesc="Stemming library supporting several languages"
cd $pkgbase
install -Dm644 {.,"$pkgdir"/usr}/include/libstemmer.h
- install -Dm644 {.,"$pkgdir"/usr/lib}/libstemmer.so.0.0.0
+ install -D {.,"$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"
Added: dynamiclib.patch
===================================================================
--- dynamiclib.patch (rev 0)
+++ dynamiclib.patch 2016-03-30 21:57:26 UTC (rev 263445)
@@ -0,0 +1,39 @@
+diff --git c/GNUmakefile i/GNUmakefile
+index 1693f5a..b33a42e 100644
+--- c/GNUmakefile
++++ i/GNUmakefile
+@@ -112,10 +112,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
++CFLAGS=-O2 -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) \
+@@ -158,6 +158,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 $@.0.0.0 $^
++
+ stemwords: $(STEMWORDS_OBJECTS) libstemmer.o
+ $(CC) -o $@ $^
+
+diff --git c/libstemmer/symbol.map i/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