Flatpak: Update snowball patch
Upstream wiggled the makefile a bit
This commit is contained in:
parent
9e5c42f2c7
commit
0e545a4527
1 changed files with 25 additions and 17 deletions
|
|
@ -1,13 +1,15 @@
|
|||
Description: Build libstemmer as a shared library.
|
||||
Author: Stefano Rivera <stefanor@debian.org>
|
||||
Forwarded: http://news.gmane.org/find-root.php?message_id=%3c20110821220427.GC1738%40bach.rivera.co.za%3e
|
||||
Last-Update: 2019-10-17
|
||||
Last-Update: 2021-07-05
|
||||
|
||||
diff --git a/GNUmakefile b/GNUmakefile
|
||||
index 23a730f..e18b58a 100644
|
||||
--- a/GNUmakefile
|
||||
+++ b/GNUmakefile
|
||||
@@ -154,12 +154,13 @@ JAVA_RUNTIME_CLASSES=$(JAVARUNTIME_SOURC
|
||||
override CFLAGS += -W -Wall -Wmissing-prototypes -Wmissing-declarations
|
||||
override CPPFLAGS += -Iinclude
|
||||
@@ -167,12 +167,13 @@ CPPFLAGS=
|
||||
|
||||
INCLUDES=-Iinclude
|
||||
|
||||
-all: snowball libstemmer.o stemwords $(C_OTHER_SOURCES) $(C_OTHER_HEADERS) $(C_OTHER_OBJECTS)
|
||||
+all: snowball libstemmer.so stemwords $(C_OTHER_SOURCES) $(C_OTHER_HEADERS) $(C_OTHER_OBJECTS)
|
||||
|
|
@ -21,7 +23,7 @@ Last-Update: 2019-10-17
|
|||
libstemmer/modules.h \
|
||||
libstemmer/modules_utf8.h \
|
||||
$(C_LIB_SOURCES) $(C_LIB_HEADERS) $(C_LIB_OBJECTS) \
|
||||
@@ -173,7 +174,7 @@ clean:
|
||||
@@ -187,7 +188,7 @@ clean:
|
||||
libstemmer/mkinc.mak libstemmer/mkinc_utf8.mak \
|
||||
libstemmer/libstemmer.c libstemmer/libstemmer_utf8.c \
|
||||
algorithms.mk
|
||||
|
|
@ -30,7 +32,7 @@ Last-Update: 2019-10-17
|
|||
-rmdir $(c_src_dir)
|
||||
-rmdir $(python_output_dir)
|
||||
-rmdir $(js_output_dir)
|
||||
@@ -197,11 +198,17 @@ libstemmer/modules_utf8.h libstemmer/mki
|
||||
@@ -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)
|
||||
|
||||
|
|
@ -44,22 +46,25 @@ Last-Update: 2019-10-17
|
|||
+ ln -s $@.0.0.0 $@
|
||||
+ $(AR) -crs ${@:.so=.a} $^
|
||||
|
||||
examples/%.o: examples/%.c
|
||||
$(CC) $(CFLAGS) $(INCLUDES) $(CPPFLAGS) -c -o $@ $<
|
||||
|
||||
-stemwords: $(STEMWORDS_OBJECTS) libstemmer.o
|
||||
+stemwords: $(STEMWORDS_OBJECTS) libstemmer.so
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
|
||||
+ $(CC) $(CFLAGS) $(LDFLAGS) -g -o $@ $(STEMWORDS_OBJECTS) -L. -lstemmer
|
||||
|
||||
csharp_stemwords: $(CSHARP_STEMWORDS_SOURCES) $(CSHARP_RUNTIME_SOURCES) $(CSHARP_SOURCES)
|
||||
$(MCS) -unsafe -target:exe -out:$@ $(CSHARP_STEMWORDS_SOURCES) $(CSHARP_RUNTIME_SOURCES) $(CSHARP_SOURCES)
|
||||
@@ -241,7 +248,6 @@ $(c_src_dir)/stem_ISO_8859_2_%.c $(c_src
|
||||
tests/%.o: tests/%.c
|
||||
$(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
|
||||
- $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
|
||||
- $(CC) $(CFLAGS) $(INCLUDES) $(CPPFLAGS) -c -o $@ $<
|
||||
|
||||
$(java_src_dir)/%Stemmer.java: algorithms/%.sbl snowball
|
||||
@mkdir -p $(java_src_dir)
|
||||
@@ -473,13 +479,14 @@ check_koi8r: $(KOI8_R_algorithms:%=check
|
||||
@@ -506,13 +512,14 @@ check_koi8r: $(KOI8_R_algorithms:%=check_koi8r_%)
|
||||
# a sibling to this one.
|
||||
STEMMING_DATA ?= ../snowball-data
|
||||
STEMMING_DATA_ABS := $(abspath $(STEMMING_DATA))
|
||||
|
|
@ -76,7 +81,7 @@ Last-Update: 2019-10-17
|
|||
fi
|
||||
@if test -f '$</output.txt.gz' ; then \
|
||||
gzip -dc '$</output.txt.gz'|diff -u - tmp.txt; \
|
||||
@@ -491,7 +498,7 @@ check_utf8_%: $(STEMMING_DATA)/% stemwor
|
||||
@@ -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' |\
|
||||
|
|
@ -85,7 +90,7 @@ Last-Update: 2019-10-17
|
|||
@$(ICONV) -fUTF8 -tISO8859-1 '$</output.txt' |\
|
||||
diff -u - tmp.txt
|
||||
@rm tmp.txt
|
||||
@@ -499,7 +506,7 @@ check_iso_8859_1_%: $(STEMMING_DATA)/% s
|
||||
@@ -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' |\
|
||||
|
|
@ -94,7 +99,7 @@ Last-Update: 2019-10-17
|
|||
@$(ICONV) -fUTF8 -tISO8859-2 '$</output.txt' |\
|
||||
diff -u - tmp.txt
|
||||
@rm tmp.txt
|
||||
@@ -507,7 +514,7 @@ check_iso_8859_2_%: $(STEMMING_DATA)/% s
|
||||
@@ -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' |\
|
||||
|
|
@ -103,9 +108,9 @@ Last-Update: 2019-10-17
|
|||
@$(ICONV) -fUTF8 -tKOI8-R '$</output.txt' |\
|
||||
diff -u - tmp.txt
|
||||
@rm tmp.txt
|
||||
@@ -663,4 +670,9 @@ update_version:
|
||||
csharp/Snowball/AssemblyInfo.cs \
|
||||
python/setup.py
|
||||
@@ -726,4 +733,9 @@ ada/bin/generate:
|
||||
ada/bin/stemwords: $(ADA_SOURCES)
|
||||
cd ada && $(gprbuild) -Pstemwords -p
|
||||
|
||||
+%.o: %.c
|
||||
+ @mkdir -p $(shell dirname ${@:%=.shared/%})
|
||||
|
|
@ -113,3 +118,6 @@ Last-Update: 2019-10-17
|
|||
+ $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
|
||||
+
|
||||
.SUFFIXES: .class .java
|
||||
--
|
||||
2.30.2
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue