All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Andreas Müller" <schnitzeltony@gmail.com>
To: openembedded-devel@lists.openembedded.org
Subject: [PATCH 04/15] libstemmer: initial add 2.0.0
Date: Fri, 25 Oct 2019 09:21:02 +0200	[thread overview]
Message-ID: <20191025072113.11172-5-schnitzeltony@gmail.com> (raw)
In-Reply-To: <20191025072113.11172-1-schnitzeltony@gmail.com>

It is a dependency for upcoming appstream-glib

Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
---
 .../libstemmer/0001-Build-so-lib.patch        | 63 +++++++++++++++++++
 ...ds-do-link-with-LDFLAGS-set-by-build.patch | 46 ++++++++++++++
 .../libstemmer/libstemmer_git.bb              | 39 ++++++++++++
 3 files changed, 148 insertions(+)
 create mode 100644 meta-gnome/recipes-support/libstemmer/libstemmer/0001-Build-so-lib.patch
 create mode 100644 meta-gnome/recipes-support/libstemmer/libstemmer/0002-snowball-stemwords-do-link-with-LDFLAGS-set-by-build.patch
 create mode 100644 meta-gnome/recipes-support/libstemmer/libstemmer_git.bb

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 @@
+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://aur.archlinux.org/cgit/aur.git/commit/dynamiclib.patch?h=snowball-git&id=a9cbf4f42f3661e4b8f791cd4374233821716ea1
+
+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
+
+diff --git a/GNUmakefile b/GNUmakefile
+index cbd6ff7..a85230b 100644
+--- a/GNUmakefile
++++ b/GNUmakefile
+@@ -142,10 +142,10 @@ C_OTHER_OBJECTS = $(C_OTHER_SOURCES:.c=.o)
+ 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
+ 
+-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)
+ 
+ clean:
+ 	rm -f $(COMPILER_OBJECTS) $(RUNTIME_OBJECTS) \
+@@ -192,6 +192,9 @@ libstemmer/libstemmer.o: libstemmer/modules.h $(C_LIB_HEADERS)
+ libstemmer.o: 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) -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 @@
++SB_STEMMER_0 {
++    global:
++        sb_stemmer_*;
++    local:
++        *;
++};
+-- 
+2.20.1
+
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 @@
+From 23eacfbcc10c777ce47283a5285455ec83c8aa41 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
+Date: Sun, 6 Oct 2019 13:05:08 +0200
+Subject: [PATCH] snowball/stemwords: do link with LDFLAGS set by build
+ environment
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Some (cross-)build systems as OpeneEmbedded are picky (for certain reasons) if
+their LDFLAGS are ignored.
+
+Upstream-Status: Submitted [1]
+
+[1] https://github.com/snowballstem/snowball/pull/120
+
+Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
+---
+ GNUmakefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/GNUmakefile b/GNUmakefile
+index 76f6ae9..47c6077 100644
+--- a/GNUmakefile
++++ b/GNUmakefile
+@@ -179,7 +179,7 @@ clean:
+ 	-rmdir $(js_output_dir)
+ 
+ snowball: $(COMPILER_OBJECTS)
+-	$(CC) $(CFLAGS) -o $@ $^
++	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
+ 
+ $(COMPILER_OBJECTS): $(COMPILER_HEADERS)
+ 
+@@ -204,7 +204,7 @@ 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) -o $@ $^
++	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
+ 
+ csharp_stemwords: $(CSHARP_STEMWORDS_SOURCES) $(CSHARP_RUNTIME_SOURCES) $(CSHARP_SOURCES)
+ 	$(MCS) -unsafe -target:exe -out:$@ $(CSHARP_STEMWORDS_SOURCES) $(CSHARP_RUNTIME_SOURCES) $(CSHARP_SOURCES)
+-- 
+2.21.0
+
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 @@
+SUMMARY = "Snowball compiler and stemming algorithms"
+HOMEPAGE = "https://snowballstem.org/"
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://COPYING;md5=2750797da77c1d784e7626b3f7d7ff3e"
+
+DEPENDS_class-target = "${BPN}-native"
+
+SRC_URI = "\
+    git://github.com/snowballstem/snowball.git \
+    file://0001-Build-so-lib.patch \
+    file://0002-snowball-stemwords-do-link-with-LDFLAGS-set-by-build.patch \
+"
+SRCREV = "c70ed64f9d41c1032fba4e962b054f8e9d489a74"
+S = "${WORKDIR}/git"
+PV = "2.0.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
+}
+
+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}
+}
-- 
2.21.0



  parent reply	other threads:[~2019-10-25  7:21 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-25  7:20 [PATCH 00/15] Upgrades & GNOME preparations Andreas Müller
2019-10-25  7:20 ` [PATCH 01/15] gtkmm3: upgrade 3.24.1 -> 3.24.2 Andreas Müller
2019-10-25  7:21 ` [PATCH 02/15] geany: upgrade 1.34.1 -> 1.36 Andreas Müller
2019-10-25  7:21 ` [PATCH 03/15] geany-plugins: upgrade 1.34 " Andreas Müller
2019-10-25  7:21 ` Andreas Müller [this message]
2019-10-25  7:21 ` [PATCH 05/15] appstream-glib: initial add 0.7.16 Andreas Müller
2019-10-25  7:21 ` [PATCH 06/15] yelp-xsl: initial add 3.34.0 Andreas Müller
2019-10-25  7:21 ` [PATCH 07/15] yelp-tools: initial add 3.32.2 Andreas Müller
2019-10-25  7:21 ` [PATCH 08/15] yelp: initial add 3.34.0 Andreas Müller
2019-10-25  7:21 ` [PATCH 09/15] zenity: pretify recipe a bit Andreas Müller
2019-10-25 11:45   ` Adrian Bunk
2019-10-25 12:07     ` Andreas Müller
2019-10-25 17:50       ` Randy MacLeod
2019-10-25  7:21 ` [PATCH 10/15] glibmm: upgrade 2.60.0 -> 2.62.0 Andreas Müller
2019-10-25  7:21 ` [PATCH 11/15] libsigc++-3: initial add 3.0.0 Andreas Müller
2019-10-25  7:21 ` [PATCH 12/15] ibus: initial add 1.5.21 Andreas Müller
2019-10-25 21:37   ` Khem Raj
2019-10-25  7:21 ` [PATCH 13/15] libgusb: initial add 0.3.0+ Andreas Müller
2019-10-25  7:21 ` [PATCH 14/15] colord: initial add 1.4.4 Andreas Müller
2019-10-25 21:37   ` Khem Raj
2019-10-25 22:48     ` Andreas Müller
2019-10-26  0:33       ` Andreas Müller
2019-10-25  7:21 ` [PATCH 15/15] colord-gtk: initial add 0.2.0 Andreas Müller
2019-10-27 15:33 ` [PATCH 00/15] Upgrades & GNOME preparations Andreas Müller
2019-10-27 15:56   ` Khem Raj

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191025072113.11172-5-schnitzeltony@gmail.com \
    --to=schnitzeltony@gmail.com \
    --cc=openembedded-devel@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.