aboutsummaryrefslogtreecommitdiffstats
path: root/graphics/xpdf4/Makefile
blob: 75b745a5496ef04650a18f15fde8938f227362d9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# $FreeBSD$

PORTNAME=   xpdf
PORTVERSION=    4.02
CATEGORIES= graphics print
MASTER_SITES=   http://www.xpdfreader.com/dl/
.if !defined(MASTERDIR)
PKGNAMESUFFIX=  4
.endif

MAINTAINER= cy@FreeBSD.org
COMMENT=    Display PDF files and convert them to other formats
WRKSRC=     ${WRKDIR}/${PORTNAME}-4.00

LICENSE=    GPLv2

LIB_DEPENDS=    libfreetype.so:print/freetype2 \
        libpng.so:graphics/png

CONFLICTS_INSTALL=  xpdf

MANPREFIX=  ${PREFIX}/share/xpdf
SUB_FILES=  xpdf-man.conf

USES=       cmake:outsource localbase
CMAKE_ARGS+=    -DOPI_SUPPORT:BOOL=ON -DCMAKE_DISABLE_FIND_PACKAGE_Qt4:BOOL=ON \
        -DUSE_LCMS:BOOL=OFF -DSYSTEM_XPDFRC=${PREFIX}/etc/xpdfrc

OPTIONS_DEFINE=     TYPE1 LIBPAPER GUI
OPTIONS_DEFAULT=    TYPE1 GUI
OPTIONS_SUB=        yes

TYPE1_CMAKE_BOOL=   TYPE1
TYPE1_DESC=     Ghostscript type1 fonts
TYPE1_RUN_DEPENDS=  ${LOCALBASE}/share/ghostscript/fonts/d050000l.pfb:print/gsfonts

LIBPAPER_CMAKE_BOOL=    USE_LIBPAPER
LIBPAPER_LIB_DEPENDS=   libpaper.so:print/libpaper

GUI_CMAKE_ON=       -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Widgets:BOOL=FALSE
GUI_CMAKE_OFF=      -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Widgets:BOOL=TRUE
GUI_DESC=       QT5 interface
GUI_CMAKE_ARGS+=    -DNO_TEXT_SELECT:BOOL=OFF
GUI_USE=        QT5=buildtools_build,qmake_build,concurrent,core,gui,widgets,printsupport

post-install:
        @cd ${STAGEDIR}${PREFIX}; \
        ${LN} -sf ../libexec/xpdf/xpdf bin/xpdf

        ${INSTALL_DATA} ${WRKSRC}/doc/sample-xpdfrc ${STAGEDIR}${PREFIX}/etc/xpdfrc.sample
        ${INSTALL_DATA} ${WRKDIR}/xpdf-man.conf \
            ${STAGEDIR}${PREFIX}/etc/man.d/xpdf.conf

.include <bsd.port.mk>