summaryrefslogtreecommitdiffstats
path: root/meta-gnome/recipes-support
diff options
context:
space:
mode:
authorAndreas Müller <schnitzeltony@gmail.com>2019-10-25 09:21:02 +0200
committerKhem Raj <raj.khem@gmail.com>2019-10-25 10:42:44 -0700
commitbdbce2d403673e54ad712a100eabd6734a6f097d (patch)
tree2ff290aa1194bf6d73cbbefb3b9765a6ed25c32f /meta-gnome/recipes-support
parentae9f2ba86d2eff7cb601e5f9af4e689756d5fdef (diff)
downloadmeta-openembedded-bdbce2d403673e54ad712a100eabd6734a6f097d.tar.gz
libstemmer: initial add 2.0.0
It is a dependency for upcoming appstream-glib Signed-off-by: Andreas Müller <schnitzeltony@gmail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-gnome/recipes-support')
-rw-r--r--meta-gnome/recipes-support/libstemmer/libstemmer/0001-Build-so-lib.patch63
-rw-r--r--meta-gnome/recipes-support/libstemmer/libstemmer/0002-snowball-stemwords-do-link-with-LDFLAGS-set-by-build.patch46
-rw-r--r--meta-gnome/recipes-support/libstemmer/libstemmer_git.bb39
3 files changed, 148 insertions, 0 deletions
diff --git a/meta-gnome/recipes-support/libstemmer/libstemmer/0001-Build-so-lib.patch b/meta-gnome/recipes-support/libstemmer/libstemmer/0001-Build-so-lib.patch
new file mode 100644
index 000000000..73ebeb484
--- /dev/null
+++ b/meta-gnome/recipes-support/libstemmer/libstemmer/0001-Build-so-lib.patch
@@ -0,0 +1,63 @@
1From eacc9e9c62a3857ce1e2e24b81fc22d8ae91f422 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
3Date: Thu, 9 May 2019 22:06:48 +0200
4Subject: [PATCH] Build so-lib
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9Stolen from [1]
10
11[1] https://aur.archlinux.org/cgit/aur.git/commit/dynamiclib.patch?h=snowball-git&id=a9cbf4f42f3661e4b8f791cd4374233821716ea1
12
13Upstream-Status: Pending
14
15Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
16---
17 GNUmakefile | 7 +++++--
18 libstemmer/symbol.map | 6 ++++++
19 2 files changed, 11 insertions(+), 2 deletions(-)
20 create mode 100644 libstemmer/symbol.map
21
22diff --git a/GNUmakefile b/GNUmakefile
23index cbd6ff7..a85230b 100644
24--- a/GNUmakefile
25+++ b/GNUmakefile
26@@ -142,10 +142,10 @@ C_OTHER_OBJECTS = $(C_OTHER_SOURCES:.c=.o)
27 JAVA_CLASSES = $(JAVA_SOURCES:.java=.class)
28 JAVA_RUNTIME_CLASSES=$(JAVARUNTIME_SOURCES:.java=.class)
29
30-CFLAGS=-O2 -W -Wall -Wmissing-prototypes -Wmissing-declarations
31+CFLAGS=-O2 -fPIC -W -Wall -Wmissing-prototypes -Wmissing-declarations
32 CPPFLAGS=-Iinclude
33
34-all: snowball libstemmer.o stemwords $(C_OTHER_SOURCES) $(C_OTHER_HEADERS) $(C_OTHER_OBJECTS)
35+all: snowball libstemmer.o libstemmer.so stemwords $(C_OTHER_SOURCES) $(C_OTHER_HEADERS) $(C_OTHER_OBJECTS)
36
37 clean:
38 rm -f $(COMPILER_OBJECTS) $(RUNTIME_OBJECTS) \
39@@ -192,6 +192,9 @@ libstemmer/libstemmer.o: libstemmer/modules.h $(C_LIB_HEADERS)
40 libstemmer.o: libstemmer/libstemmer.o $(RUNTIME_OBJECTS) $(C_LIB_OBJECTS)
41 $(AR) -cru $@ $^
42
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 $^
45+
46 stemwords: $(STEMWORDS_OBJECTS) libstemmer.o
47 $(CC) $(CFLAGS) -o $@ $^
48
49diff --git a/libstemmer/symbol.map b/libstemmer/symbol.map
50new file mode 100644
51index 0000000..7a3d423
52--- /dev/null
53+++ b/libstemmer/symbol.map
54@@ -0,0 +1,6 @@
55+SB_STEMMER_0 {
56+ global:
57+ sb_stemmer_*;
58+ local:
59+ *;
60+};
61--
622.20.1
63
diff --git a/meta-gnome/recipes-support/libstemmer/libstemmer/0002-snowball-stemwords-do-link-with-LDFLAGS-set-by-build.patch b/meta-gnome/recipes-support/libstemmer/libstemmer/0002-snowball-stemwords-do-link-with-LDFLAGS-set-by-build.patch
new file mode 100644
index 000000000..69c1d670e
--- /dev/null
+++ b/meta-gnome/recipes-support/libstemmer/libstemmer/0002-snowball-stemwords-do-link-with-LDFLAGS-set-by-build.patch
@@ -0,0 +1,46 @@
1From 23eacfbcc10c777ce47283a5285455ec83c8aa41 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
3Date: Sun, 6 Oct 2019 13:05:08 +0200
4Subject: [PATCH] snowball/stemwords: do link with LDFLAGS set by build
5 environment
6MIME-Version: 1.0
7Content-Type: text/plain; charset=UTF-8
8Content-Transfer-Encoding: 8bit
9
10Some (cross-)build systems as OpeneEmbedded are picky (for certain reasons) if
11their LDFLAGS are ignored.
12
13Upstream-Status: Submitted [1]
14
15[1] https://github.com/snowballstem/snowball/pull/120
16
17Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
18---
19 GNUmakefile | 4 ++--
20 1 file changed, 2 insertions(+), 2 deletions(-)
21
22diff --git a/GNUmakefile b/GNUmakefile
23index 76f6ae9..47c6077 100644
24--- a/GNUmakefile
25+++ b/GNUmakefile
26@@ -179,7 +179,7 @@ clean:
27 -rmdir $(js_output_dir)
28
29 snowball: $(COMPILER_OBJECTS)
30- $(CC) $(CFLAGS) -o $@ $^
31+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
32
33 $(COMPILER_OBJECTS): $(COMPILER_HEADERS)
34
35@@ -204,7 +204,7 @@ libstemmer.so: libstemmer/libstemmer.o $(RUNTIME_OBJECTS) $(C_LIB_OBJECTS)
36 $(CC) $(CFLAGS) -shared $(LDFLAGS) -Wl,-soname,libstemmer.so.0,-version-script,libstemmer/symbol.map -o $@.0.0.0 $^
37
38 stemwords: $(STEMWORDS_OBJECTS) libstemmer.o
39- $(CC) $(CFLAGS) -o $@ $^
40+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
41
42 csharp_stemwords: $(CSHARP_STEMWORDS_SOURCES) $(CSHARP_RUNTIME_SOURCES) $(CSHARP_SOURCES)
43 $(MCS) -unsafe -target:exe -out:$@ $(CSHARP_STEMWORDS_SOURCES) $(CSHARP_RUNTIME_SOURCES) $(CSHARP_SOURCES)
44--
452.21.0
46
diff --git a/meta-gnome/recipes-support/libstemmer/libstemmer_git.bb b/meta-gnome/recipes-support/libstemmer/libstemmer_git.bb
new file mode 100644
index 000000000..96dd880b6
--- /dev/null
+++ b/meta-gnome/recipes-support/libstemmer/libstemmer_git.bb
@@ -0,0 +1,39 @@
1SUMMARY = "Snowball compiler and stemming algorithms"
2HOMEPAGE = "https://snowballstem.org/"
3LICENSE = "BSD-3-Clause"
4LIC_FILES_CHKSUM = "file://COPYING;md5=2750797da77c1d784e7626b3f7d7ff3e"
5
6DEPENDS_class-target = "${BPN}-native"
7
8SRC_URI = "\
9 git://github.com/snowballstem/snowball.git \
10 file://0001-Build-so-lib.patch \
11 file://0002-snowball-stemwords-do-link-with-LDFLAGS-set-by-build.patch \
12"
13SRCREV = "c70ed64f9d41c1032fba4e962b054f8e9d489a74"
14S = "${WORKDIR}/git"
15PV = "2.0.0"
16LIBVER = "0.0.0"
17
18inherit lib_package
19
20BBCLASSEXTEND = "native"
21
22do_compile_prepend_class-target() {
23 # use native tools
24 sed -i 's:./snowball :snowball :g' ${S}/GNUmakefile
25}
26
27do_install() {
28 install -d ${D}${bindir}
29 install -m 755 ${S}/snowball ${D}${bindir}
30 install -m 755 ${S}/stemwords ${D}${bindir}
31
32 install -d ${D}${libdir}
33 install -m 755 ${S}/libstemmer.so.${LIBVER} ${D}${libdir}/
34 ln -s libstemmer.so.${LIBVER} ${D}${libdir}/libstemmer.so.0
35 ln -s libstemmer.so.${LIBVER} ${D}${libdir}/libstemmer.so
36
37 install -d ${D}${includedir}
38 install -m 644 ${S}/include/*.h ${D}${includedir}
39}