--- Makefile.orig 2012-10-01 21:19:54.000000000 +0200
+++ Makefile 2012-10-01 21:45:06.000000000 +0200
@@ -1,9 +1,5 @@
-# New ports collection makefile for: tigervnc
-# Date created: 2012-05-27
-# Whom: Koichiro IWAO
-#
+# Created by: Koichiro IWAO
# $FreeBSD$
-#
PORTNAME= tigervnc
PORTVERSION= 1.2.0
@@ -30,17 +26,41 @@
tightvnc-[0-9]* \
vnc-[0-9]*
-OPTIONS= GNUTLS "GNUTLS support (broken)" off \
- NLS "native language support" off \
- OPENSSL_PORT "Use ports openssl" off \
- PAM "PAM authentication support" off \
- VIEWER "build vncviewer (broken)" off
+MAKE_JOBS_UNSAFE= yes
+
+USE_GMAKE= yes
+USE_GL= gl
+USE_AUTOTOOLS+= autoconf:env automake:env libtool:env
+USE_PYTHON= yes
+USE_LDCONFIG= yes
+USE_OPENSSL= yes
+
+USE_XORG+= bigreqsproto compositeproto damageproto fixesproto fontsproto glproto \
+ inputproto kbproto pixman randrproto renderproto resourceproto \
+ scrnsaverproto videoproto xau xdmcp xext xkbfile xcmiscproto xextproto \
+ xfont xproto xrandr xtrans xtst
+
+WRKSRC= ${WRKDIR}/tigervnc-${PORTVERSION}/
+
+MAN1+= vncpasswd.1 \
+ x0vncserver.1 \
+ vncserver.1 \
+ vncconfig.1 \
+ Xserver.1 \
+ Xvnc.1
+
+OPTIONS_DEFINE= GNUTLS NLS PAM VIEWER
+OPTIONS_DEFAULT=
+
+GNUTLS_DESC= GNUTLS support (broken)
+PAM_DESC= PAM authentication support
+VIEWER_DESC= build VNCviewer (broken)
.include
CMAKE_ARGS= -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=${PREFIX} -DUSE_INCLUDED_ZLIB=1
-.if defined(WITH_GNUTLS)
+.if ${PORT_OPTIONS:MGNUTLS}
BROKEN= not available now
LIB_DEPENDS+= tasn:${PORTSDIR}/security/libtasn1 \
gcrypt:${PORTSDIR}/security/libgcrypt \
@@ -51,7 +71,7 @@
CMAKE_ARGS+= -DENABLE_GNUTLS=0
.endif
-.if defined(WITH_NLS) && !defined(WITHOUT_NLS)
+.if ${PORT_OPTIONS:MNLS}
USE_GETTEXT= yes
CMAKE_ARGS+= -DENABLE_NLS=1
PLIST_SUB+= NLS=""
@@ -60,19 +80,17 @@
PLIST_SUB+= NLS="@comment "
.endif
-.if defined(WITHOUT_OPENSSL_PORT)
-EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-unix_xserver_configure.ac
-.endif
-
-.if defined(WITH_PAM)
+.if ${PORT_OPTIONS:MPAM}
CMAKE_ARGS+= -DENABLE_PAM=1
.else
CMAKE_ARGS+= -DENABLE_PAM=0
.endif
-.if !defined(WITHOUT_VIEWER)
+.if ${PORT_OPTIONS:MVIEWER}
BROKEN= not available now
-CMAKE_ARGS+= -DENABLE_VIEWER=1 -DFLTK_INCLUDE_DIR=${LOCALBASE}/include -DFLTK_LIBRARIES="-L${LOCALBASE}/lib -lfltk -lfltk_forms -lfltk_images"
+CMAKE_ARGS+= -DENABLE_VIEWER=1 -DFLTK_INCLUDE_DIR=${LOCALBASE}/include \
+ -DFLTK_LIBRARIES="-L${LOCALBASE}/lib \
+ -lfltk -lfltk_forms -lfltk_images"
LIB_DEPENDS+= png15:${PORTSDIR}/graphics/png \
fltk:${PORTSDIR}/x11-toolkits/fltk
USE_XORG+= xcursor xfixes xft xinerama
@@ -82,15 +100,6 @@
PLIST_SUB+= VIEWER="@comment "
.endif
-MAKE_JOBS_UNSAFE= yes
-
-USE_GMAKE= yes
-USE_GL= gl
-USE_AUTOTOOLS+= autoconf:env automake:env libtool:env
-USE_PYTHON= yes
-USE_LDCONFIG= yes
-USE_OPENSSL= yes
-
MAKE_ARGS+= TIGERVNC_SRCDIR=${WRKSRC}
CONFIGURE_ARGS+= --prefix=${PREFIX} --mandir=${PREFIX}/man/ \
--docdir=${PREFIX}/share/doc/${PORTNAME}/ --with-pic --without-dtrace \
@@ -108,6 +117,8 @@
--with-dri-driver-path=${PREFIX}/lib/dri \
--disable-selective-werror
+.include
+
.if defined(WITH_NEW_XORG)
BROKEN= does not build with new xorg
XORG_VERSION= 1.10.6
@@ -116,24 +127,13 @@
.endif
TIGERVNC_XORG_PATCH_VER= 17
-USE_XORG+= bigreqsproto compositeproto damageproto fixesproto fontsproto glproto \
- inputproto kbproto pixman randrproto renderproto resourceproto \
- scrnsaverproto videoproto xau xdmcp xext xkbfile xcmiscproto xextproto \
- xfont xproto xrandr xtrans xtst
-
-WRKSRC= ${WRKDIR}/tigervnc-${PORTVERSION}/
-
-MAN1+= vncpasswd.1 \
- x0vncserver.1 \
- vncserver.1 \
- vncconfig.1 \
- Xserver.1 \
- Xvnc.1
-
-.include
+.if defined(WITH_OPENSSL_PORT)
+.warning detected OPENSSL_PORT, build with extra-patch
+EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-unix_xserver_configure.ac
+.endif
post-extract:
- ${CP} -R ${WRKDIR}/xorg-server-${XORG_VERSION}/* ${WRKSRC}/unix/xserver
+ ${CP} -R ${WRKDIR}/xorg-server-${XORG_VERSION}/* ${WRKSRC}/unix/xserver/
post-patch:
@cd ${WRKSRC}/unix/xserver/ && ${PATCH} -p1 < ${WRKSRC}/unix/xserver${TIGERVNC_XORG_PATCH_VER}.patch