Check-in [d4584bf4ae]
Overview
Comment:Updated to attempt to determine OS from magic of built Tcl Updated to pass arguments from the command line to subsequent "build.sh" scripts Fixed issue on "dict" where "out" was being cleaned up
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: d4584bf4ae88b90526749b5166a3a70217b82ef8
User & Date: rkeene on 2010-02-09 14:39:28
Other Links: manifest | tags
Context
2010-02-09
14:53
Added sqlite3 compliation check-in: 1ff15eb03f user: rkeene tags: trunk
14:39
Updated to attempt to determine OS from magic of built Tcl Updated to pass arguments from the command line to subsequent "build.sh" scripts Fixed issue on "dict" where "out" was being cleaned up check-in: d4584bf4ae user: rkeene tags: trunk
2010-02-06
22:37
Added dict package Made tls package more consistent with other packages check-in: 65ce01732d user: rkeene tags: trunk
Changes

Modified .fossil-settings/ignore-glob from [37900b3cfd] to [d710c30e5c].

8
9
10
11
12
13
14


15
16
17
18
19
20
21
22
23
24
25
26
server/buildpkgs/Tclx/src/*
server/buildpkgs/dict/build
server/buildpkgs/dict/build/*
server/buildpkgs/dict/out
server/buildpkgs/dict/out/*
server/buildpkgs/dict/src
server/buildpkgs/dict/src/*


server/buildpkgs/tcl
server/buildpkgs/tcl/*
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/*







>
>












8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
server/buildpkgs/Tclx/src/*
server/buildpkgs/dict/build
server/buildpkgs/dict/build/*
server/buildpkgs/dict/out
server/buildpkgs/dict/out/*
server/buildpkgs/dict/src
server/buildpkgs/dict/src/*
server/buildpkgs/platform.magic.*
server/buildpkgs/platform.magic.*/*
server/buildpkgs/tcl
server/buildpkgs/tcl/*
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/Tclx/build.sh from [efebbc9ef2] to [e6281d406a].

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#! /bin/bash

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

	exit 1
fi

VERS=8.4
SRC="src/tclx${VERS}.tar.bz2"
SRCURL="http://sourceforge.net/projects/tclx/files/TclX/${VERS}.0/tclx${VERS}.tar.bz2/download"
BUILDDIR="tclx${VERS}"
WORKDIR="${TMPDIR:-/tmp}/tclx-$$${RANDOM}${RANDOM}${RANDOM}"
PLATFORM="$(../platform)"
PLATDIR="$(pwd)/out/${PLATFORM}"

export VERS SRC SRCURL BUILDDIR WORKDIR PLATFORM PLATDIR

(
	rm -rf build
	mkdir build
) || exit 1

if [ ! -f "${SRC}" ]; then













<


|







1
2
3
4
5
6
7
8
9
10
11
12
13

14
15
16
17
18
19
20
21
22
23
#! /bin/bash

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

	exit 1
fi

VERS=8.4
SRC="src/tclx${VERS}.tar.bz2"
SRCURL="http://sourceforge.net/projects/tclx/files/TclX/${VERS}.0/tclx${VERS}.tar.bz2/download"
BUILDDIR="tclx${VERS}"
WORKDIR="${TMPDIR:-/tmp}/tclx-$$${RANDOM}${RANDOM}${RANDOM}"

PLATDIR="$(pwd)/out/${PLATFORM}"

export VERS SRC SRCURL BUILDDIR WORKDIR PLATDIR

(
	rm -rf build
	mkdir build
) || exit 1

if [ ! -f "${SRC}" ]; then
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
+    char *srcChannelId = NULL, *targetChannelId;
 
     if ((objc < 2) || (objc > 3)) {
         return TclX_WrongArgs (interp, objv [0],
__EOF__


	bash ./configure --enable-shared --with-tcl="${TCLCONFIGDIR}" --libdir="${PLATDIR}"
	${MAKE:-make} || exit 1

	mkdir -p "${PLATDIR}" >/dev/null 2>/dev/null

	${MAKE:-make} install-lib-binaries PKG_DIR='' || exit 1

) || exit 1

../create_teapot "${PLATDIR}/teapot.txt" "Tclx" "${VERS}" "${SRCURL}" "${PLATFORM}" "Tcl 8.4" "Extended Tcl"

exit 0







|











76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
+    char *srcChannelId = NULL, *targetChannelId;
 
     if ((objc < 2) || (objc > 3)) {
         return TclX_WrongArgs (interp, objv [0],
__EOF__


	bash ./configure --enable-shared --with-tcl="${TCLCONFIGDIR}" --libdir="${PLATDIR}" ${CONFIGUREEXTRA}
	${MAKE:-make} || exit 1

	mkdir -p "${PLATDIR}" >/dev/null 2>/dev/null

	${MAKE:-make} install-lib-binaries PKG_DIR='' || exit 1

) || exit 1

../create_teapot "${PLATDIR}/teapot.txt" "Tclx" "${VERS}" "${SRCURL}" "${PLATFORM}" "Tcl 8.4" "Extended Tcl"

exit 0

Modified server/buildpkgs/build_all.sh from [b9b3d01220] to [3c49d360c7].

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

if [ ! -x "./platform" ]; then
	echo 'ERROR: Platform script not found: ./platform' >&2

	exit 1
fi

CLEANONLY=0
DISTCLEAN=0
if [ "$1" = "clean" ]; then

	CLEANONLY=1
fi
if [ "$1" = "distclean" ]; then

	CLEANONLY=1
	DISTCLEAN=1
fi
export CLEANONLY DISTCLEAN




# Determine path to "tclConfig.sh"
rm -rf tcl/build

if [ "${DISTCLEAN}" = "1" ]; then
	rm -rf tcl
fi

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



	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

	echo "Building Tcl ${TCLVERS}"
	(
		mkdir tcl/build >/dev/null 2>/dev/null
		cd tcl/build || exit 1
		gzip -dc "../src/tcl${TCLVERS}.tar.gz" | tar -xf -


		cd "${TCLPRIVATE}/unix" || exit 1


		./configure --enable-shared

		${MAKE:-make}
















	) > "tcl/build/build.log" 2>&1



	if [ -d "${TCLPRIVATE}" -a -f "${TCLPRIVATE}/unix/tclConfig.sh" ]; then




		TCLCONFIGDIR="${TCLPRIVATE}/unix"
	else
		unset TCLPRIVATE

		TCLCONFIGDIR=$(
			(
				echo "${LD_LIBRARY_PATH}" | tr ':' "\n"
				cat /etc/ld.so.conf 2>/dev/null
				crle 2>/dev/null | grep '^ *Default Library Path' | sed 's@^ *Default Library Path[^:]*:[^:]*/@/@' | tr ':' "\n"
			) | grep '^/' | while read chklibdir; do
				if [ -f "${chklibdir}/tclConfig.sh" ]; then
					echo "${chklibdir}"
					break
				fi
			done
		)
		if [ -z "${TCLCONFIGDIR}" ]; then
			TCLCONFIGDIR="/usr/lib"
		fi

		TCLPRIVATE="${TCLCONFIGDIR}/../include/tcl-private"
	fi

	ADDFLAGS="-I${TCLPRIVATE} -I${TCLPRIVATE}/generic -I${TCLPRIVATE}/unix"
	CFLAGS="${ADDFLAGS} ${CFLAGS}"
	CPPFLAGS="${ADDFLAGS} ${CPPFLAGS}"

	unset TCLVERS
	unset ADDFLAGS

	export TCLCONFIGDIR TCLPRIVATE CFLAGS CPPFLAGS
fi

# Determine platform
PLATFORM="$(./platform)"
export PLATFORM












>



>





>
>
>


>







>
>














>
|

>
|

|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
>
>
|
|
>
>
>
>
|



















|


|





>







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

if [ ! -x "./platform" ]; then
	echo 'ERROR: Platform script not found: ./platform' >&2

	exit 1
fi

CLEANONLY=0
DISTCLEAN=0
if [ "$1" = "clean" ]; then
	shift
	CLEANONLY=1
fi
if [ "$1" = "distclean" ]; then
	shift
	CLEANONLY=1
	DISTCLEAN=1
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

	echo "Building Tcl ${TCLVERS}"
	(
		mkdir tcl/build >/dev/null 2>/dev/null
		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 'puts "$::tcl_platform(os)"' | ./tclsh*.exe > "${PROJROOTDIR}/platform.magic.os" 2>/dev/null
			else
				echo 'puts "$::tcl_platform(os)"' | ./tclsh > "${PROJROOTDIR}/platform.magic.os" 2>/dev/null
			fi
			echo "${dir}" > "${PROJROOTDIR}/platform.magic.platform"
			pwd > "${PROJROOTDIR}/platform.magic.dir"

			break
		done
	) > "tcl/build/build.log" 2>&1 || (
		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"
				cat /etc/ld.so.conf 2>/dev/null
				crle 2>/dev/null | grep '^ *Default Library Path' | sed 's@^ *Default Library Path[^:]*:[^:]*/@/@' | tr ':' "\n"
			) | grep '^/' | while read chklibdir; do
				if [ -f "${chklibdir}/tclConfig.sh" ]; then
					echo "${chklibdir}"
					break
				fi
			done
		)
		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
PLATFORM="$(./platform)"
export PLATFORM

Modified server/buildpkgs/dict/build.sh from [d1b93160fd] to [a8c213b541].

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

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

	exit 1
fi

VERS=8.5.2
SRC="src/tclDict-${VERS}.tar.gz"
SRCURL="http://pascal.scheffers.net/software/tclDict-${VERS}.tar.gz"
BUILDDIR="tclDict-${VERS}"
WORKDIR="${TMPDIR:-/tmp}/dict-$$${RANDOM}${RANDOM}${RANDOM}"
PLATFORM="$(../platform)"
PLATDIR="$(pwd)/out/${PLATFORM}"

export VERS SRC SRCURL BUILDDIR WORKDIR PLATFORM PLATDIR

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

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

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

	cd build/ || exit 1

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

	# This fixes a well-known, long-standing failure in many Tcl
	# configure scripts
	sed "s@ /etc/\\.relid'@ '/etc/.relid'@" configure > configure.new
	cat configure.new > configure
	rm -f configure.new

	./configure --enable-shared --with-tcl="${TCLCONFIGDIR}" --prefix="${PLATDIR}" --libdir="${PLATDIR}" --bindir="${PLATDIR}"

	${MAKE:-make} || exit 1

	${MAKE:-make} install-binaries PKG_DIR='' || exit 1

	rm -f "${PLATDIR}"/*.a
) || exit 1

../create_teapot "${PLATDIR}/teapot.txt" "dict" "${VERS}" "${SRCURL}" "${PLATFORM}" "Tcl 8.4" "Dict Backports for Tcl 8.4"

exit 0













<


|








|














|











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

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

	exit 1
fi

VERS=8.5.2
SRC="src/tclDict-${VERS}.tar.gz"
SRCURL="http://pascal.scheffers.net/software/tclDict-${VERS}.tar.gz"
BUILDDIR="tclDict-${VERS}"
WORKDIR="${TMPDIR:-/tmp}/dict-$$${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

	# This fixes a well-known, long-standing failure in many Tcl
	# configure scripts
	sed "s@ /etc/\\.relid'@ '/etc/.relid'@" configure > configure.new
	cat configure.new > configure
	rm -f configure.new

	bash ./configure --enable-shared --with-tcl="${TCLCONFIGDIR}" --prefix="${PLATDIR}" --libdir="${PLATDIR}" --bindir="${PLATDIR}" ${CONFIGUREEXTRA}

	${MAKE:-make} || exit 1

	${MAKE:-make} install-binaries PKG_DIR='' || exit 1

	rm -f "${PLATDIR}"/*.a
) || exit 1

../create_teapot "${PLATDIR}/teapot.txt" "dict" "${VERS}" "${SRCURL}" "${PLATFORM}" "Tcl 8.4" "Dict Backports for Tcl 8.4"

exit 0

Modified server/buildpkgs/platform from [828b4fc7e9] to [c6457b56af].

1
2




3















































4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#! /bin/bash





case "`uname -s`" in















































	Linux)
		GLIBCVERS=$(strings /lib/libc.so.6 | grep '^GLIBC_[0-9][0-9]*\.[0-9]*' | cut -f 2- -d _ | cut -f 1-2 -d . | sed 's@\.@ @g' |  sort -n +0 +1 | tail -1 | sed 's@ @\.@g')

		case "`uname -m`" in
			i?86)
				CPUPLAT="ix86"
				;;
			sun4?)
				CPUPLAT="sparc"
				;;
			*)
				CPUPLAT="`uname -m`"
				;;
		esac

		echo "linux-glibc${GLIBCVERS}-${CPUPLAT}"
		;;
	SunOS)
		SUNMAJVER=$(uname -r | cut -f 1 -d .)
		SUNMINVER=$(uname -r | cut -f 2 -d .)


>
>
>
>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>



|






<
<
<







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

MAGICFILEFILE="$0.magic.file"
MAGICOSFILE="$0.magic.os"
MAGICPLATFILE="$0.magic.platform"

OSNAME="`uname -s`"
CPUPLAT="`uname -m`"

if [ -f "${MAGICFILEFILE}" -a -f "${MAGICOSFILE}" -a -f "${MAGICPLATFILE}" ]; then
	MAGICPLAT="$(cat "${MAGICPLATFILE}")"
	MAGICOS="$(cat "${MAGICOSFILE}")"
	MAGICFILE="$(cat "${MAGICFILEFILE}" | dd conv=lcase 2>/dev/null)"

	case "${MAGICPLAT}" in
		unix)
			case "${MAGICFILE}" in
				*elf*x86-64*)
					CPUPLAT="x86_64"
					;;
				*elf*intel\ 80386*)
					CPUPLAT="ix86"
					;;
				*parisc*)
					CPUPLAT="parisc"
					;;
				*elf*32-bit*sparc*)
					CPUPLAT="sparc"
					;;
				*elf*64-bit*sparc*)
					CPUPLAT="sparc64"
					;;
			esac

			if [ "${MAGICOS}" != "`uname -s`" ]; then
				# Cross compiling, try to determine OS ...
				true
			fi
			;;
		win)
			if grep "64-bit" "${MAGICFILEFILE}" >/dev/null; then
				echo "win32-x86_64"
			else
				echo "win32-ix86"
			fi

			exit 0
			;;
		macosx)
			;;
	esac
fi

case "${OSNAME}" in
	Linux)
		GLIBCVERS=$(strings /lib/libc.so.6 | grep '^GLIBC_[0-9][0-9]*\.[0-9]*' | cut -f 2- -d _ | cut -f 1-2 -d . | sed 's@\.@ @g' |  sort -n +0 +1 | tail -1 | sed 's@ @\.@g')

		case "${CPUPLAT}" in
			i?86)
				CPUPLAT="ix86"
				;;
			sun4?)
				CPUPLAT="sparc"
				;;



		esac

		echo "linux-glibc${GLIBCVERS}-${CPUPLAT}"
		;;
	SunOS)
		SUNMAJVER=$(uname -r | cut -f 1 -d .)
		SUNMINVER=$(uname -r | cut -f 2 -d .)

Modified server/buildpkgs/tls/build.sh from [89436dfb5e] to [3a852f9bb4].

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#! /bin/bash

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

	exit 1
fi

VERS=1.6
SRC="src/tls${VERS}-src.tar.gz"
SRCURL="http://sourceforge.net/projects/tls/files/tls/${VERS}/tls${VERS}-src.tar.gz/download"
BUILDDIR="tls${VERS}"
WORKDIR="${TMPDIR:-/tmp}/tls-$$${RANDOM}${RANDOM}${RANDOM}"
PLATFORM="$(../platform)"
PLATDIR="$(pwd)/out/${PLATFORM}"

export VERS SRC SRCURL BUILDDIR WORKDIR PLATFORM PLATDIR

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

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














<


|







1
2
3
4
5
6
7
8
9
10
11
12
13

14
15
16
17
18
19
20
21
22
23
#! /bin/bash

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

	exit 1
fi

VERS=1.6
SRC="src/tls${VERS}-src.tar.gz"
SRCURL="http://sourceforge.net/projects/tls/files/tls/${VERS}/tls${VERS}-src.tar.gz/download"
BUILDDIR="tls${VERS}"
WORKDIR="${TMPDIR:-/tmp}/tls-$$${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

35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
			SSLDIR=$(echo "${chkssldir}" | sed 's@/[^/]*/*$@@')
		fi
	done
	if [ -z "${SSLDIR}" ]; then
		SSLDIR="/usr"
	fi

	./configure --enable-shared --with-tcl="${TCLCONFIGDIR}" --with-ssl-dir="${SSLDIR}"
	${MAKE:-make} || exit 1
) || exit 1

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

	cp "build/${BUILDDIR}/libtls1.6.so" "${PLATDIR}/"







|







34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
			SSLDIR=$(echo "${chkssldir}" | sed 's@/[^/]*/*$@@')
		fi
	done
	if [ -z "${SSLDIR}" ]; then
		SSLDIR="/usr"
	fi

	bash ./configure --enable-shared --with-tcl="${TCLCONFIGDIR}" --with-ssl-dir="${SSLDIR}" ${CONFIGUREEXTRA}
	${MAKE:-make} || exit 1
) || exit 1

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

	cp "build/${BUILDDIR}/libtls1.6.so" "${PLATDIR}/"