1 # Created by: Koichiro IWAO <meta+ports@vmeta.jp>
8 CATEGORIES= net x11-servers
10 MAINTAINER= meta+ports@vmeta.jp
11 COMMENT= High-performance, platform-neutral implementation of VNC
14 LICENSE_FILE= ${WRKSRC}/LICENCE.TXT
16 PATCH_DEPENDS= ${NONEXISTENT}:x11-servers/xorg-server:patch
17 BUILD_DEPENDS= ${LOCALBASE}/include/GL/internal/dri_interface.h:graphics/dri \
18 ${LOCALBASE}/libdata/pkgconfig/fontutil.pc:x11-fonts/font-util \
20 # almost equivalent to x11-servers/xorg-server's
21 RUN_DEPENDS= ${LOCALBASE}/share/X11/xkb/rules/base:x11/xkeyboard-config \
24 CONFLICTS= tigervnc-devel-[0-9]* \
29 USES= autoreconf:build cmake cpe gmake iconv jpeg libtool pkgconfig \
36 USE_XORG+= bigreqsproto compositeproto damageproto fixesproto fontsproto glproto \
37 ice inputproto kbproto pixman presentproto randrproto renderproto \
38 resourceproto scrnsaverproto sm videoproto x11 xau xcmiscproto xdamage \
39 xdmcp xext xextproto xfont xkbfile xorg-macros xproto xrandr xrender \
42 LIB_DEPENDS= libunwind.so:devel/libunwind \
43 libxshmfence.so:x11/libxshmfence \
44 libfontconfig.so:x11-fonts/fontconfig
48 OPTIONS_DEFINE= GNUTLS NLS PAM VIEWER DOCS
49 OPTIONS_DEFAULT= GNUTLS PAM VIEWER
50 VIEWER_DESC= Build vncviewer
52 .include <bsd.port.options.mk>
54 CMAKE_ARGS= -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=${STAGE}${PREFIX}
56 .if ${PORT_OPTIONS:MGNUTLS}
57 LIB_DEPENDS+= libtasn1.so:security/libtasn1 \
58 libgcrypt.so:security/libgcrypt \
59 libgpg-error.so:security/libgpg-error \
60 libgnutls.so:security/gnutls
61 CONFIGURE_ARGS+= --enable-glx-tls
62 CMAKE_ARGS+= -DENABLE_GNUTLS=1
64 CMAKE_ARGS+= -DENABLE_GNUTLS=0
67 .if ${PORT_OPTIONS:MNLS}
69 CMAKE_ARGS+= -DENABLE_NLS=1
72 CMAKE_ARGS+= -DENABLE_NLS=0
73 PLIST_SUB+= NLS="@comment "
76 .if ${PORT_OPTIONS:MPAM}
77 CMAKE_ARGS+= -DENABLE_PAM=1
79 CMAKE_ARGS+= -DENABLE_PAM=0
82 .if ${PORT_OPTIONS:MVIEWER}
83 CMAKE_ARGS+= -DBUILD_VIEWER=1
84 LIB_DEPENDS+= libpng.so:graphics/png \
85 libfltk.so:x11-toolkits/fltk
86 # ImageMagick is required to generate icons during build process
87 BUILD_DEPENDS+= ${LOCALBASE}/bin/convert:graphics/ImageMagick
88 USE_XORG+= xcursor xfixes xft xinerama
91 DESKTOP_ENTRIES= "TigerVNC viewer" "Connect to VNC server and display remote desktop" \
92 "${PORTNAME}" "vncviewer" "Network;" false
94 CMAKE_ARGS+= -DBUILD_VIEWER=0
95 PLIST_SUB+= VIEWER="@comment "
98 MAKE_ARGS+= TIGERVNC_SRCDIR=${WRKSRC}
100 --prefix=${PREFIX} --mandir=${PREFIX}/man/ \
101 --docdir=${PREFIX}/share/doc/${PORTNAME}/ --with-pic --without-dtrace \
102 --disable-static --disable-dri --disable-unit-tests \
103 --disable-xinerama --disable-xvfb --disable-xnest --disable-xorg \
104 --disable-dmx --disable-xwin --disable-xephyr --disable-kdrive \
105 --disable-config-dbus --disable-config-hal \
106 --disable-dri2 --enable-install-libxf86config --enable-glx \
107 --with-default-font-path="catalogue:${LOCALBASE}/share/fonts,built-ins" \
108 --with-xkb-path=${LOCALBASE}/share/X11/xkb \
109 --with-xkb-bin-directory=${LOCALBASE}/bin \
110 --with-serverconfig-path=${LOCALBASE}/lib/X11 \
111 --disable-selective-werror \
113 --with-fontrootdir=${LOCALBASE}/share/fonts
115 .include <bsd.port.pre.mk>
117 TIGERVNC_XORG_PATCH_VER= 117
119 # import from x11-server/xorg-server/Makefile
120 .if ${SSL_DEFAULT} == base
121 # The reason why I use this is cause openssl from base doesn't
122 # install a .pc file and configure will fail trying to find it.
123 # Setting both of those variables to a *non-empty* value by-passes
124 # the pkg-config check.
125 CONFIGURE_ENV= SHA1_LIB="-L/usr/lib -lcrypto" SHA1_CFLAGS="-I/usr/include"
128 XORG_WRKDIR= ${MAKE} -C ${PORTSDIR}/x11-servers/xorg-server -VWRKSRC
131 @${CP} -R `${XORG_WRKDIR}`/ ${WRKSRC}/unix/xserver/
134 @cd ${WRKSRC}/unix/xserver/ && ${PATCH} -p1 < ${WRKSRC}/unix/xserver${TIGERVNC_XORG_PATCH_VER}.patch
137 @cd ${WRKSRC}/unix/xserver/ && ${SETENV} ${CONFIGURE_ENV} ${MAKE_ENV} ${AUTORECONF} -fiv
138 @cd ${WRKSRC}/unix/xserver/ && ${SETENV} ${CONFIGURE_ENV} ${MAKE_ENV} ./configure ${CONFIGURE_ARGS}
141 @cd ${WRKSRC}/unix/xserver/ && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} SHELL=${LOCALBASE}/bin/bash
144 @cd ${WRKSRC}/unix/xserver/hw/vnc/ && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} install
145 @${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/Xvnc ${STAGEDIR}${PREFIX}/lib/xorg/modules/extensions/libvnc.so
147 .include <bsd.port.post.mk>