db-move: moved webkit2gtk from [testing] to [extra] (x86_64)
[arch-packages.git] / snowball / trunk / dynamiclib.diff
blob9d90fe866b18d2ef36478c6563a876fb3f37fc50
1 GNUmakefile | 15 +++++++--------
2 libstemmer/symbol.map | 6 ++++++
3 2 files changed, 13 insertions(+), 8 deletions(-)
5 diff --git c/GNUmakefile i/GNUmakefile
6 index 98eb1fa..86e4855 100644
7 --- c/GNUmakefile
8 +++ i/GNUmakefile
9 @@ -170,20 +170,19 @@ C_OTHER_OBJECTS = $(C_OTHER_SOURCES:.c=.o)
10 JAVA_CLASSES = $(JAVA_SOURCES:.java=.class)
11 JAVA_RUNTIME_CLASSES=$(JAVARUNTIME_SOURCES:.java=.class)
13 -CFLAGS=-O2 -W -Wall -Wmissing-prototypes -Wmissing-declarations
14 -CPPFLAGS=
15 +CFLAGS+=-fPIC -W -Wall -Wmissing-prototypes -Wmissing-declarations
17 INCLUDES=-Iinclude
19 -all: snowball$(EXEEXT) libstemmer.a stemwords$(EXEEXT) $(C_OTHER_SOURCES) $(C_OTHER_HEADERS) $(C_OTHER_OBJECTS)
20 +all: snowball$(EXEEXT) libstemmer.so.0 stemwords$(EXEEXT) $(C_OTHER_SOURCES) $(C_OTHER_HEADERS) $(C_OTHER_OBJECTS)
22 algorithms.mk: libstemmer/mkalgorithms.pl libstemmer/modules.txt
23 libstemmer/mkalgorithms.pl algorithms.mk libstemmer/modules.txt
25 clean:
26 rm -f $(COMPILER_OBJECTS) $(RUNTIME_OBJECTS) \
27 $(LIBSTEMMER_OBJECTS) $(LIBSTEMMER_UTF8_OBJECTS) $(STEMWORDS_OBJECTS) snowball$(EXEEXT) \
28 - libstemmer.a stemwords$(EXEEXT) \
29 + libstemmer.so.0 stemwords$(EXEEXT) \
30 libstemmer/modules.h \
31 libstemmer/modules_utf8.h \
32 $(C_LIB_SOURCES) $(C_LIB_HEADERS) $(C_LIB_OBJECTS) \
33 @@ -222,19 +221,19 @@ libstemmer/modules_utf8.h libstemmer/mkinc_utf8.mak: libstemmer/mkmodules.pl lib
35 libstemmer/libstemmer.o: libstemmer/modules.h $(C_LIB_HEADERS)
37 -libstemmer.a: libstemmer/libstemmer.o $(RUNTIME_OBJECTS) $(C_LIB_OBJECTS)
38 - $(AR) -cru $@ $^
39 +libstemmer.so.0: libstemmer/libstemmer.o $(RUNTIME_OBJECTS) $(C_LIB_OBJECTS)
40 + $(CC) $(CFLAGS) -shared $(LDFLAGS) -Wl,-soname,$@,-version-script,libstemmer/symbol.map -o $@ $^
42 examples/%.o: examples/%.c
43 $(CC) $(CFLAGS) $(INCLUDES) $(CPPFLAGS) -c -o $@ $<
45 -stemwords$(EXEEXT): $(STEMWORDS_OBJECTS) libstemmer.a
46 +stemwords$(EXEEXT): $(STEMWORDS_OBJECTS) libstemmer.so.0
47 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
49 tests/%.o: tests/%.c
50 $(CC) $(CFLAGS) $(INCLUDES) $(CPPFLAGS) -c -o $@ $<
52 -stemtest$(EXEEXT): $(STEMTEST_OBJECTS) libstemmer.a
53 +stemtest$(EXEEXT): $(STEMTEST_OBJECTS) libstemmer.so.0
54 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
56 csharp_stemwords$(EXEEXT): $(CSHARP_STEMWORDS_SOURCES) $(CSHARP_RUNTIME_SOURCES) $(CSHARP_SOURCES)
57 diff --git c/libstemmer/symbol.map i/libstemmer/symbol.map
58 new file mode 100644
59 index 0000000..7a3d423
60 --- /dev/null
61 +++ i/libstemmer/symbol.map
62 @@ -0,0 +1,6 @@
63 +SB_STEMMER_0 {
64 + global:
65 + sb_stemmer_*;
66 + local:
67 + *;
68 +};