aboutsummaryrefslogtreecommitdiff
path: root/graphics/mupdf
diff options
context:
space:
mode:
authorTijl Coosemans <tijl@FreeBSD.org>2014-08-05 19:05:34 +0000
committerTijl Coosemans <tijl@FreeBSD.org>2014-08-05 19:05:34 +0000
commit2fbc95a10a2f30b9311ce7d56ea35fd4eaefbbd9 (patch)
tree3dba98c953905825f2e50ab57555f7f831a81ee8 /graphics/mupdf
parent6b1e4aa709c5beaac20f998b7aff178825ef4c98 (diff)
downloadports-2fbc95a10a2f30b9311ce7d56ea35fd4eaefbbd9.tar.gz
ports-2fbc95a10a2f30b9311ce7d56ea35fd4eaefbbd9.zip
Notes
Diffstat (limited to 'graphics/mupdf')
-rw-r--r--graphics/mupdf/Makefile29
-rw-r--r--graphics/mupdf/files/patch-Makefile16
-rw-r--r--graphics/mupdf/pkg-plist1
3 files changed, 17 insertions, 29 deletions
diff --git a/graphics/mupdf/Makefile b/graphics/mupdf/Makefile
index 79fb2a72cb6e..b23daea37314 100644
--- a/graphics/mupdf/Makefile
+++ b/graphics/mupdf/Makefile
@@ -3,6 +3,7 @@
PORTNAME= mupdf
PORTVERSION= 1.5
+PORTREVISION= 1
PORTEPOCH= 1
CATEGORIES= graphics
MASTER_SITES= GOOGLE_CODE \
@@ -14,15 +15,14 @@ COMMENT= Lightweight PDF viewer and toolkit
LICENSE= AGPLv3
-LIB_DEPENDS= libfreetype.so:${PORTSDIR}/print/freetype2 \
+LIB_DEPENDS= libcurl.so:${PORTSDIR}/ftp/curl \
+ libfreetype.so:${PORTSDIR}/print/freetype2 \
libjpeg.so:${PORTSDIR}/graphics/jpeg \
libjbig2dec.so:${PORTSDIR}/graphics/jbig2dec \
libopenjp2.so:${PORTSDIR}/graphics/openjpeg
-MAKE_ARGS+= build=release prefix=${PREFIX} verbose=1 mandir=${PREFIX}/man \
- HAVE_X11=yes \
- XCFLAGS="`pkg-config --cflags freetype2` -I ${LOCALBASE}/include" \
- XLIBS="`pkg-config --libs freetype2 libopenjp2 x11 xext` -ljpeg -ljbig2dec"
+LIBS+= -L${LOCALBASE}/lib
+MAKE_ARGS= build=release prefix=${PREFIX} mandir=${PREFIX}/man verbose=yes
USES= pkgconfig gmake
USE_XORG= x11 xext
@@ -36,12 +36,6 @@ JS_DESC= JavaScript support (V8 engine)
.include <bsd.port.options.mk>
-.if ${CC:T:Mclang} == "clang"
-CFLAGS+= -no-integrated-as
-.elif ${ARCH} == "amd64" || ${ARCH} == "i386"
-CFLAGS+= -mfpmath=sse
-.endif
-
.if ${PORT_OPTIONS:MSCROLL}
EXTRA_PATCHES+= ${FILESDIR}/scroll_hack-platform__x11__pdfapp.c
.endif
@@ -52,12 +46,21 @@ MAKE_ARGS+= V8_PRESENT=1 V8LIBS=-lv8
.endif
post-patch:
- ${REINPLACE_CMD} -e 's/-pipe -O2 //' \
+ @${REINPLACE_CMD} -e 's/-pipe -O2 //' \
-e 's|/usr/local|${LOCALBASE}|' \
+ -e 's/Linux/FreeBSD/' \
${WRKSRC}/Makerules
- ${RM} -r ${WRKSRC}/thirdparty/*
+ @${REINPLACE_CMD} '/^CFLAGS/s|$$| -I${LOCALBASE}/include|' \
+ ${WRKSRC}/Makefile
+ @${RM} -r ${WRKSRC}/thirdparty/*
+
+post-build:
+ (cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_FLAGS} \
+ ${MAKEFILE} ${MAKE_ARGS} OUT=build/pic XCFLAGS=-fpic libs)
post-install:
+ ${INSTALL_DATA} ${WRKSRC}/build/pic/libmupdf.a \
+ ${STAGEDIR}${PREFIX}/lib/libmupdf_pic.a
${MV} ${STAGEDIR}${PREFIX}/bin/mupdf-x11 ${STAGEDIR}${PREFIX}/bin/mupdf
.for binary in mudraw mutool mujstest mupdf
${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/${binary}
diff --git a/graphics/mupdf/files/patch-Makefile b/graphics/mupdf/files/patch-Makefile
deleted file mode 100644
index fe8db8ec9065..000000000000
--- a/graphics/mupdf/files/patch-Makefile
+++ /dev/null
@@ -1,16 +0,0 @@
---- ./Makefile.orig 2014-06-10 17:09:28.000000000 +0200
-+++ ./Makefile 2014-08-04 18:51:44.000000000 +0200
-@@ -18,13 +18,6 @@
- include Makerules
- include Makethird
-
--THIRD_LIBS += $(FREETYPE_LIB)
--THIRD_LIBS += $(JBIG2DEC_LIB)
--THIRD_LIBS += $(JPEG_LIB)
--THIRD_LIBS += $(OPENJPEG_LIB)
--THIRD_LIBS += $(OPENSSL_LIB)
--THIRD_LIBS += $(ZLIB_LIB)
--
- LIBS += $(FREETYPE_LIBS)
- LIBS += $(JBIG2DEC_LIBS)
- LIBS += $(JPEG_LIBS)
diff --git a/graphics/mupdf/pkg-plist b/graphics/mupdf/pkg-plist
index dead94236ef4..eeb265bbe8df 100644
--- a/graphics/mupdf/pkg-plist
+++ b/graphics/mupdf/pkg-plist
@@ -69,6 +69,7 @@ include/mupdf/pdf/xref.h
include/mupdf/tiff.h
include/mupdf/xps.h
lib/libmupdf.a
+lib/libmupdf_pic.a
man/man1/mudraw.1.gz
man/man1/mupdf.1.gz
man/man1/mutool.1.gz