Update multimedia/mplayer to version 1.1.r20141223_2
[dports.git] / net / tigervnc / Makefile
1 # Created by: Koichiro IWAO <meta+ports@vmeta.jp>
2 # $FreeBSD$
3
4 PORTNAME=       tigervnc
5 PORTVERSION=    1.3.1
6 PORTREVISION=   9
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
11
12 MAINTAINER=     meta+ports@vmeta.jp
13 COMMENT=        High-performance, platform-neutral implementation of VNC
14
15 LICENSE=        GPLv2
16
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
24
25 CONFLICTS=      tridiavnc-[0-9]* \
26                 tightvnc-[0-9]* \
27                 vnc-[0-9]*
28
29 USES=           cmake gmake libtool pkgconfig python
30 USE_GL=         gl
31 USE_AUTOTOOLS=  autoconf:env automake:env libtoolize:env
32 USE_LDCONFIG=   yes
33 USE_OPENSSL=    yes
34
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
39
40 CFLAGS+=        -fPIC
41
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
46
47 .include <bsd.port.options.mk>
48
49 CMAKE_ARGS=     -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=${STAGE}${PREFIX}
50
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
58 .else
59 CMAKE_ARGS+=    -DENABLE_GNUTLS=0
60 .endif
61
62 .if ${PORT_OPTIONS:MNLS}
63 USES+=          gettext
64 CMAKE_ARGS+=    -DENABLE_NLS=1
65 PLIST_SUB+=     NLS=""
66 .else
67 CMAKE_ARGS+=    -DENABLE_NLS=0
68 PLIST_SUB+=     NLS="@comment "
69 .endif
70
71 .if ${PORT_OPTIONS:MPAM}
72 CMAKE_ARGS+=    -DENABLE_PAM=1
73 .else
74 CMAKE_ARGS+=    -DENABLE_PAM=0
75 .endif
76
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
84 PLIST_SUB+=     VIEWER=""
85 INSTALLS_ICONS= yes
86 DESKTOP_ENTRIES=        "TigerVNC viewer" "Connect to VNC server and display remote desktop" \
87                         "${PORTNAME}" "vncviewer" "Network;" false
88 .else
89 CMAKE_ARGS+=    -DBUILD_VIEWER=0
90 PLIST_SUB+=     VIEWER="@comment "
91 .endif
92
93 .if ${PORT_OPTIONS:MHPJPG}
94 LIB_DEPENDS+=   libturbojpeg.so:${PORTSDIR}/graphics/libjpeg-turbo
95 .else
96 LIB_DEPENDS+=   libjpeg.so:${PORTSDIR}/graphics/jpeg
97 .endif
98
99 MAKE_ARGS+=     TIGERVNC_SRCDIR=${WRKSRC}
100 CONFIGURE_ARGS+=        \
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
114
115 .include <bsd.port.pre.mk>
116
117 TIGERVNC_XORG_PATCH_VER=        114
118
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"
125 .endif
126
127 XORG_WRKDIR=    ${MAKE} -C ${PORTSDIR}/x11-servers/xorg-server -VWRKSRC
128
129 pre-patch:
130         @${CP} -R `${XORG_WRKDIR}`/ ${WRKSRC}/unix/xserver/
131
132 post-patch:
133         @cd ${WRKSRC}/unix/xserver/ && ${PATCH} -p1 < ${WRKSRC}/unix/xserver${TIGERVNC_XORG_PATCH_VER}.patch
134
135 post-configure:
136         @cd ${WRKSRC}/unix/xserver/ && ${SETENV} ${CONFIGURE_ENV} ${AUTORECONF} -fiv
137         @cd ${WRKSRC}/unix/xserver/ && ${SETENV} ${CONFIGURE_ENV} ./configure ${CONFIGURE_ARGS}
138
139 post-build:
140         @cd ${WRKSRC}/unix/xserver/ && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} SHELL=${LOCALBASE}/bin/bash
141
142 post-install:
143         @cd ${WRKSRC}/unix/xserver/hw/vnc/ && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} install
144
145 .include <bsd.port.post.mk>