diff options
Diffstat (limited to 'meta-oe/recipes-support/libstemmer')
-rw-r--r-- | meta-oe/recipes-support/libstemmer/libstemmer/0001-Build-so-lib.patch | 57 | ||||
-rw-r--r-- | meta-oe/recipes-support/libstemmer/libstemmer_2.2.0.bb | 37 |
2 files changed, 94 insertions, 0 deletions
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 new file mode 100644 index 0000000000..2529d5d9d1 --- /dev/null +++ b/meta-oe/recipes-support/libstemmer/libstemmer/0001-Build-so-lib.patch @@ -0,0 +1,57 @@ +From eacc9e9c62a3857ce1e2e24b81fc22d8ae91f422 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com> +Date: Thu, 9 May 2019 22:06:48 +0200 +Subject: [PATCH] Build so-lib +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Stolen from [1] + +[1] https://raw.githubusercontent.com/archlinux/svntogit-packages/packages/snowball/trunk/dynamiclib.diff + +Upstream-Status: Pending + +Signed-off-by: Andreas Müller <schnitzeltony@gmail.com> +--- + GNUmakefile | 7 +++++-- + libstemmer/symbol.map | 6 ++++++ + 2 files changed, 11 insertions(+), 2 deletions(-) + create mode 100644 libstemmer/symbol.map + +--- a/GNUmakefile ++++ b/GNUmakefile +@@ -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= + + 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 +@@ -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 $^ ++ + examples/%.o: examples/%.c + $(CC) $(CFLAGS) $(INCLUDES) $(CPPFLAGS) -c -o $@ $< + +--- /dev/null ++++ b/libstemmer/symbol.map +@@ -0,0 +1,6 @@ ++SB_STEMMER_0 { ++ global: ++ sb_stemmer_*; ++ local: ++ *; ++}; diff --git a/meta-oe/recipes-support/libstemmer/libstemmer_2.2.0.bb b/meta-oe/recipes-support/libstemmer/libstemmer_2.2.0.bb new file mode 100644 index 0000000000..be2935a385 --- /dev/null +++ b/meta-oe/recipes-support/libstemmer/libstemmer_2.2.0.bb @@ -0,0 +1,37 @@ +SUMMARY = "Snowball compiler and stemming algorithms" +HOMEPAGE = "https://snowballstem.org/" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://COPYING;md5=19139aaf3c8c8fa1ca6edd59c072fb9f" + +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 = "48a67a2831005f49c48ec29a5837640e23e54e6b" +S = "${WORKDIR}/git" + +LIBVER = "0.0.0" + +inherit lib_package + +do_compile:prepend:class-target() { + # use native tools + sed -i 's:./snowball :snowball :g' ${S}/GNUmakefile +} + +do_install() { + install -d ${D}${bindir} + install -m 755 ${S}/snowball ${D}${bindir} + install -m 755 ${S}/stemwords ${D}${bindir} + + install -d ${D}${libdir} + install -m 755 ${S}/libstemmer.so.${LIBVER} ${D}${libdir}/ + ln -s libstemmer.so.${LIBVER} ${D}${libdir}/libstemmer.so.0 + ln -s libstemmer.so.${LIBVER} ${D}${libdir}/libstemmer.so + + install -d ${D}${includedir} + install -m 644 ${S}/include/*.h ${D}${includedir} +} + +BBCLASSEXTEND = "native" |