openbsd-ports/textproc/mupdf/patches/patch-Makefile
sthen 80be9e2293 update mupdf (a nice fast lightweight pdf viewer with its own codebase
rather than yet-another-xpdf-derivative) to 0.8.15.

various improvements and fixes, notably now supports AESv3 encrypted
PDFs and, very welcome, search now operates over all pages and is thus
actually useful.
2011-03-22 23:40:46 +00:00

65 lines
1.7 KiB
Plaintext

$OpenBSD: patch-Makefile,v 1.3 2011/03/22 23:40:46 sthen Exp $
--- Makefile.orig Wed Mar 16 11:57:24 2011
+++ Makefile Tue Mar 22 22:56:25 2011
@@ -44,13 +44,15 @@ CFLAGS += $(THIRD_INCS) $(SYS_FREETYPE_INC)
ifneq "$(verbose)" ""
GENFILE_CMD = $(firstword $^) $@ $(wordlist 2, 999, $^)
+AS_CMD = $(AS) -o $@ $<
CC_CMD = $(CC) -o $@ -c $< $(CFLAGS)
LD_CMD = $(CC) -o $@ $^ $(LDFLAGS) $(LIBS)
-AR_CMD = rm -f $@ && $(AR) cru $@ $^
+AR_CMD = $(AR) cru $@ $^
else
GENFILE_CMD = @ echo GENFILE $@ && $(firstword $^) $@ $(wordlist 2, 999, $^)
+AS_CMD = @ echo AS $@ && $(AS) -o $@ $<
CC_CMD = @ echo CC $@ && $(CC) -o $@ -c $< $(CFLAGS)
LD_CMD = @ echo LD $@ && $(CC) -o $@ $^ $(LDFLAGS) $(LIBS)
AR_CMD = @ echo AR $@ && rm -f $@ && $(AR) cru $@ $^
@@ -65,6 +67,10 @@ FONTDUMP_EXE := $(OBJDIR)/fontdump
$(FONTDUMP_EXE): $(OBJDIR)/fontdump.o
$(LD_CMD)
+FONTRES_EXE=$(OBJDIR)/fontres
+$(FONTRES_EXE): $(OBJDIR)/fontres.o
+ $(LD_CMD)
+
CMAPDUMP_EXE := $(OBJDIR)/cmapdump
$(CMAPDUMP_EXE): $(OBJDIR)/cmapdump.o
$(LD_CMD)
@@ -180,6 +186,8 @@ $(OBJDIR)/%.o: mupdf/%.c
$(CC_CMD)
$(OBJDIR)/%.o: $(GENDIR)/%.c
$(CC_CMD)
+$(OBJDIR)/%.o: $(GENDIR)/%.s
+ $(AS_CMD)
#
# Generated font file dumps
@@ -207,18 +215,18 @@ CJKFONT_FILES := \
ifeq "$(pregen)" ""
-$(GENDIR)/font_base14.c: $(FONTDUMP_EXE) $(BASEFONT_FILES)
+$(GENDIR)/font_base14.s: $(FONTRES_EXE) $(BASEFONT_FILES)
$(GENFILE_CMD)
-$(GENDIR)/font_cjk.c: $(FONTDUMP_EXE) $(CJKFONT_FILES)
+$(GENDIR)/font_cjk.s: $(FONTRES_EXE) $(CJKFONT_FILES)
$(GENFILE_CMD)
endif
FONT_SRC := \
- $(GENDIR)/font_base14.c \
- $(GENDIR)/font_cjk.c
+ $(GENDIR)/font_base14.s \
+ $(GENDIR)/font_cjk.s
-FONT_OBJ := $(FONT_SRC:$(GENDIR)/%.c=$(OBJDIR)/%.o)
+FONT_OBJ := $(FONT_SRC:$(GENDIR)/%.s=$(OBJDIR)/%.o)
#