Diff

Differences From Artifact [910bb9be64]:

To Artifact [7543705ff9]:


211
212
213
214
215
216
217

218
219
220
221
222
223
224
...
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
}

function preinstall() {
	:
}

function install() {

	local installpkgdir
	local pkglibfile

	mkdir -p "${installdir}/lib" || return 1
	${MAKE:-make} tcllibdir="${installdir}/lib" "${make_extra[@]}" install || return 1

	# Create pkgIndex if needed
................................................................................
		tclpkg="${pkg}"
	fi

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

	installpkgdir="$(echo "${installdir}/lib"/*)"

	if [ -d "${installpkgdir}" ]; then

		if [ ! -e "${installpkgdir}/pkgIndex.tcl" ]; then
			case "${pkg_configure_shared_build}" in
				0)
					cat << _EOF_ > "${installpkgdir}/pkgIndex.tcl"
package ifneeded ${tclpkg} ${tclpkgversion} [list load {} ${tclpkg}]
_EOF_
					;;


				1)
					pkglibfile="$(find "${installpkgdir}" -name '*.so' -o -name '*.dylib' -o -name '*.dll' -o -name '*.shlib' | head -n 1 | sed 's@^.*/@@')"

					cat << _EOF_ > "${installpkgdir}/pkgIndex.tcl"
package ifneeded ${tclpkg} ${tclpkgversion} [list load [file join \$dir ${pkglibfile}]]
_EOF_
					;;
			esac
		fi

	fi
}

function postinstall() {
	:
}

function createruntime() {
	local file

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

	find "${runtimedir}" -name '*.a' -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
	fi







>







 







|

|
>
|
<
<
|


<
>
>
|
|
>
|


<
<
|
>













|







211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
...
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
}

function preinstall() {
	:
}

function install() {
	local installlibdir
	local installpkgdir
	local pkglibfile

	mkdir -p "${installdir}/lib" || return 1
	${MAKE:-make} tcllibdir="${installdir}/lib" "${make_extra[@]}" install || return 1

	# Create pkgIndex if needed
................................................................................
		tclpkg="${pkg}"
	fi

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

	installlibdir="${installdir}/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"
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"
package ifneeded ${tclpkg} ${tclpkgversion} [list load [file join \$dir ${pkglibfile}]]
_EOF_


			fi
		done
	fi
}

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
	fi