Changeset View
Changeset View
Standalone View
Standalone View
head/net/tigervnc/Makefile
# $FreeBSD$ | # $FreeBSD$ | ||||
PORTNAME= tigervnc | PORTNAME= tigervnc | ||||
PORTVERSION= 1.9.0 | PORTVERSION= 1.9.0 | ||||
DISTVERSIONPREFIX= v | DISTVERSIONPREFIX= v | ||||
PORTREVISION= 2 | PORTREVISION= 3 | ||||
CATEGORIES= net x11-servers | CATEGORIES= net x11-servers | ||||
MAINTAINER= meta@FreeBSD.org | MAINTAINER= meta@FreeBSD.org | ||||
COMMENT= High-performance, platform-neutral implementation of VNC | COMMENT= High-performance, platform-neutral implementation of VNC | ||||
LICENSE= GPLv2+ | LICENSE= GPLv2+ | ||||
LICENSE_FILE= ${WRKSRC}/LICENCE.TXT | LICENSE_FILE= ${WRKSRC}/LICENCE.TXT | ||||
Show All 16 Lines | |||||
CONFLICTS= tightvnc-[0-9]* | CONFLICTS= tightvnc-[0-9]* | ||||
GH_ACCOUNT= TigerVNC | GH_ACCOUNT= TigerVNC | ||||
USE_XORG+= ice pixman sm x11 xau xdamage xdmcp xext xfixes xfont xkbfile \ | USE_XORG+= ice pixman sm x11 xau xdamage xdmcp xext xfixes xfont xkbfile \ | ||||
xorg-macros xorgproto xrandr xrender xtrans xtst | xorg-macros xorgproto xrandr xrender xtrans xtst | ||||
CFLAGS+= -fPIC | |||||
OPTIONS_DEFINE= GNUTLS NLS PAM VIEWER DOCS | OPTIONS_DEFINE= GNUTLS NLS PAM VIEWER DOCS | ||||
OPTIONS_DEFAULT= GNUTLS PAM VIEWER | OPTIONS_DEFAULT= GNUTLS PAM VIEWER | ||||
OPTIONS_SUB= yes | |||||
VIEWER_DESC= Build vncviewer | VIEWER_DESC= Build vncviewer | ||||
.include <bsd.port.options.mk> | GNUTLS_CMAKE_BOOL= ENABLE_GNUTLS | ||||
GNUTLS_CONFIGURE_ARGS= --enable-glx-tls | |||||
CMAKE_ARGS= -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=${STAGE}${PREFIX} | GNUTLS_LIB_DEPENDS= libtasn1.so:security/libtasn1 \ | ||||
.if ${PORT_OPTIONS:MGNUTLS} | |||||
LIB_DEPENDS+= libtasn1.so:security/libtasn1 \ | |||||
libgcrypt.so:security/libgcrypt \ | libgcrypt.so:security/libgcrypt \ | ||||
libgpg-error.so:security/libgpg-error \ | libgpg-error.so:security/libgpg-error \ | ||||
libgnutls.so:security/gnutls | libgnutls.so:security/gnutls | ||||
CONFIGURE_ARGS+= --enable-glx-tls | PAM_CMAKE_BOOL= ENABLE_PAM | ||||
CMAKE_ARGS+= -DENABLE_GNUTLS=1 | VIEWER_CMAKE_BOOL= BUILD_VIEWER | ||||
.else | VIEWER_BUILD_DEPENDS= convert:graphics/ImageMagick7 # to generate icons during build | ||||
CMAKE_ARGS+= -DENABLE_GNUTLS=0 | VIEWER_LIB_DEPENDS= libpng.so:graphics/png \ | ||||
.endif | |||||
.if ${PORT_OPTIONS:MNLS} | |||||
USES+= gettext | |||||
CMAKE_ARGS+= -DENABLE_NLS=1 | |||||
PLIST_SUB+= NLS="" | |||||
.else | |||||
CMAKE_ARGS+= -DENABLE_NLS=0 | |||||
PLIST_SUB+= NLS="@comment " | |||||
.endif | |||||
.if ${PORT_OPTIONS:MPAM} | |||||
CMAKE_ARGS+= -DENABLE_PAM=1 | |||||
.else | |||||
CMAKE_ARGS+= -DENABLE_PAM=0 | |||||
.endif | |||||
.if ${PORT_OPTIONS:MVIEWER} | |||||
CMAKE_ARGS+= -DBUILD_VIEWER=1 | |||||
LIB_DEPENDS+= libpng.so:graphics/png \ | |||||
libfltk.so:x11-toolkits/fltk | libfltk.so:x11-toolkits/fltk | ||||
# ImageMagick is required to generate icons during build process | VIEWER_INSTALLS_ICONS= yes | ||||
BUILD_DEPENDS+= ${LOCALBASE}/bin/convert:graphics/ImageMagick6 | VIEWER_DESKTOP_ENTRIES= "TigerVNC viewer" "Connect to VNC server and display remote desktop" \ | ||||
USE_XORG+= xcursor xfixes xft xinerama | |||||
PLIST_SUB+= VIEWER="" | |||||
INSTALLS_ICONS= yes | |||||
DESKTOP_ENTRIES= "TigerVNC viewer" "Connect to VNC server and display remote desktop" \ | |||||
"${PORTNAME}" "vncviewer" "Network;" false | "${PORTNAME}" "vncviewer" "Network;" false | ||||
.else | VIEWER_USE= xorg=xcursor,xfixes,xft,xinerama | ||||
CMAKE_ARGS+= -DBUILD_VIEWER=0 | NLS_CMAKE_BOOL= ENABLE_NLS | ||||
PLIST_SUB+= VIEWER="@comment " | NLS_USES= gettext | ||||
.endif | |||||
CMAKE_ARGS+= -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=${STAGE}${PREFIX} | |||||
MAKE_ARGS+= TIGERVNC_SRCDIR=${WRKSRC} | MAKE_ARGS+= TIGERVNC_SRCDIR=${WRKSRC} | ||||
CONFIGURE_ARGS+= \ | CONFIGURE_ARGS+= \ | ||||
--prefix=${PREFIX} --mandir=${PREFIX}/man/ \ | --prefix=${PREFIX} --mandir=${PREFIX}/man/ \ | ||||
--docdir=${PREFIX}/share/doc/${PORTNAME}/ --with-pic --without-dtrace \ | --docdir=${PREFIX}/share/doc/${PORTNAME}/ --with-pic --without-dtrace \ | ||||
--disable-static --disable-dri --disable-unit-tests \ | --disable-static --disable-dri --disable-unit-tests \ | ||||
--disable-xinerama --disable-xvfb --disable-xnest --disable-xorg \ | --disable-xinerama --disable-xvfb --disable-xnest --disable-xorg \ | ||||
--disable-dmx --disable-xwin --disable-xephyr --disable-kdrive \ | --disable-dmx --disable-xwin --disable-xephyr --disable-kdrive \ | ||||
--disable-config-dbus --disable-config-hal \ | --disable-config-dbus --disable-config-hal \ | ||||
--disable-dri2 --enable-install-libxf86config --enable-glx \ | --disable-dri2 --enable-install-libxf86config --enable-glx \ | ||||
--with-default-font-path="catalogue:${LOCALBASE}/share/fonts,built-ins" \ | --with-default-font-path="catalogue:${LOCALBASE}/share/fonts,built-ins" \ | ||||
--with-xkb-path=${LOCALBASE}/share/X11/xkb \ | --with-xkb-path=${LOCALBASE}/share/X11/xkb \ | ||||
--with-xkb-bin-directory=${LOCALBASE}/bin \ | --with-xkb-bin-directory=${LOCALBASE}/bin \ | ||||
--with-serverconfig-path=${LOCALBASE}/lib/X11 \ | --with-serverconfig-path=${LOCALBASE}/lib/X11 \ | ||||
--disable-selective-werror \ | --disable-selective-werror \ | ||||
--disable-xwayland \ | --disable-xwayland \ | ||||
--with-fontrootdir=${LOCALBASE}/share/fonts | --with-fontrootdir=${LOCALBASE}/share/fonts | ||||
.include <bsd.port.pre.mk> | .include <bsd.port.pre.mk> | ||||
# keep in sync with all platforms where libunwind is available | # keep in sync with all platforms where libunwind is available | ||||
.if (${ARCH} == amd64 || ${ARCH} == i386) | .if (${ARCH} == amd64 || ${ARCH} == i386) | ||||
LIB_DEPENDS+= libunwind.so:devel/libunwind | LIB_DEPENDS+= libunwind.so:devel/libunwind | ||||
.endif | .endif | ||||
TIGERVNC_XORG_PATCH_VER= ${MAKE} -C "${PORTSDIR}/x11-servers/xorg-server" -V PORTVERSION:R:S,\.,,g | TIGERVNC_XORG_PATCH_VER= ${MAKE} -C "${.CURDIR}/../../x11-servers/xorg-server" -V PORTVERSION:R:S,\.,,g | ||||
XORG_WRKSRC= ${MAKE} -C ${.CURDIR}/../../x11-servers/xorg-server -VWRKSRC | |||||
# import from x11-server/xorg-server/Makefile | # import from x11-server/xorg-server/Makefile | ||||
.if ${SSL_DEFAULT} == base | .if ${SSL_DEFAULT} == base | ||||
# The reason why I use this is cause openssl from base doesn't | # The reason why I use this is cause openssl from base doesn't | ||||
# install a .pc file and configure will fail trying to find it. | # install a .pc file and configure will fail trying to find it. | ||||
# Setting both of those variables to a *non-empty* value by-passes | # Setting both of those variables to a *non-empty* value by-passes | ||||
# the pkg-config check. | # the pkg-config check. | ||||
CONFIGURE_ENV= SHA1_LIB="-L/usr/lib -lcrypto" SHA1_CFLAGS="-I/usr/include" | CONFIGURE_ENV= SHA1_LIB="-L/usr/lib -lcrypto" SHA1_CFLAGS="-I/usr/include" | ||||
.endif | .endif | ||||
XORG_WRKDIR= ${MAKE} -C ${PORTSDIR}/x11-servers/xorg-server -VWRKSRC | |||||
pre-patch: | pre-patch: | ||||
@${CP} -R `${XORG_WRKDIR}`/ ${WRKSRC}/unix/xserver/ | @${CP} -R $$(${XORG_WRKSRC})/ ${WRKSRC}/unix/xserver/ | ||||
post-patch: | post-patch: | ||||
@cd ${WRKSRC}/unix/xserver/ && ${PATCH} -p1 < ${WRKSRC}/unix/xserver`${TIGERVNC_XORG_PATCH_VER}`.patch | @cd ${WRKSRC}/unix/xserver/ && ${PATCH} -p1 < ${WRKSRC}/unix/xserver$$(${TIGERVNC_XORG_PATCH_VER}).patch | ||||
post-configure: | post-configure: | ||||
@cd ${WRKSRC}/unix/xserver/ && ${SETENV} ${CONFIGURE_ENV} ${MAKE_ENV} ${AUTORECONF} -fiv | @cd ${WRKSRC}/unix/xserver/ && ${SETENV} ${CONFIGURE_ENV} ${MAKE_ENV} ${AUTORECONF} -fiv | ||||
@cd ${WRKSRC}/unix/xserver/ && ${SETENV} ${CONFIGURE_ENV} ${MAKE_ENV} ./configure ${CONFIGURE_ARGS} | @cd ${WRKSRC}/unix/xserver/ && ${SETENV} ${CONFIGURE_ENV} ${MAKE_ENV} ./configure ${CONFIGURE_ARGS} | ||||
post-build: | post-build: | ||||
@cd ${WRKSRC}/unix/xserver/ && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} SHELL=${LOCALBASE}/bin/bash | @cd ${WRKSRC}/unix/xserver/ && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} SHELL=${LOCALBASE}/bin/bash | ||||
post-install: | post-install: | ||||
@cd ${WRKSRC}/unix/xserver/hw/vnc/ && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} install | @cd ${WRKSRC}/unix/xserver/hw/vnc/ && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} install | ||||
@${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/Xvnc ${STAGEDIR}${PREFIX}/lib/xorg/modules/extensions/libvnc.so | @${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/Xvnc ${STAGEDIR}${PREFIX}/lib/xorg/modules/extensions/libvnc.so | ||||
.include <bsd.port.post.mk> | .include <bsd.port.post.mk> |