Lines 2-56
Link Here
|
2 |
# $FreeBSD: head/graphics/djview4/Makefile 398102 2015-09-28 09:08:02Z rm $ |
2 |
# $FreeBSD: head/graphics/djview4/Makefile 398102 2015-09-28 09:08:02Z rm $ |
3 |
|
3 |
|
4 |
PORTNAME= djview |
4 |
PORTNAME= djview |
5 |
PORTVERSION= 4.9 |
5 |
PORTVERSION= 4.10.3 |
6 |
PORTREVISION= 5 |
|
|
7 |
CATEGORIES= graphics |
6 |
CATEGORIES= graphics |
8 |
MASTER_SITES= SF/djvu/DjView/${PORTVERSION} |
7 |
MASTER_SITES= SF/djvu/DjView/${PORTVERSION:R} |
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 |
14 |
LICENSE_FILE= ${WRKSRC}/COPYING |
13 |
LICENSE_FILE= ${WRKSRC}/COPYING |
15 |
|
14 |
|
|
|
15 |
BUILD_DEPENDS= rsvg-convert:${PORTSDIR}/graphics/librsvg2 |
16 |
LIB_DEPENDS= libdjvulibre.so:${PORTSDIR}/graphics/djvulibre \ |
16 |
LIB_DEPENDS= libdjvulibre.so:${PORTSDIR}/graphics/djvulibre \ |
17 |
libtiff.so:${PORTSDIR}/graphics/tiff |
17 |
libtiff.so:${PORTSDIR}/graphics/tiff |
18 |
|
18 |
|
|
|
19 |
INSTALL_TARGET= install-strip |
19 |
GNU_CONFIGURE= yes |
20 |
GNU_CONFIGURE= yes |
20 |
USES= desktop-file-utils libtool pkgconfig webplugin:native |
21 |
USES= autoreconf desktop-file-utils gmake libtool pkgconfig \ |
21 |
USE_QT4= gui network linguisttools_build moc_build qmake_build rcc_build \ |
22 |
webplugin:native |
22 |
uic_build |
|
|
23 |
USE_XORG= sm ice xt |
23 |
USE_XORG= sm ice xt |
24 |
QT_NONSTANDARD= yes |
|
|
25 |
CONFIGURE_ARGS= --x-includes="${LOCALBASE}/include" \ |
24 |
CONFIGURE_ARGS= --x-includes="${LOCALBASE}/include" \ |
26 |
--x-libraries="${LOCALBASE}/lib" --disable-desktopfiles |
25 |
--x-libraries="${LOCALBASE}/lib" |
27 |
CONFIGURE_ENV= QMAKE="${QMAKE}" \ |
26 |
CONFIGURE_ENV= LRELEASE="${LRELEASE}" LUPDATE="${LUPDATE}" |
28 |
QMAKESPEC="${QMAKESPEC}" |
27 |
|
29 |
CPPFLAGS+= -I${LOCALBASE}/include |
28 |
CPPFLAGS+= -I${LOCALBASE}/include |
30 |
LDFLAGS+= -L${LOCALBASE}/lib |
29 |
LDFLAGS+= -L${LOCALBASE}/lib |
31 |
MAKE_ENV= INSTALL_SCRIPT="${INSTALL_SCRIPT}" |
|
|
32 |
|
33 |
WRKSRC= ${WRKDIR}/djview4-${PORTVERSION} |
34 |
|
30 |
|
35 |
WEBPLUGIN_DIR= ${PREFIX}/lib/djview4/plugins |
31 |
WEBPLUGIN_DIR= ${PREFIX}/lib/djview4/plugins |
36 |
WEBPLUGIN_FILES= nsdejavu.so |
32 |
WEBPLUGIN_FILES= nsdejavu.so |
37 |
|
33 |
|
38 |
post-patch: |
34 |
OPTIONS_SINGLE= QT |
39 |
@${REINPLACE_CMD} -e 's,/netscape/,/djview4/,' \ |
35 |
OPTIONS_SINGLE_QT= QT4 QT5 |
40 |
${WRKSRC}/nsdejavu/Makefile.in ${WRKSRC}/nsdejavu/nsdejavu.1.in |
36 |
OPTIONS_DEFAULT= QT5 |
41 |
@${REINPLACE_CMD} -e 's,@NSDEJAVU_LIBS@,& -lXt -lXext,g' \ |
37 |
|
42 |
${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 |
43 |
|
51 |
|
44 |
post-install: |
52 |
post-install: |
45 |
.for f in ${WEBPLUGIN_FILES} |
53 |
# Create a symbolic link to match desktop file exec name |
46 |
@${STRIP_CMD} ${STAGEDIR}${WEBPLUGIN_DIR}/${f} |
54 |
(cd ${STAGEDIR}${PREFIX}/bin && ${LN} -sf ${PORTNAME} ${PORTNAME}4) |
47 |
.endfor |
|
|
48 |
.for d in 32 64 |
49 |
@${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/${d}x${d}/apps |
50 |
${INSTALL_DATA} ${WRKSRC}/desktopfiles/hi${d}-djview4.png \ |
51 |
${STAGEDIR}${PREFIX}/share/icons/hicolor/${d}x${d}/apps/djvulibre-djview4.png |
52 |
.endfor |
53 |
${INSTALL_DATA} ${WRKSRC}/desktopfiles/djvulibre-djview4.desktop \ |
54 |
${STAGEDIR}${PREFIX}/share/applications |
55 |
|
55 |
|
56 |
.include <bsd.port.mk> |
56 |
.include <bsd.port.mk> |