1 # Created by: Koichiro IWAO <meta+ports@vmeta.jp>
2 # $FreeBSD: net/tigervnc/Makefile 328711 2013-09-29 17:01:41Z zeising $
7 CATEGORIES= net x11-servers
8 MASTER_SITES= SF:tigervnc
9 MASTER_SITE_SUBDIR= ${PORTNAME}/${PORTNAME}/${PORTVERSION}/:tigervnc
10 DISTFILES= ${PORTNAME}-${PORTVERSION}.tar.bz2:tigervnc
12 MAINTAINER= meta+ports@vmeta.jp
13 COMMENT= High-performance, platform-neutral implementation of VNC
17 PATCH_DEPENDS= ${NONEXISTENT}:${PORTSDIR}/x11-servers/xorg-server:patch
18 BUILD_DEPENDS= ${LOCALBASE}/include/GL/internal/dri_interface.h:${PORTSDIR}/graphics/dri \
19 ${LOCALBASE}/libdata/pkgconfig/fontutil.pc:${PORTSDIR}/x11-fonts/font-util \
20 bash:${PORTSDIR}/shells/bash
21 # almost equivalent to x11-servers/xorg-server's
22 RUN_DEPENDS= ${LOCALBASE}/share/X11/xkb/rules/base:${PORTSDIR}/x11/xkeyboard-config \
23 xkbcomp:${PORTSDIR}/x11/xkbcomp
25 CONFLICTS= tridiavnc-[0-9]* \
29 USES= cmake gmake pkgconfig
31 USE_AUTOTOOLS+= autoconf:env automake:env libtool:env
36 USE_XORG+= bigreqsproto compositeproto damageproto fixesproto fontsproto glproto \
37 inputproto kbproto pixman randrproto renderproto resourceproto \
38 scrnsaverproto videoproto xau xdmcp xext xkbfile xcmiscproto xextproto \
39 xfont xproto xrandr xtrans xtst xorg-macros
48 OPTIONS_DEFINE= GNUTLS NLS PAM VIEWER HPJPG
49 OPTIONS_DEFAULT= GNUTLS NLS PAM VIEWER
50 VIEWER_DESC= Build vncviewer
51 HPJPG_DESC= Build with High-Performance JPEG support
54 .include <bsd.port.options.mk>
56 CMAKE_ARGS= -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=${PREFIX}
58 .if ${PORT_OPTIONS:MGNUTLS}
59 LIB_DEPENDS+= libtasn1.so:${PORTSDIR}/security/libtasn1 \
60 libgcrypt.so:${PORTSDIR}/security/libgcrypt \
61 libgpg-error.so:${PORTSDIR}/security/libgpg-error \
62 libgnutls.so:${PORTSDIR}/security/gnutls
63 CONFIGURE_ARGS+= --enable-glx-tls
64 CMAKE_ARGS+= -DENABLE_GNUTLS=1
66 CMAKE_ARGS+= -DENABLE_GNUTLS=0
69 .if ${PORT_OPTIONS:MNLS}
71 CMAKE_ARGS+= -DENABLE_NLS=1
74 CMAKE_ARGS+= -DENABLE_NLS=0
75 PLIST_SUB+= NLS="@comment "
78 .if ${PORT_OPTIONS:MPAM}
79 CMAKE_ARGS+= -DENABLE_PAM=1
81 CMAKE_ARGS+= -DENABLE_PAM=0
84 .if ${PORT_OPTIONS:MVIEWER}
85 CMAKE_ARGS+= -DENABLE_VIEWER=1
86 LIB_DEPENDS+= libpng15.so:${PORTSDIR}/graphics/png \
87 libfltk.so:${PORTSDIR}/x11-toolkits/fltk
88 USE_XORG+= xcursor xfixes xft xinerama
92 DESKTOP_ENTRIES= "TigerVNC viewer" "Connect to VNC server and display remote desktop" \
93 "${PREFIX}/share/icons/hicolor/scalable/apps/${PORTNAME}.svg" \
94 "vncviewer" "Network;" false
96 PLIST_SUB+= VIEWER="@comment "
99 .if ${PORT_OPTIONS:MHPJPG}
100 LIB_DEPENDS+= libturbojpeg.so:${PORTSDIR}/graphics/libjpeg-turbo
102 LIB_DEPENDS+= libjpeg.so:${PORTSDIR}/graphics/jpeg
105 MAKE_ARGS+= TIGERVNC_SRCDIR=${WRKSRC}
107 --prefix=${PREFIX} --mandir=${PREFIX}/man/ \
108 --docdir=${PREFIX}/share/doc/${PORTNAME}/ --with-pic --without-dtrace \
109 --disable-static --disable-dri \
110 --disable-xinerama --disable-xvfb --disable-xnest --disable-xorg \
111 --disable-dmx --disable-xwin --disable-xephyr --disable-kdrive \
112 --disable-config-dbus --disable-config-hal \
113 --disable-dri2 --enable-install-libxf86config --enable-glx \
114 --with-default-font-path="catalogue:${PREFIX}/share/fonts,built-ins" \
115 --with-xkb-path=${PREFIX}/share/X11/xkb \
116 --with-xkb-output=/var/lib/xkb \
117 --with-xkb-bin-directory=${PREFIX}/bin \
118 --with-serverconfig-path=${PREFIX}/lib/X11 \
119 --disable-selective-werror
121 CONFIGURE_ARGS+= --with-fontrootdir=${PREFIX}/share/fonts
123 CONFIGURE_ARGS+= --with-fontdir=${PREFIX}/share/fonts
126 .include <bsd.port.pre.mk>
129 TIGERVNC_XORG_PATCH_VER= 112
131 TIGERVNC_XORG_PATCH_VER= 17
134 # import from x11-server/xorg-server/Makefile
135 .ifdef WITH_OPENSSL_BASE
136 # The reason why I use this is cause openssl from base doesn't install a .pc file
137 # and configure will fail trying to find it. Setting both of those variables to
138 # a *non-empty* value by-passes the pkg-config check.
139 CONFIGURE_ENV= SHA1_LIB="-L/usr/lib -lcrypto" SHA1_CFLAGS="-I/usr/include"
142 XORG_WRKDIR= ${MAKE} -C ${PORTSDIR}/x11-servers/xorg-server -VWRKSRC
145 @${CP} -R `${XORG_WRKDIR}`/ ${WRKSRC}/unix/xserver/
148 @cd ${WRKSRC}/unix/xserver/ && ${PATCH} -p1 < ${WRKSRC}/unix/xserver${TIGERVNC_XORG_PATCH_VER}.patch
151 @cd ${WRKSRC}/unix/xserver/ && ${SETENV} ${CONFIGURE_ENV} ${AUTORECONF} -fiv
152 @cd ${WRKSRC}/unix/xserver/ && ${SETENV} ${CONFIGURE_ENV} ./configure ${CONFIGURE_ARGS}
155 @cd ${WRKSRC}/unix/xserver/ && ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_ARGS} SHELL=${LOCALBASE}/bin/bash
158 @cd ${WRKSRC}/unix/xserver/hw/vnc/ && ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_ARGS} install
159 .if ${PORT_OPTIONS:MVIEWER}
160 @${MKDIR} ${PREFIX}/share/icons/hicolor/scalable/apps/
161 @cd ${WRKSRC}/media/ && ${INSTALL_DATA} icons/tigervnc.svg ${PREFIX}/share/icons/hicolor/scalable/apps/
164 .include <bsd.port.post.mk>