1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
|
PORTNAME= putty
PORTVERSION= 0.74
PORTREVISION= 1
CATEGORIES= security
MASTER_SITES= http://the.earth.li/~sgtatham/putty/${PORTVERSION}/ \
ftp://ftp.chiark.greenend.org.uk/users/sgtatham/putty-latest/
MAINTAINER= mandree@FreeBSD.org
COMMENT= Secure shell and telnet client
# test plan: test ALL 4 GSSAPI_* options, ALL 3 GTK options, WITH_DEBUG=yes build.
LICENSE= MIT
LICENSE_FILE= ${PATCH_WRKSRC}/LICENCE
USES= cpe gmake pkgconfig
CPE_VENDOR= simon_tatham
MAKEFILE= Makefile.gtk
CONFLICTS_INSTALL?= pssh-[0-9]* putty-gtk2-[0-9]* putty-nogtk-[0-9]*
PATCH_WRKSRC= ${WRKDIR}/${DISTNAME}
WRKSRC= ${WRKDIR}/${DISTNAME}/unix
PLIST_FILES= bin/plink \
bin/pscp \
bin/psftp \
bin/puttygen \
man/man1/plink.1.gz \
man/man1/pscp.1.gz \
man/man1/psftp.1.gz \
man/man1/puttygen.1.gz
OPTIONS_DEFAULT= GSSAPI_BASE GTK3
OPTIONS_RADIO= TOOLKIT
OPTIONS_RADIO_TOOLKIT= GTK2 GTK3
OPTIONS_SINGLE= GSSAPI_SELECT
OPTIONS_SINGLE_GSSAPI_SELECT= GSSAPI_NONE GSSAPI_BASE GSSAPI_HEIMDAL \
GSSAPI_MIT
.include <bsd.port.options.mk>
CFLAGS+= -DBSD_PTYS -DHAVE_FUTIMES -DIPV6 -DOMIT_UTMP
LDFLAGS+= -Wl,--as-needed
.if (${PORT_OPTIONS:MGTK2} || ${PORT_OPTIONS:MGTK3}) && !defined(WITHOUT_X11)
USES+= xorg
USE_XORG= x11
.if ${PORT_OPTIONS:MGTK2}
USES+= gnome
USE_GNOME= cairo gdkpixbuf2 gtk20
MAKE_ARGS+= GTK_CONFIG="pkg-config gtk+-2.0 x11 --cflags" \
PUTTY_WITH_GTK=yes
.endif
.if ${PORT_OPTIONS:MGTK3}
USES+= gnome
USE_GNOME= cairo gdkpixbuf2 gtk30
MAKE_ARGS+= GTK_CONFIG="pkg-config gtk+-3.0 x11 --cflags" \
PUTTY_WITH_GTK=yes
.endif
PLIST_FILES+= bin/pageant \
bin/pterm \
bin/putty \
bin/puttytel \
man/man1/pageant.1.gz \
man/man1/pterm.1.gz \
man/man1/putty.1.gz \
man/man1/puttytel.1.gz \
share/pixmaps/putty.ico
DESKTOP_ENTRIES= "PuTTY" \
"${COMMENT}" \
"${PREFIX}/share/pixmaps/${PORTNAME}.ico" \
"${PORTNAME}" \
"" \
false
.else
MAKE_ARGS+= GTK_CONFIG=:
.endif
.if ${PORT_OPTIONS:MGSSAPI_BASE}
USES+= gssapi:base,flags
MAKE_ARGS+= KRB5CONFIG=${KRB5CONFIG}
.elif ${PORT_OPTIONS:MGSSAPI_HEIMDAL}
USES+= gssapi:heimdal,flags
MAKE_ARGS+= KRB5CONFIG=${KRB5CONFIG}
.elif ${PORT_OPTIONS:MGSSAPI_MIT}
USES+= gssapi:mit,flags
MAKE_ARGS+= KRB5CONFIG=${KRB5CONFIG}
.else
_COMPAT= -DNO_GSSAPI
.endif
_COMPAT+= -DOMIT_UTMP
.if defined(WITH_DEBUG)
CFLAGS+= -DDEBUG
XFLAGS= -DDEBUG
_COMPAT+= -DDEBUG
.endif
# upstream sets -Werror - there are no issues on 9.1-FreeBSD amd64
# currently, but override it nonetheless.
XFLAGS+= -Wno-error
MAKE_ARGS+= CC="${CC}" \
COMPAT="${_COMPAT}" \
INSTALL_DATA="${INSTALL_DATA}" \
INSTALL_PROGRAM="${INSTALL_PROGRAM}" \
XFLAGS="${XFLAGS}"
post-patch:
@${REINPLACE_CMD} -e 's,prefix=/usr/local,prefix=${PREFIX},;\
s,make,${MAKE_CMD},'\
${WRKSRC}/${MAKEFILE}
post-install:
.if ${PORT_OPTIONS:MGTK2} || ${PORT_OPTIONS:MGTK3}
@${MKDIR} ${STAGEDIR}${PREFIX}/share/pixmaps
${INSTALL_DATA} ${WRKSRC}/../windows/putty.ico \
${STAGEDIR}${PREFIX}/share/pixmaps/
.endif
.include <bsd.port.mk>
|