libstemmer: Update to 2.2.0

Rename recipe to reflect PV
Refresh solibs build patch

Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Khem Raj 2023-04-02 10:19:39 -07:00
parent 77c6192de7
commit 60afa577e5
2 changed files with 22 additions and 29 deletions

View File

@ -8,7 +8,7 @@ Content-Transfer-Encoding: 8bit
Stolen from [1]
[1] https://aur.archlinux.org/cgit/aur.git/commit/dynamiclib.patch?h=snowball-git&id=a9cbf4f42f3661e4b8f791cd4374233821716ea1
[1] https://raw.githubusercontent.com/archlinux/svntogit-packages/packages/snowball/trunk/dynamiclib.diff
Upstream-Status: Pending
@ -19,36 +19,33 @@ Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
2 files changed, 11 insertions(+), 2 deletions(-)
create mode 100644 libstemmer/symbol.map
diff --git a/GNUmakefile b/GNUmakefile
index cbd6ff7..a85230b 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -162,10 +162,10 @@ C_OTHER_OBJECTS = $(C_OTHER_SOURCES:.c=.o)
@@ -170,12 +170,12 @@ C_OTHER_OBJECTS = $(C_OTHER_SOURCES:.c=.
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
CPPFLAGS=
-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)
INCLUDES=-Iinclude
clean:
rm -f $(COMPILER_OBJECTS) $(RUNTIME_OBJECTS) \
@@ -212,6 +212,9 @@ libstemmer/libstemmer.o: libstemmer/modules.h $(C_LIB_HEADERS)
libstemmer.o: libstemmer/libstemmer.o $(RUNTIME_OBJECTS) $(C_LIB_OBJECTS)
-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
@@ -225,6 +225,9 @@ libstemmer/libstemmer.o: libstemmer/modu
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 $^
+
stemwords: $(STEMWORDS_OBJECTS) libstemmer.o
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
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
+++ b/libstemmer/symbol.map
@@ -0,0 +1,6 @@
@ -58,6 +55,3 @@ index 0000000..7a3d423
+ local:
+ *;
+};
--
2.20.1

View File

@ -3,21 +3,18 @@ HOMEPAGE = "https://snowballstem.org/"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://COPYING;md5=19139aaf3c8c8fa1ca6edd59c072fb9f"
DEPENDS:class-target = "${BPN}-native"
DEPENDS:append:class-target = " ${BPN}-native"
SRC_URI = "\
git://github.com/snowballstem/snowball.git;branch=master;protocol=https \
file://0001-Build-so-lib.patch \
"
SRCREV = "4764395431c8f2a0b4fe18b816ab1fc966a45837"
SRC_URI = "git://github.com/snowballstem/snowball.git;branch=master;protocol=https \
file://0001-Build-so-lib.patch \
"
SRCREV = "48a67a2831005f49c48ec29a5837640e23e54e6b"
S = "${WORKDIR}/git"
PV = "2.1.0"
LIBVER = "0.0.0"
inherit lib_package
BBCLASSEXTEND = "native"
do_compile:prepend:class-target() {
# use native tools
sed -i 's:./snowball :snowball :g' ${S}/GNUmakefile
@ -34,5 +31,7 @@ do_install() {
ln -s libstemmer.so.${LIBVER} ${D}${libdir}/libstemmer.so
install -d ${D}${includedir}
install -m 644 ${S}/include/*.h ${D}${includedir}
install -m 644 ${S}/include/*.h ${D}${includedir}
}
BBCLASSEXTEND = "native"