svn commit: r398615 - in head/graphics/mupdf: . files
Sunpoet Po-Chuan Hsieh
sunpoet at FreeBSD.org
Sun Oct 4 18:01:54 UTC 2015
Author: sunpoet
Date: Sun Oct 4 18:01:53 2015
New Revision: 398615
URL: https://svnweb.freebsd.org/changeset/ports/398615
Log:
- Fix build with openjpeg 2.1.1
- Bump PORTREVISION
- While I'm here:
- Update MASTER_SITES: make 1.7 fetchable
- Use DISTVERSIONSUFFIX instead of EXTRACT_SUFX
- Convert to new options helper
PR: 203327
Submitted by: Walter Schwarzenfeld <w.litter at aon.at>
Approved by: Zsolt Udvari <udvzsolt at gmail.com> (maintainer)
Modified:
head/graphics/mupdf/Makefile
head/graphics/mupdf/files/patch-source__fitz__load-jpx.c
Modified: head/graphics/mupdf/Makefile
==============================================================================
--- head/graphics/mupdf/Makefile Sun Oct 4 18:01:48 2015 (r398614)
+++ head/graphics/mupdf/Makefile Sun Oct 4 18:01:53 2015 (r398615)
@@ -3,18 +3,17 @@
PORTNAME= mupdf
PORTVERSION= 1.7
+DISTVERSIONSUFFIX= -source
PORTEPOCH= 1
CATEGORIES= graphics
-MASTER_SITES= http://www.mupdf.com/download/
-EXTRACT_SUFX= -source.tar.gz
+MASTER_SITES= http://www.mupdf.com/download/ \
+ http://www.mupdf.com/download/archive/
MAINTAINER= udvzsolt at gmail.com
COMMENT= Lightweight PDF viewer and toolkit
LICENSE= AGPLv3
-BROKEN= fails to link with openjpeg 2.1.1
-
LIB_DEPENDS= libcurl.so:${PORTSDIR}/ftp/curl \
libfreetype.so:${PORTSDIR}/print/freetype2 \
libjbig2dec.so:${PORTSDIR}/graphics/jbig2dec \
@@ -35,16 +34,9 @@ OPTIONS_DEFAULT=SCROLL
SCROLL_DESC= Build with scroll hacks
JS_DESC= JavaScript support (V8 engine)
-.include <bsd.port.options.mk>
-
-.if ${PORT_OPTIONS:MSCROLL}
-EXTRA_PATCHES+= ${FILESDIR}/scroll_hack-platform__x11__pdfapp.c
-.endif
-
-.if ${PORT_OPTIONS:MJS}
-LIB_DEPENDS+= libv8.so:${PORTSDIR}/lang/v8
-MAKE_ARGS+= V8_PRESENT=1 V8LIBS=-lv8
-.endif
+SCROLL_EXTRA_PATCHES= ${FILESDIR}/scroll_hack-platform__x11__pdfapp.c
+JS_LIB_DEPENDS= libv8.so:${PORTSDIR}/lang/v8
+JS_MAKE_ARGS= V8_PRESENT=1 V8LIBS=-lv8
post-patch:
@${REINPLACE_CMD} -e 's/-pipe -O2 //' \
Modified: head/graphics/mupdf/files/patch-source__fitz__load-jpx.c
==============================================================================
--- head/graphics/mupdf/files/patch-source__fitz__load-jpx.c Sun Oct 4 18:01:48 2015 (r398614)
+++ head/graphics/mupdf/files/patch-source__fitz__load-jpx.c Sun Oct 4 18:01:53 2015 (r398615)
@@ -1,15 +1,25 @@
---- ./source/fitz/load-jpx.c.orig 2014-06-10 17:09:28.000000000 +0200
-+++ ./source/fitz/load-jpx.c 2014-08-04 18:51:45.000000000 +0200
-@@ -8,7 +8,7 @@
+--- source/fitz/load-jpx.c.orig 2015-04-16 08:57:45 UTC
++++ source/fitz/load-jpx.c
+@@ -3,12 +3,17 @@
+ /* Without the definition of OPJ_STATIC, compilation fails on windows
+ * due to the use of __stdcall. We believe it is required on some
+ * linux toolchains too. */
++
++#ifdef __cplusplus
++extern "C"
++{
+ #define OPJ_STATIC
+ #ifndef _MSC_VER
#define OPJ_HAVE_STDINT_H
#endif
++#endif
-#include <openjpeg.h>
+#include <openjpeg-2.1/openjpeg.h>
static void fz_opj_error_callback(const char *msg, void *client_data)
{
-@@ -116,7 +116,7 @@
+@@ -117,7 +122,7 @@ 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);
@@ -18,3 +28,10 @@
/* Set the length to avoid an assert */
opj_stream_set_user_data_length(stream, size);
+@@ -247,3 +252,6 @@ fz_load_jpx(fz_context *ctx, unsigned ch
+
+ return img;
+ }
++#ifdef __cplusplus
++}
++#endif
More information about the svn-ports-all
mailing list