diff options
Diffstat (limited to 'print/mupdf/patches/patch-ac')
-rw-r--r-- | print/mupdf/patches/patch-ac | 115 |
1 files changed, 57 insertions, 58 deletions
diff --git a/print/mupdf/patches/patch-ac b/print/mupdf/patches/patch-ac index 3978bc59013..58fb87e4f59 100644 --- a/print/mupdf/patches/patch-ac +++ b/print/mupdf/patches/patch-ac @@ -1,8 +1,8 @@ -$NetBSD: patch-ac,v 1.3 2012/03/24 13:31:58 drochner Exp $ +$NetBSD: patch-ac,v 1.4 2012/06/03 22:03:24 wiz Exp $ ---- Makefile.orig 2011-09-05 11:55:39.000000000 +0000 +--- Makefile.orig 2012-04-24 16:41:33.000000000 +0000 +++ Makefile -@@ -21,17 +21,9 @@ THIRD_LIBS += $(JPEG_LIB) +@@ -24,17 +24,9 @@ THIRD_LIBS += $(JPEG_LIB) THIRD_LIBS += $(OPENJPEG_LIB) THIRD_LIBS += $(ZLIB_LIB) @@ -14,77 +14,76 @@ $NetBSD: patch-ac,v 1.3 2012/03/24 13:31:58 drochner Exp $ -QUIET_MKDIR = @ echo ' ' ' ' MKDIR $@ ; -endif - - CC_CMD = $(QUIET_CC) $(CC) $(CFLAGS) -o $@ -c $< +-CC_CMD = $(QUIET_CC) $(CC) $(CFLAGS) -o $@ -c $< -AR_CMD = $(QUIET_AR) $(AR) cru $@ $^ -LINK_CMD = $(QUIET_LINK) $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) ++CC_CMD = ${LIBTOOL} --mode=compile $(CC) $(CFLAGS) -o $@ -c $< +AR_CMD = ${LIBTOOL} --mode=link $(CC) -o $@ -version-info 0:0:0 -rpath ${PREFIX}/lib $^ +LINK_CMD = ${LIBTOOL} --mode=link $(CC) -o $@ $^ $(LDFLAGS) $(LIBS) MKDIR_CMD = $(QUIET_MKDIR) mkdir -p $@ # --- Rules --- -@@ -39,40 +31,40 @@ MKDIR_CMD = $(QUIET_MKDIR) mkdir -p $@ +@@ -47,33 +39,32 @@ MUCBZ_HDR := $(FITZ_HDR) cbz/mucbz.h $(OUT) $(GEN) : $(MKDIR_CMD) -$(OUT)/%.a : +$(OUT)/%.la : $(AR_CMD) +- $(RANLIB_CMD) -$(OUT)/% : $(OUT)/%.o +$(OUT)/% : $(OUT)/%.lo $(LINK_CMD) --$(OUT)/%.o : fitz/%.c fitz/fitz.h | $(OUT) -- $(CC_CMD) --$(OUT)/%.o : draw/%.c fitz/fitz.h | $(OUT) -- $(CC_CMD) --$(OUT)/%.o : pdf/%.c fitz/fitz.h pdf/mupdf.h | $(OUT) -- $(CC_CMD) --$(OUT)/%.o : xps/%.c fitz/fitz.h xps/muxps.h | $(OUT) -- $(CC_CMD) --$(OUT)/%.o : apps/%.c fitz/fitz.h pdf/mupdf.h xps/muxps.h | $(OUT) -- $(CC_CMD) +-$(OUT)/%.o : fitz/%.c $(FITZ_HDR) | $(OUT) ++$(OUT)/%.lo : fitz/%.c $(FITZ_HDR) | $(OUT) + $(CC_CMD) +-$(OUT)/%.o : draw/%.c $(FITZ_HDR) | $(OUT) ++$(OUT)/%.lo : draw/%.c $(FITZ_HDR) | $(OUT) + $(CC_CMD) +-$(OUT)/%.o : pdf/%.c $(MUPDF_HDR) | $(OUT) ++$(OUT)/%.lo : pdf/%.c $(MUPDF_HDR) | $(OUT) + $(CC_CMD) +-$(OUT)/%.o : xps/%.c $(MUXPS_HDR) | $(OUT) ++$(OUT)/%.lo : xps/%.c $(MUXPS_HDR) | $(OUT) + $(CC_CMD) +-$(OUT)/%.o : cbz/%.c $(MUCBZ_HDR) | $(OUT) ++$(OUT)/%.lo : cbz/%.c $(MUCBZ_HDR) | $(OUT) + $(CC_CMD) +-$(OUT)/%.o : apps/%.c fitz/fitz.h pdf/mupdf.h xps/muxps.h cbz/mucbz.h | $(OUT) ++$(OUT)/%.lo : apps/%.c fitz/fitz.h pdf/mupdf.h xps/muxps.h cbz/mucbz.h | $(OUT) + $(CC_CMD) -$(OUT)/%.o : scripts/%.c | $(OUT) -- $(CC_CMD) -+$(OUT)/%.lo : fitz/%.c fitz/fitz.h | $(OUT) -+ libtool --mode=compile $(CC_CMD) -+$(OUT)/%.lo : draw/%.c fitz/fitz.h | $(OUT) -+ libtool --mode=compile $(CC_CMD) -+$(OUT)/%.lo : pdf/%.c fitz/fitz.h pdf/mupdf.h | $(OUT) -+ libtool --mode=compile $(CC_CMD) -+$(OUT)/%.lo : xps/%.c fitz/fitz.h xps/muxps.h | $(OUT) -+ libtool --mode=compile $(CC_CMD) -+$(OUT)/%.lo : apps/%.c fitz/fitz.h pdf/mupdf.h xps/muxps.h | $(OUT) -+ libtool --mode=compile $(CC_CMD) +$(OUT)/%.lo : scripts/%.c | $(OUT) -+ libtool --mode=compile $(CC_CMD) + $(CC_CMD) -.PRECIOUS : $(OUT)/%.o # Keep intermediates from chained rules +.PRECIOUS : $(OUT)/%.lo # Keep intermediates from chained rules - # --- Fitz, MuPDF and MuXPS libraries --- + # --- Fitz, MuPDF, MuXPS and MuCBZ library --- -FITZ_LIB := $(OUT)/libfitz.a --MUPDF_LIB := $(OUT)/libmupdf.a --MUXPS_LIB := $(OUT)/libmuxps.a +FITZ_LIB := $(OUT)/libfitz.la -+MUPDF_LIB := $(OUT)/libmupdf.la -+MUXPS_LIB := $(OUT)/libmuxps.la FITZ_SRC := $(notdir $(wildcard fitz/*.c draw/*.c)) - MUPDF_SRC := $(notdir $(wildcard pdf/*.c)) + FITZ_SRC := $(filter-out draw_simple_scale.c, $(FITZ_SRC)) +@@ -81,10 +72,10 @@ MUPDF_SRC := $(notdir $(wildcard pdf/*.c MUXPS_SRC := $(notdir $(wildcard xps/*.c)) + MUCBZ_SRC := $(notdir $(wildcard cbz/*.c)) -$(FITZ_LIB) : $(addprefix $(OUT)/, $(FITZ_SRC:%.c=%.o)) --$(MUPDF_LIB) : $(addprefix $(OUT)/, $(MUPDF_SRC:%.c=%.o)) --$(MUXPS_LIB) : $(addprefix $(OUT)/, $(MUXPS_SRC:%.c=%.o)) +-$(FITZ_LIB) : $(addprefix $(OUT)/, $(MUPDF_SRC:%.c=%.o)) +-$(FITZ_LIB) : $(addprefix $(OUT)/, $(MUXPS_SRC:%.c=%.o)) +-$(FITZ_LIB) : $(addprefix $(OUT)/, $(MUCBZ_SRC:%.c=%.o)) +$(FITZ_LIB) : $(addprefix $(OUT)/, $(FITZ_SRC:%.c=%.lo)) -+$(MUPDF_LIB) : $(addprefix $(OUT)/, $(MUPDF_SRC:%.c=%.lo)) -+$(MUXPS_LIB) : $(addprefix $(OUT)/, $(MUXPS_SRC:%.c=%.lo)) ++$(FITZ_LIB) : $(addprefix $(OUT)/, $(MUPDF_SRC:%.c=%.lo)) ++$(FITZ_LIB) : $(addprefix $(OUT)/, $(MUXPS_SRC:%.c=%.lo)) ++$(FITZ_LIB) : $(addprefix $(OUT)/, $(MUCBZ_SRC:%.c=%.lo)) - libs: $(MUXPS_LIB) $(MUPDF_LIB) $(FITZ_LIB) $(THIRD_LIBS) - @ echo MuPDF/XPS and underlying libraries built -@@ -116,13 +108,13 @@ endif + libs: $(FITZ_LIB) $(THIRD_LIBS) + +@@ -127,9 +118,9 @@ endif generate: $(CMAP_HDR) $(FONT_HDR) @@ -97,40 +96,40 @@ $NetBSD: patch-ac,v 1.3 2012/03/24 13:31:58 drochner Exp $ # --- Tools and Apps --- --PDF_APPS := $(addprefix $(OUT)/, pdfdraw pdfclean pdfextract pdfinfo pdfshow) -+PDF_APPS := $(addprefix $(OUT)/, pdfdraw pdfclean pdfextract mupdf-pdfinfo pdfshow) - XPS_APPS := $(addprefix $(OUT)/, xpsdraw) +@@ -139,13 +130,13 @@ $(MU_APPS) : $(FITZ_LIB) $(THIRD_LIBS) + + BUSY_SRC := $(notdir $(wildcard apps/mubusy_*.c)) + BUSY_APP := $(addprefix $(OUT)/, mubusy) +-$(BUSY_APP) : $(addprefix $(OUT)/, $(BUSY_SRC:%.c=%.o)) ++$(BUSY_APP) : $(addprefix $(OUT)/, $(BUSY_SRC:%.c=%.lo)) + $(BUSY_APP) : $(FITZ_LIB) $(THIRD_LIBS) - $(PDF_APPS) : $(MUPDF_LIB) $(FITZ_LIB) $(THIRD_LIBS) -@@ -131,7 +123,7 @@ $(XPS_APPS) : $(MUXPS_LIB) $(FITZ_LIB) $ - MUPDF := $(OUT)/mupdf - $(MUPDF) : $(MUXPS_LIB) $(MUPDF_LIB) $(FITZ_LIB) $(THIRD_LIBS) ifeq "$(NOX11)" "" + MUPDF := $(OUT)/mupdf + $(MUPDF) : $(FITZ_LIB) $(THIRD_LIBS) -$(MUPDF) : $(addprefix $(OUT)/, x11_main.o x11_image.o pdfapp.o) +$(MUPDF) : $(addprefix $(OUT)/, x11_main.lo x11_image.lo pdfapp.lo) $(LINK_CMD) $(X11_LIBS) endif -@@ -141,14 +133,18 @@ prefix ?= /usr/local +@@ -165,14 +156,16 @@ prefix ?= /usr/local bindir ?= $(prefix)/bin libdir ?= $(prefix)/lib incdir ?= $(prefix)/include -mandir ?= $(prefix)/share/man +mandir ?= $(prefix)/man - install: $(MUXPS_LIB) $(MUPDF_LIB) $(FITZ_LIB) $(PDF_APPS) $(XPS_APPS) $(MUPDF) + install: $(FITZ_LIB) $(MU_APPS) $(MUPDF) - install -d $(bindir) $(libdir) $(incdir) $(mandir)/man1 -- install $(MUXPS_LIB) $(MUPDF_LIB) $(FITZ_LIB) $(libdir) -- install fitz/fitz.h pdf/mupdf.h xps/muxps.h $(incdir) -- install $(PDF_APPS) $(XPS_APPS) $(MUPDF) $(bindir) +- install $(FITZ_LIB) $(libdir) +- install fitz/memento.h fitz/fitz.h pdf/mupdf.h xps/muxps.h cbz/mucbz.h $(incdir) +- install $(MU_APPS) $(MUPDF) $(bindir) - install $(wildcard apps/man/*.1) $(mandir)/man1 + ${BSD_INSTALL_DATA_DIR} $(bindir) $(libdir) $(incdir) $(mandir)/man1 -+ for f in $(MUXPS_LIB) $(MUPDF_LIB) $(FITZ_LIB); do \ -+ libtool --mode=install ${BSD_INSTALL_LIB} $$f $(libdir); \ -+ done -+ ${BSD_INSTALL_DATA} fitz/fitz.h pdf/mupdf.h xps/muxps.h $(incdir) -+ for f in $(PDF_APPS) $(XPS_APPS) $(MUPDF); do \ -+ libtool --mode=install ${BSD_INSTALL_PROGRAM} $$f $(bindir); \ ++ libtool --mode=install ${BSD_INSTALL_LIB} $(FITZ_LIB) $(libdir) ++ ${BSD_INSTALL_DATA} fitz/memento.h fitz/fitz.h pdf/mupdf.h xps/muxps.h cbz/mucbz.h $(incdir) ++ for f in $(MU_APPS) $(MUPDF); do \ ++ libtool --mode=install ${BSD_INSTALL_PROGRAM} $$f $(bindir); \ + done + ${BSD_INSTALL_DATA} $(wildcard apps/man/*.1) $(mandir)/man1 |