Lines 2-42
Link Here
|
2 |
# $FreeBSD: head/graphics/djview4/Makefile 370129 2014-10-05 21:30:26Z tijl $ |
2 |
# $FreeBSD: head/graphics/djview4/Makefile 370129 2014-10-05 21:30:26Z tijl $ |
3 |
|
3 |
|
4 |
PORTNAME= djview |
4 |
PORTNAME= djview |
5 |
PORTVERSION= 4.9 |
5 |
PORTVERSION= 4.10 |
6 |
PORTREVISION= 3 |
|
|
7 |
CATEGORIES= graphics |
6 |
CATEGORIES= graphics |
8 |
MASTER_SITES= SF/djvu/DjView/${PORTVERSION} |
7 |
MASTER_SITES= SF/djvu/DjView/${PORTVERSION} |
9 |
|
8 |
|
10 |
MAINTAINER= ports@FreeBSD.org |
9 |
MAINTAINER= ports@FreeBSD.org |
11 |
COMMENT= Standalone Djvu viewer and plugin based on Qt4 toolkit |
10 |
COMMENT= Standalone Djvu viewer and plugin based on Qt toolkit |
12 |
|
11 |
|
13 |
LICENSE= GPLv2 |
12 |
LICENSE= GPLv2 |
|
|
13 |
LICENSE_FILE= ${WRKSRC}/COPYING |
14 |
|
14 |
|
15 |
LIB_DEPENDS= libdjvulibre.so:${PORTSDIR}/graphics/djvulibre |
15 |
BUILD_DEPENDS= rsvg-convert:${PORTSDIR}/graphics/librsvg2 |
|
|
16 |
LIB_DEPENDS= libdjvulibre.so:${PORTSDIR}/graphics/djvulibre \ |
17 |
libtiff.so:${PORTSDIR}/graphics/tiff |
16 |
|
18 |
|
|
|
19 |
INSTALL_TARGET= install-strip |
17 |
GNU_CONFIGURE= yes |
20 |
GNU_CONFIGURE= yes |
18 |
USES= pkgconfig webplugin:native libtool |
21 |
USES= autoreconf desktop-file-utils gmake libtool pkgconfig \ |
19 |
USE_QT4= gui network rcc_build uic_build moc_build qmake_build |
22 |
webplugin:native |
20 |
USE_XORG= sm ice xt |
23 |
USE_XORG= sm ice xt |
21 |
QT_NONSTANDARD= yes |
|
|
22 |
CONFIGURE_ARGS= --x-includes="${LOCALBASE}/include" \ |
24 |
CONFIGURE_ARGS= --x-includes="${LOCALBASE}/include" \ |
23 |
--x-libraries="${LOCALBASE}/lib" |
25 |
--x-libraries="${LOCALBASE}/lib" |
24 |
CONFIGURE_ENV= QMAKE="${QMAKE}" \ |
26 |
CONFIGURE_ENV= LRELEASE="${LRELEASE}" LUPDATE="${LUPDATE}" |
25 |
QMAKESPEC="${QMAKESPEC}" |
|
|
26 |
LDFLAGS+= -L${LOCALBASE}/lib |
27 |
CFLAGS+= -I${LOCALBASE}/include |
28 |
CXXFLAGS+= -I${LOCALBASE}/include |
29 |
MAKE_ENV= INSTALL_SCRIPT="${INSTALL_SCRIPT}" |
30 |
|
27 |
|
31 |
WRKSRC= ${WRKDIR}/djview4-${PORTVERSION} |
28 |
CPPFLAGS+= -I${LOCALBASE}/include |
|
|
29 |
LDFLAGS+= -L${LOCALBASE}/lib |
32 |
|
30 |
|
33 |
WEBPLUGIN_DIR= ${PREFIX}/lib/djview4/plugins |
31 |
WEBPLUGIN_DIR= ${PREFIX}/lib/djview4/plugins |
34 |
WEBPLUGIN_FILES= nsdejavu.so |
32 |
WEBPLUGIN_FILES= nsdejavu.so |
35 |
|
33 |
|
36 |
post-patch: |
34 |
OPTIONS_SINGLE= QT |
37 |
@${REINPLACE_CMD} -e 's,/netscape/,/djview4/,' \ |
35 |
OPTIONS_SINGLE_QT= QT4 QT5 |
38 |
${WRKSRC}/nsdejavu/Makefile.in ${WRKSRC}/nsdejavu/nsdejavu.1.in |
36 |
OPTIONS_DEFAULT= QT5 |
39 |
@${REINPLACE_CMD} -e 's,@NSDEJAVU_LIBS@,@NSDEJAVU_LIBS@ -lXt -lXext,g' \ |
37 |
|
40 |
${WRKSRC}/nsdejavu/Makefile.in |
38 |
QT4_USE= QT4=gui,network,opengl,linguisttools_build,moc_build,qmake_build,rcc_build,uic_build |
|
|
39 |
QT5_USE= QT5=gui,network,opengl,printsupport,widgets,buildtools_build,linguisttools_build,qmake_build |
40 |
|
41 |
post-patch: .SILENT |
42 |
# Allow to strip binary |
43 |
${REINPLACE_CMD} -e '/^bin_/s/SCRIPTS/PROGRAMS/' \ |
44 |
${WRKSRC}/src/Makefile.am |
45 |
# Change plugins directory |
46 |
# Add GLIB cflags and libs (including -lX*) |
47 |
${REINPLACE_CMD} -e '/^pluginsdir/s/mozilla/djview4/ ; \ |
48 |
/NSDEJAVU_CFLAGS/s|$$| $$\(GLIB_CFLAGS\)| ; \ |
49 |
/NSDEJAVU_LIBS/s|$$| $$\(GLIB_LIBS\) -lXt -lXext|' \ |
50 |
${WRKSRC}/nsdejavu/Makefile.am |
51 |
|
52 |
post-install: |
53 |
# Create a symbolic link to match desktop file exec name |
54 |
(cd ${STAGEDIR}${PREFIX}/bin && ${LN} -sf ${PORTNAME} ${PORTNAME}4) |
41 |
|
55 |
|
42 |
.include <bsd.port.mk> |
56 |
.include <bsd.port.mk> |