pkgsrc/print/mupdf/patches/patch-thirdparty_mujs_Makefile
leot fea5aee3b9 mupdf: Update print/mupdf to 1.13.0
pkgsrc changes:
 - Directly override VERSION in files/mupdf.pc in the post-build phase
   (to avoid an extra manual step for every mupdf update)
 - Get rid of OPJ_STATIC patch hunk in patches/patch-source_fitz_load-jpx.c (it
   is no more needed, because the `-DOPJ_STATIC' is now passed in Makefile-s
   when the bundled openjpeg is used).
 - Pass HAVE_LIBCRYPTO=no to avoid requiring openssl>=1.1.0.

Changes:
1.13.0
------
* This is primarily a bugfix release.
* New "mutool sign" tool for showing and verifying digital signatures.
* Chinese, Japanese, Korean, Cyrillic, and Greek font support in mutool create.
* Improvements to annotation editing API.
2018-05-06 13:19:10 +00:00

53 lines
1.5 KiB
Text

$NetBSD: patch-thirdparty_mujs_Makefile,v 1.4 2018/05/06 13:19:10 leot Exp $
- Add libtool support to mujs.
- Avoid to set (unused) VERSION variable.
--- thirdparty/mujs/Makefile.orig 2018-01-24 15:55:49.000000000 +0000
+++ thirdparty/mujs/Makefile
@@ -7,12 +7,6 @@ bindir ?= $(prefix)/bin
incdir ?= $(prefix)/include
libdir ?= $(prefix)/lib
-ifeq "$(wildcard .git)" ".git"
-VERSION := $(shell git describe --tags --always)
-else
-VERSION := $(shell basename $$PWD | sed -e s,^mujs-,,)
-endif
-
# Compiler flags for various configurations:
CFLAGS := -std=c99 -pedantic -Wall -Wextra -Wno-unused-parameter
@@ -63,19 +57,19 @@ jsdump.c: astnames.h opnames.h
$(OUT):
mkdir -p $(OUT)
-$(OUT)/main.o: main.c $(HDRS)
+$(OUT)/main.lo: main.c $(HDRS)
$(CC) $(CFLAGS) -o $@ -c $<
-$(OUT)/libmujs.o: one.c $(HDRS)
+$(OUT)/libmujs.lo: one.c $(HDRS)
$(CC) $(CFLAGS) -o $@ -c $<
-$(OUT)/libmujs.a: $(OUT)/libmujs.o
+$(OUT)/libmujs.la: $(OUT)/libmujs.lo
$(AR) cru $@ $^
$(OUT)/libmujs.so: one.c $(HDRS)
$(CC) $(CFLAGS) -fPIC -shared -o $@ $< -lm
-$(OUT)/mujs: $(OUT)/libmujs.o $(OUT)/main.o
+$(OUT)/mujs: $(OUT)/libmujs.lo $(OUT)/main.lo
$(CC) $(LDFLAGS) -o $@ $^ -lm
$(OUT)/mujs.pc:
@@ -100,7 +94,7 @@ install-common: release
install -m 755 build/release/mujs $(DESTDIR)$(bindir)
install-static: install-common
- install -m 644 build/release/libmujs.a $(DESTDIR)$(libdir)
+ install -m 644 build/release/libmujs.la $(DESTDIR)$(libdir)
install-shared: install-common
install -m 755 build/release/libmujs.so $(DESTDIR)$(libdir)