Lines 13-28
Link Here
|
13 |
# different TCL versions the version can be specified directly. |
13 |
# different TCL versions the version can be specified directly. |
14 |
# If version is not specified (USE_TCL=yes) then the latest |
14 |
# If version is not specified (USE_TCL=yes) then the latest |
15 |
# version is used (8.4 currently). |
15 |
# version is used (8.4 currently). |
16 |
# Available values are: 85, 85-thread, 84, 84-thread, 83, 82, |
16 |
# Available values are: 85+, 84+, 83+, 85, 84, 83, 82, 81 and 80. |
17 |
# 81 and 80. |
17 |
# USE_TCL_BUILD - Set to add build time dependency on tcl, requires USE_TCL. |
18 |
# USE_TCL_BUILD - Build time dependency on tcl. Same semantics as USE_TCL. |
18 |
# TCL_NO_RUN_DEPENDS - Set to disable runtime dependency on Tcl (requires USE_TCL_BUILD) |
|
|
19 |
# |
20 |
# USE_TCL_THREADS - If unset, non-threaded TCL is required by default. If a threaded version |
21 |
# is installed, port uses the threaded version. |
22 |
# If set, a threaded build of TCL is always required. |
23 |
# USE_TCL_NOTHREADS - If set, a non-threaded TCL is always required. |
24 |
# (overrides USE_TCL_THREADS if set) |
19 |
# |
25 |
# |
20 |
# USE_TK - Depend on tk to run. In case of incompatible APIs of different |
26 |
# USE_TK - Depend on tk to run. In case of incompatible APIs of different |
21 |
# TK versions the version can be specified directly. If version |
27 |
# TK versions the version can be specified directly. If version |
22 |
# is not specified (USE_TK=yes) then the latest version is |
28 |
# is not specified (USE_TK=yes) then the latest version is |
23 |
# used (8.4 currently). |
29 |
# used (8.4 currently). |
24 |
# Available values are: 85, 84, 83, 82, 81 and 80. |
30 |
# Available values are: 85+, 84+, 83+, 85, 84, 83, 82, 81 and 80. |
25 |
# USE_TK_BUILD - Build time dependency on tk. Same semantics as USE_TK. |
31 |
# USE_TK_BUILD - Set to add build time dependency on tk. |
|
|
32 |
# TK_NO_RUN_DEPENDS - Set to disable runtime dependency on Tk (requires USE_TK_BUILD) |
26 |
## |
33 |
## |
27 |
# TCL_LIBDIR - Path where tcl libraries can be found |
34 |
# TCL_LIBDIR - Path where tcl libraries can be found |
28 |
# |
35 |
# |
Lines 47-107
Link Here
|
47 |
# wish calls with wish${TK_VER} calls. Also note that |
54 |
# wish calls with wish${TK_VER} calls. Also note that |
48 |
# post-patch target is used. |
55 |
# post-patch target is used. |
49 |
|
56 |
|
50 |
.if defined(USE_TCL) || defined(USE_TCL_BUILD) |
57 |
# Backwards compatibility with old USE_TCL_BUILD |
51 |
|
58 |
.if defined(USE_TCL_BUILD) && !defined(USE_TCL) |
52 |
_TCL_VERSIONS= 85 85-thread 84 84-thread 83 82 81 80 |
59 |
USE_TCL= ${USE_TCL_BUILD} |
|
|
60 |
USE_TCL_BUILD= yes |
61 |
.endif |
53 |
|
62 |
|
|
|
63 |
# TCL part |
54 |
.if defined(USE_TCL) |
64 |
.if defined(USE_TCL) |
55 |
_RUN= yes |
|
|
56 |
.endif |
57 |
|
65 |
|
58 |
.if defined(USE_TCL_BUILD) |
66 |
_TCL_VERSIONS= 85 84 84 83 82 81 80 |
59 |
USE_TCL= ${USE_TCL_BUILD} |
67 |
_TCL_THREADED_VERSIONS= 85 84 81 |
60 |
_BUILD= yes |
68 |
_TCL_MINIMUM_VERSIONS= 85+ 84+ 83+ |
61 |
.endif |
69 |
|
|
|
70 |
# For specifying [85, 84, 83, ..]+ |
71 |
_TCL_83P= 83 84 85 |
72 |
_TCL_84P= 84 85 |
73 |
_TCL_85P= 85 |
74 |
|
75 |
# Support for obsolete 84-thread and 85-thread definitions |
76 |
. if ${USE_TCL} == "84-thread" || ${USE_TCL} == "85-thread" |
77 |
USE_TCL= ${USE_TCL:S/-thread//} |
78 |
USE_TCL_THREADS= yes |
79 |
. endif |
62 |
|
80 |
|
63 |
.if ${USE_TCL} == "yes" |
81 |
.if ${USE_TCL} == "yes" |
64 |
USE_TCL= 84 |
82 |
USE_TCL= 84 |
65 |
.endif |
83 |
.endif |
66 |
|
84 |
|
67 |
TCL_VER:= ${USE_TCL:S/8/8./:S/-thread//} |
85 |
.if defined(USE_TCL_BUILD) |
|
|
86 |
. if defined(TCL_NO_RUN_DEPENDS) |
87 |
_NORUN= yes |
88 |
. endif |
89 |
_BUILD= yes |
90 |
.endif |
68 |
|
91 |
|
69 |
# Special case |
92 |
# Special case |
70 |
.if ${USE_TCL} == "81" |
93 |
.if ${USE_TCL} == "81" |
71 |
USE_TCL= tcl81-thread |
94 |
USE_TCL_THREADS= yes |
|
|
95 |
.endif |
96 |
|
97 |
# Check if a tcl build with threads is required |
98 |
.if defined(USE_TCL_THREADS) && !defined(USE_TCL_NOTHREADS) |
99 |
_TCL_THREADED= _THREADED |
100 |
_TCL_THREADED_PORT= -thread |
101 |
_TCL_THREADED_IGNORE= (with threads) |
102 |
.endif |
103 |
|
104 |
# Check for highest installed TCL (if e.g. 83+ is specified) |
105 |
_TCL_VER= no |
106 |
.for ver in ${_TCL_RANGE_VERSIONS} |
107 |
. if ${USE_TCL} == "${ver}" && ${_TCL_VER} == "no" |
108 |
_MATCHED_TCL_VER:= ${USE_TCL:S/+//} |
109 |
. for tcl in ${_TCL_${_MATCHED_TCL_VER}P} |
110 |
. if exists(${LOCALBASE}/include/tcl${tcl:S/8/8./}/tcl.h) |
111 |
_TCL_VER=${tcl} |
112 |
. endif |
113 |
. endfor |
114 |
. endif |
115 |
.endfor |
116 |
.if defined(_MATCHED_TCL_VER) |
117 |
. if ${_TCL_VER} != "no" |
118 |
USE_TCL= ${_TCL_VER} |
119 |
. else |
120 |
USE_TCL= ${_MATCHED_TCL_VER} |
121 |
. endif |
72 |
.endif |
122 |
.endif |
73 |
|
123 |
|
|
|
124 |
TCL_VER:= ${USE_TCL:S/8/8./} |
125 |
|
126 |
# Check if correct TCL version was specified |
74 |
_FOUND= no |
127 |
_FOUND= no |
75 |
.for ver in ${_TCL_VERSIONS} |
128 |
.for ver in ${_TCL${_TCL_THREADED}_VERSIONS} |
76 |
. if ${USE_TCL} == "${ver}" |
129 |
. if ${USE_TCL} == "${ver}" |
77 |
_FOUND= yes |
130 |
_FOUND= yes |
78 |
. if defined(_BUILD) |
131 |
|
79 |
BUILD_DEPENDS+= tclsh${TCL_VER}:${PORTSDIR}/lang/tcl${USE_TCL} |
|
|
80 |
. endif |
81 |
. if defined(_RUN) |
82 |
RUN_DEPENDS+= tclsh${TCL_VER}:${PORTSDIR}/lang/tcl${USE_TCL} |
83 |
. endif |
84 |
TCL_INCLUDEDIR= ${LOCALBASE}/include/tcl${TCL_VER} |
132 |
TCL_INCLUDEDIR= ${LOCALBASE}/include/tcl${TCL_VER} |
85 |
TCL_LIBDIR= ${LOCALBASE}/lib/tcl${TCL_VER} |
133 |
TCL_LIBDIR= ${LOCALBASE}/lib/tcl${TCL_VER} |
86 |
TCLSH= ${LOCALBASE}/bin/tclsh${TCL_VER} |
134 |
TCLSH= ${LOCALBASE}/bin/tclsh${TCL_VER} |
|
|
135 |
|
136 |
# Check if a threaded or non-threaded TCL is installed |
137 |
. if exists(${TCLSH}) |
138 |
_TCL_IS_THREADED!= echo 'puts [array names tcl_platform -exact threaded]' | ${TCLSH} || return 0 |
139 |
. if ${_TCL_IS_THREADED} != "threaded" |
140 |
. if defined(USE_TCL_THREADS) |
141 |
IGNORE= TCL ${TCL_VER} with threads required. The installed version does not support threads |
142 |
. endif |
143 |
. else |
144 |
. if defined(USE_TCL_NOTHREADS) |
145 |
IGNORE= TCL ${TCL_VER} without threads required. The installed version uses threads |
146 |
. else |
147 |
_TCL_THREADED_PORT= -thread |
148 |
. endif |
149 |
. endif |
150 |
. endif |
151 |
|
152 |
# Add dependencies |
153 |
. if defined(_BUILD) |
154 |
BUILD_DEPENDS+= tclsh${TCL_VER}:${PORTSDIR}/lang/tcl${USE_TCL}${_TCL_THREADED_PORT} |
155 |
. endif |
156 |
. if !defined(_NORUN) |
157 |
RUN_DEPENDS+= tclsh${TCL_VER}:${PORTSDIR}/lang/tcl${USE_TCL}${_TCL_THREADED_PORT} |
158 |
. endif |
87 |
. endif |
159 |
. endif |
88 |
.endfor |
160 |
.endfor |
89 |
|
161 |
|
90 |
.if ${_FOUND} == "no" |
162 |
.if ${_FOUND} == "no" |
91 |
IGNORE= Unknown TCL version specified: ${USE_TCL} |
163 |
IGNORE= Unknown TCL version specified: ${USE_TCL} ${_TCL_THREADED_IGNORE} |
92 |
.endif |
164 |
.endif |
93 |
.endif # defined(USE_TCL) || defined(USE_TCL_BUILD) |
|
|
94 |
|
165 |
|
95 |
.if defined(USE_TK) || defined(USE_TK_BUILD) |
166 |
.endif # defined(USE_TCL) |
96 |
|
167 |
|
97 |
_TK_VERSIONS= 85 84 83 82 81 80 |
168 |
# Backwards compatibility with old USE_TK_BUILD |
|
|
169 |
.if defined(USE_TK_BUILD) && !defined(USE_TK) |
170 |
USE_TK= ${USE_TK_BUILD} |
171 |
USE_TK_BUILD= yes |
172 |
.endif |
98 |
|
173 |
|
|
|
174 |
# TK part |
99 |
.if defined(USE_TK) |
175 |
.if defined(USE_TK) |
100 |
_TK_RUN= yes |
176 |
|
101 |
.endif |
177 |
_TK_VERSIONS= 85 84 83 82 81 80 |
|
|
178 |
_TK_RANGE_VERSIONS= 85+ 84+ 83+ |
179 |
|
180 |
# For specifying [85, 84, 83, ..]+ |
181 |
_TK_83P= 83 84 85 |
182 |
_TK_84P= 84 85 |
183 |
_TK_85P= 85 |
102 |
|
184 |
|
103 |
.if defined(USE_TK_BUILD) |
185 |
.if defined(USE_TK_BUILD) |
104 |
USE_TK= ${USE_TK_BUILD} |
186 |
. if defined(NO_TK_RUN_DEPENDS) |
|
|
187 |
_TK_NORUN= yes |
188 |
. endif |
105 |
_TK_BUILD= yes |
189 |
_TK_BUILD= yes |
106 |
.endif |
190 |
.endif |
107 |
|
191 |
|
Lines 109-114
Link Here
|
109 |
USE_TK= 84 |
193 |
USE_TK= 84 |
110 |
.endif |
194 |
.endif |
111 |
|
195 |
|
|
|
196 |
# Check for highest installed TK (if e.g. 83+ is specified) |
197 |
_TK_VER= no |
198 |
.for ver in ${_TK_RANGE_VERSIONS} |
199 |
. if ${USE_TK} == "${ver}" && ${_TK_VER} == "no" |
200 |
_MATCHED_TK_VER:= ${USE_TK:S/+//} |
201 |
. for tk in ${_TK_${_MATCHED_TK_VER}P} |
202 |
. if exists(${LOCALBASE}/include/tk${tk:S/8/8./}/tk.h) |
203 |
_TK_VER=${tk} |
204 |
. endif |
205 |
. endfor |
206 |
. endif |
207 |
.endfor |
208 |
.if defined(_MATCHED_TK_VER) |
209 |
. if ${_TK_VER} != "no" |
210 |
USE_TK= ${_TK_VER} |
211 |
. else |
212 |
USE_TK= ${_MATCHED_TK_VER} |
213 |
. endif |
214 |
.endif |
215 |
|
112 |
TK_VER:= ${USE_TK:S/8/8./} |
216 |
TK_VER:= ${USE_TK:S/8/8./} |
113 |
TCL_VER?= ${TK_VER} |
217 |
TCL_VER?= ${TK_VER} |
114 |
|
218 |
|
Lines 123-129
Link Here
|
123 |
. if defined(_TK_BUILD) |
227 |
. if defined(_TK_BUILD) |
124 |
BUILD_DEPENDS+= wish${TK_VER}:${PORTSDIR}/x11-toolkits/tk${USE_TK} |
228 |
BUILD_DEPENDS+= wish${TK_VER}:${PORTSDIR}/x11-toolkits/tk${USE_TK} |
125 |
.endif |
229 |
.endif |
126 |
. if defined(_TK_RUN) |
230 |
. if !defined(_TK_NORUN) |
127 |
RUN_DEPENDS+= wish${TK_VER}:${PORTSDIR}/x11-toolkits/tk${USE_TK} |
231 |
RUN_DEPENDS+= wish${TK_VER}:${PORTSDIR}/x11-toolkits/tk${USE_TK} |
128 |
.endif |
232 |
.endif |
129 |
TCL_INCLUDEDIR= ${LOCALBASE}/include/tcl${TK_VER} |
233 |
TCL_INCLUDEDIR= ${LOCALBASE}/include/tcl${TK_VER} |
Lines 138-144
Link Here
|
138 |
.if ${_FOUND} == "no" |
242 |
.if ${_FOUND} == "no" |
139 |
IGNORE= Unknown TK version specified: ${USE_TK} |
243 |
IGNORE= Unknown TK version specified: ${USE_TK} |
140 |
.endif |
244 |
.endif |
141 |
.endif # defined(USE_TK) || defined(USE_TK_BUILD) |
245 |
.endif # defined(USE_TK) |
142 |
|
246 |
|
143 |
.endif # !defined(_POSTMKINCLUDED) && !defined(Tcl_Pre_Include) |
247 |
.endif # !defined(_POSTMKINCLUDED) && !defined(Tcl_Pre_Include) |