45bcdeddaf
- Introduced build scripts for gsettings-desktop-schemas, hypercorn, json-glib, libassuan, libbsd, libcloudproviders, libdaemon, libmd, libproxy, libsass, libseccomp, libxcomposite, libxdamage, libxtst, lmdb, python-aiofiles, python-blinker, python-flask, python-h11, python-h2, python-hpack, python-hyperframe, python-itsdangerous, python-more-itertools, python-priority, python-pyaml, python-quart, python-tappy, python-werkzeug, python-wsproto, sassc, snowball, talloc, xmltoman, and xorg-xprop. - Added TOML configuration files for each package specifying build types, dependencies, and source URLs. - Implemented custom build scripts for packages requiring specific build commands and configurations. - Included patches for snowball to make libstemmer a shared library.
76 lines
2.8 KiB
Diff
76 lines
2.8 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: "Jan Alexander Steffens (heftig)" <heftig@archlinux.org>
|
|
Date: Fri, 1 Apr 2022 19:55:54 +0000
|
|
Subject: [PATCH] Make libstemmer a shared library
|
|
|
|
---
|
|
GNUmakefile | 15 +++++++--------
|
|
libstemmer/symbol.map | 6 ++++++
|
|
2 files changed, 13 insertions(+), 8 deletions(-)
|
|
create mode 100644 libstemmer/symbol.map
|
|
|
|
diff --git a/GNUmakefile b/GNUmakefile
|
|
index e1403be3c85b..e014388a2e92 100644
|
|
--- a/GNUmakefile
|
|
+++ b/GNUmakefile
|
|
@@ -190,20 +190,19 @@ C_OTHER_OBJECTS = $(C_OTHER_SOURCES:.c=.o)
|
|
JAVA_CLASSES = $(JAVA_SOURCES:.java=.class)
|
|
JAVA_RUNTIME_CLASSES=$(JAVARUNTIME_SOURCES:.java=.class)
|
|
|
|
-CFLAGS=-g -O2 -W -Wall -Wmissing-prototypes -Wmissing-declarations -Wshadow $(WERROR)
|
|
-CPPFLAGS=
|
|
+CFLAGS+=-fPIC -W -Wall -Wmissing-prototypes -Wmissing-declarations -Wshadow $(WERROR)
|
|
|
|
INCLUDES=-Iinclude
|
|
|
|
-all: snowball$(EXEEXT) libstemmer.a stemwords$(EXEEXT) $(C_OTHER_SOURCES) $(C_OTHER_HEADERS) $(C_OTHER_OBJECTS)
|
|
+all: snowball$(EXEEXT) libstemmer.so.0 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:
|
|
rm -f $(COMPILER_OBJECTS) $(RUNTIME_OBJECTS) \
|
|
$(LIBSTEMMER_OBJECTS) $(LIBSTEMMER_UTF8_OBJECTS) $(STEMWORDS_OBJECTS) snowball$(EXEEXT) \
|
|
- libstemmer.a stemwords$(EXEEXT) \
|
|
+ libstemmer.so.0 stemwords$(EXEEXT) \
|
|
libstemmer/modules.h \
|
|
libstemmer/modules_utf8.h \
|
|
$(C_LIB_SOURCES) $(C_LIB_HEADERS) $(C_LIB_OBJECTS) \
|
|
@@ -254,19 +253,19 @@ libstemmer/modules_utf8.h libstemmer/mkinc_utf8.mak: libstemmer/mkmodules.pl lib
|
|
|
|
libstemmer/libstemmer.o: libstemmer/modules.h $(C_LIB_HEADERS)
|
|
|
|
-libstemmer.a: libstemmer/libstemmer.o $(RUNTIME_OBJECTS) $(C_LIB_OBJECTS)
|
|
- $(AR) -cru $@ $^
|
|
+libstemmer.so.0: libstemmer/libstemmer.o $(RUNTIME_OBJECTS) $(C_LIB_OBJECTS)
|
|
+ $(CC) $(CFLAGS) -shared $(LDFLAGS) -Wl,-soname,$@,-version-script,libstemmer/symbol.map -o $@ $^
|
|
|
|
examples/%.o: examples/%.c
|
|
$(CC) $(CFLAGS) $(INCLUDES) $(CPPFLAGS) -c -o $@ $<
|
|
|
|
-stemwords$(EXEEXT): $(STEMWORDS_OBJECTS) libstemmer.a
|
|
+stemwords$(EXEEXT): $(STEMWORDS_OBJECTS) libstemmer.so.0
|
|
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
|
|
|
|
tests/%.o: tests/%.c
|
|
$(CC) $(CFLAGS) $(INCLUDES) $(CPPFLAGS) -c -o $@ $<
|
|
|
|
-stemtest$(EXEEXT): $(STEMTEST_OBJECTS) libstemmer.a
|
|
+stemtest$(EXEEXT): $(STEMTEST_OBJECTS) libstemmer.so.0
|
|
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
|
|
|
|
csharp_stemwords$(EXEEXT): $(CSHARP_STEMWORDS_SOURCES) $(CSHARP_RUNTIME_SOURCES) $(CSHARP_SOURCES)
|
|
diff --git a/libstemmer/symbol.map b/libstemmer/symbol.map
|
|
new file mode 100644
|
|
index 000000000000..7a3d42356362
|
|
--- /dev/null
|
|
+++ b/libstemmer/symbol.map
|
|
@@ -0,0 +1,6 @@
|
|
+SB_STEMMER_0 {
|
|
+ global:
|
|
+ sb_stemmer_*;
|
|
+ local:
|
|
+ *;
|
|
+};
|