build: Update Flatpak manifest

- Update libstemmer patch
- Some buildsystem changes
- evolution-data-server moved to libsoup3. Fixed commit until Folks is
  ported to libsoup3
This commit is contained in:
Cédric Bellegarde 2022-06-30 10:05:31 +02:00
parent adca034818
commit fdc2828d1b
2 changed files with 50 additions and 105 deletions

View file

@ -1,123 +1,69 @@
Description: Build libstemmer as a shared library. GNUmakefile | 15 +++++++--------
Author: Stefano Rivera <stefanor@debian.org> libstemmer/symbol.map | 6 ++++++
Forwarded: http://news.gmane.org/find-root.php?message_id=%3c20110821220427.GC1738%40bach.rivera.co.za%3e 2 files changed, 13 insertions(+), 8 deletions(-)
Last-Update: 2021-07-05
diff --git a/GNUmakefile b/GNUmakefile diff --git c/GNUmakefile i/GNUmakefile
index 23a730f..e18b58a 100644 index 98eb1fa..86e4855 100644
--- a/GNUmakefile --- c/GNUmakefile
+++ b/GNUmakefile +++ i/GNUmakefile
@@ -167,12 +167,13 @@ CPPFLAGS= @@ -170,20 +170,19 @@ 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
-CPPFLAGS=
+CFLAGS+=-fPIC -W -Wall -Wmissing-prototypes -Wmissing-declarations
INCLUDES=-Iinclude INCLUDES=-Iinclude
-all: snowball libstemmer.o stemwords $(C_OTHER_SOURCES) $(C_OTHER_HEADERS) $(C_OTHER_OBJECTS) -all: snowball$(EXEEXT) libstemmer.a stemwords$(EXEEXT) $(C_OTHER_SOURCES) $(C_OTHER_HEADERS) $(C_OTHER_OBJECTS)
+all: snowball libstemmer.so stemwords $(C_OTHER_SOURCES) $(C_OTHER_HEADERS) $(C_OTHER_OBJECTS) +all: snowball$(EXEEXT) 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
clean: clean:
rm -f $(COMPILER_OBJECTS) $(RUNTIME_OBJECTS) \ rm -f $(COMPILER_OBJECTS) $(RUNTIME_OBJECTS) \
$(LIBSTEMMER_OBJECTS) $(LIBSTEMMER_UTF8_OBJECTS) $(STEMWORDS_OBJECTS) snowball \ $(LIBSTEMMER_OBJECTS) $(LIBSTEMMER_UTF8_OBJECTS) $(STEMWORDS_OBJECTS) snowball$(EXEEXT) \
- libstemmer.o stemwords \ - libstemmer.a stemwords$(EXEEXT) \
+ $(wildcard libstemmer.so*) libstemmer.a \ + libstemmer.so stemwords$(EXEEXT) \
+ stemwords \
libstemmer/modules.h \ libstemmer/modules.h \
libstemmer/modules_utf8.h \ libstemmer/modules_utf8.h \
$(C_LIB_SOURCES) $(C_LIB_HEADERS) $(C_LIB_OBJECTS) \ $(C_LIB_SOURCES) $(C_LIB_HEADERS) $(C_LIB_OBJECTS) \
@@ -187,7 +188,7 @@ clean: @@ -222,19 +221,19 @@ libstemmer/modules_utf8.h libstemmer/mkinc_utf8.mak: libstemmer/mkmodules.pl lib
libstemmer/mkinc.mak libstemmer/mkinc_utf8.mak \
libstemmer/libstemmer.c libstemmer/libstemmer_utf8.c \
algorithms.mk
- rm -rf dist
+ rm -rf dist .shared
-rmdir $(c_src_dir)
-rmdir $(python_output_dir)
-rmdir $(js_output_dir)
@@ -211,14 +212,20 @@ libstemmer/modules_utf8.h libstemmer/mkinc_utf8.mak: libstemmer/mkmodules.pl lib
libstemmer/libstemmer.o: libstemmer/modules.h $(C_LIB_HEADERS) libstemmer/libstemmer.o: libstemmer/modules.h $(C_LIB_HEADERS)
-libstemmer.o: libstemmer/libstemmer.o $(RUNTIME_OBJECTS) $(C_LIB_OBJECTS) -libstemmer.a: libstemmer/libstemmer.o $(RUNTIME_OBJECTS) $(C_LIB_OBJECTS)
- $(AR) -cru $@ $^ - $(AR) -cru $@ $^
+libstemmer.so: libstemmer/libstemmer.o $(RUNTIME_OBJECTS) $(C_LIB_OBJECTS) +libstemmer.so: libstemmer/libstemmer.o $(RUNTIME_OBJECTS) $(C_LIB_OBJECTS)
+ $(CC) $(CFLAGS) -shared $(LDFLAGS) \ + $(CC) $(CFLAGS) -shared $(LDFLAGS) -Wl,-soname,$@,-version-script,libstemmer/symbol.map -o $@ $^
+ -Wl,-soname,libstemmer.so.0 \
+ -o $@.0.0.0 ${^:%=.shared/%}
+ ln -s $@.0.0.0 $@.0
+ ln -s $@.0.0.0 $@
+ $(AR) -crs ${@:.so=.a} $^
examples/%.o: examples/%.c examples/%.o: examples/%.c
$(CC) $(CFLAGS) $(INCLUDES) $(CPPFLAGS) -c -o $@ $< $(CC) $(CFLAGS) $(INCLUDES) $(CPPFLAGS) -c -o $@ $<
-stemwords: $(STEMWORDS_OBJECTS) libstemmer.o -stemwords$(EXEEXT): $(STEMWORDS_OBJECTS) libstemmer.a
+stemwords: $(STEMWORDS_OBJECTS) libstemmer.so +stemwords$(EXEEXT): $(STEMWORDS_OBJECTS) libstemmer.so
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
+ $(CC) $(CFLAGS) $(LDFLAGS) -g -o $@ $(STEMWORDS_OBJECTS) -L. -lstemmer
tests/%.o: tests/%.c tests/%.o: tests/%.c
$(CC) $(CFLAGS) $(INCLUDES) $(CPPFLAGS) -c -o $@ $< $(CC) $(CFLAGS) $(INCLUDES) $(CPPFLAGS) -c -o $@ $<
@@ -264,7 +271,6 @@ $(c_src_dir)/stem_ISO_8859_2_%.c $(c_src_dir)/stem_ISO_8859_2_%.h: algorithms/%.
./snowball charsets/ISO-8859-2.sbl $< -o $${o} -eprefix $${l}_ISO_8859_2_ -r ../runtime
$(c_src_dir)/stem_%.o: $(c_src_dir)/stem_%.c $(c_src_dir)/stem_%.h -stemtest$(EXEEXT): $(STEMTEST_OBJECTS) libstemmer.a
- $(CC) $(CFLAGS) $(INCLUDES) $(CPPFLAGS) -c -o $@ $< +stemtest$(EXEEXT): $(STEMTEST_OBJECTS) libstemmer.so
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
$(java_src_dir)/%Stemmer.java: algorithms/%.sbl snowball csharp_stemwords$(EXEEXT): $(CSHARP_STEMWORDS_SOURCES) $(CSHARP_RUNTIME_SOURCES) $(CSHARP_SOURCES)
@mkdir -p $(java_src_dir) diff --git c/libstemmer/symbol.map i/libstemmer/symbol.map
@@ -506,13 +512,14 @@ check_koi8r: $(KOI8_R_algorithms:%=check_koi8r_%) new file mode 100644
# a sibling to this one. index 0000000..7a3d423
STEMMING_DATA ?= ../snowball-data --- /dev/null
STEMMING_DATA_ABS := $(abspath $(STEMMING_DATA)) +++ i/libstemmer/symbol.map
+STEMWORDS=LD_LIBRARY_PATH=.:$(LD_LIBRARY_PATH) ./stemwords @@ -0,0 +1,6 @@
+SB_STEMMER_0 {
check_utf8_%: $(STEMMING_DATA)/% stemwords + global:
@echo "Checking output of `echo $<|sed 's!.*/!!'` stemmer with UTF-8" + sb_stemmer_*;
@if test -f '$</voc.txt.gz' ; then \ + local:
- gzip -dc '$</voc.txt.gz'|./stemwords -c UTF_8 -l `echo $<|sed 's!.*/!!'` -o tmp.txt; \ + *;
+ gzip -dc '$</voc.txt.gz'|$(STEMWORDS) -c UTF_8 -l `echo $<|sed 's!.*/!!'` -o tmp.txt; \ +};
else \
- ./stemwords -c UTF_8 -l `echo $<|sed 's!.*/!!'` -i $</voc.txt -o tmp.txt; \
+ $(STEMWORDS) -c UTF_8 -l `echo $<|sed 's!.*/!!'` -i $</voc.txt -o tmp.txt; \
fi
@if test -f '$</output.txt.gz' ; then \
gzip -dc '$</output.txt.gz'|diff -u - tmp.txt; \
@@ -524,7 +531,7 @@ check_utf8_%: $(STEMMING_DATA)/% stemwords
check_iso_8859_1_%: $(STEMMING_DATA)/% stemwords
@echo "Checking output of `echo $<|sed 's!.*/!!'` stemmer with ISO_8859_1"
@$(ICONV) -fUTF8 -tISO8859-1 '$</voc.txt' |\
- ./stemwords -c ISO_8859_1 -l `echo $<|sed 's!.*/!!'` -o tmp.txt
+ $(STEMWORDS) -c ISO_8859_1 -l `echo $<|sed 's!.*/!!'` -o tmp.txt
@$(ICONV) -fUTF8 -tISO8859-1 '$</output.txt' |\
diff -u - tmp.txt
@rm tmp.txt
@@ -532,7 +539,7 @@ check_iso_8859_1_%: $(STEMMING_DATA)/% stemwords
check_iso_8859_2_%: $(STEMMING_DATA)/% stemwords
@echo "Checking output of `echo $<|sed 's!.*/!!'` stemmer with ISO_8859_2"
@$(ICONV) -fUTF8 -tISO8859-2 '$</voc.txt' |\
- ./stemwords -c ISO_8859_2 -l `echo $<|sed 's!.*/!!'` -o tmp.txt
+ $(STEMWORDS) -c ISO_8859_2 -l `echo $<|sed 's!.*/!!'` -o tmp.txt
@$(ICONV) -fUTF8 -tISO8859-2 '$</output.txt' |\
diff -u - tmp.txt
@rm tmp.txt
@@ -540,7 +547,7 @@ check_iso_8859_2_%: $(STEMMING_DATA)/% stemwords
check_koi8r_%: $(STEMMING_DATA)/% stemwords
@echo "Checking output of `echo $<|sed 's!.*/!!'` stemmer with KOI8R"
@$(ICONV) -fUTF8 -tKOI8-R '$</voc.txt' |\
- ./stemwords -c KOI8_R -l `echo $<|sed 's!.*/!!'` -o tmp.txt
+ $(STEMWORDS) -c KOI8_R -l `echo $<|sed 's!.*/!!'` -o tmp.txt
@$(ICONV) -fUTF8 -tKOI8-R '$</output.txt' |\
diff -u - tmp.txt
@rm tmp.txt
@@ -726,4 +733,9 @@ ada/bin/generate:
ada/bin/stemwords: $(ADA_SOURCES)
cd ada && $(gprbuild) -Pstemwords -p
+%.o: %.c
+ @mkdir -p $(shell dirname ${@:%=.shared/%})
+ $(CC) $(CFLAGS) $(CPPFLAGS) -c -fPIC -o ${@:%=.shared/%} $<
+ $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
+
.SUFFIXES: .class .java
--
2.30.2

View file

@ -46,11 +46,9 @@
"modules": [ "modules": [
{ {
"name": "gnome-online-accounts", "name": "gnome-online-accounts",
"buildsystem": "meson",
"config-opts": [ "config-opts": [
"--disable-telepathy", "-Dgoabackend=false"
"--disable-documentation",
"--disable-backend",
"--enable-debug=no"
], ],
"sources": [ "sources": [
{ {
@ -93,8 +91,8 @@
"sources": [ "sources": [
{ {
"type": "archive", "type": "archive",
"url": "https://github.com/libical/libical/releases/download/v3.0.8/libical-3.0.8.tar.gz", "url": "https://github.com/libical/libical/releases/download/v3.0.14/libical-3.0.14.tar.gz",
"sha256": "09fecacaf75ba5a242159e3a9758a5446b5ce4d0ab684f98a7040864e1d1286f" "sha256": "4284b780356f1dc6a01f16083e7b836e63d3815e27ed0eaaad684712357ccc8f"
} }
], ],
"cleanup": [ "cleanup": [
@ -136,7 +134,7 @@
{ {
"type": "git", "type": "git",
"url": "https://gitlab.gnome.org/GNOME/evolution-data-server.git", "url": "https://gitlab.gnome.org/GNOME/evolution-data-server.git",
"branch": "master" "branch": "a4e8d81239ba9168a7b42e87b29ec65243d52e64"
} }
], ],
"cleanup": [ "cleanup": [
@ -193,6 +191,7 @@
}, },
{ {
"name": "gsound", "name": "gsound",
"buildsystem": "meson",
"sources": [ "sources": [
{ {
"type": "git", "type": "git",
@ -251,7 +250,7 @@
"build-commands": [ "build-commands": [
"make libstemmer.so -j$FLATPAK_BUILDER_N_JOBS", "make libstemmer.so -j$FLATPAK_BUILDER_N_JOBS",
"install -Dm644 include/libstemmer.h /app/include/libstemmer.h", "install -Dm644 include/libstemmer.h /app/include/libstemmer.h",
"install -Dm644 libstemmer.so.0.0.0 /app/lib/libstemmer.so.0.0.0", "install -Dm644 libstemmer.so /app/lib/libstemmer.so.0.0.0",
"ln -s libstemmer.so.0.0.0 /app/lib/libstemmer.so.0", "ln -s libstemmer.so.0.0.0 /app/lib/libstemmer.so.0",
"ln -s libstemmer.so.0 /app/lib/libstemmer.so" "ln -s libstemmer.so.0 /app/lib/libstemmer.so"
] ]