Check-in [95d02d1e34]
Overview
Comment:Better handling of patching kitcreator and building Nano package
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 95d02d1e349c3e0216426946daab359df20b226fbb096f979a2c4e5108de131b
User & Date: rkeene on 2019-01-23 08:23:23
Other Links: manifest | tags
Context
2019-01-23
20:24
Upgraded to latest version of AES to deal with more warnings check-in: 803aa5197b user: rkeene tags: trunk
08:23
Better handling of patching kitcreator and building Nano package check-in: 95d02d1e34 user: rkeene tags: trunk
08:13
On some platforms the IPv6 address from TclUDP is enclosed in braces, strip them out check-in: 7dc146968b user: rkeene tags: trunk
Changes

Modified build/kits/make-kit from [9d6b5ec672] to [2151c249f6].

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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169


170
171
172
173
174
175
176
177
178
179
180
181
182
183

184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204

205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231

232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
89
90
91
92
93
94
95

96





97




































































98
99














100





















101



























102



























103
104
105
106
107
108
109







-
+
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-







mkdir "${workdir}" 
gzip -dc "${kitcreator_tarball}" | (
	cd "${workdir}" || exit 1
	tar -xf -
	shopt -s dotglob
	mv */* .
	rmdir kitcreator-[0-9]*

)
	cat << \_EOF_ | patch -p0
--- common/common.sh
+++ common/common.sh
@@ -271,10 +271,14 @@
 

 	# Create pkgIndex files if needed
 	if [ -z "${tclpkg}" ]; then
 		tclpkg="${pkg}"
 	fi
+	echo "${tclpkg}" > "${installdir}/tcl-pkg-name"
+	if [ -n "${tclpkg_initfunc}" ]; then
+		echo "${tclpkg_initfunc}" > "${installdir}/tcl-init-func"
+	fi
 
 	if [ -z "${tclpkgversion}" ]; then
 		tclpkgversion="${version}"
 	fi
 

--- kitcreator
+++ kitcreator
@@ -32,11 +32,11 @@
 		echo "Please remember to run 'build/pre.sh' if you expect this build to work." >&2
 	fi
 fi
 
 # Define the list of all packages, for cleaning purposes
-KITCREATOR_ALLPKGS="kitsh tcl tclvfs zlib tk itcl mk4tcl thread dbus tls tclx tcc4tcl tcllib udp yajltcl tdom tuapi"
+KITCREATOR_ALLPKGS="kitsh tcl tclvfs zlib tk itcl mk4tcl thread dbus tls tclx tcc4tcl tcllib udp yajltcl tdom tuapi tclcurl lmdb nano"
 
 # Always rebuild kitsh
 rm -f "kitsh/.success"
 for pkg in ${KITCREATOR_ALLPKGS} ${KITCREATOR_PKGS}; do
 	if [ "${mode}" != "retry" -o ! -f "${pkg}/.success" ]; then

--- kitsh/buildsrc/kitsh-0.0/aclocal.m4
+++ kitsh/buildsrc/kitsh-0.0/aclocal.m4
@@ -304,10 +304,13 @@
 			if test -n "${projlibfilesnostub}"; then
 				for subproj in $subprojs; do
 					subprojucase="`echo ${subproj} | dd conv=ucase 2>/dev/null`"
 					subprojtcase="`echo ${subprojucase} | cut -c 1``echo ${subproj} | cut -c 2-`"
 					lib_init_func="${subprojtcase}_Init"
+					if test -f "${projdir}/inst/tcl-init-func"; then
+						lib_init_func="`cat "${projdir}/inst/tcl-init-func"`"
+					fi
 
 					echo "#define KIT_INCLUDES_${subprojucase}" >> kitInit-libs.h
 					echo "Tcl_AppInitProc ${lib_init_func};" >> kitInit-libs.h
 
 					libs_init_funcs="${libs_init_funcs} ${lib_init_func}"
@@ -321,10 +324,13 @@
 
 	echo '' >> kitInit-libs.h
 	echo 'static void _Tclkit_GenericLib_Init(void) {' >> kitInit-libs.h
 	for lib_init_func in ${libs_init_funcs}; do
 		proj="`echo ${lib_init_func} | sed 's@_Init$$@@@' | dd conv=lcase 2>/dev/null`"
+		if test -f "${projdir}/inst/tcl-pkg-name"; then
+			proj="`cat "${projdir}/inst/tcl-pkg-name"`"
+		fi
 		echo "	Tcl_StaticPackage(0, \"${proj}\", ${lib_init_func}, NULL);" >> kitInit-libs.h
 	done
 	echo '	return;' >> kitInit-libs.h
 	echo '}' >> kitInit-libs.h
 

--- lmdb/build.sh
+++ lmdb/build.sh
@@ -1,7 +1,15 @@
 #! /usr/bin/env bash
 
 # BuildCompatible: KitCreator
 
# Patch KitCreator
(
-version="0.3.6"
+version="0.4.0"
 url="https://github.com/ray2501/tcl-lmdb/archive/${version}.tar.gz"
-sha256='887f72e7c8bc569d74d3c9f151313eadeb19036b4bf8ebd68d7da45aa8a14da7'
+sha256='d19a19376da6716a1ed159a918e631030491f8b6a4ef9e72a4221481b24b2e40'
+
+function postinstall() {
+	local name
+
+	find "${installdir}" -type -f -name '*.a' | while IFS='' read -r name; do
+		echo '-lntdll' > "${name}.linkadd"
+	done
+}

	cd "${workdir}" || exit 1
DELETED lmdb/patches/lmdb-0.3.6-1fixbytearray.diff
Index: lmdb/patches/lmdb-0.3.6-1fixbytearray.diff
==================================================================
--- lmdb/patches/lmdb-0.3.6-1fixbytearray.diff
+++ lmdb/patches/lmdb-0.3.6-1fixbytearray.diff
@@ -1,14 +0,0 @@
-diff --no-dereference -uNr lmdb-0.3.6.orig/generic/tclmdb.c lmdb-0.3.6-1fixbytearray/generic/tclmdb.c
---- lmdb-0.3.6.orig/generic/tclmdb.c	2017-11-23 11:47:39.000000000 -0600
-+++ lmdb-0.3.6-1fixbytearray/generic/tclmdb.c	2018-06-03 12:12:08.650738083 -0500
-@@ -259,8 +259,8 @@
-       }
- 
-       pResultStr = Tcl_NewListObj(0, NULL);
--      Tcl_ListObjAppendElement(interp, pResultStr, Tcl_NewStringObj(mkey.mv_data, mkey.mv_size));
--      Tcl_ListObjAppendElement(interp, pResultStr, Tcl_NewStringObj(mdata.mv_data, mdata.mv_size));
-+      Tcl_ListObjAppendElement(interp, pResultStr, Tcl_NewByteArrayObj(mkey.mv_data, mkey.mv_size));
-+      Tcl_ListObjAppendElement(interp, pResultStr, Tcl_NewByteArrayObj(mdata.mv_data, mdata.mv_size));
- 
-       Tcl_SetObjResult(interp, pResultStr);
- 

	patch -p0
--- tclcurl/build.sh
+++ tclcurl/build.sh
@@ -0,0 +1,23 @@
+#! /usr/bin/env bash
+
+# BuildCompatible: KitCreator
+
+version='7.22.0'
+url="https://github.com/flightaware/tclcurl-fa/archive/1fd1b4178a083f4821d0c45723605824fbcdb017.tar.gz"
+sha256='5abad0f369205b8369819f3993a700bb452921bcab7f42056ef29a1adc3eb093'
+tclpkg='TclCurl'
+
+function postinstall() {
+	if [ "${pkg_configure_shared_build}" = '0' ]; then
+		(
+			eval "$(grep '^PKG_LIBS=' config.log)" || exit 1
+			find "${installdir}" -type f -name '*.a' | while IFS='' read -r filename; do
+				echo "${PKG_LIBS}" > "${filename}.linkadd"
+			done
+		) || return 1
+
+		cat << \_EOF_ | sed "s|@@VERSION@@|${version}|g"> "${installdir}/lib/TclCurl${version}/pkgIndex.tcl"
+package ifneeded TclCurl @@VERSION@@ [list load {} TclCurl]\n[list source [file join $dir tclcurl.tcl]]
+_EOF_
+	fi
+}

) < patches/kitcreator-0.11.0-totrunk.diff
--- udp/patches/tcludp-1.0.11-fixerrno.diff
+++ udp/patches/tcludp-1.0.11-fixerrno.diff
@@ -0,0 +1,21 @@
+diff --no-dereference -uNr tcludp-1.0.11.orig/generic/udp_tcl.c tcludp-1.0.11-fixerrno/generic/udp_tcl.c
+--- tcludp-1.0.11.orig/generic/udp_tcl.c	2014-08-24 02:17:21.000000000 -0500
++++ tcludp-1.0.11-fixerrno/generic/udp_tcl.c	2019-01-18 09:57:47.320471347 -0600
+@@ -31,6 +31,9 @@
+ #error "Neither sys/ioctl.h nor sys/filio.h found. We need ioctl()"
+ #endif
+ #endif /* WIN32 */
++#if defined(HAVE_STRERROR)
++#include <string.h>
++#endif
+ 
+ #if HAVE_FCNTL_H
+ #  include <fcntl.h>
+@@ -1833,7 +1836,6 @@
+     Tcl_AppendUnicodeToObj(errObj, (LPWSTR)sMsg, len - 1);
+     LocalFree(sMsg);
+ #elif defined(HAVE_STRERROR)
+-    extern int errno;
+     errObj = Tcl_NewStringObj(prefix, -1);
+     Tcl_AppendStringsToObj(errObj, ": ", strerror(errno), NULL);
+ #endif

_EOF_
)

# Copy the library into the build system
mkdir "${workdir}/nano" >/dev/null 2>/dev/null || :
mkdir "${workdir}/nano/buildsrc"
(
	cd "${topdir}" || exit 1
	find . '(' \
279
280
281
282
283
284
285
286
287

288
289
290
291
292
293

294
295
296
297
298
299
300
301
302
303
304
305
306

307
308
309
310
311
312
313
314
123
124
125
126
127
128
129


130
131
132
133
134
135

136
137
138
139
140
141
142
143
144
145
146
147
148

149

150
151
152
153
154
155
156







-
-
+





-
+












-
+
-







	make distclean || exit 1
)

# Prepare the build system for the library
(
	cd "${workdir}/nano" || exit 1

	if [ ! -f "build.sh" ]; then
		cat << \_EOF_ > build.sh
	cat << \_EOF_ > build.sh
#! /usr/bin/env bash

# BuildCompatible: KitCreator

version="1.0"
configure_extra=(--enable-stubs)
configure_extra=(--enable-stubs --disable-shared --disable-amalgamation)

function preconfigure() {
	sed -i 's@stack-protector-all@donot-stack-protector-all@g' configure
}

function postinstall() {
	rm -f "${installdir}/lib/tcl-nano${version}/nano.man"
	if [ -f "${installdir}/lib/tcl-nano${version}/nano.lib" -a ! -f "${installdir}/lib/tcl-nano${version}/nano.a" ]; then
		mv "${installdir}/lib/tcl-nano${version}/nano.lib" "${installdir}/lib/tcl-nano${version}/nano.a"
	fi
}
_EOF_
		chmod +x build.sh
	chmod +x build.sh
	fi
)

# Copy the application into the kit
mkdir "${workdir}/app"
mkdir "${workdir}/app/in"
(
	cp -rp app/* "${workdir}/app/in" || exit 1

Added build/kits/patches/kitcreator-0.11.0-totrunk.diff version [e14c1f3ce9].
































































































































































































































































































































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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: common/common.sh
==================================================================
--- common/common.sh
+++ common/common.sh
@@ -271,10 +271,14 @@
 
 	# Create pkgIndex files if needed
 	if [ -z "${tclpkg}" ]; then
 		tclpkg="${pkg}"
 	fi
+	echo "${tclpkg}" > "${installdir}/tcl-pkg-name"
+	if [ -n "${tclpkg_initfunc}" ]; then
+		echo "${tclpkg_initfunc}" > "${installdir}/tcl-init-func"
+	fi
 
 	if [ -z "${tclpkgversion}" ]; then
 		tclpkgversion="${version}"
 	fi
 

Index: kitcreator
==================================================================
--- kitcreator
+++ kitcreator
@@ -32,11 +32,11 @@
 		echo "Please remember to run 'build/pre.sh' if you expect this build to work." >&2
 	fi
 fi
 
 # Define the list of all packages, for cleaning purposes
-KITCREATOR_ALLPKGS="kitsh tcl tclvfs zlib tk itcl mk4tcl thread dbus tls tclx tcc4tcl tcllib udp yajltcl tdom tuapi"
+KITCREATOR_ALLPKGS="kitsh tcl tclvfs zlib tk itcl mk4tcl thread dbus tls tclx tcc4tcl tcllib udp yajltcl tdom tuapi tclcurl lmdb nano"
 
 # Always rebuild kitsh
 rm -f "kitsh/.success"
 for pkg in ${KITCREATOR_ALLPKGS} ${KITCREATOR_PKGS}; do
 	if [ "${mode}" != "retry" -o ! -f "${pkg}/.success" ]; then
@@ -73,27 +73,39 @@
 elif echo " ${CONFIGUREEXTRA} " | grep ' --disable-threads ' >/dev/null 2>/dev/null; then
 	KITCREATOR_ADD_ENABLE_THREADS='0'
 fi
 
 # Determine cross-compile status
+kitsh_dir="$(cd kitsh/buildsrc/kitsh-* && pwd)" || exit 1
 host_os="$(echo " ${CONFIGUREEXTRA} " | sed 's@^.* --host=\([^ ]*\) .*$@\1@
 t x
 d
 :x')"
 build_os="$(echo " ${CONFIGUREEXTRA} " | sed 's@^.* --build=\([^ ]*\) .*$@\1@
 t x
 d
 :x')"
+
+if [ -z "${build_os}" ]; then
+	build_os="$("${kitsh_dir}/config.guess")"
+else
+	build_os="$("${kitsh_dir}/config.sub" "${build_os}")"
+fi
+if [ -z "${host_os}" ]; then
+	host_os="$("${kitsh_dir}/config.guess")"
+else
+	host_os="$("${kitsh_dir}/config.sub" "${host_os}")"
+fi
 
 if [ "${host_os}" != "${build_os}" -a -n "${host_os}" ]; then
 	KC_CROSSCOMPILE='1'
-	KC_CROSSCOMPILE_HOST_OS="${host_os}"
 else
 	KC_CROSSCOMPILE='0'
-	KC_CROSSCOMPILE_HOST_OS=''
 fi
+KC_CROSSCOMPILE_HOST_OS="${host_os}"
 export KC_CROSSCOMPILE KC_CROSSCOMPILE_HOST_OS
+unset kitsh_dir
 
 # Set default target
 KITTARGET="kitsh"
 export KITTARGET
 

Index: kitsh/buildsrc/kitsh-0.0/aclocal.m4
==================================================================
--- kitsh/buildsrc/kitsh-0.0/aclocal.m4
+++ kitsh/buildsrc/kitsh-0.0/aclocal.m4
@@ -304,10 +304,13 @@
 			if test -n "${projlibfilesnostub}"; then
 				for subproj in $subprojs; do
 					subprojucase="`echo ${subproj} | dd conv=ucase 2>/dev/null`"
 					subprojtcase="`echo ${subprojucase} | cut -c 1``echo ${subproj} | cut -c 2-`"
 					lib_init_func="${subprojtcase}_Init"
+					if test -f "${projdir}/inst/tcl-init-func"; then
+						lib_init_func="`cat "${projdir}/inst/tcl-init-func"`"
+					fi
 
 					echo "#define KIT_INCLUDES_${subprojucase}" >> kitInit-libs.h
 					echo "Tcl_AppInitProc ${lib_init_func};" >> kitInit-libs.h
 
 					libs_init_funcs="${libs_init_funcs} ${lib_init_func}"
@@ -321,10 +324,13 @@
 
 	echo '' >> kitInit-libs.h
 	echo 'static void _Tclkit_GenericLib_Init(void) {' >> kitInit-libs.h
 	for lib_init_func in ${libs_init_funcs}; do
 		proj="`echo ${lib_init_func} | sed 's@_Init$$@@@' | dd conv=lcase 2>/dev/null`"
+		if test -f "${projdir}/inst/tcl-pkg-name"; then
+			proj="`cat "${projdir}/inst/tcl-pkg-name"`"
+		fi
 		echo "	Tcl_StaticPackage(0, \"${proj}\", ${lib_init_func}, NULL);" >> kitInit-libs.h
 	done
 	echo '	return;' >> kitInit-libs.h
 	echo '}' >> kitInit-libs.h
 

Index: lmdb/build.sh
==================================================================
--- lmdb/build.sh
+++ lmdb/build.sh
@@ -1,7 +1,26 @@
 #! /usr/bin/env bash
 
 # BuildCompatible: KitCreator
 
-version="0.3.6"
+version="0.4.0"
 url="https://github.com/ray2501/tcl-lmdb/archive/${version}.tar.gz"
-sha256='887f72e7c8bc569d74d3c9f151313eadeb19036b4bf8ebd68d7da45aa8a14da7'
+sha256='d19a19376da6716a1ed159a918e631030491f8b6a4ef9e72a4221481b24b2e40'
+
+function postinstall() {
+	local name
+	local isWindows
+
+	# Windows-only
+	isWindows='false'
+	case "${KC_CROSSCOMPILE_HOST_OS}" in
+		*-cygwin|*-mingw32|*-mingw32-*|*-cygwin-*)
+			isWindows='true'
+			;;
+	esac
+
+	if [ "${isWindows}" = 'true' ]; then
+		find "${installdir}" -type -f -name '*.a' | while IFS='' read -r name; do
+			echo '-lntdll' > "${name}.linkadd"
+		done
+	fi
+}

DELETED lmdb/patches/lmdb-0.3.6-1fixbytearray.diff
Index: lmdb/patches/lmdb-0.3.6-1fixbytearray.diff
==================================================================
--- lmdb/patches/lmdb-0.3.6-1fixbytearray.diff
+++ lmdb/patches/lmdb-0.3.6-1fixbytearray.diff
@@ -1,14 +0,0 @@
-diff --no-dereference -uNr lmdb-0.3.6.orig/generic/tclmdb.c lmdb-0.3.6-1fixbytearray/generic/tclmdb.c
---- lmdb-0.3.6.orig/generic/tclmdb.c	2017-11-23 11:47:39.000000000 -0600
-+++ lmdb-0.3.6-1fixbytearray/generic/tclmdb.c	2018-06-03 12:12:08.650738083 -0500
-@@ -259,8 +259,8 @@
-       }
- 
-       pResultStr = Tcl_NewListObj(0, NULL);
--      Tcl_ListObjAppendElement(interp, pResultStr, Tcl_NewStringObj(mkey.mv_data, mkey.mv_size));
--      Tcl_ListObjAppendElement(interp, pResultStr, Tcl_NewStringObj(mdata.mv_data, mdata.mv_size));
-+      Tcl_ListObjAppendElement(interp, pResultStr, Tcl_NewByteArrayObj(mkey.mv_data, mkey.mv_size));
-+      Tcl_ListObjAppendElement(interp, pResultStr, Tcl_NewByteArrayObj(mdata.mv_data, mdata.mv_size));
- 
-       Tcl_SetObjResult(interp, pResultStr);
- 

ADDED   lmdb/patches/tcl-lmdb-0.4.0-fixrobust.diff
Index: lmdb/patches/tcl-lmdb-0.4.0-fixrobust.diff
==================================================================
--- lmdb/patches/tcl-lmdb-0.4.0-fixrobust.diff
+++ lmdb/patches/tcl-lmdb-0.4.0-fixrobust.diff
@@ -0,0 +1,21 @@
+diff --no-dereference -uNr tcl_lmdb-0.4.0.orig/Makefile.in tcl_lmdb-0.4.0-fixrobust/Makefile.in
+--- tcl_lmdb-0.4.0.orig/Makefile.in	2018-06-22 10:17:46.000000000 -0500
++++ tcl_lmdb-0.4.0-fixrobust/Makefile.in	2019-01-22 15:51:11.244784351 -0600
+@@ -149,17 +149,6 @@
+ 
+ PKG_CFLAGS	= @PKG_CFLAGS@
+ 
+-# Workaround for glibc pthread robust mutex support (glibc < 2.12) fix
+-ifneq ("$(OS)","Windows_NT")
+-UNAME_S := $(shell uname -s)
+-ifeq ($(UNAME_S),Linux)
+-GLIBCCHECK := $(shell expr `ldd --version | grep ^ldd | sed 's/^.* //g'` \< 2.12)
+-ifeq "$(GLIBCCHECK)" "1"
+-        PKG_CFLAGS += -DMDB_USE_ROBUST=0
+-endif
+-endif
+-endif
+-
+ # TCL_DEFS is not strictly need here, but if you remove it, then you
+ # must make sure that configure.ac checks for the necessary components
+ # that your library may use.  TCL_DEFS can actually be a problem if

ADDED   nano/build.sh
Index: nano/build.sh
==================================================================
--- nano/build.sh
+++ nano/build.sh
@@ -0,0 +1,19 @@
+#! /usr/bin/env bash
+
+# BuildCompatible: KitCreator
+
+version="1.2"
+url="https://chiselapp.com/user/rkeene/repository/tcl-nano/uv/releases/tcl-nano-${version}.tar.gz"
+sha256='84465093c491ab8ae7cf3db2c330e010691ac558ab830f096ca8cb7fe0222338'
+configure_extra=(--enable-stubs)
+
+function preconfigure() {
+	sed -i 's@stack-protector-all@donot-stack-protector-all@g' configure
+}
+
+function postinstall() {
+	rm -f "${installdir}/lib/tcl-nano${version}/nano.man"
+	if [ -f "${installdir}/lib/tcl-nano${version}/nano.lib" -a ! -f "${installdir}/lib/tcl-nano${version}/nano.a" ]; then
+		mv "${installdir}/lib/tcl-nano${version}/nano.lib" "${installdir}/lib/tcl-nano${version}/nano.a"
+	fi
+}

Index: nsf/build.sh
==================================================================
--- nsf/build.sh
+++ nsf/build.sh
@@ -21,15 +21,15 @@
     NSFVERSEXTRA=""
     SRC="src/nsf${GITTAG}.zip"
     SRCURL="http://fisheye.openacs.org/browse/~tarball=zip,br=${GITTAG}/nsf/nsf.zip"
     SRCHASH='-'
 else
-    NSFVERS="2.1.0"
+    NSFVERS="2.2.0"
     NSFVERSEXTRA=""
     SRC="src/nsf${NSFVERS}.tar.gz"
     SRCURL="http://sourceforge.net/projects/next-scripting/files/${NSFVERS}/nsf${NSFVERS}.tar.gz/download"
-    SRCHASH='00ed655eac33a85128094f9049166eea37569b68'
+    SRCHASH='ee50e594837ad241dc8012e88af7b878f5437607'
 fi
 
 BUILDDIR="$(pwd)/build/nsf${NSFVERS}"
 OUTDIR="$(pwd)/out"
 INSTDIR="$(pwd)/inst"

ADDED   tclcurl/build.sh
Index: tclcurl/build.sh
==================================================================
--- tclcurl/build.sh
+++ tclcurl/build.sh
@@ -0,0 +1,23 @@
+#! /usr/bin/env bash
+
+# BuildCompatible: KitCreator
+
+version='7.22.0'
+url="https://github.com/flightaware/tclcurl-fa/archive/1fd1b4178a083f4821d0c45723605824fbcdb017.tar.gz"
+sha256='5abad0f369205b8369819f3993a700bb452921bcab7f42056ef29a1adc3eb093'
+tclpkg='TclCurl'
+
+function postinstall() {
+	if [ "${pkg_configure_shared_build}" = '0' ]; then
+		(
+			eval "$(grep '^PKG_LIBS=' config.log)" || exit 1
+			find "${installdir}" -type f -name '*.a' | while IFS='' read -r filename; do
+				echo "${PKG_LIBS}" > "${filename}.linkadd"
+			done
+		) || return 1
+
+		cat << \_EOF_ | sed "s|@@VERSION@@|${version}|g"> "${installdir}/lib/TclCurl${version}/pkgIndex.tcl"
+package ifneeded TclCurl @@VERSION@@ [list load {} TclCurl]\n[list source [file join $dir tclcurl.tcl]]
+_EOF_
+	fi
+}

Index: tdom/build.sh
==================================================================
--- tdom/build.sh
+++ tdom/build.sh
@@ -1,7 +1,7 @@
 #! /usr/bin/env bash
 
 # BuildCompatible: KitCreator
 
-version='0.8.3'
-url="https://github.com/downloads/tDOM/tdom/tDOM-${version}.tgz"
-sha256='496d5950907dd70db61bc20c55a05a5521363ce3c076e2fdd97270181bc720b9'
+version='0.9.1'
+url="http://tdom.org/downloads/tdom-${version}-src.tgz"
+sha256='8e89b0fff005250b1117e05b986c94f119f8524601753c05df18e9b6de58fb8f'

ADDED   udp/patches/tcludp-1.0.11-fixerrno.diff
Index: udp/patches/tcludp-1.0.11-fixerrno.diff
==================================================================
--- udp/patches/tcludp-1.0.11-fixerrno.diff
+++ udp/patches/tcludp-1.0.11-fixerrno.diff
@@ -0,0 +1,21 @@
+diff --no-dereference -uNr tcludp-1.0.11.orig/generic/udp_tcl.c tcludp-1.0.11-fixerrno/generic/udp_tcl.c
+--- tcludp-1.0.11.orig/generic/udp_tcl.c	2014-08-24 02:17:21.000000000 -0500
++++ tcludp-1.0.11-fixerrno/generic/udp_tcl.c	2019-01-18 09:57:47.320471347 -0600
+@@ -31,6 +31,9 @@
+ #error "Neither sys/ioctl.h nor sys/filio.h found. We need ioctl()"
+ #endif
+ #endif /* WIN32 */
++#if defined(HAVE_STRERROR)
++#include <string.h>
++#endif
+ 
+ #if HAVE_FCNTL_H
+ #  include <fcntl.h>
+@@ -1833,7 +1836,6 @@
+     Tcl_AppendUnicodeToObj(errObj, (LPWSTR)sMsg, len - 1);
+     LocalFree(sMsg);
+ #elif defined(HAVE_STRERROR)
+-    extern int errno;
+     errObj = Tcl_NewStringObj(prefix, -1);
+     Tcl_AppendStringsToObj(errObj, ": ", strerror(errno), NULL);
+ #endif