Check-in [b759ce7ece]
Overview
Comment:Added TclPCKS11 build script Reworked build script for Tcl to install Tcl and set TCLCONFIGDIR to installed location
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:b759ce7ecea7e41c79e9495b747627e998a8578f
User & Date: rkeene on 2010-10-17 12:54:27
Other Links: manifest | tags
Context
2010-10-17
13:24
Updated to remove tclWinDde.c and tclWinReg.c from Tcl 8.4.19 compile as these fail to build check-in: 60857c9f4d user: rkeene tags: trunk
12:54
Added TclPCKS11 build script Reworked build script for Tcl to install Tcl and set TCLCONFIGDIR to installed location check-in: b759ce7ece user: rkeene tags: trunk
2010-10-09
15:48
Updated teapot_index to remove duplicate requirements from built index page check-in: 0844204408 user: rkeene tags: trunk
Changes

Modified .fossil-settings/ignore-glob from [e3e4fac2e6] to [8dda756635].

24
25
26
27
28
29
30






31
32
33
34
35
36
37
38
39
40
server/buildpkgs/tcl/*
server/buildpkgs/tcllib/build
server/buildpkgs/tcllib/build/*
server/buildpkgs/tcllib/out
server/buildpkgs/tcllib/out/*
server/buildpkgs/tcllib/src
server/buildpkgs/tcllib/src/*






server/buildpkgs/tclpkgs-*.tar.*
server/buildpkgs/tclpkgs-*.tar.*/*
server/buildpkgs/tls/build
server/buildpkgs/tls/build/*
server/buildpkgs/tls/out
server/buildpkgs/tls/out/*
server/buildpkgs/tls/src
server/buildpkgs/tls/src/*
server/pkgs
server/pkgs/*







>
>
>
>
>
>










24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
server/buildpkgs/tcl/*
server/buildpkgs/tcllib/build
server/buildpkgs/tcllib/build/*
server/buildpkgs/tcllib/out
server/buildpkgs/tcllib/out/*
server/buildpkgs/tcllib/src
server/buildpkgs/tcllib/src/*
server/buildpkgs/tclpkcs11/build
server/buildpkgs/tclpkcs11/build/*
server/buildpkgs/tclpkcs11/out
server/buildpkgs/tclpkcs11/out/*
server/buildpkgs/tclpkcs11/src
server/buildpkgs/tclpkcs11/src/*
server/buildpkgs/tclpkgs-*.tar.*
server/buildpkgs/tclpkgs-*.tar.*/*
server/buildpkgs/tls/build
server/buildpkgs/tls/build/*
server/buildpkgs/tls/out
server/buildpkgs/tls/out/*
server/buildpkgs/tls/src
server/buildpkgs/tls/src/*
server/pkgs
server/pkgs/*

Modified server/buildpkgs/build_all.sh from [62bff14932] to [af64eaf700].

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
..
48
49
50
51
52
53
54
55
56
57

58
59
60
61
62
63
64
..
75
76
77
78
79
80
81


82
83
84
85
86
87
88
89
..
99
100
101
102
103
104
105


106




107
108
109
110
111
112
113
114
115
116
117
118
119
120
fi
export CLEANONLY DISTCLEAN

CONFIGUREEXTRA="$@"
export CONFIGUREEXTRA

# Determine path to "tclConfig.sh"
rm -rf tcl/build
rm -f platform.magic.*
if [ "${DISTCLEAN}" = "1" ]; then
	rm -rf tcl
fi

if [ "${CLEANONLY}" = "0" ]; then
	TCLVERS="8.4.19"
	TCLPRIVATE="$(pwd)/tcl/build/tcl${TCLVERS}"
	PROJROOTDIR="$(pwd)"

	export TCLVERS TCLPRIVATE PROJROOTDIR

	mkdir tcl tcl/build >/dev/null 2>/dev/null

	if [ ! -f "tcl/src/tcl${TCLVERS}.tar.gz" ]; then
		mkdir tcl/src >/dev/null 2>/dev/null
		wget -o /dev/null -O "tcl/src/tcl${TCLVERS}.tar.gz" "http://prdownloads.sourceforge.net/tcl/tcl${TCLVERS}-src.tar.gz"
	fi
................................................................................
		cd tcl/build || exit 1
		gzip -dc "../src/tcl${TCLVERS}.tar.gz" | tar -xf -

		for dir in unix win macosx; do
			cd "${TCLPRIVATE}/${dir}" || exit 1

			echo " Executing: ./configure ${CONFIGUREEXTRA}"
			./configure --disable-threads ${CONFIGUREEXTRA}

			${MAKE:-make} || continue


			LD_LIBRARY_PATH=".:${LD_LIBRARY_PATH}"
			LD_RUN_PATH=".:${LD_RUN_PATH}"
			export LD_LIBRARY_PATH LD_RUN_PATH

			file tclsh tclsh*.exe 2>/dev/null | grep -iv 'No such file' > "${PROJROOTDIR}/platform.magic.file"
			if [ -f tclsh*.exe ]; then
................................................................................
		echo 'Failed to build Tcl.  See "./tcl/build/build.log"'
		echo 'Proceeding with system Tcl.  Building might fail.'
	)

	TCLBUILDDIR="$(cat "${PROJROOTDIR}/platform.magic.dir")"
	export TCLBUILDDIR



	if [ -d "${TCLBUILDDIR}" -a -f "${TCLBUILDDIR}/tclConfig.sh" ]; then
		TCLCONFIGDIR="${TCLBUILDDIR}"
	else
		unset TCLPRIVATE

		TCLCONFIGDIR=$(
			(
				echo "${LD_LIBRARY_PATH}" | tr ':' "\n"
................................................................................
		if [ -z "${TCLCONFIGDIR}" ]; then
			TCLCONFIGDIR="/usr/lib"
		fi

		TCLPRIVATE="$(dirname "${TCLCONFIGDIR}")/include/tcl-private"
	fi



	ADDFLAGS="-I${TCLPRIVATE} -I${TCLPRIVATE}/generic -I${TCLBUILDDIR}"




	CFLAGS="${ADDFLAGS} ${CFLAGS}"
	CPPFLAGS="${ADDFLAGS} ${CPPFLAGS}"

	unset TCLVERS
	unset ADDFLAGS
	unset TCLBUILDDIR
	export TCLCONFIGDIR TCLPRIVATE CFLAGS CPPFLAGS
fi

# Determine platform
if [ -z "${FORCE_PLATFORM}" ]; then
	PLATFORM="$(./platform)"
	export PLATFORM
else







|









>
|







 







|


>







 







>
>
|







 







>
>
|
>
>
>
>





<
|







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
..
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
..
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
...
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
fi
export CLEANONLY DISTCLEAN

CONFIGUREEXTRA="$@"
export CONFIGUREEXTRA

# Determine path to "tclConfig.sh"
rm -rf tcl/build tcl/inst
rm -f platform.magic.*
if [ "${DISTCLEAN}" = "1" ]; then
	rm -rf tcl
fi

if [ "${CLEANONLY}" = "0" ]; then
	TCLVERS="8.4.19"
	TCLPRIVATE="$(pwd)/tcl/build/tcl${TCLVERS}"
	PROJROOTDIR="$(pwd)"
	TCLINSTDIR="$(pwd)/tcl/inst"
	export TCLVERS TCLPRIVATE PROJROOTDIR TCLINSTDIR

	mkdir tcl tcl/build >/dev/null 2>/dev/null

	if [ ! -f "tcl/src/tcl${TCLVERS}.tar.gz" ]; then
		mkdir tcl/src >/dev/null 2>/dev/null
		wget -o /dev/null -O "tcl/src/tcl${TCLVERS}.tar.gz" "http://prdownloads.sourceforge.net/tcl/tcl${TCLVERS}-src.tar.gz"
	fi
................................................................................
		cd tcl/build || exit 1
		gzip -dc "../src/tcl${TCLVERS}.tar.gz" | tar -xf -

		for dir in unix win macosx; do
			cd "${TCLPRIVATE}/${dir}" || exit 1

			echo " Executing: ./configure ${CONFIGUREEXTRA}"
			./configure --disable-threads ${CONFIGUREEXTRA} --prefix="${TCLINSTDIR}"

			${MAKE:-make} || continue
			${MAKE:-make} install || break

			LD_LIBRARY_PATH=".:${LD_LIBRARY_PATH}"
			LD_RUN_PATH=".:${LD_RUN_PATH}"
			export LD_LIBRARY_PATH LD_RUN_PATH

			file tclsh tclsh*.exe 2>/dev/null | grep -iv 'No such file' > "${PROJROOTDIR}/platform.magic.file"
			if [ -f tclsh*.exe ]; then
................................................................................
		echo 'Failed to build Tcl.  See "./tcl/build/build.log"'
		echo 'Proceeding with system Tcl.  Building might fail.'
	)

	TCLBUILDDIR="$(cat "${PROJROOTDIR}/platform.magic.dir")"
	export TCLBUILDDIR

	if [ -d "${TCLINSTDIR}" -a -f "${TCLINSTDIR}/lib/tclConfig.sh" ]; then
		TCLCONFIGDIR="${TCLINSTDIR}/lib"
	elif [ -d "${TCLBUILDDIR}" -a -f "${TCLBUILDDIR}/tclConfig.sh" ]; then
		TCLCONFIGDIR="${TCLBUILDDIR}"
	else
		unset TCLPRIVATE

		TCLCONFIGDIR=$(
			(
				echo "${LD_LIBRARY_PATH}" | tr ':' "\n"
................................................................................
		if [ -z "${TCLCONFIGDIR}" ]; then
			TCLCONFIGDIR="/usr/lib"
		fi

		TCLPRIVATE="$(dirname "${TCLCONFIGDIR}")/include/tcl-private"
	fi

	ADDFLAGS=""
	if [ -n "${TCLPRIVATE}" ]; then
		ADDFLAGS="${ADDFLAGS} -I${TCLPRIVATE} -I${TCLPRIVATE}/generic"
	fi
	if [ -n "${TCLBUILDDIR}" ]; then
		ADDFLAGS="${ADDFLAGS} -I${TCLBUILDDIR}"
	fi
	CFLAGS="${ADDFLAGS} ${CFLAGS}"
	CPPFLAGS="${ADDFLAGS} ${CPPFLAGS}"

	unset TCLVERS
	unset ADDFLAGS

	export TCLBUILDDIR TCLCONFIGDIR TCLPRIVATE CFLAGS CPPFLAGS
fi

# Determine platform
if [ -z "${FORCE_PLATFORM}" ]; then
	PLATFORM="$(./platform)"
	export PLATFORM
else

Added server/buildpkgs/tclpkcs11/build.sh version [2e24f26dd6].





































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
#! /bin/bash

if [ ! -x "../platform" ]; then
	echo "No platform script found, aborting." >&2

	exit 1
fi

if [ "${PLATFORM}" = "tcl" ]; then
	rm -rf out

	exit 0
fi

VERS=0.9.6
SRC="src/sqlite-${VERS}.tar.gz"
SRCURL="http://www.rkeene.org/devel/tclpkcs11-${VERS}.tar.gz"
BUILDDIR="tclpkcs11-${VERS}"
WORKDIR="${TMPDIR:-/tmp}/tclpkcs11-$$${RANDOM}${RANDOM}${RANDOM}"
PLATDIR="$(pwd)/out/${PLATFORM}"

export VERS SRC SRCURL BUILDDIR WORKDIR PLATDIR

if [ ! -f "${SRC}" ]; then
	mkdir src >/dev/null 2>/dev/null

	wget -O "${SRC}" "${SRCURL}" || exit 1
fi

(
	rm -rf build
	mkdir -p "${PLATDIR}" >/dev/null 2>/dev/null
	mkdir build

	cd build/ || exit 1

	gzip -dc "../${SRC}" | tar -xf -
	cd "${BUILDDIR}" || exit 1

	./configure --enable-shared --with-tcl="${TCLCONFIGDIR}" ${CONFIGUREEXTRA}

	${MAKE:-make} || exit 1

	cp tclpkcs11.so tclpkcs11.sl tclpkcs11.dylib tclpkcs11.dll "${PLATDIR}" >/dev/null 2>/dev/null
	cp pkgIndex.tcl "${PLATDIR}"
) || exit 1

../create_teapot "${PLATDIR}/teapot.txt" "tclpkcs11" "${VERS}" "${SRCURL}" "${PLATFORM}" "Tcl 8.4, pki" "TclPKCS11 is a package to provide PKCS#11 cryptography support to Tcl.  This will let you offload cryptographic operations onto a dedicated hardware or software module."

exit 0