Update graphics/xpdf4 to version 4.02_2
[dports.git] / graphics / xpdf4 / Makefile
1 # $FreeBSD$
2
3 PORTNAME=       xpdf
4 PORTVERSION=    4.02
5 PORTREVISION=   2
6 CATEGORIES=     graphics print
7 MASTER_SITES=   http://www.xpdfreader.com/dl/
8 .if !defined(MASTERDIR)
9 PKGNAMESUFFIX=  4
10 CONFLICTS_INSTALL=      xpdf3-* xpdf-*
11 .else
12 CONFLICTS_INSTALL=      xpdf3-* xpdf4-*
13 .endif
14
15 MAINTAINER=     cy@FreeBSD.org
16 COMMENT=        Display PDF files and convert them to other formats
17 WRKSRC=         ${WRKDIR}/${PORTNAME}-4.00
18
19 LICENSE=        GPLv2
20
21 LIB_DEPENDS=    libfreetype.so:print/freetype2 \
22                 libpng.so:graphics/png
23
24 CONFLICTS_INSTALL=      xpdf
25
26 MANPREFIX=      ${PREFIX}/share/xpdf
27 SUB_FILES=      xpdf-man.conf
28
29 USES=           cmake:outsource localbase
30 CMAKE_ARGS+=    -DOPI_SUPPORT:BOOL=ON -DCMAKE_DISABLE_FIND_PACKAGE_Qt4:BOOL=ON \
31                 -DUSE_LCMS:BOOL=OFF -DSYSTEM_XPDFRC=${PREFIX}/etc/xpdfrc
32
33 OPTIONS_DEFINE=         TYPE1 LIBPAPER GUI PRINT
34 OPTIONS_DEFAULT=        TYPE1 GUI PRINT
35 OPTIONS_SUB=            yes
36
37 TYPE1_CMAKE_BOOL=       TYPE1
38 TYPE1_DESC=             Ghostscript type1 fonts
39 TYPE1_RUN_DEPENDS=      ${LOCALBASE}/share/ghostscript/fonts/d050000l.pfb:print/gsfonts
40
41 LIBPAPER_CMAKE_BOOL=    USE_LIBPAPER
42 LIBPAPER_LIB_DEPENDS=   libpaper.so:print/libpaper
43
44 GUI_CMAKE_ON=           -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Widgets:BOOL=FALSE
45 GUI_CMAKE_OFF=          -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Widgets:BOOL=TRUE
46 GUI_DESC=               QT5 interface
47 GUI_CMAKE_ARGS+=        -DNO_TEXT_SELECT:BOOL=OFF
48 GUI_USE=                QT5=buildtools_build,qmake_build,concurrent,core,gui,widgets,printsupport
49
50 PRINT_CMAKE_ON=         -DXPDFWIDGET_PRINTING:BOOL=ON -DCUPS:BOOL=ON
51 PRINT_CMAKE_OFF=        -DXPDFWIDGET_PRINTING:BOOL=OFF -DCUPS:BOOL=OFF
52 PRINT_DESC=              Print support (CUPS dependency)
53 PRINT_LDFLAGS=          -L${LOCALBASE}/lib
54 PRINT_LIB_DEPENDS=      libcups.so:print/cups
55
56 post-install:
57                 @cd ${STAGEDIR}${PREFIX}; \
58                 ${LN} -sf ../libexec/xpdf/xpdf bin/xpdf
59
60                 ${INSTALL_DATA} ${WRKSRC}/doc/sample-xpdfrc ${STAGEDIR}${PREFIX}/etc/xpdfrc.sample
61                 ${INSTALL_DATA} ${WRKDIR}/xpdf-man.conf \
62                         ${STAGEDIR}${PREFIX}/etc/man.d/xpdf.conf
63
64 .include <bsd.port.mk>