diff options
Diffstat (limited to 'print/mupdf/patches/patch-ac')
-rw-r--r-- | print/mupdf/patches/patch-ac | 196 |
1 files changed, 196 insertions, 0 deletions
diff --git a/print/mupdf/patches/patch-ac b/print/mupdf/patches/patch-ac new file mode 100644 index 00000000000..f42e6d1581d --- /dev/null +++ b/print/mupdf/patches/patch-ac @@ -0,0 +1,196 @@ +$NetBSD: patch-ac,v 1.1 2010/09/15 13:15:29 joerg Exp $ + +--- Makefile.orig 2010-08-25 14:12:08.000000000 +0000 ++++ Makefile +@@ -41,32 +41,21 @@ CFLAGS += $(THIRD_INCS) $(SYS_FREETYPE_I + # Build commands + # + +-ifneq "$(verbose)" "" +- + GENFILE_CMD = $(firstword $^) $@ $(wordlist 2, 999, $^) + CC_CMD = $(CC) -o $@ -c $< $(CFLAGS) +-LD_CMD = $(CC) -o $@ $^ $(LDFLAGS) $(LIBS) +-AR_CMD = rm -f $@ && $(AR) cru $@ $^ +- +-else +- +-GENFILE_CMD = @ echo GENFILE $@ && $(firstword $^) $@ $(wordlist 2, 999, $^) +-CC_CMD = @ echo CC $@ && $(CC) -o $@ -c $< $(CFLAGS) +-LD_CMD = @ echo LD $@ && $(CC) -o $@ $^ $(LDFLAGS) $(LIBS) +-AR_CMD = @ echo AR $@ && rm -f $@ && $(AR) cru $@ $^ +- +-endif ++LD_CMD = ${LIBTOOL} --mode=link $(CC) -o $@ $^ $(LDFLAGS) $(LIBS) ++AR_CMD = ${LIBTOOL} --mode=link $(CC) -o $@ -version-info 0:0:0 -rpath ${PREFIX}/lib $^ + + # + # Code generation tools + # + + FONTDUMP_EXE := $(OBJDIR)/fontdump +-$(FONTDUMP_EXE): $(OBJDIR)/fontdump.o ++$(FONTDUMP_EXE): $(OBJDIR)/fontdump.lo + $(LD_CMD) + + CMAPDUMP_EXE := $(OBJDIR)/cmapdump +-$(CMAPDUMP_EXE): $(OBJDIR)/cmapdump.o ++$(CMAPDUMP_EXE): $(OBJDIR)/cmapdump.lo + $(LD_CMD) + + # +@@ -112,7 +101,7 @@ FITZ_SRC := \ + fitz/stm_buffer.c \ + fitz/stm_open.c \ + fitz/stm_read.c +-FITZ_OBJ := $(FITZ_SRC:fitz/%.c=$(OBJDIR)/%.o) ++FITZ_OBJ := $(FITZ_SRC:fitz/%.c=$(OBJDIR)/%.lo) + $(FITZ_OBJ): $(FITZ_HDR) + + DRAW_SRC := $(DRAW_ARCH_SRC) \ +@@ -128,8 +117,8 @@ DRAW_SRC := $(DRAW_ARCH_SRC) \ + draw/pathscan.c \ + draw/pathstroke.c \ + draw/porterduff.c +-DRAW_OBJ := $(DRAW_SRC:draw/%.c=$(OBJDIR)/%.o) +-DRAW_OBJ := $(DRAW_OBJ:draw/%.s=$(OBJDIR)/%.o) ++DRAW_OBJ := $(DRAW_SRC:draw/%.c=$(OBJDIR)/%.lo) ++DRAW_OBJ := $(DRAW_OBJ:draw/%.s=$(OBJDIR)/%.lo) + $(DRAW_OBJ): $(FITZ_HDR) + + MUPDF_HDR := $(FITZ_HDR) mupdf/mupdf.h +@@ -166,19 +155,19 @@ MUPDF_SRC := \ + mupdf/pdf_unicode.c \ + mupdf/pdf_xobject.c \ + mupdf/pdf_xref.c +-MUPDF_OBJ := $(MUPDF_SRC:mupdf/%.c=$(OBJDIR)/%.o) ++MUPDF_OBJ := $(MUPDF_SRC:mupdf/%.c=$(OBJDIR)/%.lo) + $(MUPDF_OBJ): $(MUPDF_HDR) + +-$(OBJDIR)/%.o: fitz/%.c +- $(CC_CMD) +-$(OBJDIR)/%.o: draw/%.c +- $(CC_CMD) +-$(OBJDIR)/%.o: draw/%.s +- $(CC_CMD) +-$(OBJDIR)/%.o: mupdf/%.c +- $(CC_CMD) +-$(OBJDIR)/%.o: $(GENDIR)/%.c +- $(CC_CMD) ++$(OBJDIR)/%.lo: fitz/%.c ++ libtool --mode=compile $(CC_CMD) ++$(OBJDIR)/%.lo: draw/%.c ++ libtool --mode=compile $(CC_CMD) ++$(OBJDIR)/%.lo: draw/%.s ++ libtool --mode=compile $(CC_CMD) ++$(OBJDIR)/%.lo: mupdf/%.c ++ libtool --mode=compile $(CC_CMD) ++$(OBJDIR)/%.lo: $(GENDIR)/%.c ++ libtool --mode=compile $(CC_CMD) + + # + # Generated font file dumps +@@ -217,7 +206,7 @@ FONT_SRC := \ + $(GENDIR)/font_base14.c \ + $(GENDIR)/font_cjk.c + +-FONT_OBJ := $(FONT_SRC:$(GENDIR)/%.c=$(OBJDIR)/%.o) ++FONT_OBJ := $(FONT_SRC:$(GENDIR)/%.c=$(OBJDIR)/%.lo) + + + # +@@ -287,13 +276,13 @@ CMAP_SRC := \ + $(GENDIR)/cmap_japan.c \ + $(GENDIR)/cmap_korea.c + +-CMAP_OBJ := $(CMAP_SRC:$(GENDIR)/%.c=$(OBJDIR)/%.o) ++CMAP_OBJ := $(CMAP_SRC:$(GENDIR)/%.c=$(OBJDIR)/%.lo) + + # + # Library + # + +-MUPDF_LIB = $(OBJDIR)/libmupdf.a ++MUPDF_LIB = $(OBJDIR)/libmupdf.la + $(MUPDF_LIB): $(FITZ_OBJ) $(DRAW_OBJ) $(MUPDF_OBJ) $(CMAP_OBJ) $(FONT_OBJ) + $(AR_CMD) + +@@ -303,40 +292,40 @@ $(MUPDF_LIB): $(FITZ_OBJ) $(DRAW_OBJ) $( + + APPS = $(PDFSHOW_EXE) $(PDFCLEAN_EXE) $(PDFDRAW_EXE) $(PDFEXTRACT_EXE) $(PDFINFO_EXE) $(PDFVIEW_EXE) + +-$(OBJDIR)/%.o: apps/%.c +- $(CC_CMD) ++$(OBJDIR)/%.lo: apps/%.c ++ libtool --mode=compile $(CC_CMD) + + PDFSHOW_SRC=apps/pdfshow.c +-PDFSHOW_OBJ=$(PDFSHOW_SRC:apps/%.c=$(OBJDIR)/%.o) ++PDFSHOW_OBJ=$(PDFSHOW_SRC:apps/%.c=$(OBJDIR)/%.lo) + PDFSHOW_EXE=$(OBJDIR)/pdfshow + $(PDFSHOW_OBJ): $(MUPDF_HDR) + $(PDFSHOW_EXE): $(PDFSHOW_OBJ) $(MUPDF_LIB) $(THIRD_LIBS) + $(LD_CMD) + + PDFCLEAN_SRC=apps/pdfclean.c +-PDFCLEAN_OBJ=$(PDFCLEAN_SRC:apps/%.c=$(OBJDIR)/%.o) ++PDFCLEAN_OBJ=$(PDFCLEAN_SRC:apps/%.c=$(OBJDIR)/%.lo) + PDFCLEAN_EXE=$(OBJDIR)/pdfclean + $(PDFCLEAN_OBJ): $(MUPDF_HDR) + $(PDFCLEAN_EXE): $(PDFCLEAN_OBJ) $(MUPDF_LIB) $(THIRD_LIBS) + $(LD_CMD) + + PDFDRAW_SRC=apps/pdfdraw.c +-PDFDRAW_OBJ=$(PDFDRAW_SRC:apps/%.c=$(OBJDIR)/%.o) ++PDFDRAW_OBJ=$(PDFDRAW_SRC:apps/%.c=$(OBJDIR)/%.lo) + PDFDRAW_EXE=$(OBJDIR)/pdfdraw + $(PDFDRAW_OBJ): $(MUPDF_HDR) + $(PDFDRAW_EXE): $(PDFDRAW_OBJ) $(MUPDF_LIB) $(THIRD_LIBS) + $(LD_CMD) + + PDFEXTRACT_SRC=apps/pdfextract.c +-PDFEXTRACT_OBJ=$(PDFEXTRACT_SRC:apps/%.c=$(OBJDIR)/%.o) ++PDFEXTRACT_OBJ=$(PDFEXTRACT_SRC:apps/%.c=$(OBJDIR)/%.lo) + PDFEXTRACT_EXE=$(OBJDIR)/pdfextract + $(PDFEXTRACT_OBJ): $(MUPDF_HDR) + $(PDFEXTRACT_EXE): $(PDFEXTRACT_OBJ) $(MUPDF_LIB) $(THIRD_LIBS) + $(LD_CMD) + + PDFINFO_SRC=apps/pdfinfo.c +-PDFINFO_OBJ=$(PDFINFO_SRC:apps/%.c=$(OBJDIR)/%.o) +-PDFINFO_EXE=$(OBJDIR)/pdfinfo ++PDFINFO_OBJ=$(PDFINFO_SRC:apps/%.c=$(OBJDIR)/%.lo) ++PDFINFO_EXE=$(OBJDIR)/mupdf-pdfinfo + $(PDFINFO_OBJ): $(MUPDF_HDR) + $(PDFINFO_EXE): $(PDFINFO_OBJ) $(MUPDF_LIB) $(THIRD_LIBS) + $(LD_CMD) +@@ -344,7 +333,7 @@ $(PDFINFO_EXE): $(PDFINFO_OBJ) $(MUPDF_L + PDFAPP_HDR = apps/pdfapp.h + + X11VIEW_SRC=apps/x11_main.c apps/x11_image.c apps/pdfapp.c +-X11VIEW_OBJ=$(X11VIEW_SRC:apps/%.c=$(OBJDIR)/%.o) ++X11VIEW_OBJ=$(X11VIEW_SRC:apps/%.c=$(OBJDIR)/%.lo) + X11VIEW_EXE=$(OBJDIR)/mupdf + + $(X11VIEW_OBJ): $(MUPDF_HDR) $(PDFAPP_HDR) +@@ -353,7 +342,7 @@ $(X11VIEW_EXE): $(X11VIEW_OBJ) $(MUPDF_L + + WINVIEW_SRC=apps/win_main.c apps/pdfapp.c + WINVIEW_RES=apps/win_res.rc +-WINVIEW_OBJ=$(WINVIEW_SRC:apps/%.c=$(OBJDIR)/%.o) $(WINVIEW_RES:apps/%.rc=$(OBJDIR)/%.o) ++WINVIEW_OBJ=$(WINVIEW_SRC:apps/%.c=$(OBJDIR)/%.lo) $(WINVIEW_RES:apps/%.rc=$(OBJDIR)/%.lo) + WINVIEW_EXE=$(OBJDIR)/mupdf.exe + + $(OBJDIR)/%.o: apps/%.rc +@@ -378,7 +367,7 @@ nuke: + rm -rf build + + install: $(OBJDIR) $(GENDIR) $(MUPDF_LIB) $(APPS) +- install -d $(prefix)/bin $(prefix)/lib $(prefix)/include +- install $(APPS) $(prefix)/bin +- install $(MUPDF_LIB) $(prefix)/lib +- install $(MUPDF_HDR) $(prefix)/include ++ mkdir -p $(prefix)/bin $(prefix)/lib $(prefix)/include ++ libtool --mode=install ${BSD_INSTALL_PROGRAM} $(APPS) $(prefix)/bin ++ libtool --mode=install ${BSD_INSTALL_LIB} $(MUPDF_LIB) $(prefix)/lib ++ ${BSD_INSTALL_DATA} $(MUPDF_HDR) $(prefix)/include |