]> git.pld-linux.org Git - packages/mupdf.git/blame - mupdf-shared.patch
- updated to 1.8 (note: needs ~2016 mujs, mudraw is gone)
[packages/mupdf.git] / mupdf-shared.patch
CommitLineData
f81d51d1
JB
1--- mupdf-1.8-source/Makefile.orig 2015-11-10 17:19:51.000000000 +0100
2+++ mupdf-1.8-source/Makefile 2016-04-14 20:39:17.552708551 +0200
f735ca81 3@@ -44,17 +44,24 @@
6d5cd20c 4 ifneq "$(verbose)" "yes"
f735ca81
JB
5 QUIET_AR = @ echo ' ' ' ' AR $@ ;
6 QUIET_CC = @ echo ' ' ' ' CC $@ ;
7+QUIET_LTCC = @ echo ' ' ' ' LTCC $@ ;
8 QUIET_CXX = @ echo ' ' ' ' CXX $@ ;
9+QUIET_LTCXX = @ echo ' ' ' ' LTCXX $@ ;
10 QUIET_GEN = @ echo ' ' ' ' GEN $@ ;
11 QUIET_LINK = @ echo ' ' ' ' LINK $@ ;
12+QUIET_LTLINK = @ echo ' ' ' ' LTLINK $@ ;
13 QUIET_MKDIR = @ echo ' ' ' ' MKDIR $@ ;
14 QUIET_RM = @ echo ' ' ' ' RM $@ ;
15 endif
16
17 CC_CMD = $(QUIET_CC) $(CC) $(CFLAGS) -o $@ -c $<
18+LTCC_CMD = $(QUIET_LTCC) libtool --mode=compile --tag=CC $(CC) $(CFLAGS) -o $@ -c $<
19 CXX_CMD = $(QUIET_CXX) $(CXX) $(CFLAGS) -o $@ -c $<
20+LTCXX_CMD = $(QUIET_CXX) libtool --mode=compile --tag=CXX $(CXX) $(CFLAGS) -o $@ -c $<
21 AR_CMD = $(QUIET_AR) $(AR) cr $@ $^
22 LINK_CMD = $(QUIET_LINK) $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
23+LTLINK_CMD = $(QUIET_LINK) libtool --mode=link --tag=CC $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
24+LTLINKCXX_CMD = $(QUIET_LINK) libtool --mode=link --tag=CXX $(CXX) $(LDFLAGS) -o $@ $^ $(LIBS)
25 MKDIR_CMD = $(QUIET_MKDIR) mkdir -p $@
26 RM_CMD = $(QUIET_RM) rm -f $@
27
f81d51d1
JB
28@@ -91,47 +98,47 @@
29 HTML_SRC_HDR := $(wildcard source/html/*.h)
30 GPRF_SRC_HDR := $(wildcard source/gprf/*.h)
f735ca81
JB
31
32-FITZ_OBJ := $(subst source/, $(OUT)/, $(addsuffix .o, $(basename $(FITZ_SRC))))
33-PDF_OBJ := $(subst source/, $(OUT)/, $(addsuffix .o, $(basename $(PDF_SRC))))
34-XPS_OBJ := $(subst source/, $(OUT)/, $(addsuffix .o, $(basename $(XPS_SRC))))
35-CBZ_OBJ := $(subst source/, $(OUT)/, $(addsuffix .o, $(basename $(CBZ_SRC))))
f81d51d1
JB
36-HTML_OBJ := $(subst source/, $(OUT)/, $(addsuffix .o, $(basename $(HTML_SRC))))
37-GPRF_OBJ := $(subst source/, $(OUT)/, $(addsuffix .o, $(basename $(GPRF_SRC))))
f735ca81
JB
38+FITZ_LOBJ := $(subst source/, $(OUT)/, $(addsuffix .lo, $(basename $(FITZ_SRC))))
39+PDF_LOBJ := $(subst source/, $(OUT)/, $(addsuffix .lo, $(basename $(PDF_SRC))))
40+XPS_LOBJ := $(subst source/, $(OUT)/, $(addsuffix .lo, $(basename $(XPS_SRC))))
41+CBZ_LOBJ := $(subst source/, $(OUT)/, $(addsuffix .lo, $(basename $(CBZ_SRC))))
f81d51d1
JB
42+HTML_LOBJ := $(subst source/, $(OUT)/, $(addsuffix .lo, $(basename $(HTML_SRC))))
43+GPRF_LOBJ := $(subst source/, $(OUT)/, $(addsuffix .lo, $(basename $(GPRF_SRC))))
6d5cd20c
JB
44
45 # --- Choice of Javascript library ---
46
47 ifeq "$(HAVE_MUJS)" "yes"
48-PDF_OBJ += $(OUT)/pdf/js/pdf-js.o
49-PDF_OBJ += $(OUT)/pdf/js/pdf-jsimp-mu.o
50+PDF_LOBJ += $(OUT)/pdf/js/pdf-js.lo
51+PDF_LOBJ += $(OUT)/pdf/js/pdf-jsimp-mu.lo
52 THIRD_LIBS += $(MUJS_LIB)
53 LIBS += $(MUJS_LIBS)
54 CFLAGS += $(MUJS_CFLAGS)
55 else ifeq "$(HAVE_JSCORE)" "yes"
56-PDF_OBJ += $(OUT)/pdf/js/pdf-js.o
57-PDF_OBJ += $(OUT)/pdf/js/pdf-jsimp-jscore.o
58+PDF_LOBJ += $(OUT)/pdf/js/pdf-js.lo
59+PDF_LOBJ += $(OUT)/pdf/js/pdf-jsimp-jscore.lo
60 LIBS += $(JSCORE_LIBS)
61 CFLAGS += $(JSCORE_CFLAGS)
62 else ifeq "$(HAVE_V8)" "yes"
63-PDF_OBJ += $(OUT)/pdf/js/pdf-js.o
64-PDF_OBJ += $(OUT)/pdf/js/pdf-jsimp-cpp.o $(OUT)/pdf/js/pdf-jsimp-v8.o
65+PDF_LOBJ += $(OUT)/pdf/js/pdf-js.lo
66+PDF_LOBJ += $(OUT)/pdf/js/pdf-jsimp-cpp.lo $(OUT)/pdf/js/pdf-jsimp-v8.lo
67 LIBS += $(V8_LIBS)
68 CFLAGS += $(V8_CFLAGS)
69 else
70-PDF_OBJ += $(OUT)/pdf/js/pdf-js-none.o
71+PDF_LOBJ += $(OUT)/pdf/js/pdf-js-none.lo
72 endif
73
74-$(FITZ_OBJ) : $(FITZ_HDR) $(FITZ_SRC_HDR)
75-$(PDF_OBJ) : $(FITZ_HDR) $(PDF_HDR) $(PDF_SRC_HDR)
76-$(XPS_OBJ) : $(FITZ_HDR) $(XPS_HDR) $(XPS_SRC_HDR)
f81d51d1
JB
77-$(CBZ_OBJ) : $(FITZ_HDR)
78-$(HTML_OBJ) : $(FITZ_HDR) $(HTML_HDR) $(HTML_SRC_HDR)
79-$(GPRF_OBJ) : $(FITZ_HDR) $(GPRF_HDR) $(GPRF_SRC_HDR)
f735ca81
JB
80+$(FITZ_LOBJ) : $(FITZ_HDR) $(FITZ_SRC_HDR)
81+$(PDF_LOBJ) : $(FITZ_HDR) $(PDF_HDR) $(PDF_SRC_HDR)
82+$(XPS_LOBJ) : $(FITZ_HDR) $(XPS_HDR) $(XPS_SRC_HDR)
f81d51d1
JB
83+$(CBZ_LOBJ) : $(FITZ_HDR)
84+$(HTML_LOBJ) : $(FITZ_HDR) $(HTML_HDR) $(HTML_SRC_HDR)
85+$(GPRF_LOBJ) : $(FITZ_HDR) $(GPRF_HDR) $(GPRF_SRC_HDR)
f735ca81
JB
86
87 # --- Library ---
88
89-MUPDF_LIB := $(OUT)/libmupdf.a
f735ca81 90+MUPDF_LIB := $(OUT)/libmupdf.la
f735ca81 91
f81d51d1
JB
92-$(MUPDF_LIB) : $(FITZ_OBJ) $(PDF_OBJ) $(XPS_OBJ) $(CBZ_OBJ) $(HTML_OBJ) $(GPRF_OBJ)
93+$(MUPDF_LIB) : $(FITZ_LOBJ) $(PDF_LOBJ) $(XPS_LOBJ) $(CBZ_LOBJ) $(HTML_LOBJ) $(GPRF_LOBJ)
6d5cd20c
JB
94
95 INSTALL_LIBS := $(MUPDF_LIB)
96
f81d51d1 97@@ -140,10 +147,8 @@
f735ca81
JB
98 $(ALL_DIR) $(OUT) $(GEN) :
99 $(MKDIR_CMD)
100
101-$(OUT)/%.a :
102- $(RM_CMD)
103- $(AR_CMD)
104- $(RANLIB_CMD)
105+$(OUT)/%.la :
106+ $(LTLINK_CMD) -rpath $(libdir) $(LDLIBS)
107
108 $(OUT)/%: $(OUT)/%.o
109 $(LINK_CMD)
f81d51d1 110@@ -154,6 +159,12 @@
f735ca81
JB
111 $(OUT)/%.o : source/%.cpp | $(ALL_DIR)
112 $(CXX_CMD)
113
114+$(OUT)/%.lo : source/%.c | $(ALL_DIR)
115+ $(LTCC_CMD)
116+
117+$(OUT)/%.lo : source/%.cpp | $(ALL_DIR)
118+ $(LTCXX_CMD)
119+
120 $(OUT)/%.o : scripts/%.c | $(OUT)
121 $(CC_CMD)
122
f81d51d1 123@@ -233,12 +244,12 @@
f735ca81 124
f81d51d1 125 generate: $(CMAP_GEN) $(FONT_GEN) $(JAVASCRIPT_GEN) $(ADOBECA_GEN) $(NAME_GEN)
f735ca81
JB
126
127-$(OUT)/pdf/pdf-cmap-table.o : $(CMAP_GEN)
128-$(OUT)/pdf/pdf-fontfile.o : $(FONT_GEN)
129-$(OUT)/pdf/pdf-pkcs7.o : $(ADOBECA_GEN)
130-$(OUT)/pdf/js/pdf-js.o : $(JAVASCRIPT_GEN)
f81d51d1
JB
131-$(OUT)/pdf/pdf-object.o : source/pdf/pdf-name-table.h
132-$(OUT)/cmapdump.o : include/mupdf/pdf/cmap.h source/pdf/pdf-cmap.c source/pdf/pdf-cmap-parse.c source/pdf/pdf-name-table.h
f735ca81
JB
133+$(OUT)/pdf/pdf-cmap-table.lo : $(CMAP_GEN)
134+$(OUT)/pdf/pdf-fontfile.lo : $(FONT_GEN)
135+$(OUT)/pdf/pdf-pkcs7.lo : $(ADOBECA_GEN)
136+$(OUT)/pdf/js/pdf-js.lo : $(JAVASCRIPT_GEN)
f81d51d1
JB
137+$(OUT)/pdf/pdf-object.lo : source/pdf/pdf-name-table.h
138+$(OUT)/cmapdump.lo : include/mupdf/pdf/cmap.h source/pdf/pdf-cmap.c source/pdf/pdf-cmap-parse.c source/pdf/pdf-name-table.h
f735ca81
JB
139
140 # --- Tools and Apps ---
f735ca81 141
f81d51d1 142@@ -247,19 +258,19 @@
6d5cd20c
JB
143 $(MUTOOL_OBJ): $(FITZ_HDR) $(PDF_HDR)
144 $(MUTOOL) : $(MUPDF_LIB) $(THIRD_LIBS)
145 $(MUTOOL) : $(MUTOOL_OBJ)
f735ca81
JB
146- $(LINK_CMD)
147+ $(LTLINK_CMD)
148
6d5cd20c
JB
149 MJSGEN := $(OUT)/mjsgen
150 $(MJSGEN) : $(MUPDF_LIB) $(THIRD_LIBS)
151 $(MJSGEN) : $(addprefix $(OUT)/tools/, mjsgen.o)
152- $(LINK_CMD)
153+ $(LTLINK_CMD)
f735ca81 154
6d5cd20c 155 MUJSTEST := $(OUT)/mujstest
f81d51d1
JB
156 MUJSTEST_OBJ := $(addprefix $(OUT)/platform/x11/, jstest_main.o pdfapp.o)
157 $(MUJSTEST_OBJ) : $(FITZ_HDR) $(PDF_HDR)
6d5cd20c 158 $(MUJSTEST) : $(MUPDF_LIB) $(THIRD_LIBS)
f81d51d1 159 $(MUJSTEST) : $(MUJSTEST_OBJ)
6d5cd20c
JB
160- $(LINK_CMD)
161+ $(LTLINK_CMD)
162
163 ifeq "$(HAVE_X11)" "yes"
f735ca81 164 MUVIEW_X11 := $(OUT)/mupdf-x11
f81d51d1 165@@ -267,7 +278,7 @@
6d5cd20c
JB
166 $(MUVIEW_X11_OBJ) : $(FITZ_HDR) $(PDF_HDR)
167 $(MUVIEW_X11) : $(MUPDF_LIB) $(THIRD_LIBS)
168 $(MUVIEW_X11) : $(MUVIEW_X11_OBJ)
f735ca81
JB
169- $(LINK_CMD) $(X11_LIBS)
170+ $(LTLINK_CMD) $(X11_LIBS)
171
f81d51d1
JB
172 ifeq "$(HAVE_GLFW)" "yes"
173 MUVIEW_GLFW := $(OUT)/mupdf-gl
174@@ -275,7 +286,7 @@
175 $(MUVIEW_GLFW_OBJ) : $(FITZ_HDR) $(PDF_HDR) platform/gl/gl-app.h
176 $(MUVIEW_GLFW) : $(MUPDF_LIB) $(THIRD_LIBS) $(GLFW_LIB)
177 $(MUVIEW_GLFW) : $(MUVIEW_GLFW_OBJ)
178- $(LINK_CMD) $(GLFW_LIBS)
179+ $(LTLINK_CMD) $(GLFW_LIBS)
180 endif
181
6d5cd20c 182 ifeq "$(HAVE_CURL)" "yes"
f81d51d1 183@@ -284,7 +295,7 @@
6d5cd20c
JB
184 $(MUVIEW_X11_CURL_OBJ) : $(FITZ_HDR) $(PDF_HDR)
185 $(MUVIEW_X11_CURL) : $(MUPDF_LIB) $(THIRD_LIBS) $(CURL_LIB)
186 $(MUVIEW_X11_CURL) : $(MUVIEW_X11_CURL_OBJ)
187- $(LINK_CMD) $(X11_LIBS) $(CURL_LIBS) $(SYS_CURL_DEPS)
188+ $(LTLINK_CMD) $(X11_LIBS) $(CURL_LIBS) $(SYS_CURL_DEPS)
f735ca81
JB
189 endif
190 endif
191
f81d51d1
JB
192@@ -294,7 +305,7 @@
193 $(MUVIEW_WIN32_OBJ) : $(FITZ_HDR) $(PDF_HDR)
194 $(MUVIEW_WIN32) : $(MUPDF_LIB) $(THIRD_LIBS)
195 $(MUVIEW_WIN32) : $(MUVIEW_WIN32_OBJ)
196- $(LINK_CMD) $(WIN32_LIBS)
197+ $(LTLINK_CMD) $(WIN32_LIBS)
198 endif
199
200 MUVIEW := $(MUVIEW_X11) $(MUVIEW_WIN32) $(MUVIEW_GLFW)
201@@ -307,9 +318,9 @@
202 examples: $(OUT)/example $(OUT)/multi-threaded
203
204 $(OUT)/example: docs/example.c $(MUPDF_LIB) $(THIRD_LIBS)
205- $(LINK_CMD) $(CFLAGS)
206+ $(LTLINK_CMD) $(CFLAGS)
207 $(OUT)/multi-threaded: docs/multi-threaded.c $(MUPDF_LIB) $(THIRD_LIBS)
208- $(LINK_CMD) $(CFLAGS) -lpthread
209+ $(LTLINK_CMD) $(CFLAGS) -lpthread
210
211 # --- Update version string header ---
212
213@@ -351,10 +362,10 @@
f735ca81
JB
214 install include/mupdf/pdf/*.h $(DESTDIR)$(incdir)/mupdf/pdf
215
216 install -d $(DESTDIR)$(libdir)
217- install $(INSTALL_LIBS) $(DESTDIR)$(libdir)
218+ libtool --mode=install install $(INSTALL_LIBS) $(DESTDIR)$(libdir)
219
220 install -d $(DESTDIR)$(bindir)
221- install $(INSTALL_APPS) $(DESTDIR)$(bindir)
222+ libtool --mode=install install $(INSTALL_APPS) $(DESTDIR)$(bindir)
223
224 install -d $(DESTDIR)$(mandir)/man1
225 install docs/man/*.1 $(DESTDIR)$(mandir)/man1
This page took 0.137245 seconds and 4 git commands to generate.