Update databases/mariadb105-server to version 10.5.17
[dports.git] / net / tightvnc / Makefile
1 PORTNAME=       tightvnc
2 PORTVERSION=    1.3.10
3 PORTREVISION=   6
4 CATEGORIES=     net java
5 MASTER_SITES=   SF/vnc-tight/TightVNC-unix/${PORTVERSION}
6 DISTNAME=       ${PORTNAME}-${PORTVERSION}_unixsrc
7
8 MAINTAINER=     meta@FreeBSD.org
9 COMMENT=        Enhanced version of VNC
10 WWW=            https://www.tightvnc.com/
11
12 LICENSE=        GPLv2
13 LICENSE_FILE=   ${WRKSRC}/LICENCE.TXT
14
15 RUN_DEPENDS=    showrgb:x11/rgb \
16                 xauth:x11/xauth \
17                 xorg-fonts>=7.2:x11-fonts/xorg-fonts
18
19 USES=           cpe imake jpeg shebangfix perl5 tar:bzip2 xorg
20 USE_XORG=       ice sm x11 xaw xext xmu xt xpm
21
22 CFLAGS+=        -fcommon # for build with clang-11, see https://sourceforge.net/p/vnc-tight/bugs/1523/
23
24 MAKE_JOBS_UNSAFE=       yes
25 CONFLICTS=      tigervnc
26 WRKSRC=         ${WRKDIR}/vnc_unixsrc
27 SHEBANG_FILES=  vncserver
28 CFLAGS+=        -Wno-return-type
29 ALL_TARGET=     World
30 MAKE_ARGS=      CC=${CC}
31
32 OPTIONS_DEFINE= JVNC_VIEWER
33 OPTIONS_SUB=    yes
34 JVNC_VIEWER_DESC=       Install Java-based vnc viewer
35 JVNC_VIEWER_USE=        JAVA=yes
36 JVNC_VIEWER_VARS=       JAVA_RUN=yes
37
38 .ifdef(TIGHTVNC_BASE)
39 PREFIX=${TIGHTVNC_BASE}
40 .endif
41
42 .include <bsd.port.pre.mk>
43
44 .if ${ARCH} == aarch64
45 USE_GCC=        yes
46 .endif
47
48 .if exists(${PREFIX}/share/vnc/classes/index.vnc)
49 IGNORE=         vnc has already been installed, please uninstall it first
50 .endif
51
52 post-patch:
53 .for file in vncviewer/Imakefile Xvnc/config/cf/vnclibs.def
54         @${REINPLACE_CMD} -i '' -e "s|%%LOCALBASE%%|${LOCALBASE}|g" ${WRKSRC}/${file}
55 .endfor
56         @${REINPLACE_CMD} -i '' -e "s|/usr/local/vnc/classes|${DATADIR}/classes|g" \
57                 ${WRKSRC}/vncserver
58         @${REINPLACE_CMD} -i '' -e "s|%%CC%%|${CC}|g ; \
59                 s|%%CFLAGS%%|${CFLAGS}|g" ${WRKSRC}/Xvnc/config/cf/FreeBSD.cf
60
61 do-install:
62         @(cd ${WRKSRC}; ./vncinstall ${STAGEDIR}${PREFIX}/bin ${STAGEDIR}${PREFIX}/man)
63 .if defined(STRIP) && ${STRIP} != ""
64 .for FILE in Xvnc vncviewer vncpasswd vncconnect
65         @${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/${FILE}
66 .endfor
67 .endif
68
69 do-install-JVNC_VIEWER-on:
70         @${MKDIR} ${STAGEDIR}${DATADIR}/classes
71         ${INSTALL_DATA} ${WRKSRC}/classes/*.* ${STAGEDIR}${DATADIR}/classes
72
73 .include <bsd.port.post.mk>