Check-in [eb2922d636]
Overview
SHA1:eb2922d6369200bd20f160b0bb4a0c87a121bf2f
Date: 2014-12-19 02:08:04
User: rkeene
Comment:Added yajltcl support
Timelines: family | ancestors | descendants | both | trunk
Downloads: Tarball | ZIP archive
Other Links: files | file ages | folders | manifest
Tags And Properties
Context
2014-12-19
02:18
[7be354cf06] Added recently added extensions to the web interface (user: rkeene, tags: trunk)
02:08
[eb2922d636] Added yajltcl support (user: rkeene, tags: trunk)
01:11
[966987c964] Added TclUDP support (user: rkeene, tags: trunk)
Changes

Modified .fossil-settings/ignore-glob from [a196c5bbbb] to [e36d46f2b3].

119
120
121
122
123
124
125









126
127
128
129
130
131
132
udp/build.log
udp/inst
udp/inst/*
udp/out
udp/out/*
udp/src
udp/src/*









kitdll/buildsrc/kitdll-0.0/starpack.vfs
kitdll/buildsrc/kitdll-0.0/starpack.vfs/*
kitdll/buildsrc/kitdll-0.0/test
kitdll/buildsrc/kitdll-0.0/configure
kitdll/buildsrc/kitdll-0.0/libtcl*.so
kitdll/buildsrc/kitdll-0.0/Makefile
kitdll/buildsrc/kitdll-0.0/*.o







>
>
>
>
>
>
>
>
>







119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
udp/build.log
udp/inst
udp/inst/*
udp/out
udp/out/*
udp/src
udp/src/*
yajltcl/build
yajltcl/build/*
yajltcl/build.log
yajltcl/inst
yajltcl/inst/*
yajltcl/out
yajltcl/out/*
yajltcl/src
yajltcl/src/*
kitdll/buildsrc/kitdll-0.0/starpack.vfs
kitdll/buildsrc/kitdll-0.0/starpack.vfs/*
kitdll/buildsrc/kitdll-0.0/test
kitdll/buildsrc/kitdll-0.0/configure
kitdll/buildsrc/kitdll-0.0/libtcl*.so
kitdll/buildsrc/kitdll-0.0/Makefile
kitdll/buildsrc/kitdll-0.0/*.o

Modified kitcreator from [5f7e210f4a] to [c1ea36ee46].

26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
if [ -f 'build/pre.sh' ]; then
	if ! find 'kitsh/buildsrc/' -name configure -type f 2>/dev/null | grep configure >/dev/null; then
		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"

# Always rebuild kitsh
rm -f "kitsh/.success"
for pkg in ${KITCREATOR_ALLPKGS} ${KITCREATOR_PKGS}; do
	if [ "${mode}" != "retry" -o ! -f "${pkg}/.success" ]; then
		rm -f "${pkg}/build.log" "${pkg}/.success"
		rm -rf "${pkg}/out" "${pkg}/inst" "${pkg}/build"







|







26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
if [ -f 'build/pre.sh' ]; then
	if ! find 'kitsh/buildsrc/' -name configure -type f 2>/dev/null | grep configure >/dev/null; then
		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"

# Always rebuild kitsh
rm -f "kitsh/.success"
for pkg in ${KITCREATOR_ALLPKGS} ${KITCREATOR_PKGS}; do
	if [ "${mode}" != "retry" -o ! -f "${pkg}/.success" ]; then
		rm -f "${pkg}/build.log" "${pkg}/.success"
		rm -rf "${pkg}/out" "${pkg}/inst" "${pkg}/build"

Added yajltcl/build.sh version [ba99dc5121].





































































































































































































































































































































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

if [ ! -f 'build.sh' ]; then
	echo 'ERROR: This script must be run from the directory it is in' >&2

	exit 1
fi
if [ -z "${TCLVERS}" ]; then
	echo 'ERROR: The TCLVERS environment variable is not set' >&2

	exit 1
fi

YAJLTCLVERS="1.5"
YAJLVERS='2.1.0'
SRC="src/yajltcl-${YAJLTCLVERS}.tar.gz"
YAJLSRC="src/yajl-${YAJLVERS}.tar.gz"
SRCURL="https://github.com/flightaware/yajl-tcl/archive/v${YAJLTCLVERS}.tar.gz"
YAJLSRCURL="http://github.com/lloyd/yajl/tarball/${YAJLVERS}"
BUILDDIR="$(pwd)/build/yajl-tcl-${YAJLTCLVERS}"
YAJLBUILDDIR="$(pwd)/build/lloyd-yajl-66cb08c"
OUTDIR="$(pwd)/out"
INSTDIR="$(pwd)/inst"
PATCHDIR="$(pwd)/patches"
export YAJLTCLVERS SRC SRCURL BUILDDIR OUTDIR INSTDIR PATCHDIR

# Set configure options for this sub-project
LDFLAGS="${LDFLAGS} ${KC_YAJLTCL_LDFLAGS}"
CFLAGS="${CFLAGS} ${KC_YAJLTCL_CFLAGS}"
CPPFLAGS="${CPPFLAGS} ${KC_YAJLTCL_CPPFLAGS}"
LIBS="${LIBS} ${KC_YAJLTCL_LIBS}"
export LDFLAGS CFLAGS CPPFLAGS LIBS

rm -rf 'build' 'out' 'inst'
mkdir 'build' 'out' 'inst' || exit 1

if [ ! -d 'buildsrc' ]; then
	mkdir 'src' >/dev/null 2>/dev/null

	if [ ! -f "${SRC}" ]; then
		rm -f "${SRC}.tmp"
		wget -O "${SRC}.tmp" "${SRCURL}" || exit 1
		mv "${SRC}.tmp" "${SRC}"
	fi

	if [ ! -f "${YAJLSRC}" ]; then
		rm -f "${YAJLSRC}.tmp"
		wget -O "${YAJLSRC}.tmp" "${YAJLSRCURL}" || exit 1
		mv "${YAJLSRC}.tmp" "${YAJLSRC}"
	fi
fi

(
	cd 'build' || exit 1

	if [ ! -d '../buildsrc' ]; then
		gzip -dc "../${SRC}" | tar -xf -
		gzip -dc "../${YAJLSRC}" | tar -xf -
	else    
		cp -rp ../buildsrc/* './'
	fi

	# Build YAJL
	(
		cd "${YAJLBUILDDIR}" || exit 1
		./configure -p "$(pwd)/INST" || exit 1
		make || exit 1
		make install || exit 1
		rm -f INST/lib/*.so*
		mv INST/lib/libyajl_s.a INST/lib/libyajl.a || exit 1
	) || exit 1

	# Include YAJL's build in our pkg-config path
	PKG_CONFIG_PATH="${YAJLBUILDDIR}/INST/share/pkgconfig"
	YAJL_CFLAGS="-I${YAJLBUILDDIR}/INST/include -I${YAJLBUILDDIR}/INST/include/yajl"
	export PKG_CONFIG_PATH YAJL_CFLAGS

	# Build YAJL-TCL
	cd "${BUILDDIR}" || exit 1

	# YAJLTCL releases are incomplete -- they lack a configure script
	autoconf || exit 1

	# Try to build as a shared object if requested
	if [ "${STATICYAJLTCL}" = "0" ]; then
		tryopts="--enable-shared --disable-shared"
	elif [ "${STATICYAJLTCL}" = "-1" ]; then
		tryopts="--enable-shared"
	else
		tryopts="--disable-shared"
	fi

	SAVE_CFLAGS="${CFLAGS}"
	for tryopt in $tryopts __fail__; do
		if [ "${tryopt}" = "__fail__" ]; then
			exit 1
		fi
		# Clean up, if needed
		make distclean >/dev/null 2>/dev/null
		rm -rf "${INSTDIR}"
		mkdir "${INSTDIR}"

		if [ "${tryopt}" == "--enable-shared" ]; then
			isshared="1"
		else
			isshared="0"
		fi

		# If build a static YAJLTCL for KitDLL, ensure that we use PIC
		# so that it can be linked into the shared object
		if [ "${isshared}" = "0" -a "${KITTARGET}" = "kitdll" ]; then
			CFLAGS="${SAVE_CFLAGS} -fPIC"
		else
			CFLAGS="${SAVE_CFLAGS}"
		fi
		export CFLAGS

		if [ "${isshared}" = '0' ]; then
			sed 's@USE_TCL_STUBS@XXX_TCL_STUBS@g' configure > configure.new
		else
			sed 's@XXX_TCL_STUBS@USE_TCL_STUBS@g' configure > configure.new
		fi
		cat configure.new > configure
		rm -f configure.new

		(
			echo "Running: ./configure $tryopt --prefix=\"${INSTDIR}\" --exec-prefix=\"${INSTDIR}\" --libdir=\"${INSTDIR}/lib\" --with-tcl=\"${TCLCONFIGDIR}\" ${CONFIGUREEXTRA}"
			./configure $tryopt --prefix="${INSTDIR}" --exec-prefix="${INSTDIR}" --libdir="${INSTDIR}/lib" --with-tcl="${TCLCONFIGDIR}" ${CONFIGUREEXTRA}

			echo "Running: ${MAKE:-make} tcllibdir=\"${INSTDIR}/lib\""
			${MAKE:-make} tcllibdir="${INSTDIR}/lib" || exit 1

			echo "Running: ${MAKE:-make} tcllibdir=\"${INSTDIR}/lib\" install"
			${MAKE:-make} tcllibdir="${INSTDIR}/lib" install || exit 1
		) || continue

		if [ "${isshared}" = '0' ]; then
			# Copy static libyajl to INSTDIR
			mkdir -p "${INSTDIR}/lib/deps"
			cp "${YAJLBUILDDIR}/INST/lib/libyajl.a" "${INSTDIR}/lib/zz-libyajl.a" || exit 1
		fi

		break
	done

	# Create pkgIndex if needed
	if [ ! -e "${INSTDIR}/lib/yajltcl${YAJLTCLVERS}/pkgIndex.tcl" ]; then
		cat << _EOF_ > "${INSTDIR}/lib/yajltcl${YAJLTCLVERS}/pkgIndex.tcl"
package ifneeded yajltcl ${YAJLTCLVERS} \
    "[list load {} yajltcl]; \
    [list source [file join \$dir yajl.tcl]]"
_EOF_
	fi

	# Install files needed by installation
	cp -r "${INSTDIR}/lib" "${OUTDIR}" || exit 1
	find "${OUTDIR}" -name '*.a' -type f | xargs -n 1 rm -f --

	exit 0
) || exit 1

exit 0