summaryrefslogtreecommitdiffstats
path: root/calibre
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2022-03-13 23:37:55 +0000
committer Eric Hameleers <alien@slackware.com>2022-03-13 23:37:55 +0000
commit40e7ba9431c660048c846d6554b642b3209dd254 (patch)
treeeac4a90271ee72de799b8d03d79b0d2ab51b76f1 /calibre
parent27847d4fbebd597fc29872b5096aeaf85ddaa2e6 (diff)
downloadasb-40e7ba9431c660048c846d6554b642b3209dd254.tar.gz
asb-40e7ba9431c660048c846d6554b642b3209dd254.tar.xz
Initial revision
Diffstat (limited to 'calibre')
-rw-r--r--calibre/build/patches/libstemmer.dynamiclib.patch41
-rw-r--r--calibre/build/patches/python3.no-static-library.diff78
2 files changed, 119 insertions, 0 deletions
diff --git a/calibre/build/patches/libstemmer.dynamiclib.patch b/calibre/build/patches/libstemmer.dynamiclib.patch
new file mode 100644
index 00000000..ee933872
--- /dev/null
+++ b/calibre/build/patches/libstemmer.dynamiclib.patch
@@ -0,0 +1,41 @@
+diff --git a/GNUmakefile b/GNUmakefile
+index 98eb1fa..40ebc38 100644
+--- a/GNUmakefile
++++ b/GNUmakefile
+@@ -170,12 +170,11 @@ 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
+
+-all: snowball$(EXEEXT) libstemmer.a stemwords$(EXEEXT) $(C_OTHER_SOURCES) $(C_OTHER_HEADERS) $(C_OTHER_OBJECTS)
++all: snowball$(EXEEXT) libstemmer.a 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
+@@ -212,6 +212,9 @@ libstemmer/libstemmer.o: libstemmer/modules.h $(C_LIB_HEADERS)
+ libstemmer.a: 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 $^
++
+ examples/%.o: examples/%.c
+ $(CC) $(CFLAGS) $(INCLUDES) $(CPPFLAGS) -c -o $@ $<
+
+diff --git a/libstemmer/symbol.map b/libstemmer/symbol.map
+new file mode 100644
+index 0000000..7a3d423
+--- /dev/null
++++ i/libstemmer/symbol.map
+@@ -0,0 +1,6 @@
++SB_STEMMER_0 {
++ global:
++ sb_stemmer_*;
++ local:
++ *;
++};
diff --git a/calibre/build/patches/python3.no-static-library.diff b/calibre/build/patches/python3.no-static-library.diff
new file mode 100644
index 00000000..e735f266
--- /dev/null
+++ b/calibre/build/patches/python3.no-static-library.diff
@@ -0,0 +1,78 @@
+From 2559cbe8f0431ba20de8a1c9921013e5e3820967 Mon Sep 17 00:00:00 2001
+From: David Malcolm <dmalcolm@redhat.com>
+Date: Mon, 18 Jan 2010 17:59:07 +0000
+Subject: [PATCH] 00111: Don't try to build a libpythonMAJOR.MINOR.a
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Downstream only: not appropriate for upstream.
+
+See https://bugzilla.redhat.com/show_bug.cgi?id=556092
+
+Co-authored-by: David Malcolm <dmalcolm@redhat.com>
+Co-authored-by: Bohuslav Kabrda <bkabrda@redhat.com>
+Co-authored-by: Matej Stuchlik <mstuchli@redhat.com>
+Co-authored-by: Robert Kuska <rkuska@redhat.com>
+Co-authored-by: Charalampos Stratakis <cstratak@redhat.com>
+Co-authored-by: Miro Hron?ok <miro@hroncok.cz>
+---
+ Makefile.pre.in | 21 ++-------------------
+ 1 file changed, 2 insertions(+), 19 deletions(-)
+
+diff --git a/Makefile.pre.in b/Makefile.pre.in
+index 4ad3df1122..72d202d71b 100644
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -562,7 +562,7 @@ clinic: check-clean-src $(srcdir)/Modules/_blake2/blake2s_impl.c
+ $(PYTHON_FOR_REGEN) $(srcdir)/Tools/clinic/clinic.py --make --srcdir $(srcdir)
+
+ # Build the interpreter
+-$(BUILDPYTHON): Programs/python.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY)
++$(BUILDPYTHON): Programs/python.o $(LDLIBRARY) $(PY3LIBRARY)
+ $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/python.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS)
+
+ platform: $(BUILDPYTHON) pybuilddir.txt
+@@ -610,12 +610,6 @@ sharedmods: $(BUILDPYTHON) pybuilddir.txt Modules/_math.o
+ _TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \
+ $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build
+
+-
+-# Build static library
+-$(LIBRARY): $(LIBRARY_OBJS)
+- -rm -f $@
+- $(AR) $(ARFLAGS) $@ $(LIBRARY_OBJS)
+-
+ libpython$(LDVERSION).so: $(LIBRARY_OBJS) $(DTRACE_OBJS)
+ if test $(INSTSONAME) != $(LDLIBRARY); then \
+ $(BLDSHARED) -Wl,-h$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM); \
+@@ -693,7 +687,7 @@ Makefile Modules/config.c: Makefile.pre \
+ @echo "The Makefile was updated, you may need to re-run make."
+
+
+-Programs/_testembed: Programs/_testembed.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY)
++Programs/_testembed: Programs/_testembed.o $(LDLIBRARY) $(PY3LIBRARY)
+ $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/_testembed.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS)
+
+ ############################################################################
+@@ -1557,17 +1551,6 @@ libainstall: @DEF_MAKE_RULE@ python-config
+ else true; \
+ fi; \
+ done
+- @if test -d $(LIBRARY); then :; else \
+- if test "$(PYTHONFRAMEWORKDIR)" = no-framework; then \
+- if test "$(SHLIB_SUFFIX)" = .dll; then \
+- $(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBPL) ; \
+- else \
+- $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \
+- fi; \
+- else \
+- echo Skip install of $(LIBRARY) - use make frameworkinstall; \
+- fi; \
+- fi
+ $(INSTALL_DATA) Modules/config.c $(DESTDIR)$(LIBPL)/config.c
+ $(INSTALL_DATA) Programs/python.o $(DESTDIR)$(LIBPL)/python.o
+ $(INSTALL_DATA) $(srcdir)/Modules/config.c.in $(DESTDIR)$(LIBPL)/config.c.in
+--
+2.24.1
+