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 python
31 USE_AUTOTOOLS= autoconf:env automake:env libtoolize:env
35 USE_XORG+= bigreqsproto compositeproto damageproto fixesproto fontsproto glproto \
36 inputproto kbproto pixman randrproto renderproto resourceproto \
37 scrnsaverproto videoproto xau xdmcp xext xkbfile xcmiscproto xextproto \
38 xfont xproto xrandr xtrans xtst xorg-macros
42 OPTIONS_DEFINE= GNUTLS NLS PAM VIEWER HPJPG DOCS
43 OPTIONS_DEFAULT= GNUTLS NLS PAM VIEWER
44 VIEWER_DESC= Build vncviewer
45 HPJPG_DESC= Build with High-Performance JPEG support
47 .include <bsd.port.options.mk>
49 CMAKE_ARGS= -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=${STAGE}${PREFIX}
51 .if ${PORT_OPTIONS:MGNUTLS}
52 LIB_DEPENDS+= libtasn1.so:${PORTSDIR}/security/libtasn1 \
53 libgcrypt.so:${PORTSDIR}/security/libgcrypt \
54 libgpg-error.so:${PORTSDIR}/security/libgpg-error \
55 libgnutls.so:${PORTSDIR}/security/gnutls
56 CONFIGURE_ARGS+= --enable-glx-tls
57 CMAKE_ARGS+= -DENABLE_GNUTLS=1
59 CMAKE_ARGS+= -DENABLE_GNUTLS=0
62 .if ${PORT_OPTIONS:MNLS}
64 CMAKE_ARGS+= -DENABLE_NLS=1
67 CMAKE_ARGS+= -DENABLE_NLS=0
68 PLIST_SUB+= NLS="@comment "
71 .if ${PORT_OPTIONS:MPAM}
72 CMAKE_ARGS+= -DENABLE_PAM=1
74 CMAKE_ARGS+= -DENABLE_PAM=0
77 .if ${PORT_OPTIONS:MVIEWER}
78 CMAKE_ARGS+= -DBUILD_VIEWER=1
79 LIB_DEPENDS+= libpng.so:${PORTSDIR}/graphics/png \
80 libfltk.so:${PORTSDIR}/x11-toolkits/fltk
81 # ImageMagick is required to generate icons during build process
82 BUILD_DEPENDS+= ${LOCALBASE}/bin/convert:${PORTSDIR}/graphics/ImageMagick
83 USE_XORG+= xcursor xfixes xft xinerama
86 DESKTOP_ENTRIES= "TigerVNC viewer" "Connect to VNC server and display remote desktop" \
87 "${PORTNAME}" "vncviewer" "Network;" false
89 CMAKE_ARGS+= -DBUILD_VIEWER=0
90 PLIST_SUB+= VIEWER="@comment "
93 .if ${PORT_OPTIONS:MHPJPG}
94 LIB_DEPENDS+= libturbojpeg.so:${PORTSDIR}/graphics/libjpeg-turbo
96 LIB_DEPENDS+= libjpeg.so:${PORTSDIR}/graphics/jpeg
99 MAKE_ARGS+= TIGERVNC_SRCDIR=${WRKSRC}
101 --prefix=${PREFIX} --mandir=${PREFIX}/man/ \
102 --docdir=${PREFIX}/share/doc/${PORTNAME}/ --with-pic --without-dtrace \
103 --disable-static --disable-dri --disable-unit-tests \
104 --disable-xinerama --disable-xvfb --disable-xnest --disable-xorg \
105 --disable-dmx --disable-xwin --disable-xephyr --disable-kdrive \
106 --disable-config-dbus --disable-config-hal \
107 --disable-dri2 --enable-install-libxf86config --enable-glx \
108 --with-default-font-path="catalogue:${LOCALBASE}/share/fonts,built-ins" \
109 --with-xkb-path=${LOCALBASE}/share/X11/xkb \
110 --with-xkb-bin-directory=${LOCALBASE}/bin \
111 --with-serverconfig-path=${LOCALBASE}/lib/X11 \
112 --disable-selective-werror \
113 --with-fontrootdir=${LOCALBASE}/share/fonts
115 .include <bsd.port.pre.mk>
117 TIGERVNC_XORG_PATCH_VER= 114
119 # import from x11-server/xorg-server/Makefile
120 .ifdef WITH_OPENSSL_BASE
121 # The reason why I use this is cause openssl from base doesn't install a .pc file
122 # and configure will fail trying to find it. Setting both of those variables to
123 # a *non-empty* value by-passes the pkg-config check.
124 CONFIGURE_ENV= SHA1_LIB="-L/usr/lib -lcrypto" SHA1_CFLAGS="-I/usr/include"
127 XORG_WRKDIR= ${MAKE} -C ${PORTSDIR}/x11-servers/xorg-server -VWRKSRC
130 @${CP} -R `${XORG_WRKDIR}`/ ${WRKSRC}/unix/xserver/
133 @cd ${WRKSRC}/unix/xserver/ && ${PATCH} -p1 < ${WRKSRC}/unix/xserver${TIGERVNC_XORG_PATCH_VER}.patch
136 @cd ${WRKSRC}/unix/xserver/ && ${SETENV} ${CONFIGURE_ENV} ${AUTORECONF} -fiv
137 @cd ${WRKSRC}/unix/xserver/ && ${SETENV} ${CONFIGURE_ENV} ./configure ${CONFIGURE_ARGS}
140 @cd ${WRKSRC}/unix/xserver/ && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} SHELL=${LOCALBASE}/bin/bash
143 @cd ${WRKSRC}/unix/xserver/hw/vnc/ && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} install
145 .include <bsd.port.post.mk>