summaryrefslogtreecommitdiff
path: root/print
diff options
context:
space:
mode:
authorwiz <wiz@pkgsrc.org>2014-05-18 08:12:22 +0000
committerwiz <wiz@pkgsrc.org>2014-05-18 08:12:22 +0000
commit2580bfb562598302a11ca94570deee3ecd67dc30 (patch)
tree6f3c085eb6492a034168c5cd76e0b208b525439f /print
parent7845be5878b8df360e17ea605654860a10a14f92 (diff)
downloadpkgsrc-2580bfb562598302a11ca94570deee3ecd67dc30.tar.gz
Fix build with openjpeg-2.1.
Bump PKGREVISION.
Diffstat (limited to 'print')
-rw-r--r--print/mupdf/Makefile12
-rw-r--r--print/mupdf/distinfo5
-rw-r--r--print/mupdf/patches/patch-ab8
-rw-r--r--print/mupdf/patches/patch-source_fitz_load-jpx.c17
4 files changed, 28 insertions, 14 deletions
diff --git a/print/mupdf/Makefile b/print/mupdf/Makefile
index 263e8b4e4bf..5949da8a535 100644
--- a/print/mupdf/Makefile
+++ b/print/mupdf/Makefile
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.23 2014/05/15 14:41:58 adam Exp $
+# $NetBSD: Makefile,v 1.24 2014/05/18 08:12:22 wiz Exp $
DISTNAME= mupdf-1.4-source
PKGNAME= ${DISTNAME:S/-source//}
-PKGREVISION= 1
+PKGREVISION= 2
CATEGORIES= print
MASTER_SITES= http://mupdf.com/downloads/
@@ -14,12 +14,6 @@ LICENSE= gnu-agpl-v3
USE_LIBTOOL= yes
USE_TOOLS+= pkg-config gmake
-SUBST_CLASSES+= makerules
-SUBST_STAGE.makerules= post-patch
-SUBST_MESSAGE.makerules= Fixing CFLAGS for openjpeg in Makerules.
-SUBST_FILES.makerules= Makerules
-SUBST_VARS.makerules+= PREFIX
-
INSTALLATION_DIRS+= bin include lib/pkgconfig
INSTALL_MAKE_FLAGS+= prefix=${PREFIX}
INSTALL_MAKE_FLAGS+= mandir=${PREFIX}/${PKGMANDIR}
@@ -53,5 +47,7 @@ post-install:
.include "../../mk/jpeg.buildlink3.mk"
.include "../../graphics/openjpeg/buildlink3.mk"
.include "../../graphics/png/buildlink3.mk"
+# what is it used for?
+#.include "../../www/curl/buildlink3.mk"
.include "../../x11/libXext/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/print/mupdf/distinfo b/print/mupdf/distinfo
index 2cb54bd7534..65629bd0c1e 100644
--- a/print/mupdf/distinfo
+++ b/print/mupdf/distinfo
@@ -1,9 +1,10 @@
-$NetBSD: distinfo,v 1.13 2014/04/21 16:14:40 wiz Exp $
+$NetBSD: distinfo,v 1.14 2014/05/18 08:12:22 wiz Exp $
SHA1 (mupdf-1.4-source.tar.gz) = 805f9b37de371638eddb2f964837fecec8b64b4a
RMD160 (mupdf-1.4-source.tar.gz) = 368140a0f825483268faaf778328bc6c3f4d461f
Size (mupdf-1.4-source.tar.gz) = 13253644 bytes
SHA1 (patch-Makethird) = 950daf9a235f0da97d6a20dedd59bc8bd1c3e274
-SHA1 (patch-ab) = 896d37f15718fed8880b56643bb131406cfe6861
+SHA1 (patch-ab) = d2ad5e74e2649a1db6eb2d5d9c0ad0efe5206182
SHA1 (patch-ac) = 87c4dbd17ff737f5edcfcf41c97add12722456ee
SHA1 (patch-ae) = bad4b6b8c669c752c6318bb564d1176daac30d19
+SHA1 (patch-source_fitz_load-jpx.c) = e5271cf60aff104e05ff60333be54712475d5a33
diff --git a/print/mupdf/patches/patch-ab b/print/mupdf/patches/patch-ab
index 5215a04e9f1..4b12e7db5ca 100644
--- a/print/mupdf/patches/patch-ab
+++ b/print/mupdf/patches/patch-ab
@@ -1,7 +1,7 @@
-$NetBSD: patch-ab,v 1.6 2014/04/21 16:14:40 wiz Exp $
+$NetBSD: patch-ab,v 1.7 2014/05/18 08:12:22 wiz Exp $
o Handle the various operating systems in the same way avoiding hardcoding
-o Build and link with openjpeg-2.0
+o Build and link with openjpeg-2.1
o libcurl (www/curl) support
--- Makerules.orig 2014-04-11 15:10:41.000000000 +0000
@@ -60,8 +60,8 @@ o libcurl (www/curl) support
SYS_FREETYPE_LIBS = $(shell pkg-config --libs freetype2)
-SYS_OPENJPEG_CFLAGS = $(shell pkg-config --cflags libopenjpeg1)
-SYS_OPENJPEG_LIBS = $(shell pkg-config --libs libopenjpeg1)
-+SYS_OPENJPEG_CFLAGS = -I/usr/pkg/include/openjpeg-2.0
-+SYS_OPENJPEG_LIBS = -lopenjp2
++SYS_OPENJPEG_CFLAGS = $(shell pkg-config --cflags libopenjp2)
++SYS_OPENJPEG_LIBS = $(shell pkg-config --libs libopenjp2)
SYS_JBIG2DEC_LIBS = -ljbig2dec
SYS_JPEG_LIBS = -ljpeg
SYS_ZLIB_LIBS = -lz
diff --git a/print/mupdf/patches/patch-source_fitz_load-jpx.c b/print/mupdf/patches/patch-source_fitz_load-jpx.c
new file mode 100644
index 00000000000..4f563bcbbd2
--- /dev/null
+++ b/print/mupdf/patches/patch-source_fitz_load-jpx.c
@@ -0,0 +1,17 @@
+$NetBSD: patch-source_fitz_load-jpx.c,v 1.1 2014/05/18 08:12:22 wiz Exp $
+
+Fix build with openjpeg-2.1.
+I have misgivings about the code though.
+
+--- source/fitz/load-jpx.c.orig 2014-04-11 15:10:41.000000000 +0000
++++ source/fitz/load-jpx.c
+@@ -117,7 +117,8 @@ fz_load_jpx(fz_context *ctx, unsigned ch
+ opj_stream_set_read_function(stream, fz_opj_stream_read);
+ opj_stream_set_skip_function(stream, fz_opj_stream_skip);
+ opj_stream_set_seek_function(stream, fz_opj_stream_seek);
+- opj_stream_set_user_data(stream, &sb);
++ /* XXX: sb is on the stack, so no user data free-er needed; I'm not sure that placing it on the stack will work though? */
++ opj_stream_set_user_data(stream, &sb, NULL);
+ /* Set the length to avoid an assert */
+ opj_stream_set_user_data_length(stream, size);
+