Check-in [a49ee9121f]
Overview
Comment:Added support for disabling "visibility=hidden" when building KitDLL
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: a49ee9121fdd12551746089399777b1a12f32f6f
User & Date: rkeene on 2011-03-03 05:01:51
Other Links: manifest | tags
Context
2011-03-03
11:30
Updated to remove "pkgs" directory from Tcl when doing a minimal build check-in: b29659c9d1 user: rkeene tags: trunk
05:01
Added support for disabling "visibility=hidden" when building KitDLL check-in: a49ee9121f user: rkeene tags: trunk
04:09
Updated to support pulling Tcl and Tk from newest fossil sources. They are still likely to change in the future. check-in: f5886050c4 user: rkeene tags: trunk
Changes

Modified tcl/build.sh from [f95adb2a3c] to [49efe2ef77].

67
68
69
70
71
72
73

74
75
76
77
78
79
80
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81







+







				find "tcl${TCLVERS}" '(' -name install-sh -o -name install.sh ')' -type f | xargs chmod +x

				tar -cf - "tcl${TCLVERS}" | gzip -c > "../${SRC}"
			fi

			rm -f "tmp-tcl.zip" "tmp-itcl.zip" "tmp-thread.zip" "tmp-tclconfig.zip"
			rm -rf "tcl-${CVSTAG}" "itcl-${CVSTAG}" "thread-${CVSTAG}" "tclconfig-${CVSTAG}"
			rm -rf "tcl${TCLVERS}"
		)
	else
		rm -f "${SRC}.tmp"
		wget -O "${SRC}.tmp" "${SRCURL}" || exit 1
		mv "${SRC}.tmp" "${SRC}"
	fi
fi
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
109
110
111
112
113
114
115











116
117
118
119
120
121
122







-
-
-
-
-
-
-
-
-
-
-








			(
				. "${patchscript}"
			)
		fi
	done

	# Patch Win32 builds to always provide DllMain if we are building KitDLL
	if [ "${KITTARGET}" = "kitdll" ]; then
		## DllMain is needed when building KitDLL
		for filetopatch in win/tclWin32Dll.c win/tclWinInit.c; do
			echo "Undefining STATIC_BUILD in \"${filetopatch}\""

			sed 's@STATIC_BUILD@NEVER_STATIC_BUILD@g' "${filetopatch}" > "${filetopatch}.new" && cat "${filetopatch}.new" > "${filetopatch}"
			rm -f "${filetopatch}.new"
		done
	fi

	for dir in unix win macosx __fail__; do
		if [ "${dir}" = "__fail__" ]; then
			# If we haven't figured out how to build it, reject.

			exit 1
		fi

Added tcl/patchscripts/visibility-unhidden.sh version [05e06e331d].












1
2
3
4
5
6
7
8
9
10
11
+
+
+
+
+
+
+
+
+
+
+
#! /bin/bash

if [ "${KITTARGET}" != "kitdll" ]; then
	exit 0
fi

for file in unix/configure; do
	sed 's@-fvisibility@-__disabled__fvisibility@' "${file}" > "${file}.new"
	cat "${file}.new" > "${file}"
	rm -f "${file}.new"
done

Added tcl/patchscripts/win32-dllmain.sh version [610ea73aa0].














1
2
3
4
5
6
7
8
9
10
11
12
13
+
+
+
+
+
+
+
+
+
+
+
+
+
#! /bin/bash

if [ "${KITTARGET}" != "kitdll" ]; then
	exit 0
fi

## DllMain is needed when building KitDLL
for filetopatch in win/tclWin32Dll.c win/tclWinInit.c; do
	echo "Undefining STATIC_BUILD in \"${filetopatch}\""

	sed 's@STATIC_BUILD@NEVER_STATIC_BUILD@g' "${filetopatch}" > "${filetopatch}.new" && cat "${filetopatch}.new" > "${filetopatch}"
	rm -f "${filetopatch}.new"
done

Modified tk/build.sh from [54785bdfbe] to [b819ea7b3f].

13
14
15
16
17
18
19

20

21
22
23
24
25
26
27
13
14
15
16
17
18
19
20

21
22
23
24
25
26
27
28







+
-
+








SRC="src/tk${TCLVERS}.tar.gz"
SRCURL="http://prdownloads.sourceforge.net/tcl/tk${TCLVERS}-src.tar.gz"
BUILDDIR="$(pwd)/build/tk${TCLVERS}"
PATCHDIR="$(pwd)/patches"
OUTDIR="$(pwd)/out"
INSTDIR="$(pwd)/inst"
PATCHSCRIPTDIR="$(pwd)/patchscripts"
export SRC SRCURL BUILDDIR PATCHDIR OUTDIR INSTDIR
export SRC SRCURL BUILDDIR PATCHDIR OUTDIR INSTDIR PATCHSCRIPTDIR

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

# Determine Tcl version
TCL_VERSION="unknown"
if [ -f "${TCLCONFIGDIR}/tclConfig.sh" ]; then
54
55
56
57
58
59
60

61
62
63
64
65
66
67
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69







+







			if [ -d "tk${TCLVERS}" ]; then
				find "tk${TCLVERS}" -name configure -type f | xargs chmod +x
                                
				tar -cf - "tk${TCLVERS}" | gzip -c > "../${SRC}"
			fi

			rm -f "tmp-tk.zip"
			rm -rf "tk-${CVSTAG}"
			rm -rf "tk${TCLVERS}"
		)
	else
		rm -f "${SRC}.tmp"
		wget -O "${SRC}.tmp" "${SRCURL}" || exit 1
		mv "${SRC}.tmp" "${SRC}"
	fi
96
97
98
99
100
101
102











103
104
105
106
107
108
109
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







+
+
+
+
+
+
+
+
+
+
+







				continue
			fi

			echo "Applying: ${patch}"
			${PATCH:-patch} -p1 < "${patch}"
		done
	)

	# Apply patch scripts if needed
	for patchscript in "${PATCHSCRIPTDIR}"/*.sh; do
		if [ -f "${patchscript}" ]; then
			echo "Running patch script: ${patchscript}"
                                
			(
				. "${patchscript}"
			)
		fi
	done

	for dir in unix win macosx win64 __fail__; do
		if [ "${dir}" = "__fail__" ]; then
			exit 1
		fi

		# Windows/amd64 workarounds

Added tk/patchscripts/visibility-unhidden.sh version [05e06e331d].












1
2
3
4
5
6
7
8
9
10
11
+
+
+
+
+
+
+
+
+
+
+
#! /bin/bash

if [ "${KITTARGET}" != "kitdll" ]; then
	exit 0
fi

for file in unix/configure; do
	sed 's@-fvisibility@-__disabled__fvisibility@' "${file}" > "${file}.new"
	cat "${file}.new" > "${file}"
	rm -f "${file}.new"
done