1 # Created by: Koichiro IWAO <meta+ports@vmeta.jp>
7 CATEGORIES= net x11-servers
8 MASTER_SITES= SF:tigervnc
9 MASTER_SITE_SUBDIR= ${PORTNAME}/${PORTNAME}/${PORTVERSION}/:tigervnc
10 DISTFILES= ${PORTNAME}-${PORTVERSION}${EXTRACT_SUFX}: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 libtool pkgconfig
31 USE_AUTOTOOLS= autoconf:env automake:env libtoolize: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
43 OPTIONS_DEFINE= GNUTLS NLS PAM VIEWER HPJPG DOCS
44 OPTIONS_DEFAULT= GNUTLS NLS PAM VIEWER
45 VIEWER_DESC= Build vncviewer
46 HPJPG_DESC= Build with High-Performance JPEG support
48 .include <bsd.port.options.mk>
50 CMAKE_ARGS= -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=${STAGE}${PREFIX}
52 .if ${PORT_OPTIONS:MGNUTLS}
53 LIB_DEPENDS+= libtasn1.so:${PORTSDIR}/security/libtasn1 \
54 libgcrypt.so:${PORTSDIR}/security/libgcrypt \
55 libgpg-error.so:${PORTSDIR}/security/libgpg-error \
56 libgnutls.so:${PORTSDIR}/security/gnutls
57 CONFIGURE_ARGS+= --enable-glx-tls
58 CMAKE_ARGS+= -DENABLE_GNUTLS=1
60 CMAKE_ARGS+= -DENABLE_GNUTLS=0
63 .if ${PORT_OPTIONS:MNLS}
65 CMAKE_ARGS+= -DENABLE_NLS=1
68 CMAKE_ARGS+= -DENABLE_NLS=0
69 PLIST_SUB+= NLS="@comment "
72 .if ${PORT_OPTIONS:MPAM}
73 CMAKE_ARGS+= -DENABLE_PAM=1
75 CMAKE_ARGS+= -DENABLE_PAM=0
78 .if ${PORT_OPTIONS:MVIEWER}
79 CMAKE_ARGS+= -DBUILD_VIEWER=1
80 LIB_DEPENDS+= libpng15.so:${PORTSDIR}/graphics/png \
81 libfltk.so:${PORTSDIR}/x11-toolkits/fltk
82 # ImageMagick is required to generate icons during build process
83 BUILD_DEPENDS+= ${LOCALBASE}/bin/convert:${PORTSDIR}/graphics/ImageMagick
84 USE_XORG+= xcursor xfixes xft xinerama
87 DESKTOP_ENTRIES= "TigerVNC viewer" "Connect to VNC server and display remote desktop" \
88 "${PORTNAME}" "vncviewer" "Network;" false
90 CMAKE_ARGS+= -DBUILD_VIEWER=0
91 PLIST_SUB+= VIEWER="@comment "
94 .if ${PORT_OPTIONS:MHPJPG}
95 LIB_DEPENDS+= libturbojpeg.so:${PORTSDIR}/graphics/libjpeg-turbo
97 LIB_DEPENDS+= libjpeg.so:${PORTSDIR}/graphics/jpeg
100 MAKE_ARGS+= TIGERVNC_SRCDIR=${WRKSRC}
102 --prefix=${PREFIX} --mandir=${PREFIX}/man/ \
103 --docdir=${PREFIX}/share/doc/${PORTNAME}/ --with-pic --without-dtrace \
104 --disable-static --disable-dri \
105 --disable-xinerama --disable-xvfb --disable-xnest --disable-xorg \
106 --disable-dmx --disable-xwin --disable-xephyr --disable-kdrive \
107 --disable-config-dbus --disable-config-hal \
108 --disable-dri2 --enable-install-libxf86config --enable-glx \
109 --with-default-font-path="catalogue:${LOCALBASE}/share/fonts,built-ins" \
110 --with-xkb-path=${LOCALBASE}/share/X11/xkb \
111 --with-xkb-bin-directory=${LOCALBASE}/bin \
112 --with-serverconfig-path=${LOCALBASE}/lib/X11 \
113 --disable-selective-werror
115 CONFIGURE_ARGS+= --with-fontrootdir=${LOCALBASE}/share/fonts
117 CONFIGURE_ARGS+= --with-fontdir=${LOCALBASE}/share/fonts
120 .include <bsd.port.pre.mk>
123 TIGERVNC_XORG_PATCH_VER= 112
125 TIGERVNC_XORG_PATCH_VER= 17
128 # import from x11-server/xorg-server/Makefile
129 .ifdef WITH_OPENSSL_BASE
130 # The reason why I use this is cause openssl from base doesn't install a .pc file
131 # and configure will fail trying to find it. Setting both of those variables to
132 # a *non-empty* value by-passes the pkg-config check.
133 CONFIGURE_ENV= SHA1_LIB="-L/usr/lib -lcrypto" SHA1_CFLAGS="-I/usr/include"
136 XORG_WRKDIR= ${MAKE} -C ${PORTSDIR}/x11-servers/xorg-server -VWRKSRC
139 @${CP} -R `${XORG_WRKDIR}`/ ${WRKSRC}/unix/xserver/
142 @cd ${WRKSRC}/unix/xserver/ && ${PATCH} -p1 < ${WRKSRC}/unix/xserver${TIGERVNC_XORG_PATCH_VER}.patch
145 @cd ${WRKSRC}/unix/xserver/ && ${SETENV} ${CONFIGURE_ENV} ${AUTORECONF} -fiv
146 @cd ${WRKSRC}/unix/xserver/ && ${SETENV} ${CONFIGURE_ENV} ./configure ${CONFIGURE_ARGS}
149 @cd ${WRKSRC}/unix/xserver/ && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} SHELL=${LOCALBASE}/bin/bash
152 @cd ${WRKSRC}/unix/xserver/hw/vnc/ && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} install
154 .include <bsd.port.post.mk>