diff --git a/meta-oe/recipes-support/libstemmer/libstemmer/0001-Build-so-lib.patch b/meta-oe/recipes-support/libstemmer/libstemmer/0001-Build-so-lib.patch index 37c5c3dc02..2529d5d9d1 100644 --- a/meta-oe/recipes-support/libstemmer/libstemmer/0001-Build-so-lib.patch +++ b/meta-oe/recipes-support/libstemmer/libstemmer/0001-Build-so-lib.patch @@ -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 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 - diff --git a/meta-oe/recipes-support/libstemmer/libstemmer_git.bb b/meta-oe/recipes-support/libstemmer/libstemmer_2.2.0.bb similarity index 72% rename from meta-oe/recipes-support/libstemmer/libstemmer_git.bb rename to meta-oe/recipes-support/libstemmer/libstemmer_2.2.0.bb index 7f0706e207..be2935a385 100644 --- a/meta-oe/recipes-support/libstemmer/libstemmer_git.bb +++ b/meta-oe/recipes-support/libstemmer/libstemmer_2.2.0.bb @@ -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"