summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-oe/recipes-support/libstemmer/libstemmer/0001-Build-so-lib.patch32
-rw-r--r--meta-oe/recipes-support/libstemmer/libstemmer_2.2.0.bb (renamed from meta-oe/recipes-support/libstemmer/libstemmer_git.bb)19
2 files changed, 22 insertions, 29 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
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
8 8
9Stolen from [1] 9Stolen from [1]
10 10
11[1] https://aur.archlinux.org/cgit/aur.git/commit/dynamiclib.patch?h=snowball-git&id=a9cbf4f42f3661e4b8f791cd4374233821716ea1 11[1] https://raw.githubusercontent.com/archlinux/svntogit-packages/packages/snowball/trunk/dynamiclib.diff
12 12
13Upstream-Status: Pending 13Upstream-Status: Pending
14 14
@@ -19,36 +19,33 @@ Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
19 2 files changed, 11 insertions(+), 2 deletions(-) 19 2 files changed, 11 insertions(+), 2 deletions(-)
20 create mode 100644 libstemmer/symbol.map 20 create mode 100644 libstemmer/symbol.map
21 21
22diff --git a/GNUmakefile b/GNUmakefile
23index cbd6ff7..a85230b 100644
24--- a/GNUmakefile 22--- a/GNUmakefile
25+++ b/GNUmakefile 23+++ b/GNUmakefile
26@@ -162,10 +162,10 @@ C_OTHER_OBJECTS = $(C_OTHER_SOURCES:.c=.o) 24@@ -170,12 +170,12 @@ C_OTHER_OBJECTS = $(C_OTHER_SOURCES:.c=.
27 JAVA_CLASSES = $(JAVA_SOURCES:.java=.class) 25 JAVA_CLASSES = $(JAVA_SOURCES:.java=.class)
28 JAVA_RUNTIME_CLASSES=$(JAVARUNTIME_SOURCES:.java=.class) 26 JAVA_RUNTIME_CLASSES=$(JAVARUNTIME_SOURCES:.java=.class)
29 27
30-CFLAGS=-O2 -W -Wall -Wmissing-prototypes -Wmissing-declarations 28-CFLAGS=-O2 -W -Wall -Wmissing-prototypes -Wmissing-declarations
31+CFLAGS=-O2 -fPIC -W -Wall -Wmissing-prototypes -Wmissing-declarations 29+CFLAGS=-O2 -fPIC -W -Wall -Wmissing-prototypes -Wmissing-declarations
32 CPPFLAGS=-Iinclude 30 CPPFLAGS=
33 31
34-all: snowball libstemmer.o stemwords $(C_OTHER_SOURCES) $(C_OTHER_HEADERS) $(C_OTHER_OBJECTS) 32 INCLUDES=-Iinclude
35+all: snowball libstemmer.o libstemmer.so stemwords $(C_OTHER_SOURCES) $(C_OTHER_HEADERS) $(C_OTHER_OBJECTS)
36 33
37 clean: 34-all: snowball$(EXEEXT) libstemmer.a stemwords$(EXEEXT) $(C_OTHER_SOURCES) $(C_OTHER_HEADERS) $(C_OTHER_OBJECTS)
38 rm -f $(COMPILER_OBJECTS) $(RUNTIME_OBJECTS) \ 35+all: snowball$(EXEEXT) libstemmer.a libstemmer.so stemwords$(EXEEXT) $(C_OTHER_SOURCES) $(C_OTHER_HEADERS) $(C_OTHER_OBJECTS)
39@@ -212,6 +212,9 @@ libstemmer/libstemmer.o: libstemmer/modules.h $(C_LIB_HEADERS) 36
40 libstemmer.o: libstemmer/libstemmer.o $(RUNTIME_OBJECTS) $(C_LIB_OBJECTS) 37 algorithms.mk: libstemmer/mkalgorithms.pl libstemmer/modules.txt
38 libstemmer/mkalgorithms.pl algorithms.mk libstemmer/modules.txt
39@@ -225,6 +225,9 @@ libstemmer/libstemmer.o: libstemmer/modu
40 libstemmer.a: libstemmer/libstemmer.o $(RUNTIME_OBJECTS) $(C_LIB_OBJECTS)
41 $(AR) -cru $@ $^ 41 $(AR) -cru $@ $^
42 42
43+libstemmer.so: libstemmer/libstemmer.o $(RUNTIME_OBJECTS) $(C_LIB_OBJECTS) 43+libstemmer.so: libstemmer/libstemmer.o $(RUNTIME_OBJECTS) $(C_LIB_OBJECTS)
44+ $(CC) $(CFLAGS) -shared $(LDFLAGS) -Wl,-soname,libstemmer.so.0,-version-script,libstemmer/symbol.map -o $@.0.0.0 $^ 44+ $(CC) $(CFLAGS) -shared $(LDFLAGS) -Wl,-soname,libstemmer.so.0,-version-script,libstemmer/symbol.map -o $@.0.0.0 $^
45+ 45+
46 stemwords: $(STEMWORDS_OBJECTS) libstemmer.o 46 examples/%.o: examples/%.c
47 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ 47 $(CC) $(CFLAGS) $(INCLUDES) $(CPPFLAGS) -c -o $@ $<
48 48
49diff --git a/libstemmer/symbol.map b/libstemmer/symbol.map
50new file mode 100644
51index 0000000..7a3d423
52--- /dev/null 49--- /dev/null
53+++ b/libstemmer/symbol.map 50+++ b/libstemmer/symbol.map
54@@ -0,0 +1,6 @@ 51@@ -0,0 +1,6 @@
@@ -58,6 +55,3 @@ index 0000000..7a3d423
58+ local: 55+ local:
59+ *; 56+ *;
60+}; 57+};
61--
622.20.1
63
diff --git a/meta-oe/recipes-support/libstemmer/libstemmer_git.bb b/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/"
3LICENSE = "BSD-3-Clause" 3LICENSE = "BSD-3-Clause"
4LIC_FILES_CHKSUM = "file://COPYING;md5=19139aaf3c8c8fa1ca6edd59c072fb9f" 4LIC_FILES_CHKSUM = "file://COPYING;md5=19139aaf3c8c8fa1ca6edd59c072fb9f"
5 5
6DEPENDS:class-target = "${BPN}-native" 6DEPENDS:append:class-target = " ${BPN}-native"
7 7
8SRC_URI = "\ 8SRC_URI = "git://github.com/snowballstem/snowball.git;branch=master;protocol=https \
9 git://github.com/snowballstem/snowball.git;branch=master;protocol=https \ 9 file://0001-Build-so-lib.patch \
10 file://0001-Build-so-lib.patch \ 10 "
11" 11SRCREV = "48a67a2831005f49c48ec29a5837640e23e54e6b"
12SRCREV = "4764395431c8f2a0b4fe18b816ab1fc966a45837"
13S = "${WORKDIR}/git" 12S = "${WORKDIR}/git"
14PV = "2.1.0" 13
15LIBVER = "0.0.0" 14LIBVER = "0.0.0"
16 15
17inherit lib_package 16inherit lib_package
18 17
19BBCLASSEXTEND = "native"
20
21do_compile:prepend:class-target() { 18do_compile:prepend:class-target() {
22 # use native tools 19 # use native tools
23 sed -i 's:./snowball :snowball :g' ${S}/GNUmakefile 20 sed -i 's:./snowball :snowball :g' ${S}/GNUmakefile
@@ -34,5 +31,7 @@ do_install() {
34 ln -s libstemmer.so.${LIBVER} ${D}${libdir}/libstemmer.so 31 ln -s libstemmer.so.${LIBVER} ${D}${libdir}/libstemmer.so
35 32
36 install -d ${D}${includedir} 33 install -d ${D}${includedir}
37 install -m 644 ${S}/include/*.h ${D}${includedir} 34 install -m 644 ${S}/include/*.h ${D}${includedir}
38} 35}
36
37BBCLASSEXTEND = "native"