1 # Created by: Koichiro IWAO <meta+ports@vmeta.jp>
2 # $FreeBSD: net/tigervnc/Makefile 326978 2013-09-11 13:20:02Z wg $
6 CATEGORIES= net x11-servers
7 MASTER_SITES= SF:tigervnc
8 MASTER_SITE_SUBDIR= ${PORTNAME}/${PORTNAME}/${PORTVERSION}/:tigervnc
9 DISTFILES= ${PORTNAME}-${PORTVERSION}.tar.bz2:tigervnc
11 MAINTAINER= meta+ports@vmeta.jp
12 COMMENT= High-performance, platform-neutral implementation of VNC
16 PATCH_DEPENDS= ${NONEXISTENT}:${PORTSDIR}/x11-servers/xorg-server:patch
17 BUILD_DEPENDS= ${LOCALBASE}/include/GL/internal/dri_interface.h:${PORTSDIR}/graphics/dri \
18 ${LOCALBASE}/libdata/pkgconfig/fontutil.pc:${PORTSDIR}/x11-fonts/font-util \
19 bash:${PORTSDIR}/shells/bash
20 # almost equivalent to x11-servers/xorg-server's
21 RUN_DEPENDS= ${LOCALBASE}/share/X11/xkb/rules/base:${PORTSDIR}/x11/xkeyboard-config \
22 xkbcomp:${PORTSDIR}/x11/xkbcomp
24 CONFLICTS= tridiavnc-[0-9]* \
28 USES= cmake gmake pkgconfig
30 USE_AUTOTOOLS+= autoconf:env automake:env libtool: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
47 OPTIONS_DEFINE= GNUTLS NLS PAM VIEWER HPJPG
48 OPTIONS_DEFAULT= GNUTLS NLS PAM VIEWER
49 VIEWER_DESC= Build vncviewer
50 HPJPG_DESC= Build with High-Performance JPEG support
52 .include <bsd.port.options.mk>
54 CMAKE_ARGS= -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=${PREFIX}
56 .if ${PORT_OPTIONS:MGNUTLS}
57 LIB_DEPENDS+= libtasn1.so:${PORTSDIR}/security/libtasn1 \
58 libgcrypt.so:${PORTSDIR}/security/libgcrypt \
59 libgpg-error.so:${PORTSDIR}/security/libgpg-error \
60 libgnutls.so:${PORTSDIR}/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+= -DENABLE_VIEWER=1
84 LIB_DEPENDS+= libpng15.so:${PORTSDIR}/graphics/png \
85 libfltk.so:${PORTSDIR}/x11-toolkits/fltk
86 USE_XORG+= xcursor xfixes xft xinerama
90 DESKTOP_ENTRIES= "TigerVNC viewer" "Connect to VNC server and display remote desktop" \
91 "${PREFIX}/share/icons/hicolor/scalable/apps/${PORTNAME}.svg" \
92 "vncviewer" "Network;" false
94 PLIST_SUB+= VIEWER="@comment "
97 .if ${PORT_OPTIONS:MHPJPG}
98 LIB_DEPENDS+= libturbojpeg.so:${PORTSDIR}/graphics/libjpeg-turbo
100 LIB_DEPENDS+= libjpeg.so:${PORTSDIR}/graphics/jpeg
103 MAKE_ARGS+= TIGERVNC_SRCDIR=${WRKSRC}
105 --prefix=${PREFIX} --mandir=${PREFIX}/man/ \
106 --docdir=${PREFIX}/share/doc/${PORTNAME}/ --with-pic --without-dtrace \
107 --disable-static --disable-dri \
108 --disable-xinerama --disable-xvfb --disable-xnest --disable-xorg \
109 --disable-dmx --disable-xwin --disable-xephyr --disable-kdrive \
110 --disable-config-dbus --disable-config-hal \
111 --disable-dri2 --enable-install-libxf86config --enable-glx \
112 --with-default-font-path="catalogue:${PREFIX}/share/fonts,built-ins" \
113 --with-xkb-path=${PREFIX}/share/X11/xkb \
114 --with-xkb-output=/var/lib/xkb \
115 --with-xkb-bin-directory=${PREFIX}/bin \
116 --with-serverconfig-path=${PREFIX}/lib/X11 \
117 --disable-selective-werror
119 CONFIGURE_ARGS+= --with-fontrootdir=${PREFIX}/share/fonts
121 CONFIGURE_ARGS+= --with-fontdir=${PREFIX}/share/fonts
124 .include <bsd.port.pre.mk>
127 TIGERVNC_XORG_PATCH_VER= 112
129 TIGERVNC_XORG_PATCH_VER= 17
132 # import from x11-server/xorg-server/Makefile
133 .ifdef WITH_OPENSSL_BASE
134 # The reason why I use this is cause openssl from base doesn't install a .pc file
135 # and configure will fail trying to find it. Setting both of those variables to
136 # a *non-empty* value by-passes the pkg-config check.
137 CONFIGURE_ENV= SHA1_LIB="-L/usr/lib -lcrypto" SHA1_CFLAGS="-I/usr/include"
140 XORG_WRKDIR= ${MAKE} -C ${PORTSDIR}/x11-servers/xorg-server -VWRKSRC
143 @${CP} -R `${XORG_WRKDIR}`/ ${WRKSRC}/unix/xserver/
146 @cd ${WRKSRC}/unix/xserver/ && ${PATCH} -p1 < ${WRKSRC}/unix/xserver${TIGERVNC_XORG_PATCH_VER}.patch
149 @cd ${WRKSRC}/unix/xserver/ && ${SETENV} ${CONFIGURE_ENV} ${AUTORECONF} -fiv
150 @cd ${WRKSRC}/unix/xserver/ && ${SETENV} ${CONFIGURE_ENV} ./configure ${CONFIGURE_ARGS}
153 @cd ${WRKSRC}/unix/xserver/ && ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_ARGS} SHELL=${LOCALBASE}/bin/bash
156 @cd ${WRKSRC}/unix/xserver/hw/vnc/ && ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_ARGS} install
157 .if ${PORT_OPTIONS:MVIEWER}
158 @${MKDIR} ${PREFIX}/share/icons/hicolor/scalable/apps/
159 @cd ${WRKSRC}/media/ && ${INSTALL_DATA} icons/tigervnc.svg ${PREFIX}/share/icons/hicolor/scalable/apps/
162 .include <bsd.port.post.mk>