unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
blob b2ab37dcc657b76b91cc10b59a467e966e13941e 1704 bytes (raw)
name: gnu/packages/patches/extract-shared-library.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
 
Adjust the Makefile to build a shared library.

diff --git a/Makefile b/Makefile
index e8933ea..5cf503c 100644
--- a/Makefile
+++ b/Makefile
@@ -130,6 +130,7 @@ endif
 $(warning gs=$(gs))
 endif
 
+build: libextract.so $(exe_dep) $(exe_buffer_test_dep) $(exe_misc_test_dep) $(exe_ziptest_dep)
 
 # Default target - run all tests.
 #
@@ -294,7 +295,7 @@ test/generated/%.pdf.mutool.text.diff: test/generated/%.pdf.mutool.text test/%.p
 # Main executable.
 #
 exe = src/build/extract-$(build).exe
-exe_src = \
+lib_src = \
         src/alloc.c \
         src/astring.c \
         src/boxer.c \
@@ -302,10 +303,10 @@ exe_src = \
         src/document.c \
         src/docx.c \
         src/docx_template.c \
-        src/extract-exe.c \
         src/extract.c \
         src/html.c \
         src/join.c \
+        src/json.c \
         src/mem.c \
         src/odt.c \
         src/odt_template.c \
@@ -318,16 +319,18 @@ exe_src = \
 
 
 ifeq ($(build),memento)
-    exe_src += src/memento.c
+    lib_src += src/memento.c
     ifeq ($(uname),Linux)
         flags_compile += -D HAVE_LIBDL
         flags_link += -L $(libbacktrace) -l backtrace -l dl
     endif
 endif
-exe_obj := $(exe_src)
-exe_obj := $(patsubst src/%.c, src/build/%.c-$(build).o, $(exe_obj))
-exe_obj := $(patsubst src/%.cpp, src/build/%.cpp-$(build).o, $(exe_obj))
-exe_dep = $(exe_obj:.o=.d)
+lib_obj := $(lib_src)
+lib_obj := $(patsubst src/%.c, src/build/%.c-$(build).o, $(lib_obj))
+lib_obj := $(patsubst src/%.cpp, src/build/%.cpp-$(build).o, $(lib_obj))
+lib_dep = $(lib_obj:.o=.d)
+libextract.so: $(lib_obj)
+	$(CXX) $(flags_link) $^ -lz -lm -shared -o $@
 exe: $(exe)
 $(exe): $(exe_obj)
 	$(CXX) $(flags_link) -o $@ $^ -lz -lm

debug log:

solving b2ab37dcc6 ...
found b2ab37dcc6 in https://yhetil.org/guix-patches/20240626192717.12818-3-david.elsing@posteo.net/

applying [1/1] https://yhetil.org/guix-patches/20240626192717.12818-3-david.elsing@posteo.net/
diff --git a/gnu/packages/patches/extract-shared-library.patch b/gnu/packages/patches/extract-shared-library.patch
new file mode 100644
index 0000000000..b2ab37dcc6

1:16: trailing whitespace.
 
1:18: trailing whitespace.
 
1:43: trailing whitespace.
 
1:44: trailing whitespace.
 
1:65: space before tab in indent.
 	$(CXX) $(flags_link) -o $@ $^ -lz -lm
Checking patch gnu/packages/patches/extract-shared-library.patch...
Applied patch gnu/packages/patches/extract-shared-library.patch cleanly.
warning: 5 lines add whitespace errors.

index at:
100644 b2ab37dcc657b76b91cc10b59a467e966e13941e	gnu/packages/patches/extract-shared-library.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).