ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/mports/trunk/graphics/poppler/Makefile
Revision: 19154
Committed: Fri May 29 01:35:29 2015 UTC (8 years, 10 months ago) by laffer1
File size: 3717 byte(s)
Log Message:
add cpe

File Contents

# Content
1 # $MidnightBSD$
2
3 PORTNAME= poppler
4 PORTVERSION= 0.30.0
5 PORTREVISION?= 0
6 CATEGORIES= graphics print
7 MASTER_SITES= http://poppler.freedesktop.org/
8
9 MAINTAINER?= ports@MidnightBSD.org
10 COMMENT?= PDF rendering library
11
12 LICENSE= gpl2
13 LICENSE_FILE= ${WRKSRC}/COPYING
14
15 LIB_DEPENDS= libjpeg.so:${PORTSDIR}/graphics/jpeg \
16 libpng.so:${PORTSDIR}/graphics/png \
17 libtiff.so:${PORTSDIR}/graphics/tiff \
18 libfontconfig.so:${PORTSDIR}/x11-fonts/fontconfig \
19 liblcms2.so:${PORTSDIR}/graphics/lcms2 \
20 libfreetype.so:${PORTSDIR}/print/freetype2
21 RUN_DEPENDS= poppler-data>0:${PORTSDIR}/graphics/poppler-data
22
23 USES= cpe gmake libtool pathfix pkgconfig tar:xz
24 CPE_VENDOR= freedesktop
25 USE_GNOME= libxml2
26 GNU_CONFIGURE= yes
27 USE_LDCONFIG= yes
28 CONFIGURE_ARGS= --enable-zlib \
29 --enable-xpdf-headers \
30 --disable-gtk-test \
31 --without-html-dir \
32 --disable-static
33 CPPFLAGS+= -I${LOCALBASE}/include
34 LDFLAGS+= -L${LOCALBASE}/lib
35
36 # see https://bugs.freedesktop.org/show_bug.cgi?id=72499
37 CPPFLAGS+= -D__LONG_LONG_SUPPORTED
38
39 INSTALL_TARGET= install-strip
40
41 .if !defined(SLAVEPORT)
42 PORTSCOUT= limitw:1,even
43
44 OPTIONS_DEFINE= CAIRO CURL OPENJPEG
45 OPTIONS_DEFAULT=CAIRO OPENJPEG
46
47 USES+= iconv
48 .endif
49
50 .include <bsd.mport.options.mk>
51
52 .if defined(SLAVEPORT)
53 PORTSCOUT= ignore:1
54 LIB_DEPENDS+= libpoppler.so:${PORTSDIR}/graphics/poppler
55
56 .if ${SLAVEPORT}==glib
57 CONFIGURE_ARGS+=--enable-poppler-glib --enable-introspection=yes
58 USE_GNOME+= cairo glib20 introspection:build
59 BUILD_WRKSRC= ${WRKSRC}/glib
60 INSTALL_WRKSRC= ${WRKSRC}/glib
61 .else
62 CONFIGURE_ARGS+=--disable-poppler-glib
63 .endif
64
65 .if ${SLAVEPORT}==qt4
66 CONFIGURE_ARGS+=--enable-poppler-qt4
67 CONFIGURE_ENV+= MOCQT4=${MOC}
68 USE_QT4= gui corelib xml qtestlib moc_build
69 BUILD_WRKSRC= ${WRKSRC}/qt4
70 INSTALL_WRKSRC= ${WRKSRC}/qt4
71 .else
72 CONFIGURE_ARGS+=--disable-poppler-qt4
73 .endif
74
75 .if ${SLAVEPORT}==qt5
76 CONFIGURE_ARGS+=--enable-poppler-qt5
77 CONFIGURE_ENV+= MOCQT5=${MOC}
78 USE_QT5= core gui widgets xml buildtools_build testlib_build
79 BUILD_WRKSRC= ${WRKSRC}/qt5
80 INSTALL_WRKSRC= ${WRKSRC}/qt5
81 .else
82 CONFIGURE_ARGS+=--disable-poppler-qt5
83 .endif
84
85 .if ${SLAVEPORT}==utils
86 LIB_DEPENDS+= libpoppler-glib.so:${PORTSDIR}/graphics/poppler-glib
87 CONFIGURE_ARGS+=--enable-utils
88 BUILD_WRKSRC= ${WRKSRC}/utils
89 INSTALL_WRKSRC= ${WRKSRC}/utils
90 .else
91 CONFIGURE_ARGS+=--disable-utils
92 .endif
93
94 .else # ! SLAVE options below
95 CONFIGURE_ARGS+=--disable-poppler-glib \
96 --disable-poppler-qt4 \
97 --disable-poppler-qt5 \
98 --disable-utils
99
100 .if ${PORT_OPTIONS:MCAIRO}
101 LIB_DEPENDS+= libcairo.so:${PORTSDIR}/graphics/cairo
102 PLIST_SUB+= CAIRO=""
103 .else
104 CONFIGURE_ARGS+=--disable-cairo-output
105 PLIST_SUB+= CAIRO="@comment "
106 .endif
107
108 .if ${PORT_OPTIONS:MCURL}
109 LIB_DEPENDS+= libcurl.so:${PORTSDIR}/ftp/curl
110 CONFIGURE_ARGS+=--enable-libcurl
111 PLIST_SUB+= CURL=""
112 .else
113 CONFIGURE_ARGS+=--disable-libcurl
114 PLIST_SUB+= CURL="@comment "
115 .endif
116
117 # stick with openjpeg1 for now due to regression in openjpeg2 (configure)
118 # https://bugs.freedesktop.org/show_bug.cgi?id=58906 Comment #35
119 .if ${PORT_OPTIONS:MOPENJPEG}
120 CONFIGURE_ARGS+=--enable-libopenjpeg=openjpeg1
121 LIB_DEPENDS+= libopenjpeg.so:${PORTSDIR}/graphics/openjpeg15
122 .else
123 CONFIGURE_ARGS+=--disable-libopenjpeg
124 .endif
125 .endif # end of options
126
127 post-patch:
128 @${REINPLACE_CMD} '/CXXFLAGS.*-ansi/d' ${WRKSRC}/configure
129 @${REINPLACE_CMD} -e 's|-fno-check-new||g' ${WRKSRC}/configure
130
131 post-install:
132 .if defined(SLAVEPORT)
133 . if ${SLAVEPORT}==glib
134 ${INSTALL_DATA} ${WRKSRC}/poppler-glib.pc \
135 ${STAGEDIR}${PREFIX}/libdata/pkgconfig
136 . elif ${SLAVEPORT}==qt4
137 ${INSTALL_DATA} ${WRKSRC}/poppler-qt4.pc \
138 ${STAGEDIR}${PREFIX}/libdata/pkgconfig
139 . elif ${SLAVEPORT}==qt5
140 ${INSTALL_DATA} ${WRKSRC}/poppler-qt5.pc \
141 ${STAGEDIR}${PREFIX}/libdata/pkgconfig
142 . endif
143 .endif
144
145 .include <bsd.port.mk>

Properties

Name Value
svn:keywords MidnightBSD=%H