Diff

Differences From Artifact [7543705ff9]:

To Artifact [dbcc3cc417]:


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
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







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

+

-
-
+
+

-
+








-
+


-
-
-
+
+
+





-
-
-
+
+
+
+
+





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







}

function preinstall() {
	:
}

function install() {
	mkdir -p "${installdir}/lib" || return 1
	${MAKE:-make} tcllibdir="${installdir}/lib" "${make_extra[@]}" install || return 1
}
	local installlibdir
	local installpkgdir

function postinstall() {
	:
}

function createruntime() {
	local runtimelibdir
	local runtimepkgdir
	local pkglibfile
	local file

	mkdir -p "${installdir}/lib" || return 1
	${MAKE:-make} tcllibdir="${installdir}/lib" "${make_extra[@]}" install || return 1
	# Install files needed by installation
	cp -r "${installdir}/lib" "${runtimedir}" || return 1

	# Create pkgIndex if needed
	# Create pkgIndex files if needed
	if [ -z "${tclpkg}" ]; then
		tclpkg="${pkg}"
	fi

	if [ -z "${tclpkgversion}" ]; then
		tclpkgversion="${version}"
	fi

	installlibdir="${installdir}/lib"
	runtimelibdir="${runtimedir}/lib"

	if [ "${pkg_configure_shared_build}" = '0' ]; then
		find "${installlibdir}" -name '*.a' | sed 's@/[^/]*\.a$@@' | head -n 1 | while IFS='' read -r installpkgdir; do
			if [ ! -e "${installpkgdir}/pkgIndex.tcl" ]; then
				cat << _EOF_ > "${installpkgdir}/pkgIndex.tcl"
		find "${runtimelibdir}" -name '*.a' | sed 's@/[^/]*\.a$@@' | head -n 1 | while IFS='' read -r runtimepkgdir; do
			if [ ! -e "${runtimepkgdir}/pkgIndex.tcl" ]; then
				cat << _EOF_ > "${runtimepkgdir}/pkgIndex.tcl"
package ifneeded ${tclpkg} ${tclpkgversion} [list load {} ${tclpkg}]
_EOF_
			fi
		done
	elif [ "${pkg_configure_shared_build}" = '1' ]; then
		find "${installlibdir}" -name '*.so' -o -name '*.dylib' -o -name '*.dll' -o -name '*.shlib' | sed 's@/[^/]*$@@' | head -n 1 | while IFS='' read -r installpkgdir; do
			if [ ! -e "${installpkgdir}/pkgIndex.tcl" ]; then
				cat << _EOF_ > "${installpkgdir}/pkgIndex.tcl"
		find "${runtimelibdir}" -name '*.so' -o -name '*.dylib' -o -name '*.dll' -o -name '*.shlib' | head -n 1 | while IFS='' read -r pkglibfile; do
			runtimepkgdir="$(echo "${pkglibfile}" | sed 's@/[^/]*$@@')"
			pkglibfile="$(echo "${pkglibfile}" | sed 's@^.*/@@')"
			if [ ! -e "${runtimepkgdir}/pkgIndex.tcl" ]; then
				cat << _EOF_ > "${runtimepkgdir}/pkgIndex.tcl"
package ifneeded ${tclpkg} ${tclpkgversion} [list load [file join \$dir ${pkglibfile}]]
_EOF_
			fi
		done
	fi
}


	# Remove link-only files from the runtime directory
function postinstall() {
	:
}

function createruntime() {
	local file

	# Install files needed by installation
	cp -r "${installdir}/lib" "${runtimedir}" || return 1

	find "${runtimedir}" '(' -name '*.a' -o -name '*.a.linkadd' ')' -type f | while IFS='' read -r file; do
		rm -f "${file}"
	done

	# Ensure that some files were installed
	if ! find "${runtimedir}" -type f 2>/dev/null | grep '^' >/dev/null; then
		return 1