Comment: | Merged trunk changes into branch |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | pluggable |
Files: | files | file ages | folders |
SHA1: |
ddf9f18c93bf50d72eba13d6efc571c3 |
User & Date: | rkeene on 2011-05-28 23:59:40 |
Other Links: | branch diff | manifest | tags |
2011-05-31
| ||
02:03 | Updated to be pluggable Closed-Leaf check-in: 349896fca7 user: rkeene tags: pluggable | |
2011-05-28
| ||
23:59 | Merged trunk changes into branch check-in: ddf9f18c93 user: rkeene tags: pluggable | |
23:53 |
Updated to only mount VFS once
Updated to always load "vfs" check-in: d5ed5900eb user: rkeene tags: trunk | |
2011-02-08
| ||
06:55 | Updated to look in all directories at the root directory for projects check-in: e2655f79ba user: rkeene tags: pluggable | |
Modified README from [b320dd82ca] to [f55796d36b].
|
| | > | 1 2 3 4 5 6 7 8 9 | This will build a Tclkit named "tclkit-<version>" or a KitDLL named "libtclkit<version>.so". --------------- Using This Tool --------------- Usage: kitcreator [{<version> | cvs_<cvsTag> | clean | distclean}] [<configure_options...>] |
︙ | ︙ | |||
56 57 58 59 60 61 62 | a. KITCREATOR_PKGS='tk itcl' b. export KITCREATOR_PKGS c. ./kitcreator 9. Create a Tclkit with Metakit4 support, but using Zip for storage: a. $ ./kitcreator --enable-kit-storage=zip | > > > | | 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 | a. KITCREATOR_PKGS='tk itcl' b. export KITCREATOR_PKGS c. ./kitcreator 9. Create a Tclkit with Metakit4 support, but using Zip for storage: a. $ ./kitcreator --enable-kit-storage=zip 10. Create a Tclkit with Metakit4 support, but using C-VFS for storage a. $ ./kitcreator --enable-kit-storage=cvfs 11. Create a KitDLL without Metakit support (will not create a Tclkit binary, just the library): a. $ KITCREATOR_PKGS='tk itcl kitdll' b. $ export KITCREATOR_PKGS c. $ ./kitcreator Environment variables: 1. MAKE |
︙ | ︙ | |||
123 124 125 126 127 128 129 130 131 132 133 134 135 136 | ascii.enc cp1252.enc iso8859-1.enc iso8859-15.enc iso8859-2.enc koi8-r.enc macRoman.enc 9. KITCREATOR_MINBUILD Set this variable to a non-empty string to exclude unnecessary packages from Tcl build. This excludes the following packages: tcltest Kitsh Configure Options: 1. --enable-kit-storage={zip|mk4|auto} Specify which type of storage to use with the Tclkit. The default is to auto-detect. Auto-detection uses Mk4 if available and built statically, otherwise it falls back to Zip. | > > > > | 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 | ascii.enc cp1252.enc iso8859-1.enc iso8859-15.enc iso8859-2.enc koi8-r.enc macRoman.enc 9. KITCREATOR_MINBUILD Set this variable to a non-empty string to exclude unnecessary packages from Tcl build. This excludes the following packages: tcltest Additionally, any bundled packages (in the "pkgs" directory) are excluded. This typically includes (as of Tcl 8.6): itcl thread Kitsh Configure Options: 1. --enable-kit-storage={zip|mk4|auto} Specify which type of storage to use with the Tclkit. The default is to auto-detect. Auto-detection uses Mk4 if available and built statically, otherwise it falls back to Zip. |
︙ | ︙ |
Added build/make-kit-linux-amd64 version [f5a7e70fab].
> > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 | #! /bin/sh PATH="${PATH}:${HOME}/root/cross-compilers/x86_64-unknown-linux-gnu/bin/" AR=x86_64-unknown-linux-gnu-ar CC=x86_64-unknown-linux-gnu-gcc CXX=x86_64-unknown-linux-gnu-g++ RANLIB=x86_64-unknown-linux-gnu-ranlib STRIP=x86_64-unknown-linux-gnu-strip export PATH AR CC CXX RANLIB STRIP ./kitcreator "$@" --host=x86_64-unknown-linux-gnu |
Renamed and modified build/make-kit-arm [78d28dde77] to build/make-kit-mipsel [814a04e3a0].
1 2 | #! /bin/sh | | | | | | | | | 1 2 3 4 5 6 7 8 9 10 11 | #! /bin/sh PATH="${PATH}:/home/rkeene/root/cross-compilers/mipsel-unknown-linux-uclibc/bin" AR=mipsel-unknown-linux-uclibc-ar CC=mipsel-unknown-linux-uclibc-gcc CXX=mipsel-unknown-linux-uclibc-g++ RANLIB=mipsel-unknown-linux-uclibc-ranlib STRIP=mipsel-unknown-linux-uclibc-strip export PATH AR CC CXX RANLIB STRIP ./build/make-minkit "$@" --host=mipsel-unknown-linux-uclibc |
Modified build/makearch.info from [cebbe97a7e] to [2ff27f5bab].
︙ | ︙ | |||
12 13 14 15 16 17 18 | # If set to "auto" it will be maintained in a file called .version # in the source directory and the revision will be incremented # each time a "makearch" is done. # # If @@SVNLCR@@ is used anywhere in this version number, it will be # replaced with the highest last-changed-rev from the output of # svn info -R (or 0) | | | 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | # If set to "auto" it will be maintained in a file called .version # in the source directory and the revision will be incremented # each time a "makearch" is done. # # If @@SVNLCR@@ is used anywhere in this version number, it will be # replaced with the highest last-changed-rev from the output of # svn info -R (or 0) VERS="0.5.4" # Space sperated list of documents, if they exist, they will be # prefixed with the contents of the DOC_HDR file and substitution # will occur: # @@UTIL@@ becomes the utility name ${UTIL} # @@VERS@@ becomes the utility version # @@DATE@@ becomes the current date |
︙ | ︙ |
Modified build/pre.sh from [6536148eb0] to [2ce5e55131].
︙ | ︙ | |||
11 12 13 14 15 16 17 | rm -rf autom4te.cache rm -f *~ ./configure || exit 1 make boot.tcl.h make zipvfs.tcl.h | < < < < < < < < < < < < < < < | 11 12 13 14 15 16 17 18 19 20 21 22 23 | rm -rf autom4te.cache rm -f *~ ./configure || exit 1 make boot.tcl.h make zipvfs.tcl.h make distclean ) || exit 1 rm -f tcl/patchscripts/dietlibc.sh find . -name '.*.sw?' -type f | xargs rm -f |
Modified build/test/do-nightly-tests-and-publish from [5c58eff196] to [d2dcdb02e1].
1 2 3 4 5 6 7 | #! /bin/bash # Update PATH to include path to Tclkit, otherwise cross-compiles will fail PATH="${PATH}:/home/rkeene/bin:/usr/local/bin" export PATH # Define build and web paths | | > > | < | | > > > > | > > | | > | > > | > > > > | | < < < > > | > > > > > | > | > > > > > > > > | > > > | > | > > | > > > > > < > > > > | > > | 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 | #! /bin/bash # Update PATH to include path to Tclkit, otherwise cross-compiles will fail PATH="${PATH}:/home/rkeene/bin:/usr/local/bin" export PATH # Define build and web paths KITCREATORFOSSIL="/web/customers/kitcreator.rkeene.org/repo/kitcreator.repo" WEBROOTDIR="/web/rkeene/devel/kitcreator/kitbuild" MARKERFILE="/web/customers/kitcreator.rkeene.org/repo/__AUTO_TESTS_RUNNING__" TMPWORKDIR="${TMPDIR:-/var/tmp}/kitcreator-test-$$${RANDOM}${RANDOM}${RANDOM}" export KITCREATORFOSSIL WEBROOTDIR MARKERFILE TMPWORKDIR # Determine change of fossil revision on trunk FOSSIL_CHANGE="$(fossil timeline --repository "${KITCREATORFOSSIL}" children trunk -n 1 -t ci | grep '^[0-9:]* \[' | sed 's@^[0-9:]* \[\([0-9a-f]*\)\].*$@\1@')" TESTNAME="fossil_${FOSSIL_CHANGE}" export FOSSIL_CHANGE TESTNAME # Verify sanity issane=1 if [ -z "${FOSSIL_CHANGE}" ]; then echo "Unable to determine name of latest revision, likely missing Kitcreator Fossil Repo: ${KITCREATORFOSSIL}" >&2 issane=0 fi if [ ! -d "${WEBROOTDIR}" ]; then echo "Missing Web Root Directory: ${WEBROOTDIR}" >&2 issane=0 fi if [ "${issane}" = '0' ]; then exit 1 fi # On Wednesday, do a distclean to force redownloading everything (mainly # for CVS Head) and force a rebuild to ensure up-to-date build status if [ "$(date '+%u')" != "3" ]; then if [ -d "${WEBROOTDIR}/${TESTNAME}" ]; then # Don't re-run the tests if nothing has changed exit 0 fi fi # Only run one at a time if [ -f "${MARKERFILE}" ]; then exit 1 fi touch "${MARKERFILE}" # Change to temporary directory to build mkdir -p "${TMPWORKDIR}" chmod 700 "${TMPWORKDIR}" cd "${TMPWORKDIR}" || exit 1 # Define clean-up handler function die () { echo "$1" >&2 cd / rm -rf "${TMPWORKDIR}" exit 1 } # Download latest tarball wget -O 'kitcreator-trunk-tip.tar.gz' -o /dev/null "http://kitcreator.rkeene.org/fossil/tarball/kitcreator-trunk-tip.tar.gz?uuid=${FOSSIL_CHANGE}" tar -xf kitcreator-trunk-tip.tar.gz || die 'Tarball Extraction Failed' cd kitcreator-trunk-tip || die 'Tarball Sanity Failed' # Prepare source ./build/pre.sh >/dev/null 2>/dev/null # Start the tests cd build/test || die 'Missing test suite' if [ ! -x test -o ! -x publish-tests ]; then die 'Missing scripts, aborting.' fi # Clean builds rm -rf kits # Run tests nice -n 20 ./test >/dev/null 2>/dev/null # Clean old auto-generated published results rm -rf "${WEBROOTDIR}"/svn_r*/ "${WEBROOTDIR}"/fossil_*/ # Publish New Results ./publish-tests "${TESTNAME}" # Create nightly symlink rm -f "${WEBROOTDIR}/nightly" ln -s "${TESTNAME}" "${WEBROOTDIR}/nightly" # Clean rm -f "${MARKERFILE}" cd / rm -rf "${TMPWORKDIR}" exit 0 |
Modified build/test/index.ttml from [32e3b3a01b] to [6b17de7829].
1 2 3 4 5 | <html> <head> <title>KitCreator Build and Test Status</title> </head> <body> | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 | <html> <head> <title>KitCreator Build and Test Status</title> </head> <body> <h1><a href="http://kitcreator.rkeene.org/">KitCreator</a> Build and Test Status</h1> <p>The follow versions of KitCreator have test suite results:</p> <ul> <? set haveTests 0 foreach subdir [lsort -dictionary [glob -type d *]] { file lstat $subdir subdirinfo if {$subdirinfo(type) == "link"} { |
︙ | ︙ | |||
23 24 25 26 27 28 29 | puts " <li><a href=\"${subdir}/\">$subdir</a></li>" } ?> </ul> <? if {$haveTests} { ?> | | | 23 24 25 26 27 28 29 30 31 32 33 34 35 | puts " <li><a href=\"${subdir}/\">$subdir</a></li>" } ?> </ul> <? if {$haveTests} { ?> <p>The actual tests can be found in <a href="http://kitcreator.rkeene.org/fossil/dir?name=build/test/tests&ci=trunk">the "tests" directory</a></p> <? } ?> </body> </html> |
Modified build/test/publish-tests from [703dc23136] to [8f47d1a196].
︙ | ︙ | |||
201 202 203 204 205 206 207 208 209 210 211 212 213 | set kitinfo(cpu) $kitcpu set kitinfo(built) $kitbuilt # Store kit information with all kits set key [list $tclversion $kitos $kitcpu] lappend allkitinfo($key) [array get kitinfo] } puts $fd "<html>" puts $fd " <head>" puts $fd " <title>KitCreator Build and Test Status</title>" puts $fd " </head>" puts $fd " <body>" | > > > > > > > > > > > > > > > | | | 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 | set kitinfo(cpu) $kitcpu set kitinfo(built) $kitbuilt # Store kit information with all kits set key [list $tclversion $kitos $kitcpu] lappend allkitinfo($key) [array get kitinfo] } # Determine human readable name, and URL if {[string match "fossil_*" $kitcreator_vers]} { set work [split $kitcreator_vers _] set kitcreator_fossil_vers [lindex $work 1] set kitcreator_readable_vers "Fossil trunk check-in ${kitcreator_fossil_vers}" set url "http://kitcreator.rkeene.org/fossil/tarball/kitcreator-${kitcreator_vers}.tar.gz?uuid=${kitcreator_fossil_vers}" } else { set kitcreator_readable_vers $kitcreator_vers set url "http://www.rkeene.org/devel/kitcreator-${kitcreator_vers}.tar.gz" } puts $fd "<html>" puts $fd " <head>" puts $fd " <title>KitCreator Build and Test Status</title>" puts $fd " </head>" puts $fd " <body>" puts $fd " <h1><a href=\"http://kitcreator.rkeene.org/\">KitCreator</a> <a href=\"../\">Build and Test Status</a></h1>" puts $fd " <p>The following table represents the status of the test results from the KitCreator test suite for <a href=\"${url}\">KitCreator ${kitcreator_readable_vers}</a>.</p>" puts $fd " <table cellpadding=\"2\" border=\"1\">" foreach key [lsort -dictionary [array names allkitinfo]] { puts $fd " <tr>" puts $fd " <th colspan=\"5\"><u>Tclkit for [pretty_print_key $key]</u></th>" puts $fd " </tr>" puts $fd " <tr>" puts $fd " <th>Kit Features</th>" |
︙ | ︙ |
Modified build/test/test from [58637ff4f9] to [38851b5a2a].
︙ | ︙ | |||
49 50 51 52 53 54 55 | Xvfb :31 -screen 0 800x600x24 -nolisten tcp >/dev/null 2>/dev/null & echo "$!" )" DISPLAY=:31 export DISPLAY failed="" | | | 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | Xvfb :31 -screen 0 800x600x24 -nolisten tcp >/dev/null 2>/dev/null & echo "$!" )" DISPLAY=:31 export DISPLAY failed="" for kit in normal normal-zip normal-threaded normal-threaded-zip normal-statictk normal-notk normal-threaded-notk normal-threaded-zip-notk normal-nomk4 min min-static normal-kitdll normal-threaded-kitdll normal-notk-kitdll normal-nomk4-kitdll normal-nomk4-notk-kitdll normal-threaded-nomk4-kitdll normal-threaded-notk-nomk4-kitdll min-kitdll win32-i586 win32-i586-zip win32-i586-threaded win32-i586-threaded-zip win32-i586-notk win32-i586-threaded-notk win32-i586-nomk4 win32-i586-kitdll win32-i586-threaded-kitdll win32-i586-notk-kitdll win32-i586-nomk4-kitdll win32-i586-nomk4-notk-kitdll win32-i586-threaded-nomk4-kitdll win32-i586-threaded-notk-nomk4-kitdll linux-mipsel-min linux-mipsel-min-kitdll linux-amd64-notk linux-amd64-notk-kitdll; do kitcreator="./kitcreator" args="" runnable="1" iszip="0" statictk="0" notk="0" nomk4="0" |
︙ | ︙ | |||
85 86 87 88 89 90 91 | kit="${os}-${cpu}-min-static" ;; win32|win32-*) kitcreator="./build/make-kit-win32" xcompile="1" kitruncmd="wine" ;; | | | > > > > > > | 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 | kit="${os}-${cpu}-min-static" ;; win32|win32-*) kitcreator="./build/make-kit-win32" xcompile="1" kitruncmd="wine" ;; linux-mipsel-min|linux-mipsel-min-kitdll) kitcreator="./build/make-kit-mipsel" runnable="0" xcompile="1" notk="1" iszip="1" ;; linux-amd64|linux-amd64-*) kitcreator="./build/make-kit-linux-amd64" runnable="0" xcompile="1" iszip="0" ;; esac if [ "${xcompile}" != "0" ]; then kit="${kit}-xcompile" fi |
︙ | ︙ | |||
253 254 255 256 257 258 259 | ( echo "" echo "" echo "" echo " *** Building KitDLL test driver (tclsh)" echo "" | | | 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 | ( echo "" echo "" echo "" echo " *** Building KitDLL test driver (tclsh)" echo "" cd kitsh/build/kitsh-*/ || exit 1 make tclsh cp tclsh ../../../ ) >> "${buildlog}" 2>&1 fi # Perform wildcard expansion createdkit="$(ls -f1 ${createdkit} 2>/dev/null | head -n 1)" |
︙ | ︙ |
Modified build/test/tests/12-threads.tcl from [df3ccdde39] to [7bfac57b1d].
1 2 | #! /usr/bin/env tclsh | > | | | | | | | | | | | | | | | | | | | | | | | | > > > > | 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 | #! /usr/bin/env tclsh if {[catch { set buildflags [split [lindex $argv 1] -] # Determine if Threads was requested (or in 8.6+, unrequested) if {$tcl_version == "8.6"} { if {[lsearch -exact $buildflags "unthreaded"] == -1} { set isthreaded 1 } else { set isthreaded 0 } } else { if {[lsearch -exact $buildflags "threaded"] == -1} { set isthreaded 0 } else { set isthreaded 1 } } # Minimal builds don't come with threads. if {[lsearch -exact $buildflags "min"] != -1} { set isthreaded 0 } if {!$isthreaded} { exit 0 } package require Thread exit 0 }]} { puts "Error in Thread Test: $errorInfo" exit 1 } |
Added build/test/tests/16-itcl.tcl version [91f3c57960].
> > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | #! /usr/bin/env tclsh if {[catch { set buildflags [split [lindex $argv 1] -] # Determine if Itcl was was requested ## Minimal builds don't come with Itcl set hasitcl 1 if {[lsearch -exact $buildflags "min"] != -1} { set hasitcl 0 } if {!$hasitcl} { exit 0 } package require Itcl exit 0 }]} { puts "Error in Itcl Test: $errorInfo" exit 1 } |
Added build/web/Makefile version [a7224e283a].
> > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | STARKIT2EXE = ../../../starkit2exe/starkit2exe RIVET2STARKIT = ../../../rivet/bin/rivet2starkit kitcreator.cgi: kitcreator.kit $(STARKIT2EXE) kitcreator.kit kitcreator.cgi kitcreator.kit: kitcreator.vfs kitcreator.vfs/index.rvt $(RIVET2STARKIT) tclkit kitcreator.kit kitcreator.vfs clean: rm -f kitcreator.kit kitcreator.cgi distclean: clean .PHONY: clean distclean |
Added build/web/kitcreator.vfs/index.rvt version [aaeb907791].
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 | <? set sourcedir "/web/rkeene/devel/kitcreator/all" foreach file [glob -tails -nocomplain -directory $sourcedir "kitcreator-*.tar.gz"] { regexp {^kitcreator-(.*).tar.gz$} $file -> vers set kitcreator_versions($vers) $vers } set kitcreator_version_selected [lindex [lsort -dictionary [array names kitcreator_versions]] end] set kitcreator_versions(trunk) "Fossil Trunk Tip" set tcl_versions(8.4.19) 8.4.19 set tcl_versions(8.5.9) 8.5.9 set tcl_versions(cvs_HEAD) "Fossil Trunk Tip" set platforms(linux-x86) "Linux on x86" set platforms(linux-amd64) "Linux on amd64" set platforms(linux-mipsel) "Linux on MIPSEL" set platforms(windows-x86) "Windows on x86" set disable { platform linux-amd64 tk platform linux-mipsel tk } set specific { platform windows-x86 file icon {Kit Icon} platform windows-x86 text description {Description} } ?><html> <head> <title>KitCreator, Web Interface</title> <script> <!-- function verifyOptions() { var kitcreator_version; var tcl_version; var platform; kitcreator_version = document.getElementsByName('kitcreator_version')[0].value; tcl_version = document.getElementsByName('tcl_version')[0].value; platform = document.getElementsByName('platform')[0].value; } --> </script> </head> <body> <h1>KitCreator Web Interface</h1> <form method="post" enctype="multipart/form-data"> <table> <tr> <td>KitCreator Version:</td> <td> <select name="kitcreator_version" onChange="verifyOptions();"> <? foreach kitcreator_version [lsort -dictionary [array names kitcreator_versions]] { set kitcreator_version_name $kitcreator_versions($kitcreator_version) if {$kitcreator_version == $kitcreator_version_selected} { set selected " selected" } else { set selected "" } puts " <option value=\"${kitcreator_version}\"${selected}>${kitcreator_version_name}</option>" } ?> </select> </td> </tr> <tr> <td>Tcl Version:</td> <td> <select name="tcl_version" onChange="verifyOptions();"> <? foreach tcl_version [lsort -dictionary [array names tcl_versions]] { set tcl_version_name $tcl_versions($tcl_version) puts " <option value=\"${tcl_version}\">${tcl_version_name}</option>" } ?> </select> </td> </tr> <tr> <td>Platform:</td> <td> <select name="platform" onChange="verifyOptions();"> <? foreach platform [lsort -dictionary [array names platforms]] { set platform_name $platforms($platform) puts " <option value=\"${platform}\">${platform_name}</option>" } ?> </select> </td> </tr> <tr> <td>Kit Options:</td> <td> <input type="checkbox" name="option_package_tk">Tk<br> <input type="checkbox" name="option_package_itcl">[incr Tcl]<br> <input type="checkbox" name="option_package_mk4tcl">Metakit<br> <input type="checkbox" name="option_threaded">Threaded<br> <input type="checkbox" name="option_kitdll">Build Library (KitDLL)<br> </td> </tr> <tr> <td>Kit Icon:</td> <td> <input type="file" name="platform-windows-x86-icon"> </td> </tr> <tr> <td>Description:</td> <td> <input type="text" name="platform-windows-x86-desc"> </td> </tr> </table> <input type="submit" name="submit" value="Create"> </form> </body> </html> |
Modified kitcreator from [15de613872] to [9916a29d8c].
1 2 3 | #! /bin/bash TCLVERS="8.4.19" | | | > > | 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 | #! /bin/bash TCLVERS="8.4.19" if echo "$1" | grep '^[0-9][0-9]*\.' >/dev/null || echo "$1" | egrep '^(cvs|fossil)_' >/dev/null; then TCLVERS="$1" shift fi export TCLVERS # Determine appropriate mode mode="build" if [ "$1" = "clean" ]; then shift mode="clean" fi if [ "$1" = "distclean" ]; then shift mode="distclean" fi # Define the list of all packages, for cleaning purposes KITCREATOR_ALLPKGS="kitsh tcl tclvfs zlib tk itcl mk4tcl thread" for pkg in ${KITCREATOR_ALLPKGS}; do rm -f "${pkg}/build.log" rm -rf "${pkg}/out" "${pkg}/inst" "${pkg}/build" rm -rf "${pkg}/src"/tmp-* if [ "${mode}" = "distclean" ]; then rm -rf "${pkg}/src" fi done # We're all done if we're in clean or distclean mode |
︙ | ︙ | |||
58 59 60 61 62 63 64 65 66 67 68 69 70 71 | # Fix up package list ## If building KitDLL, define it as our target if echo " ${KITCREATOR_PKGS} " | grep ' kitdll ' >/dev/null 2>/dev/null; then KITCREATOR_PKGS="$(echo " ${KITCREATOR_PKGS} " | sed 's@ kitdll @ @g;s@^ *@@;s@ *$@@;s@ *@ @g')" KITTARGET="kitdll" fi ## If building KitDLL and Tk, must do Tk statically ### (Well, we don't HAVE to, but it would defeat much of the purpose) if [ "${KITTARGET}" = "kitdll" ]; then if echo " ${KITCREATOR_PKGS} " | grep ' tk ' >/dev/null 2>/dev/null; then if [ "${STATICTK}" != "1" -a "${STATICTK}" != "-1" ]; then echo 'Warning: Linking Tk statically because you are building KitDLL' 2>&1 | > > > > > | 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 | # Fix up package list ## If building KitDLL, define it as our target if echo " ${KITCREATOR_PKGS} " | grep ' kitdll ' >/dev/null 2>/dev/null; then KITCREATOR_PKGS="$(echo " ${KITCREATOR_PKGS} " | sed 's@ kitdll @ @g;s@^ *@@;s@ *$@@;s@ *@ @g')" KITTARGET="kitdll" fi # If the user manually requested "--enable-kitdll", make it so if echo "x $@ " | grep ' [-][-]enable-kitdll ' >/dev/null 2>/dev/null; then KITTARGET="kitdll" fi ## If building KitDLL and Tk, must do Tk statically ### (Well, we don't HAVE to, but it would defeat much of the purpose) if [ "${KITTARGET}" = "kitdll" ]; then if echo " ${KITCREATOR_PKGS} " | grep ' tk ' >/dev/null 2>/dev/null; then if [ "${STATICTK}" != "1" -a "${STATICTK}" != "-1" ]; then echo 'Warning: Linking Tk statically because you are building KitDLL' 2>&1 |
︙ | ︙ | |||
81 82 83 84 85 86 87 88 89 | STATICMK4="0" export STATICMK4 fi fi fi failedpkgs="" buildfailed="0" | > > > > > > > > > > > > > > > > > > > > > > > > > > > | | 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 | STATICMK4="0" export STATICMK4 fi fi fi # Find Windows resource-related files if [ -f "kit.ico" ]; then KITCREATOR_ICON="$(pwd)/kit.ico" else KITCREATOR_ICON="$(echo "$(pwd)/kitsh/buildsrc"/kitsh-*/kit.ico)" fi if [ -f "kit.rc" ]; then KITCREATOR_RC="$(pwd)/kit.rc" else KITCREATOR_RC="$(echo "$(pwd)/kitsh/buildsrc"/kitsh-*/kit.rc)" fi export KITCREATOR_ICON KITCREATOR_RC # Determine how we invoke a Tcl interpreter if [ -z "${TCLSH_NATIVE}" ]; then TCLSH_NATIVE="false" fi for testsh in "${TCLSH_NATIVE}" tclsh tclsh8.4 tclsh8.5 tclsh8.6 "${TCLKIT:-tclkit}"; do if echo 'exit 0' | "${testsh}" >/dev/null 2>/dev/null; then TCLSH_NATIVE="${testsh}" break fi done export TCLSH_NATIVE # Do build failedpkgs="" buildfailed="0" for pkg in tcl tclvfs zlib ${KITCREATOR_PKGS} kitsh; do echo -n "Building ${pkg} ..." failed="0" ( cd "${pkg}" >/dev/null 2>/dev/null || exit 1 ./build.sh > build.log 2>&1 || exit 1 |
︙ | ︙ | |||
120 121 122 123 124 125 126 | echo "Failed to build:${failedpkgs}" fi if [ "${buildfailed}" != "0" ]; then echo 'WARNING: Build is likely incomplete or failed.' >&2 fi | | | 154 155 156 157 158 159 160 161 162 163 164 | echo "Failed to build:${failedpkgs}" fi if [ "${buildfailed}" != "0" ]; then echo 'WARNING: Build is likely incomplete or failed.' >&2 fi cp 'kitsh/build'/kitsh-*/libtclkit* . >/dev/null 2>/dev/null cp 'kitsh/build'/kitsh-*/kit "tclkit-${TCLVERS}" >/dev/null 2>/dev/null exit "${buildfailed}" |
Deleted kitdll/build.sh version [9d057a0710].
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted kitdll/buildsrc/kitdll-0.0/aclocal.m4 version [57e33ec54f].
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted kitdll/buildsrc/kitdll-0.0/boot.tcl version [fdb0ceb95b].
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted kitdll/buildsrc/kitdll-0.0/config.guess version [23da712e9c].
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted kitdll/buildsrc/kitdll-0.0/config.sub version [1f0ad14050].
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted kitdll/buildsrc/kitdll-0.0/configure.ac version [ae66df7b9e].
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted kitdll/buildsrc/kitdll-0.0/install-sh version [82b003ed45].
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted kitdll/buildsrc/kitdll-0.0/kitInit.c version [d13061de12].
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted kitdll/buildsrc/kitdll-0.0/pwb.c version [d3bbfc6849].
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted kitdll/buildsrc/kitdll-0.0/rechan.c version [95be374a42].
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted kitdll/buildsrc/kitdll-0.0/stringify.tcl version [07e25e6903].
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted kitdll/buildsrc/kitdll-0.0/zlib.c version [d3ecfd237b].
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Modified kitsh/build.sh from [b70457f0fd] to [030405272d].
︙ | ︙ | |||
26 27 28 29 30 31 32 33 34 35 | rm -rf 'build' 'out' 'inst' mkdir 'out' 'inst' || exit 1 ( cp -r 'buildsrc' 'build' cd "${BUILDDIR}" || exit 1 # Cleanup, just incase the incoming directory was not pre-cleaned ${MAKE:-make} distclean >/dev/null 2>/dev/null | > > > > > > > > > > > > > > > > > > > > > > > | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | | > > | > > > > > > > | 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 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 | rm -rf 'build' 'out' 'inst' mkdir 'out' 'inst' || exit 1 ( cp -r 'buildsrc' 'build' cd "${BUILDDIR}" || exit 1 # Fix up archives that Tcl gets wrong for archive in ../../../tcl/inst/lib/dde*/tcldde*.a ../../../tcl/inst/lib/reg*/tclreg*.a; do if [ ! -f "${archive}" ]; then continue fi rm -rf __TEMP__ ( mkdir __TEMP__ || exit 1 cd __TEMP__ ## Patch archive name archive="../${archive}" "${AR:-ar}" x "${archive}" || exit 1 rm -f "${archive}" "${AR:-ar}" cr "${archive}" *.o || exit 1 "${RANLIB:-ranlib}" "${archive}" || true ) done # Cleanup, just incase the incoming directory was not pre-cleaned ${MAKE:-make} distclean >/dev/null 2>/dev/null rm -rf 'starpack.vfs' # Create VFS directory mkdir "starpack.vfs" mkdir "starpack.vfs/lib" ## Copy in all built directories cp -r "${OTHERPKGSDIR}"/*/out/* 'starpack.vfs/' ## Rename the "vfs" package directory to what "boot.tcl" expects mv 'starpack.vfs/lib'/vfs* 'starpack.vfs/lib/vfs' ## Install "boot.tcl" cp 'boot.tcl' 'starpack.vfs/' # Figure out if zlib compiled (if not, the system zlib will be used and we # will need to have that present) ZLIBDIR="$(cd "${OTHERPKGSDIR}/zlib/inst" 2>/dev/null && pwd)" export ZLIBDIR if [ -z "${ZLIBDIR}" -o ! -f "${ZLIBDIR}/lib/libz.a" ]; then unset ZLIBDIR fi # Copy user specified kit.rc and kit.ico in to build directory, if found cp "${KITCREATOR_ICON}" "${BUILDDIR}/kit.ico" cp "${KITCREATOR_RC}" "${BUILDDIR}/kit.rc" # Include extra objects as required ## Initialize list of extra objects EXTRA_OBJS="" export EXTRA_OBJS ## Tk Resources (needed for Win32 support) -- remove kit-found resources to prevent the symbols from being in conflict TKDIR="$(cd "${OTHERPKGSDIR}/tk/inst" && pwd)" TKRSRC="${TKDIR}/lib/tkbase.res.o" if [ -n "${TKDIR}" -a -f "${TKRSRC}" ]; then EXTRA_OBJS="${EXTRA_OBJS} ${TKRSRC}" echo ' *** Removing "kit.rc" since we have Tk with its own resource file' rm -f "${BUILDDIR}/kit.rc" fi # Determine if target is KitDLL or KitSH if [ "${KITTARGET}" = "kitdll" ]; then CONFIGUREEXTRA="${CONFIGUREEXTRA} --enable-kitdll" fi # Compile Kit if [ -z "${ZLIBDIR}" ]; then echo "Running: ./configure --with-tcl=\"${TCLCONFIGDIR}\" ${CONFIGUREEXTRA}" ./configure --with-tcl="${TCLCONFIGDIR}" ${CONFIGUREEXTRA} else echo "Running: ./configure --with-tcl=\"${TCLCONFIGDIR}\" --with-zlib=\"${ZLIBDIR}\" ${CONFIGUREEXTRA}" ./configure --with-tcl="${TCLCONFIGDIR}" --with-zlib="${ZLIBDIR}" ${CONFIGUREEXTRA} fi echo "Running: ${MAKE:-make} TCLSH_NATIVE=\"${TCLSH_NATIVE}\"" ${MAKE:-make} TCLSH_NATIVE="${TCLSH_NATIVE}" || exit 1 # Strip the kit of all symbols, if possible "${STRIP:-strip}" kit >/dev/null 2>/dev/null "${STRIP:-strip}" -g libtclkit* >/dev/null 2>/dev/null # Fix up Win32 DLL names ## .DLL.A -> .LIB for file in libtclkit*.dll.a; do if [ ! -f "${file}" ]; then continue fi newfile="$(basename "${file}" .dll.a).lib" mv "${file}" "${newfile}" done ## .DLL.DEF -> .DEF for file in libtclkit*.dll.def; do if [ ! -f "${file}" ]; then continue fi newfile="$(basename "${file}" .dll.def).def" mv "${file}" "${newfile}" done # Determine name of created kit KITTARGET_NAME='__error__' if [ "${KITTARGET}" = "kitdll" ]; then ## Find the library created for chkkittarget in libtclkit*.*; do if [ ! -f "${chkkittarget}" ]; then continue fi if echo "${chkkittarget}" | egrep '\.(lib|def|a)$'; then continue fi KITTARGET_NAME="${chkkittarget}" break done ## Also create an executable named "kit" so that we can run it later ${MAKE:-make} tclsh mv tclsh kit else ## The executable is always named "kit" KITTARGET_NAME='kit' fi export KITTARGET_NAME if [ "x${KITTARGET_NAME}" = 'x__error__' ]; then echo "Failed to locate kit target!" >&2 exit 1 fi # Intall VFS onto kit ## Determine if we have a Tclkit to do this work TCLKIT="${TCLKIT:-tclkit}" if echo 'exit 0' | "${TCLKIT}" >/dev/null 2>/dev/null; then ## Install using existing Tclkit ### Call installer echo "Running: \"${TCLKIT}\" installvfs.tcl \"${KITTARGET_NAME}\" starpack.vfs \"${ENABLECOMPRESSION}\"" "${TCLKIT}" installvfs.tcl "${KITTARGET_NAME}" starpack.vfs "${ENABLECOMPRESSION}" || exit 1 else ## Bootstrap (cannot cross-compile) ### Call installer cp kit runkit echo "set argv [list {${KITTARGET_NAME}} starpack.vfs {${ENABLECOMPRESSION}}]" > setup.tcl echo 'if {[catch { clock seconds }]} { proc clock args { return 0 } }' >> setup.tcl echo 'source installvfs.tcl' >> setup.tcl echo 'Running: echo | ./runkit' echo | ./runkit setup.tcl || exit 1 fi # Cleanup if [ "${KITTARGET}" = "kitdll" ]; then ## Remove built interpreters if we are building KitDLL -- ## they're just tiny stubs anyway rm -f kit runkit fi exit 0 ) || exit 1 exit 0 |
Added kitsh/buildsrc/kitsh-0.0/Makefile.common.in version [537f4f602e].
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 | CC = @CC@ RC = @RC@ OBJCOPY = @OBJCOPY@ CFLAGS = @CFLAGS@ @SHOBJFLAGS@ CPPFLAGS = @CPPFLAGS@ @DEFS@ WISH_CFLAGS = @WISH_CFLAGS@ LDFLAGS = @LDFLAGS@ SHOBJLDFLAGS = @SHOBJLDFLAGS@ LIBS = @LIBS@ ARCHS = @ARCHS@ STRIPLIBS = @STRIPLIBS@ @EXTRA_OBJS@ EXTRA_OBJS = @EXTRA_OBJS@ LDRUNPATH = @LDRUNPATH@ EXTRA_KIT_DEPS = @EXTRA_KIT_DEPS@ EXTRA_VFS_OBJS = @EXTRA_VFS_OBJS@ TCLSH_NATIVE = tclsh # Build targets ## VFS Build cvfs_data_tcl.o: cvfs_data_tcl.c cvfs_data_tcl.c: dir2c.tcl starpack.vfs cvfs_data.c "$(TCLSH_NATIVE)" dir2c.tcl tcl starpack.vfs > cvfs_data_tcl.c ## Tcl scripts that need to be converted to C headers cvfs.tcl.h: cvfs.tcl "$(TCLSH_NATIVE)" ./stringify.tcl cvfs.tcl > cvfs.tcl.h boot.tcl.h: boot.tcl "$(TCLSH_NATIVE)" ./stringify.tcl boot.tcl > boot.tcl.h zipvfs.tcl.h: zipvfs.tcl "$(TCLSH_NATIVE)" ./stringify.tcl zipvfs.tcl > zipvfs.tcl.h ## Objects kitInit.o: kitInit.c boot.tcl.h $(EXTRA_KIT_DEPS) rechan.o: rechan.c pwb.o: pwb.c zlib.o: zlib.c ### Windows resources kit.res.o: kit.rc kit.ico $(RC) -o kit.res.o $(CPPFLAGS) kit.rc # Cleanup routines clean: rm -f kit kit.res.o rm -f libtclkit@KITDLL_LIB_VERSION@.@SHOBJEXT@ rm -f $(OBJS) $(EXTRA_OBJS) $(EXTRA_VFS_OBJS) rm -f cvfs_data_tcl.c cvfs_data_tcl.o rm -f cvfs.tcl.h rm -f tclsh.o tclsh tclsh.exe rm -f wish.o wish wish.exe distclean: clean rm -f Makefile Makefile.in Makefile.common rm -f config.status config.log rm -f *~ rm -rf starpack.vfs rm -rf autom4te.cache mrproper: distclean rm -f configure config.h boot.tcl.h zipvfs.tcl.h .PHONY: all clean distclean mrproper |
Renamed and modified kitdll/buildsrc/kitdll-0.0/Makefile.in [024981b5ad] to kitsh/buildsrc/kitsh-0.0/Makefile.kitdll.in [903bfeecb6].
|
| < < < < < < < < | < < < < < < < | < < < < < < < < < | | > > > > > | | < < < < < < < < < < < < < < < < < < < | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | OBJS = kitInit.o rechan.o pwb.o zlib.o # Default target all: libtclkit@KITDLL_LIB_VERSION@.@SHOBJEXT@ -include Makefile.common ## DLL Build libtclkit@KITDLL_LIB_VERSION@.@SHOBJEXT@: $(OBJS) $(EXTRA_KIT_DEPS) $(EXTRA_OBJS) $(EXTRA_VFS_OBJS) $(CC) $(CPPFLAGS) $(CFLAGS) -o libtclkit@KITDLL_LIB_VERSION@.@SHOBJEXT@ $(OBJS) $(EXTRA_OBJS) $(EXTRA_VFS_OBJS) $(LDFLAGS) $(SHOBJLDFLAGS) @WHOLEARCHIVE@ $(ARCHS) @NOWHOLEARCHIVE@ $(LIBS) -for striplib in $(STRIPLIBS); do $(OBJCOPY) --weaken "$${striplib}"; done -mv libtclkit@KITDLL_LIB_VERSION@.@SHOBJEXT@ libtclkit@KITDLL_LIB_VERSION@.@SHOBJEXT@.safe; \ $(CC) $(CPPFLAGS) $(CFLAGS) -o libtclkit@KITDLL_LIB_VERSION@.@SHOBJEXT@ $(OBJS) $(EXTRA_OBJS) $(EXTRA_VFS_OBJS) $(LDFLAGS) $(SHOBJLDFLAGS) @WHOLEARCHIVE@ $(ARCHS) @NOWHOLEARCHIVE@ $(LIBS) || \ mv libtclkit@KITDLL_LIB_VERSION@.@SHOBJEXT@.safe libtclkit@KITDLL_LIB_VERSION@.@SHOBJEXT@ -rm -f libtclkit@KITDLL_LIB_VERSION@.@SHOBJEXT@.safe # Test driver tclsh.o: tclsh.c tclsh: tclsh.o $(EXTRA_OBJS) libtclkit@KITDLL_LIB_VERSION@.@SHOBJEXT@ $(CC) $(CPPFLAGS) $(CFLAGS) -o tclsh tclsh.o $(EXTRA_OBJS) -L. -ltclkit@KITDLL_LIB_VERSION@ $(LDRUNPATH) wish.o: wish.c wish: wish.o $(EXTRA_OBJS) libtclkit@KITDLL_LIB_VERSION@.@SHOBJEXT@ $(CC) $(CPPFLAGS) $(CFLAGS) $(WISH_CFLAGS) -o wish wish.o $(EXTRA_OBJS) -L. -ltclkit@KITDLL_LIB_VERSION@ $(LDRUNPATH) |
Renamed and modified kitsh/buildsrc/kitsh-0.0/Makefile.in [6f33927faa] to kitsh/buildsrc/kitsh-0.0/Makefile.tclkit.in [9a850eafbd].
|
| < < < < < < < < < < > | | < < < < < < < < < < < < < < < < < < | 1 2 3 4 5 6 7 8 | OBJS = kitInit.o main.o pwb.o rechan.o zlib.o winMain.o all: kit -include Makefile.common kit: $(OBJS) $(EXTRA_OBJS) $(EXTRA_KIT_DEPS) $(EXTRA_VFS_OBJS) $(ARCHS) $(CC) $(CPPFLAGS) $(CFLAGS) -o kit $(OBJS) $(EXTRA_OBJS) $(EXTRA_VFS_OBJS) $(ARCHS) $(LDFLAGS) $(LIBS) |
Modified kitsh/buildsrc/kitsh-0.0/aclocal.m4 from [13694584fc] to [370c9cd778].
︙ | ︙ | |||
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | if test -f "${tclconfigsh}"; then . "${tclconfigsh}" CFLAGS="${CFLAGS} ${TCL_INCLUDE_SPEC} -I${TCL_SRC_DIR}/generic -I${tclconfigshdir}" CPPFLAGS="${CPPFLAGS} ${TCL_INCLUDE_SPEC} -I${TCL_SRC_DIR}/generic -I${tclconfigshdir}" LIBS="${LIBS} ${TCL_LIBS}" fi AC_SUBST(CFLAGS) AC_SUBST(CPPFLAGS) AC_SUBST(LIBS) AC_MSG_RESULT([$tclconfigsh]) ]) AC_DEFUN(DC_DO_TK, [ AC_MSG_CHECKING([path to tk]) AC_ARG_WITH(tk, AC_HELP_STRING([--with-tk], [directory containing tk configuration (tkConfig.sh)]), [], [ | > > > | 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | if test -f "${tclconfigsh}"; then . "${tclconfigsh}" CFLAGS="${CFLAGS} ${TCL_INCLUDE_SPEC} -I${TCL_SRC_DIR}/generic -I${tclconfigshdir}" CPPFLAGS="${CPPFLAGS} ${TCL_INCLUDE_SPEC} -I${TCL_SRC_DIR}/generic -I${tclconfigshdir}" LIBS="${LIBS} ${TCL_LIBS}" KITDLL_LIB_VERSION=`echo "${TCL_VERSION}${TCL_PATCH_LEVEL}" | sed 's@\.@@g'` fi AC_SUBST(CFLAGS) AC_SUBST(CPPFLAGS) AC_SUBST(LIBS) AC_SUBST(KITDLL_LIB_VERSION) AC_MSG_RESULT([$tclconfigsh]) ]) AC_DEFUN(DC_DO_TK, [ AC_MSG_CHECKING([path to tk]) AC_ARG_WITH(tk, AC_HELP_STRING([--with-tk], [directory containing tk configuration (tkConfig.sh)]), [], [ |
︙ | ︙ | |||
149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 | DC_DO_STATIC_LINK_LIB([C++ Library (Sun Studio)], [-lCstd -lCrun],, [ DC_DO_STATIC_LINK_LIB([C++ Library (UNIX)], [-lstdc++]) ]) ]) AC_DEFUN(DC_FIND_TCLKIT_LIBS, [ DC_SETUP_TCL_PLAT_DEFS for projdir in ../../../*/; do proj="`basename "${projdir}"`" if test "${proj}" = "zlib"; then continue fi | > > > | | | | > | > > > > > > | > > > > | | > > > > > > | > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 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 272 273 274 275 276 277 278 279 280 281 | DC_DO_STATIC_LINK_LIB([C++ Library (Sun Studio)], [-lCstd -lCrun],, [ DC_DO_STATIC_LINK_LIB([C++ Library (UNIX)], [-lstdc++]) ]) ]) AC_DEFUN(DC_FIND_TCLKIT_LIBS, [ DC_SETUP_TCL_PLAT_DEFS dnl We will need this for the Tcl project, which we will always have DC_CHECK_FOR_WHOLE_ARCHIVE for projdir in ../../../*/; do proj="`basename "${projdir}"`" if test "${proj}" = "zlib"; then continue fi projlibdir="../../../${proj}/inst" if test -d "${projlibdir}"; then true else continue fi AC_MSG_CHECKING([for libraries required for ${proj}]) projlibfiles="`find "${projlibdir}" -name '*.a' 2>/dev/null | tr "\n" ' '`" projlibfilesnostub="`find "${projlibdir}" -name '*.a' 2>/dev/null | grep -v 'stub' | tr "\n" ' '`" AC_MSG_RESULT([${projlibfilesnostub}]) hide_symbols="1" if test "${proj}" = "tcl"; then DC_TEST_WHOLE_ARCHIVE_SHARED_LIB([$ARCHS $projlibfilesnostub], [ projlibfiles="${projlibfilesnostub}" ], [ DC_TEST_WHOLE_ARCHIVE_SHARED_LIB([$ARCHS $projlibfiles], [ projlibfiles="${projlibfiles}" ]) ]) hide_symbols="0" fi if test "${proj}" = "mk4tcl"; then if test -n "${projlibfiles}"; then AC_DEFINE(KIT_INCLUDES_MK4TCL, [1], [Specify this if you link against mkt4tcl]) kc_cv_feature_kit_includes_mk4tcl='1' DC_DO_STATIC_LINK_LIBCXX fi fi if test "${proj}" = "tk"; then if test "${projlibfilesnostub}" != ""; then DC_DO_TK AC_DEFINE(KIT_INCLUDES_TK, [1], [Specify this if we link statically to Tk]) if test -n "${TK_VERSION}"; then AC_DEFINE_UNQUOTED(KIT_TK_VERSION, "${TK_VERSION}${TK_PATCH_LEVEL}", [Specify the version of Tk]) fi if test "$host_os" = "mingw32msvc" -o "$host_os" = "mingw32"; then AC_DEFINE(KITSH_NEED_WINMAIN, [1], [Define if you need WinMain (Windows)]) CFLAGS="${CFLAGS} -mwindows" fi DC_TEST_WHOLE_ARCHIVE_SHARED_LIB([$ARCHS $projlibfilesnostub], [ projlibfiles="${projlibfilesnostub}" ], [ DC_TEST_WHOLE_ARCHIVE_SHARED_LIB([$ARCHS $projlibfiles], [ projlibfiles="${projlibfiles}" ]) ]) hide_symbols="0" fi fi if test "${hide_symbols}" = "1"; then STRIPLIBS="${STRIPLIBS} ${projlibfiles}" fi dnl Do not explicitly link to Zlib, that will happen elsewhere if test "${proj}" = "zlib"; then continue fi ARCHS="${ARCHS} ${projlibfiles}" done AC_SUBST(ARCHS) AC_SUBST(STRIPLIBS) ]) AC_DEFUN(DC_SETUP_TCL_PLAT_DEFS, [ AC_CANONICAL_BUILD AC_CANONICAL_HOST AC_MSG_CHECKING(host operating system) AC_MSG_RESULT($host_os) case $host_os in mingw32*) CFLAGS="${CFLAGS} -mno-cygwin -mms-bitfields" WISH_CFLAGS="-mwindows" dnl If we are building for Win32, we need to define "BUILD_tcl" so that dnl TCL_STORAGE_CLASS gets defined as DLLEXPORT, to make static linking dnl work AC_DEFINE(BUILD_tcl, [1], [Define if you need to pretend to be building Tcl (Windows)]) AC_DEFINE(BUILD_tk, [1], [Define if you need to pretend to be building Tk (Windows)]) ;; cygwin*) CFLAGS="${CFLAGS} -mms-bitfields" WISH_CFLAGS="-mwindows" ;; esac AC_SUBST(WISH_CFLAGS) ]) AC_DEFUN(DC_STATIC_LIBGCC, [ AC_MSG_CHECKING([how to link statically against libgcc]) SAVELDFLAGS="${LDFLAGS}" staticlibgcc="" |
︙ | ︙ | |||
269 270 271 272 273 274 275 | AC_MSG_RESULT([found]) AC_DEFINE(HAVE_ACCEPTABLE_DLADDR, [1], [Define to 1 if you have an acceptable dladdr implementation with dli_fname]) ], [ AC_MSG_RESULT([not found]) ] ) ]) | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 | AC_MSG_RESULT([found]) AC_DEFINE(HAVE_ACCEPTABLE_DLADDR, [1], [Define to 1 if you have an acceptable dladdr implementation with dli_fname]) ], [ AC_MSG_RESULT([not found]) ] ) ]) dnl Usage: dnl DC_TEST_SHOBJFLAGS(shobjflags, shobjldflags, action-if-not-found) dnl AC_DEFUN(DC_TEST_SHOBJFLAGS, [ AC_SUBST(SHOBJFLAGS) AC_SUBST(SHOBJLDFLAGS) OLD_LDFLAGS="$LDFLAGS" SHOBJFLAGS="" LDFLAGS="$OLD_LDFLAGS $1 $2" AC_TRY_LINK([#include <stdio.h> int unrestst(void);], [ printf("okay\n"); unrestst(); return(0); ], [ SHOBJFLAGS="$1"; SHOBJLDFLAGS="$2" ], [ LDFLAGS="$OLD_LDFLAGS" $3 ]) LDFLAGS="$OLD_LDFLAGS" ]) AC_DEFUN(DC_GET_SHOBJFLAGS, [ AC_SUBST(SHOBJFLAGS) AC_SUBST(SHOBJLDFLAGS) AC_MSG_CHECKING(how to create shared objects) if test -z "$SHOBJFLAGS" -a -z "$SHOBJLDFLAGS"; then DC_TEST_SHOBJFLAGS([-fPIC -DPIC], [-shared -rdynamic], [ DC_TEST_SHOBJFLAGS([-fPIC -DPIC], [-shared], [ DC_TEST_SHOBJFLAGS([-fPIC -DPIC], [-shared -rdynamic -mimpure-text], [ DC_TEST_SHOBJFLAGS([-fPIC -DPIC], [-shared -mimpure-text], [ DC_TEST_SHOBJFLAGS([-fPIC -DPIC], [-shared -rdynamic -Wl,-G,-z,textoff], [ DC_TEST_SHOBJFLAGS([-fPIC -DPIC], [-shared -Wl,-G,-z,textoff], [ DC_TEST_SHOBJFLAGS([-fPIC -DPIC], [-shared -dynamiclib -flat_namespace -undefined suppress -bind_at_load], [ DC_TEST_SHOBJFLAGS([-fPIC -DPIC], [-dynamiclib -flat_namespace -undefined suppress -bind_at_load], [ DC_TEST_SHOBJFLAGS([-fPIC -DPIC], [-Wl,-dynamiclib -Wl,-flat_namespace -Wl,-undefined,suppress -Wl,-bind_at_load], [ DC_TEST_SHOBJFLAGS([-fPIC -DPIC], [-dynamiclib -flat_namespace -undefined suppress], [ DC_TEST_SHOBJFLAGS([-fPIC -DPIC], [-dynamiclib], [ AC_MSG_RESULT(cant) AC_MSG_ERROR([We are unable to make shared objects.]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) fi AC_MSG_RESULT($SHOBJLDFLAGS $SHOBJFLAGS) ]) AC_DEFUN(DC_CHK_OS_INFO, [ AC_CANONICAL_BUILD AC_CANONICAL_HOST AC_SUBST(SHOBJEXT) AC_SUBST(AREXT) AC_SUBST(SHOBJFLAGS) AC_SUBST(SHOBJLDFLAGS) AC_MSG_CHECKING(host operating system) AC_MSG_RESULT($host_os) SHOBJEXT="so" AREXT="a" case $host_os in darwin*) SHOBJEXT="dylib" ;; hpux*) SHOBJEXT="sl" ;; mingw*) SHOBJEXT="dll" SHOBJFLAGS="-mno-cygwin -mms-bitfields -DPIC" SHOBJLDFLAGS='-shared -Wl,--dll -Wl,--enable-auto-image-base -Wl,--output-def,$[@].def,--out-implib,$[@].a -Wl,--export-all-symbols -Wl,--add-stdcall-alias' ;; esac ]) AC_DEFUN(DC_TEST_WHOLE_ARCHIVE_SHARED_LIB, [ SAVE_LIBS="${LIBS}" LIBS="${WHOLEARCHIVE} $1 ${NOWHOLEARCHIVE} ${SAVE_LIBS}" AC_LINK_IFELSE( AC_LANG_PROGRAM([[ ]], [[ ]] ), [ LIBS="${SAVE_LIBS}" $2 ], [ LIBS="${SAVE_LIBS}" $3 ] ) ]) AC_DEFUN(DC_CHECK_FOR_WHOLE_ARCHIVE, [ AC_MSG_CHECKING([for how to link whole archive]) SAVE_CFLAGS="${CFLAGS}" wholearchive="" for check in "-Wl,--whole-archive -Wl,--no-whole-archive" "-Wl,-z,allextract -Wl,-z,defaultextract"; do CFLAGS="${SAVE_CFLAGS} ${check}" AC_LINK_IFELSE(AC_LANG_PROGRAM([], []), [ wholearchive="${check}" break ] ) done CFLAGS="${SAVE_CFLAGS}" if test -z "${wholearchive}"; then AC_MSG_RESULT([not found]) else AC_MSG_RESULT([${wholearchive}]) WHOLEARCHIVE=`echo "${wholearchive}" | cut -f 1 -d ' '` NOWHOLEARCHIVE=`echo "${wholearchive}" | cut -f 2 -d ' '` fi AC_SUBST(WHOLEARCHIVE) AC_SUBST(NOWHOLEARCHIVE) ]) AC_DEFUN(DC_SETLDRUNPATH, [ OLD_LDFLAGS="${LDFLAGS}" for testldflags in "-Wl,-rpath -Wl,$1" "-Wl,-R -Wl,$1"; do LDFLAGS="${OLD_LDFLAGS} ${testldflags}" AC_TRY_LINK([#include <stdio.h>], [ return(0); ], [ LDRUNPATH="$LDRUNPATH $testldflags" break ]) done LDFLAGS="${OLD_LDFLAGS}" AC_SUBST(LDRUNPATH) ]) |
Modified kitsh/buildsrc/kitsh-0.0/boot.tcl from [6dee5fa1e9] to [fcd5a93523].
1 2 3 4 5 6 | proc tclInit {} { rename tclInit {} global auto_path tcl_library tcl_libPath global tcl_version tcl_rcFileName | | | | | < < < | < < | 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 | proc tclInit {} { rename tclInit {} global auto_path tcl_library tcl_libPath global tcl_version tcl_rcFileName set mountpoint [subst "$::TCLKIT_MOUNTPOINT_VAR"] # Resolve symlinks set mountpoint [file dirname [file normalize [file join $mountpoint __dummy__]]] set tcl_library [file join $mountpoint lib tcl$tcl_version] set tcl_libPath [list $tcl_library [file join $mountpoint lib]] # the following code only gets executed once on startup if {[info exists ::TCLKIT_INITVFS]} { # lookup and emulate "source" of lib/vfs/{vfs*.tcl,mk4vfs.tcl} switch -- $::tclKitStorage { "mk4" { # must use raw MetaKit calls because VFS is not yet in place set d [mk::select exe.dirs parent 0 name lib] set d [mk::select exe.dirs parent $d name vfs] foreach x {vfsUtils vfslib mk4vfs} { set n [mk::select exe.dirs!$d.files name $x.tcl] set s [mk::get exe.dirs!$d.files!$n contents] |
︙ | ︙ | |||
70 71 72 73 74 75 76 77 78 79 | } } seek $::tclKitStorage_fd 0 set vfsHandler [list ::vfs::zip::handler $::tclKitStorage_fd] unset ::tclKitStorage_fd } } # mount the executable, i.e. make all runtime files available | > > > > > > > > > > > > > > > > > > | < > > > < < | | | | > > > > > | > > > > > > > > | > > > > > | > > > | > > | > > > > > > | > > > | | | 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 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 | } } seek $::tclKitStorage_fd 0 set vfsHandler [list ::vfs::zip::handler $::tclKitStorage_fd] unset ::tclKitStorage_fd } "cvfs" { set vfsHandler [list ::vfs::cvfs::vfshandler tcl] # Load these, the original Tclkit does so it should be safe. foreach vfsfile [list vfsUtils vfslib] { unset -nocomplain s catch { set s [::vfs::cvfs::data::getData tcl "lib/vfs/${vfsfile}.tcl"] } if {![info exists s]} { continue } uplevel #0 $s } } } # mount the executable, i.e. make all runtime files available vfs::filesystem mount $mountpoint $vfsHandler # alter path to find encodings if {[info tclversion] eq "8.4"} { load {} pwb librarypath [info library] } else { encoding dirs [list [file join [info library] encoding]] ;# TIP 258 } # fix system encoding, if it wasn't properly set up (200207.004 bug) if {[encoding system] eq "identity"} { if {[info exists ::tclkit_system_encoding] && $::tclkit_system_encoding != ""} { catch { encoding system $::tclkit_system_encoding } } } # If we've still not been able to set the encoding, revert to Tclkit defaults if {[encoding system] eq "identity"} { catch { switch $::tcl_platform(platform) { windows { encoding system cp1252 } macintosh { encoding system macRoman } default { encoding system iso8859-1 } } } } # Re-evaluate mountpoint with correct encoding set set mountpoint [subst "$::TCLKIT_MOUNTPOINT_VAR"] # now remount the executable with the correct encoding vfs::filesystem unmount [lindex [::vfs::filesystem info] 0] # Resolve symlinks set mountpoint [file dirname [file normalize [file join $mountpoint __dummy__]]] set tcl_library [file join $mountpoint lib tcl$tcl_version] set tcl_libPath [list $tcl_library [file join $mountpoint lib]] vfs::filesystem mount $mountpoint $vfsHandler # This loads everything needed for "clock scan" to work # "clock scan" is used within "vfs::zip", which may be # loaded before this is run causing the root VFS to break catch { clock scan } } # load config settings file if present namespace eval ::vfs { variable tclkit_version 1 } catch { uplevel #0 [list source [file join $mountpoint config.tcl]] } # Perform expected initialization uplevel #0 [list source [file join $tcl_library init.tcl]] # reset auto_path, so that init.tcl's search outside of tclkit is cancelled set auto_path $tcl_libPath if {$::TCLKIT_TYPE == "kitdll"} { # Set a maximum seek to avoid reading the entire file looking for a # zip header catch { package require vfs::zip set ::zip::max_header_seek 8192 } # Now that the initialization is complete, mount the user VFS if needed ## Mount the VFS from the Shared Object if {[info exists ::TCLKIT_INITVFS] && [info exists ::tclKitFilename]} { catch { vfs::zip::Mount $::tclKitFilename "/.KITDLL_USER" lappend auto_path "/.KITDLL_USER/lib" } } ## Mount the VFS from executable if {[info exists ::TCLKIT_INITVFS]} { catch { vfs::zip::Mount [info nameofexecutable] "/.KITDLL_APP" lappend auto_path "/.KITDLL_APP/lib" } } } # Clean up unset -nocomplain ::zip::max_header_seek unset -nocomplain ::TCLKIT_TYPE ::TCLKIT_INITVFS unset -nocomplain ::TCLKIT_MOUNTPOINT ::TCLKIT_VFSSOURCE ::TCLKIT_MOUNTPOINT_VAR ::TCLKIT_VFSSOURCE_VAR unset -nocomplain ::tclKitStorage ::tclKitStorage_fd ::tclKitFilename unset -nocomplain ::tclkit_system_encoding } |
Modified kitsh/buildsrc/kitsh-0.0/configure.ac from [d545ae6633] to [20795b4d45].
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | dnl What are we running AC_INIT(kitsh, 0.0) dnl Checks for programs. AC_PROG_CC AC_PROG_MAKE_SET AC_PROG_INSTALL AC_AIX AC_GNU_SOURCE dnl Find the appropriate libraries to link to AC_SEARCH_LIBS(acos, m,, [ AC_MSG_WARN([Couldn't find acos (normally in libm)!]) ]) AC_SEARCH_LIBS(dlsym, dl,, [ AC_MSG_WARN([Couldn't find dlsym (normally in libdl)!]) ]) | > > > > > > > > > > > > > > > > > > > > > > > | | > > > > > > > > > > > > > > > > > > > > > > > | > | < > > > > > > > > | | | | < < > | | > > | < > | | < > | | < > | < < > > > > > | > > | > > | > > > > > > > > | > > > > > | > > > > > > > > > > > > > > > > > > > > > > > | | 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 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 | dnl What are we running AC_INIT(kitsh, 0.0) dnl Checks for programs. AC_PROG_CC AC_PROG_MAKE_SET AC_PROG_INSTALL AC_AIX AC_GNU_SOURCE dnl Find out if we should build a DLL or an Executable TARGET="tclkit" EXTRA_KIT_DEPS="" AC_MSG_CHECKING([what target to build]) AC_ARG_ENABLE(kitdll, AC_HELP_STRING([--enable-kitdll], [Enable building KitDLL instead of Tclkit (default: no)]), [ AS_CASE([$enableval], [yes|kitdll], [ TARGET="kitdll" ], no, [ true ], [ AC_MSG_RESULT([unknown]) AC_MSG_ERROR([Invalid option: $enableval]) ] ) ]) AC_MSG_RESULT([$TARGET]) dnl Find the appropriate libraries to link to AC_SEARCH_LIBS(acos, m,, [ AC_MSG_WARN([Couldn't find acos (normally in libm)!]) ]) AC_SEARCH_LIBS(dlsym, dl,, [ AC_MSG_WARN([Couldn't find dlsym (normally in libdl)!]) ]) AS_IF([test "$TARGET" = "tclkit"], [ dnl We have Tclkit dnl Figure out how to statically link to libgcc, if needed DC_STATIC_LIBGCC dnl Specify local Appinit function AC_DEFINE(TK_LOCAL_APPINIT, [TclKit_AppInit], [Tclkit appinit function]) ], [ dnl We have KitDLL dnl Determine system information DC_CHK_OS_INFO dnl Determine how to create a shared object DC_GET_SHOBJFLAGS dnl Determine if we have "objcopy" available to weaken non-Tcl/Tk symbols AC_CHECK_TOOL(OBJCOPY, objcopy, [:]) dnl Define KitDLL usage AC_DEFINE([TCLKIT_DLL], [1], [Define if you are using a KitDLL rather than a Tclkit]) ]) dnl Set linker rpath for tclsh/wish DC_SETLDRUNPATH([.]) dnl Find the appropriate Tcl headers and libraries DC_DO_TCL dnl Find archives we need to link to DC_FIND_TCLKIT_LIBS dnl Find extra objects we need to link as a part of "kit" AC_SUBST(EXTRA_OBJS) AC_SUBST(EXTRA_VFS_OBJS) dnl Check for Windows Resource Compiler AC_CHECK_TOOL([RC], [windres], [false]) dnl If we found the resource compiler, add "kit.res.o" to our list of objects to build dnl (as long as the source for such an object exists) AS_IF([test "$RC" != "false"], [ AS_IF([test -f kit.rc], [ EXTRA_OBJS="$EXTRA_OBJS kit.res.o" ]) ]) dnl Check for Tcl features SAVE_LIBS="${LIBS}" LIBS="${ARCHS} ${LIBS}" dnl Determine if we have "Tcl_SetStartupScript" (8.6.x) or "TclSetStartupScriptPath" (8.4.x) AC_CHECK_FUNCS(Tcl_SetStartupScript TclSetStartupScriptPath) dnl Check for the ability to get the current system encoding AC_CHECK_FUNCS(Tcl_GetEncodingNameFromEnvironment Tcl_SetSystemEncoding) LIBS="${SAVE_LIBS}" dnl Check for optional headers AC_HEADER_STDC AC_CHECK_HEADERS(unistd.h string.h strings.h) dnl Check for optional system calls AC_CHECK_FUNCS(readlink) dnl Check for acceptable dladdr so we can find ourselves on Solaris DC_CHECK_FOR_ACCEPTABLE_DLADDR dnl Find zlib AC_ARG_WITH(zlib, AC_HELP_STRING([--with-zlib], [directory containing zlib]), [ CPPFLAGS="${CPPFLAGS} -I${with_zlib}/include -I${with_zlib}" CFLAGS="${CFLAGS} -I${with_zlib}/include -I${with_zlib}" LDFLAGS="${LDFLAGS} -L${with_zlib}/lib -L${with_zlib}" ]) dnl Only needed for Tclkit DC_DO_STATIC_LINK_LIB(zlib, -lz,, [ DC_DO_STATIC_LINK_LIB(zlib, -lzlib,, [ AC_SEARCH_LIBS(inflate, z zlib,, [ AC_MSG_WARN([Couldn't find inflate (normally in zlib)!]) ]) ]) ]) dnl Determine which storage mechanism to use AC_MSG_CHECKING([which Tclkit Storage mechanism to use]) storage_mech="auto" AC_ARG_ENABLE(kit-storage, AC_HELP_STRING([--enable-kit-storage={zip|mk4|cvfs}], [Specify storage mechanism to use for built-in VFS (default: auto)]), [ AS_CASE(["$enableval"], mk4, [ storage_mech="mk4" ], zip, [ storage_mech="zip" ], cvfs, [ storage_mech="cvfs" ], yes, [ # If they just want to enable kit storage, but nothing specifically, do nothing storage_mech="auto" ], auto, [ # Auto is how it works by default storage_mech="auto" ], no, [ # You can't disable kit storage AC_MSG_RESULT([fail]) AC_MSG_ERROR([Kit Storage cannot be disabled]) ], [ AC_MSG_RESULT([fail]) AC_MSG_ERROR([Unknown kit storage type: $enableval]) ] ) ]) dnl Explicitly define the storage mechanism AS_IF([test "$storage_mech" = "auto"], [ AS_IF([test "$TARGET" = 'tclkit'], [ AS_IF([test "x$kc_cv_feature_kit_includes_mk4tcl" = 'x1'], [ storage_mech="mk4" ], [ storage_mech="zip" ]) ], [ storage_mech="cvfs" ]) ]) dnl Note result AC_MSG_RESULT([$storage_mech]) dnl Define appropriate macros for the storage mechanism AS_CASE([$storage_mech], mk4, [ AC_DEFINE([KIT_STORAGE_MK4], [1], [Define if you are going to use Metakit4 for kit storage]) ], zip, [ AC_DEFINE([KIT_STORAGE_ZIP], [1], [Define if you are going to use ZIP for kit storage]) dnl Add appropriate dependencies EXTRA_KIT_DEPS="zipvfs.tcl.h" ], cvfs, [ AC_DEFINE([KIT_STORAGE_CVFS], [1], [Define if you are going to use C-VFS for kit storage]) dnl Define that C-VFS should be make [load]-able AC_DEFINE([CVFS_MAKE_LOADABLE], [1], [Specify that the C-VFS should be able to be loaded]) dnl Add appropriate dependencies EXTRA_KIT_DEPS="cvfs.tcl.h" EXTRA_VFS_OBJS="${EXTRA_VFS_OBJS} cvfs_data_tcl.o" ] ) AC_SUBST(EXTRA_KIT_DEPS) dnl Put correct Makefile template in place rm -f Makefile.in cp Makefile.${TARGET}.in Makefile.in dnl Produce output AC_OUTPUT(Makefile Makefile.common) |
Renamed and modified kitdll/buildsrc/kitdll-0.0/vfs_kitdll.tcl [662da588b0] to kitsh/buildsrc/kitsh-0.0/cvfs.tcl [20e6e11465].
1 2 3 4 | #! /usr/bin/env tcl package require vfs | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 | #! /usr/bin/env tcl package require vfs namespace eval ::vfs::cvfs {} # Convience functions proc ::vfs::cvfs::Mount {hashkey local} { vfs::filesystem mount $local [list ::vfs::cvfs::vfshandler $hashkey] catch { vfs::RegisterMount $local [list ::vfs::cvfs::Unmount] } } proc ::vfs::cvfs::Unmount {local} { vfs::filesystem unmount $local } # Implementation ## I/O Handlers (pass to appropriate hashkey) namespace eval ::vfs::cvfs::data {} proc ::vfs::cvfs::data::getChildren args { set hashkey [lindex $args 0] set cmd "::vfs::cvfs::data::${hashkey}::getChildren" set cmd [linsert $args 0 $cmd] eval $cmd } proc ::vfs::cvfs::data::getMetadata args { set hashkey [lindex $args 0] set cmd "::vfs::cvfs::data::${hashkey}::getMetadata" set cmd [linsert $args 0 $cmd] eval $cmd } proc ::vfs::cvfs::data::getData args { set hashkey [lindex $args 0] set cmd "::vfs::cvfs::data::${hashkey}::getData" set cmd [linsert $args 0 $cmd] eval $cmd } ## VFS and Chan I/O ### Dispatchers proc ::vfs::cvfs::vfshandler {hashkey subcmd args} { set cmd $args set cmd [linsert $cmd 0 "::vfs::cvfs::vfsop_${subcmd}" $hashkey] return [eval $cmd] } proc ::vfs::cvfs::chanhandler {hashkey subcmd args} { set cmd $args set cmd [linsert $cmd 0 "::vfs::cvfs::chanop_${subcmd}" $hashkey] return [eval $cmd] } ### Actual handlers #### Channel operation handlers proc ::vfs::cvfs::chanop_initialize {hashkey chanId mode} { return [list initialize finalize watch read seek] } proc ::vfs::cvfs::chanop_finalize {hashkey chanId} { unset -nocomplain ::vfs::cvfs::chandata([list $hashkey $chanId]) return } proc ::vfs::cvfs::chanop_watch {hashkey chanId eventSpec} { array set chaninfo $::vfs::cvfs::chandata([list $hashkey $chanId]) set chaninfo(watching) $eventSpec set ::vfs::cvfs::chandata([list $hashkey $chanId]) [array get chaninfo] if {[lsearch -exact $chaninfo(watching) "read"] != -1} { after 0 [list catch "chan postevent $chanId [list {read}]"] } return } proc ::vfs::cvfs::chanop_read {hashkey chanId bytes} { array set chaninfo $::vfs::cvfs::chandata([list $hashkey $chanId]) set pos $chaninfo(pos) set len $chaninfo(len) if {[lsearch -exact $chaninfo(watching) "read"] != -1} { after 0 [list catch "chan postevent $chanId [list {read}]"] } if {$pos == $len} { return "" } set end [expr {$pos + $bytes}] if {$end > $len} { set end $len } set data [::vfs::cvfs::data::getData $hashkey $chaninfo(file) $pos $end] set dataLen [string length $data] incr pos $dataLen set chaninfo(pos) $pos set ::vfs::cvfs::chandata([list $hashkey $chanId]) [array get chaninfo] return $data } proc ::vfs::cvfs::chanop_seek {hashkey chanId offset origin} { array set chaninfo $::vfs::cvfs::chandata([list $hashkey $chanId]) set pos $chaninfo(pos) set len $chaninfo(len) switch -- $origin { "start" - "0" { set pos $offset |
︙ | ︙ | |||
142 143 144 145 146 147 148 | } if {$pos > $len} { set pos $len } set chaninfo(pos) $pos | | | | | | | | | | | 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 | } if {$pos > $len} { set pos $len } set chaninfo(pos) $pos set ::vfs::cvfs::chandata([list $hashkey $chanId]) [array get chaninfo] return $pos } #### VFS operation handlers proc ::vfs::cvfs::vfsop_stat {hashkey root relative actualpath} { catch { set ret [::vfs::cvfs::data::getMetadata $hashkey $relative] } if {![info exists ret]} { vfs::filesystem posixerror $::vfs::posix(ENOENT) } return $ret } proc ::vfs::cvfs::vfsop_access {hashkey root relative actualpath mode} { set ret [::vfs::cvfs::data::getMetadata $hashkey $relative] if {$mode & 0x2} { vfs::filesystem posixerror $::vfs::posix(EROFS) } return 1 } proc ::vfs::cvfs::vfsop_matchindirectory {hashkey root relative actualpath pattern types} { set ret [list] catch { array set metadata [::vfs::cvfs::data::getMetadata $hashkey $relative] } if {![info exists metadata]} { return [list] } if {$pattern == ""} { set children [list $relative] } else { set children [::vfs::cvfs::data::getChildren $hashkey $relative] } foreach child $children { if {$pattern != ""} { if {![string match $pattern $child]} { continue } } unset -nocomplain metadata catch { array set metadata [::vfs::cvfs::data::getMetadata $hashkey $child] } if {[string index $root end] == "/"} { set child "${root}${child}" } else { set child "${root}/${child}" } |
︙ | ︙ | |||
238 239 240 241 242 243 244 | lappend ret $child } return $ret } | | | | 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 | lappend ret $child } return $ret } proc ::vfs::cvfs::vfsop_fileattributes {hashkey root relative actualpath {index -1} {value ""}} { set attrs [list -owner -group -permissions] if {$value != ""} { vfs::filesystem posixerror $::vfs::posix(EROFS) } if {$index == -1} { return $attrs } array set metadata [::vfs::cvfs::data::getMetadata $hashkey $relative] set attr [lindex $attrs $index] switch -- $attr { "-owner" { return $metadata(uid) } |
︙ | ︙ | |||
272 273 274 275 276 277 278 | return [format {0%o} $metadata(mode)] } } return -code error "Invalid index" } | | | | | | | | | | | | | 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 | return [format {0%o} $metadata(mode)] } } return -code error "Invalid index" } proc ::vfs::cvfs::vfsop_open {hashkey root relative actualpath mode permissions} { if {$mode != "" && $mode != "r"} { vfs::filesystem posixerror $::vfs::posix(EROFS) } catch { array set metadata [::vfs::cvfs::data::getMetadata $hashkey $relative] } if {![info exists metadata]} { vfs::filesystem posixerror $::vfs::posix(ENOENT) } if {$metadata(type) == "directory"} { vfs::filesystem posixerror $::vfs::posix(EISDIR) } if {[info command chan] != ""} { set chan [chan create [list "read"] [list ::vfs::cvfs::chanhandler $hashkey]] set ::vfs::cvfs::chandata([list $hashkey $chan]) [list file $relative pos 0 len $metadata(size) watching ""] return [list $chan] } if {[info command rechan] == ""} { catch { package require rechan } } if {[info command rechan] != ""} { set chan [rechan [list ::vfs::cvfs::chanhandler $hashkey] 2] set ::vfs::cvfs::chandata([list $hashkey $chan]) [list file $relative pos 0 len $metadata(size) watching ""] return [list $chan] } return -code error "No way to generate a channel, need either Tcl 8.5+, \"rechan\"" } ##### No-Ops since we are a readonly filesystem proc ::vfs::cvfs::vfsop_createdirectory {args} { vfs::filesystem posixerror $::vfs::posix(EROFS) } proc ::vfs::cvfs::vfsop_deletefile {args} { vfs::filesystem posixerror $::vfs::posix(EROFS) } proc ::vfs::cvfs::vfsop_removedirectory {args} { vfs::filesystem posixerror $::vfs::posix(EROFS) } proc ::vfs::cvfs::vfsop_utime {} { vfs::filesystem posixerror $::vfs::posix(EROFS) } package provide vfs::cvfs 1.0 |
Renamed and modified kitdll/buildsrc/kitdll-0.0/vfs_kitdll_data.c [e51d57abbf] to kitsh/buildsrc/kitsh-0.0/cvfs_data.c [dcf0f1a5fd].
1 2 3 4 5 6 | #include <tcl.h> #ifdef HAVE_STDLIB_H # include <stdlib.h> #endif | | | | 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 | #include <tcl.h> #ifdef HAVE_STDLIB_H # include <stdlib.h> #endif typedef struct cvfs_data *(cmd_getData_t)(const char *, unsigned long); typedef unsigned long (cmd_getChildren_t)(const char *, unsigned long *, unsigned long); /* Your implementation must provide these */ static cmd_getData_t *getCmdData(const char *hashkey); static cmd_getChildren_t *getCmdChildren(const char *hashkey); /* Tcl Commands */ static int getMetadata(ClientData cd, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { cmd_getData_t *cmd_getData; cmd_getChildren_t *cmd_getChildren; struct cvfs_data *finfo = NULL; Tcl_Obj *ret_list, *ret_list_items[20]; unsigned long num_children; const char *hashkey; const char *file; if (objc != 3) { Tcl_SetResult(interp, "wrong # args: should be \"getMetadata hashKey fileName\"", TCL_STATIC); |
︙ | ︙ | |||
48 49 50 51 52 53 54 | } /* Values that can be derived from "finfo" */ ret_list_items[0] = Tcl_NewStringObj("type", 4); ret_list_items[2] = Tcl_NewStringObj("mode", 4); ret_list_items[4] = Tcl_NewStringObj("nlink", 5); | | | 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | } /* Values that can be derived from "finfo" */ ret_list_items[0] = Tcl_NewStringObj("type", 4); ret_list_items[2] = Tcl_NewStringObj("mode", 4); ret_list_items[4] = Tcl_NewStringObj("nlink", 5); if (finfo->type == CVFS_FILETYPE_DIR) { num_children = cmd_getChildren(file, NULL, 0); ret_list_items[1] = Tcl_NewStringObj("directory", 9); ret_list_items[3] = Tcl_NewLongObj(040555); ret_list_items[5] = Tcl_NewLongObj(num_children); } else { ret_list_items[1] = Tcl_NewStringObj("file", 4); |
︙ | ︙ | |||
90 91 92 93 94 95 96 | Tcl_SetObjResult(interp, ret_list); return(TCL_OK); } static int getData(ClientData cd, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { | | | 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 | Tcl_SetObjResult(interp, ret_list); return(TCL_OK); } static int getData(ClientData cd, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { struct cvfs_data *finfo = NULL; cmd_getData_t *cmd_getData; const char *hashkey; const char *file; const char *end_str; Tcl_Obj *ret_str; long start = 0; long end = -1; |
︙ | ︙ | |||
146 147 148 149 150 151 152 | if (finfo == NULL) { Tcl_SetResult(interp, "No such file or directory", TCL_STATIC); return(TCL_ERROR); } | | | 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 | if (finfo == NULL) { Tcl_SetResult(interp, "No such file or directory", TCL_STATIC); return(TCL_ERROR); } if (finfo->type != CVFS_FILETYPE_FILE) { Tcl_SetResult(interp, "Not a file", TCL_STATIC); return(TCL_ERROR); } if (end == -1) { end = finfo->size; |
︙ | ︙ | |||
182 183 184 185 186 187 188 | Tcl_SetObjResult(interp, ret_str); return(TCL_OK); } static int getChildren(ClientData cd, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { | | | 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 | Tcl_SetObjResult(interp, ret_str); return(TCL_OK); } static int getChildren(ClientData cd, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { struct cvfs_data *finfo = NULL; cmd_getChildren_t *cmd_getChildren; cmd_getData_t *cmd_getData; unsigned long num_children, idx; unsigned long *children; const char *hashkey; const char *file; const char *child; |
︙ | ︙ | |||
218 219 220 221 222 223 224 | if (finfo == NULL) { Tcl_SetResult(interp, "No such file or directory", TCL_STATIC); return(TCL_ERROR); } | | | 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 | if (finfo == NULL) { Tcl_SetResult(interp, "No such file or directory", TCL_STATIC); return(TCL_ERROR); } if (finfo->type != CVFS_FILETYPE_DIR) { Tcl_SetResult(interp, "Not a directory", TCL_STATIC); return(TCL_ERROR); } num_children = cmd_getChildren(file, NULL, 0); |
︙ | ︙ |
Renamed and modified kitdll/buildsrc/kitdll-0.0/dir2c.tcl [28f9b94a91] to kitsh/buildsrc/kitsh-0.0/dir2c.tcl [903b20a63c].
1 2 3 | #! /usr/bin/env tclsh if {[llength $argv] != 2} { | | | 1 2 3 4 5 6 7 8 9 10 11 | #! /usr/bin/env tclsh if {[llength $argv] != 2} { puts stderr "Usage: dir2c.tcl <hashkey> <startdir>" exit 1 } set hashkey [lindex $argv 0] set startdir [lindex $argv 1] |
︙ | ︙ | |||
72 73 74 75 76 77 78 | set ret "\"$ret\"" return $ret } # This function must be kept in-sync with the generated C function below | | | 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 | set ret "\"$ret\"" return $ret } # This function must be kept in-sync with the generated C function below proc cvfs_hash {path} { set h 0 set g 0 for {set idx 0} {$idx < [string length $path]} {incr idx} { binary scan [string index $path $idx] H* char set char "0x$char" |
︙ | ︙ | |||
99 100 101 102 103 104 105 | # Generate list of files to include in output set files [recursive_glob $startdir] # Insert dummy entry cooresponding to C dummy entry set files [linsert $files 0 "__DUMMY__"] # Produce C89 compatible header | | | | | | | | | | | | | | | | | | 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 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 | # Generate list of files to include in output set files [recursive_glob $startdir] # Insert dummy entry cooresponding to C dummy entry set files [linsert $files 0 "__DUMMY__"] # Produce C89 compatible header set cpp_tag "CVFS_[string toupper $hashkey]" set code_tag "cvfs_[string tolower $hashkey]" set hashkey [string tolower $hashkey] puts "#ifndef $cpp_tag" puts "# define $cpp_tag 1" puts { # ifdef HAVE_STDC # ifndef HAVE_UNISTD_H # define HAVE_UNISTD_H 1 # endif # ifndef HAVE_STRING_H # define HAVE_STRING_H 1 # endif # endif # ifdef HAVE_UNISTD_H # include <unistd.h> # endif # ifdef HAVE_STRING_H # include <string.h> # endif # ifndef LOADED_CVFS_COMMON # define LOADED_CVFS_COMMON 1 typedef enum { CVFS_FILETYPE_FILE, CVFS_FILETYPE_DIR } cvfs_filetype_t; struct cvfs_data { const char * name; unsigned long index; unsigned long size; cvfs_filetype_t type; const unsigned char * data; }; static unsigned long cvfs_hash(const unsigned char *path) { unsigned long i, h = 0, g = 0; for (i = 0; path[i]; i++) { h = (h << 4) + path[i]; g = h & 0xf0000000; if (g) { h ^= (g >> 24); } h &= ((~g) & 0xffffffffLU); } return(h); } # endif /* !LOADED_CVFS_COMMON */} puts "" puts "static struct cvfs_data ${code_tag}_data\[\] = {" puts "\t{" puts "\t\t.name = NULL," puts "\t\t.index = 0," puts "\t\t.type = 0," puts "\t\t.size = 0," puts "\t\t.data = NULL," puts "\t}," for {set idx 1} {$idx < [llength $files]} {incr idx} { set file [lindex $files $idx] set shortfile [shorten_file $startdir $file] unset -nocomplain finfo type file stat $file finfo switch -- $finfo(type) { "file" { set type "CVFS_FILETYPE_FILE" set size $finfo(size) set fd [open $file] fconfigure $fd -translation binary set data [read $fd] close $fd set data "(unsigned char *) [stringify $data]" } "directory" { set type "CVFS_FILETYPE_DIR" set data "NULL" set size 0 } } puts "\t{" puts "\t\t.name = \"$shortfile\"," puts "\t\t.index = $idx," puts "\t\t.type = $type," puts "\t\t.size = $size," puts "\t\t.data = $data," puts "\t}," } puts "};" puts "" puts "static unsigned long ${code_tag}_lookup_index(const char *path) {" puts "\tswitch (cvfs_hash((unsigned char *) path)) {" for {set idx 1} {$idx < [llength $files]} {incr idx} { set file [lindex $files $idx] set shortfile [shorten_file $startdir $file] set hash [cvfs_hash $shortfile] lappend indexes_per_hash($hash) [list $shortfile $idx] } foreach {hash idx_list} [array get indexes_per_hash] { puts "\t\tcase $hash:" |
︙ | ︙ | |||
234 235 236 237 238 239 240 | } puts "\t}" puts "\treturn(0);" puts "}" puts "" | | | 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 | } puts "\t}" puts "\treturn(0);" puts "}" puts "" puts "static struct cvfs_data *${code_tag}_getData(const char *path, unsigned long index) {" puts "\tif (path != NULL) {" puts "\t\tindex = ${code_tag}_lookup_index(path);" puts "\t}" puts "" puts "\tif (index == 0) {" puts "\t\treturn(NULL);" puts "\t}" |
︙ | ︙ | |||
262 263 264 265 266 267 268 | puts "\tunsigned long num_children = 0;" puts "" puts "\tindex = ${code_tag}_lookup_index(path);" puts "\tif (index == 0) {" puts "\t\treturn(0);" puts "\t}" puts "" | | | 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 | puts "\tunsigned long num_children = 0;" puts "" puts "\tindex = ${code_tag}_lookup_index(path);" puts "\tif (index == 0) {" puts "\t\treturn(0);" puts "\t}" puts "" puts "\tif (${code_tag}_data\[index\].type != CVFS_FILETYPE_DIR) {" puts "\t\treturn(0);" puts "\t}" puts "" puts "\tif (strcmp(path, ${code_tag}_data\[index\].name) != 0) {" puts "\t\treturn(0);" puts "\t}" puts "" |
︙ | ︙ | |||
347 348 349 350 351 352 353 | puts "\t}" puts "" puts "\treturn(num_children);" puts "}" puts "" | | | | > > > > > | | < < < < < | | | 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 | puts "\t}" puts "" puts "\treturn(num_children);" puts "}" puts "" puts "# ifdef CVFS_MAKE_LOADABLE" set fd [open "cvfs_data.c"] puts [read $fd] close $fd puts "static cmd_getData_t *getCmdData(const char *hashkey) {" puts "\treturn(${code_tag}_getData);" puts "}" puts "" puts "static cmd_getChildren_t *getCmdChildren(const char *hashkey) {" puts "\treturn(${code_tag}_getChildren);" puts "}" puts "" puts "int Cvfs_data_${hashkey}_Init(Tcl_Interp *interp) {" puts "\tTcl_Command tclCreatComm_ret;" puts "\tint tclPkgProv_ret;" puts "" puts "\ttclCreatComm_ret = Tcl_CreateObjCommand(interp, \"::vfs::cvfs::data::${hashkey}::getMetadata\", getMetadata, NULL, NULL);" puts "\tif (!tclCreatComm_ret) {" puts "\t\treturn(TCL_ERROR);" puts "\t}" puts "" puts "\ttclCreatComm_ret = Tcl_CreateObjCommand(interp, \"::vfs::cvfs::data::${hashkey}::getData\", getData, NULL, NULL);" puts "\tif (!tclCreatComm_ret) {" puts "\t\treturn(TCL_ERROR);" puts "\t}" puts "" puts "\ttclCreatComm_ret = Tcl_CreateObjCommand(interp, \"::vfs::cvfs::data::${hashkey}::getChildren\", getChildren, NULL, NULL);" puts "\tif (!tclCreatComm_ret) {" puts "\t\treturn(TCL_ERROR);" puts "\t}" puts "" puts "\ttclPkgProv_ret = Tcl_PkgProvide(interp, \"vfs::cvfs::data::${hashkey}\", \"1.0\");" puts "" puts "\treturn(tclPkgProv_ret);" puts "\t}" puts "# endif /* CVFS_MAKE_LOADABLE */" puts "#endif /* !$cpp_tag */" |
Modified kitsh/buildsrc/kitsh-0.0/installvfs.tcl from [01a4e2e7f2] to [b17724e7c3].
︙ | ︙ | |||
11 12 13 14 15 16 17 | set kitfile [lindex $argv 0] set vfsdir [lindex $argv 1] if {[lindex $argv 2] != ""} { set opt_compression [lindex $argv 2] } # Determine what storage mechanism is being used | < | < < | | < < < | 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 | set kitfile [lindex $argv 0] set vfsdir [lindex $argv 1] if {[lindex $argv 2] != ""} { set opt_compression [lindex $argv 2] } # Determine what storage mechanism is being used set fd [open Makefile.common r] set data [read $fd] close $fd if {[string match "*KIT_STORAGE_ZIP*" $data]} { set tclKitStorage zip } if {[string match "*KIT_STORAGE_MK4*" $data]} { set tclKitStorage mk4 } if {[string match "*KIT_STORAGE_CVFS*" $data]} { set tclKitStorage cvfs } # Define procedures proc copy_file {srcfile destfile} { switch -glob -- $srcfile { "*.tcl" - "*.txt" { set ifd [open $srcfile r] |
︙ | ︙ | |||
113 114 115 116 117 118 119 120 | if {[catch { close $zipfd } err]} { puts stderr "Error while updating executable: $err" exit 1 } } | > > | > | 107 108 109 110 111 112 113 114 115 116 117 118 | if {[catch { close $zipfd } err]} { puts stderr "Error while updating executable: $err" exit 1 } } "cvfs" { # No-op } } |
Modified kitsh/buildsrc/kitsh-0.0/kitInit.c from [2ea4599da9] to [50169ff8c3].
︙ | ︙ | |||
13 14 15 16 17 18 19 | * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * * RCS: @(#) $Id$ */ #ifdef KIT_INCLUDES_TK # include <tk.h> | < < > | 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * * RCS: @(#) $Id$ */ #ifdef KIT_INCLUDES_TK # include <tk.h> #endif /* KIT_INCLUDES_TK */ #include <tcl.h> #ifdef _WIN32 # define WIN32_LEAN_AND_MEAN # include <windows.h> # undef WIN32_LEAN_AND_MEAN #endif /* _WIN32 */ |
︙ | ︙ | |||
71 72 73 74 75 76 77 78 79 80 81 82 83 84 | Tcl_AppInitProc Vfs_Init, Rechan_Init; #ifdef KIT_INCLUDES_PWB Tcl_AppInitProc Pwb_Init; #endif #ifdef KIT_INCLUDES_ZLIB Tcl_AppInitProc Zlib_Init; #endif #ifdef TCL_THREADS Tcl_AppInitProc Thread_Init; #endif #ifdef _WIN32 Tcl_AppInitProc Dde_Init, Registry_Init; #endif | > > > | | | > > > | | > | | > | > | | > | | | | | | | > > > > | | > > > > > > > > > > > > > > > > > > > > | | | | | | | | > < < < < < < < < < < < | | > > > > > > > > > > > > > > > > > > > > > > | 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 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 | Tcl_AppInitProc Vfs_Init, Rechan_Init; #ifdef KIT_INCLUDES_PWB Tcl_AppInitProc Pwb_Init; #endif #ifdef KIT_INCLUDES_ZLIB Tcl_AppInitProc Zlib_Init; #endif #ifdef KIT_STORAGE_CVFS Tcl_AppInitProc Cvfs_data_tcl_Init; #endif #ifdef TCL_THREADS Tcl_AppInitProc Thread_Init; #endif #ifdef _WIN32 Tcl_AppInitProc Dde_Init, Registry_Init; #endif #ifdef TCLKIT_DLL # define TCLKIT_MOUNTPOINT "/.KITDLL_TCL" # define TCLKIT_VFSSOURCE "$::tclKitFilename" #else # define TCLKIT_MOUNTPOINT "[info nameofexecutable]" # define TCLKIT_VFSSOURCE "[info nameofexecutable]" #endif /* TCLKIT_DLL */ #ifdef HAVE_ACCEPTABLE_DLADDR # ifdef KITSH_NEED_WINMAIN # ifdef _WIN32_WCE int wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdLine, int nCmdShow); # else int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdLine, int nCmdShow); # endif /* _WIN32_WCE */ # endif /* KITSH_NEED_WINMAIN */ int main(int argc, char **argv); #endif /* HAVE_ACCEPTABLE_DLADDR */ #ifdef TCLKIT_REQUIRE_TCLEXECUTABLENAME char *tclExecutableName; #endif /* * Attempt to load a "boot.tcl" entry from the embedded MetaKit file. * If there isn't one, try to open a regular "setup.tcl" file instead. * If that fails, this code will throw an error, using a message box. */ /* * This Tcl code is invoked whenever Tcl_Init() is called on an * interpreter. It should mount up the VFS and make everything ready for * that interpreter to do its job. */ static char *preInitCmd = #if defined(_WIN32_WCE) && !defined(TCLKIT_DLL) /* silly hack to get wince port to launch, some sort of std{in,out,err} problem */ "open /kitout.txt a; open /kitout.txt a; open /kitout.txt a\n" /* this too seems to be needed on wince - it appears to be related to the above */ "catch {rename source ::tcl::source}\n" "proc source file {\n" "set old [info script]\n" "info script $file\n" "set fid [open $file]\n" "set data [read $fid]\n" "close $fid\n" "set code [catch {uplevel 1 $data} res]\n" "info script $old\n" "if {$code == 2} { set code 0 }\n" "return -code $code $res\n" "}\n" #endif /* _WIN32_WCE && !TCLKIT_DLL */ "proc tclKitInit {} {\n" "rename tclKitInit {}\n" "catch { load {} vfs }\n" #ifdef KIT_INCLUDES_ZLIB "catch { load {} zlib }\n" #endif #ifdef KIT_INCLUDES_MK4TCL "catch { load {} Mk4tcl }\n" #endif #ifdef TCLKIT_DLL "load {} tclkit::init\n" "::tclkit::init::initInterp\n" "rename ::tclkit::init::initInterp {}\n" #endif /* TCLKIT_DLL */ "set bootfile [file join " TCLKIT_MOUNTPOINT " boot.tcl]\n" "if {[file exists $bootfile]} {\n" "catch {\n" "set f [open $bootfile]\n" "set s [read $f]\n" "close $f\n" "}\n" "} else {\n" "set ::TCLKIT_INITVFS 1\n" "}\n" #ifdef KIT_STORAGE_MK4 "set ::tclKitStorage \"mk4\"\n" "if {![info exists s]} {\n" "mk::file open exe " TCLKIT_VFSSOURCE " -readonly\n" "set n [mk::select exe.dirs!0.files name boot.tcl]\n" "if {$n != \"\"} {\n" "set s [mk::get exe.dirs!0.files!$n contents]\n" "if {![string length $s]} { error \"empty boot.tcl\" }\n" "catch {load {} zlib}\n" "if {[mk::get exe.dirs!0.files!$n size] != [string length $s]} {\n" "set s [zlib decompress $s]\n" "}\n" "}\n" "}\n" #endif /* KIT_STORAGE_MK4 */ #ifdef KIT_STORAGE_ZIP "set ::tclKitStorage \"zip\"\n" "if {![info exists s]} {\n" # include "zipvfs.tcl.h" "catch {\n" "set ::tclKitStorage_fd [::zip::open " TCLKIT_VFSSOURCE "]\n" "::zip::stat $::tclKitStorage_fd boot.tcl sb\n" "seek $::tclKitStorage_fd $sb(ino)\n" "::zip::Data $::tclKitStorage_fd sb s\n" "}\n" "}\n" #endif /* KIT_STORAGE_ZIP */ #ifdef KIT_STORAGE_CVFS "set ::tclKitStorage \"cvfs\"\n" "load {} rechan\n" "load {} cvfs_data_tcl\n" #include "cvfs.tcl.h" "if {![info exists s]} {\n" "catch {\n" "set s [::vfs::cvfs::data::getData tcl boot.tcl]\n" "}\n" "}\n" #endif /* KIT_STORAGE_CVFS */ #ifndef TCLKIT_DLL "if {![info exists s]} {\n" "set f [open setup.tcl]\n" "set s [read $f]\n" "close $f\n" "}\n" #endif /* !TCLKIT_DLL */ #ifdef TCLKIT_DLL "set ::TCLKIT_TYPE \"kitdll\"\n" #else "set ::TCLKIT_TYPE \"tclkit\"\n" #endif /* TCLKIT_DLL */ "set ::TCLKIT_MOUNTPOINT " TCLKIT_MOUNTPOINT "\n" "set ::TCLKIT_VFSSOURCE " TCLKIT_VFSSOURCE "\n" "set ::TCLKIT_MOUNTPOINT_VAR {" TCLKIT_MOUNTPOINT "}\n" "set ::TCLKIT_VFSSOURCE_VAR {" TCLKIT_VFSSOURCE "}\n" "uplevel #0 $s\n" #if defined(KIT_INCLUDES_TK) && defined(KIT_TK_VERSION) "package ifneeded Tk " KIT_TK_VERSION " {\n" "load {} Tk\n" "}\n" #endif #ifdef _WIN32 |
︙ | ︙ | |||
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 | return; } } } #endif /* HAVE_READLINK */ #ifdef HAVE_ACCEPTABLE_DLADDR if (Tcl_GetNameOfExecutable() == NULL) { dladdr_ret = dladdr(&SetExecName, &syminfo); if (dladdr_ret != 0) { SetExecName(interp, syminfo.dli_fname); } } #endif /* HAVE_ACCEPTABLE_DLADDR */ if (Tcl_GetNameOfExecutable() == NULL) { lobjv[0] = Tcl_GetVar2Ex(interp, "argv0", NULL, TCL_GLOBAL_ONLY); execNameObj = Tcl_FSJoinToPath(Tcl_FSGetCwd(interp), 1, lobjv); SetExecName(interp, Tcl_GetStringFromObj(execNameObj, &len)); return; } return; } | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > < < < < < < < < < < < | > > > > > > > > > > > > > > | | > | | > > | > > > > > > > > > > > > > > > | 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 | return; } } } #endif /* HAVE_READLINK */ #ifdef HAVE_ACCEPTABLE_DLADDR # ifndef TCLKIT_DLL if (Tcl_GetNameOfExecutable() == NULL) { dladdr_ret = dladdr(&SetExecName, &syminfo); if (dladdr_ret != 0) { SetExecName(interp, syminfo.dli_fname); return; } } # endif /* !TCLKIT_DLL */ # ifdef KITSH_NEED_WINMAIN if (Tcl_GetNameOfExecutable() == NULL) { # ifdef _WIN32_WCE dladdr_ret = dladdr(&WinMain, &syminfo); # else dladdr_ret = dladdr(&wWinMain, &syminfo); # endif /* _WIN32_WCE */ if (dladdr_ret != 0) { SetExecName(interp, syminfo.dli_fname); return; } } # endif /* KITSH_NEED_WINMAIN */ if (Tcl_GetNameOfExecutable() == NULL) { dladdr_ret = dladdr(&main, &syminfo); if (dladdr_ret != 0) { SetExecName(interp, syminfo.dli_fname); return; } } #endif /* HAVE_ACCEPTABLE_DLADDR */ if (Tcl_GetNameOfExecutable() == NULL) { lobjv[0] = Tcl_GetVar2Ex(interp, "argv0", NULL, TCL_GLOBAL_ONLY); execNameObj = Tcl_FSJoinToPath(Tcl_FSGetCwd(interp), 1, lobjv); SetExecName(interp, Tcl_GetStringFromObj(execNameObj, &len)); return; } return; } static void _Tclkit_Generic_Init(void) { #ifdef KIT_INCLUDES_ITCL Tcl_StaticPackage(0, "Itcl", Itcl_Init, NULL); #endif #ifdef KIT_INCLUDES_MK4TCL Tcl_StaticPackage(0, "Mk4tcl", Mk4tcl_Init, NULL); #endif #ifdef KIT_INCLUDES_PWB Tcl_StaticPackage(0, "pwb", Pwb_Init, NULL); #endif Tcl_StaticPackage(0, "rechan", Rechan_Init, NULL); Tcl_StaticPackage(0, "vfs", Vfs_Init, NULL); #ifdef KIT_INCLUDES_ZLIB Tcl_StaticPackage(0, "zlib", Zlib_Init, NULL); #endif #ifdef KIT_STORAGE_CVFS Tcl_StaticPackage(0, "cvfs_data_tcl", Cvfs_data_tcl_Init, NULL); #endif #ifdef TCL_THREADS Tcl_StaticPackage(0, "Thread", Thread_Init, NULL); #endif #ifdef _WIN32 Tcl_StaticPackage(0, "dde", Dde_Init, NULL); Tcl_StaticPackage(0, "registry", Registry_Init, NULL); #endif #ifdef KIT_INCLUDES_TK Tcl_StaticPackage(0, "Tk", Tk_Init, Tk_SafeInit); #endif TclSetPreInitScript(preInitCmd); return; } static void _Tclkit_Interp_Init(Tcl_Interp *interp) { #ifdef TCLKIT_CAN_SET_ENCODING Tcl_DString encodingName; #endif /* TCLKIT_CAN_SET_ENCODING */ #ifndef TCLKIT_DLL /* the tcl_rcFileName variable only exists in the initial interpreter */ # ifdef _WIN32 Tcl_SetVar(interp, "tcl_rcFileName", "~/tclkitrc.tcl", TCL_GLOBAL_ONLY); # else Tcl_SetVar(interp, "tcl_rcFileName", "~/.tclkitrc", TCL_GLOBAL_ONLY); # endif /* _WIN32 */ #endif /* !TCLKIT_DLL */ #ifdef TCLKIT_CAN_SET_ENCODING /* Set the encoding from the Environment */ Tcl_GetEncodingNameFromEnvironment(&encodingName); Tcl_SetSystemEncoding(NULL, Tcl_DStringValue(&encodingName)); Tcl_SetVar(interp, "tclkit_system_encoding", Tcl_DStringValue(&encodingName), 0); Tcl_DStringFree(&encodingName); #endif /* TCLKIT_CAN_SET_ENCODING */ /* Hack to get around Tcl bug 1224888. This must be run here and * in LibraryPathObjCmd because this information is needed both * before and after that command is run. */ FindAndSetExecName(interp); return; } #ifndef TCLKIT_DLL int TclKit_AppInit(Tcl_Interp *interp) { #ifdef KIT_INCLUDES_TK # ifdef _WIN32 # ifndef _WIN32_WCE char msgBuf[2049]; # endif /* !_WIN32_WCE */ # endif /* _WIN32 */ #endif /* KIT_INCLUDES_TK */ /* Perform common initialization */ _Tclkit_Generic_Init(); _Tclkit_Interp_Init(interp); if (Tcl_Init(interp) == TCL_ERROR) { goto error; } #ifdef KIT_INCLUDES_TK # ifdef _WIN32 if (Tk_Init(interp) == TCL_ERROR) { |
︙ | ︙ | |||
376 377 378 379 380 381 382 | # endif /* !_WIN32_WCE */ /* we won't reach this, but we need the return */ # endif /* _WIN32 */ #endif /* KIT_INCLUDES_TK */ return TCL_ERROR; } | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 | # endif /* !_WIN32_WCE */ /* we won't reach this, but we need the return */ # endif /* _WIN32 */ #endif /* KIT_INCLUDES_TK */ return TCL_ERROR; } #endif /* !TCLKIT_DLL */ #ifdef TCLKIT_DLL # ifdef HAVE_ACCEPTABLE_DLADDR /* Symbol to resolve against dladdr() */ static void _tclkit_dummy_func(void) { return; } # endif /* HAVE_ACCEPTABLE_DLADDR */ /* * This function will return a pathname we can open() to treat as a VFS, * hopefully */ static char *find_tclkit_dll_path(void) { #ifdef HAVE_ACCEPTABLE_DLADDR Dl_info syminfo; int dladdr_ret; #endif /* HAVE_ACCEPTABLE_DLADDR */ #ifdef _WIN32 TCHAR modulename[8192]; DWORD gmfn_ret; #endif /* _WIN32 */ #ifdef HAVE_ACCEPTABLE_DLADDR dladdr_ret = dladdr(&_tclkit_dummy_func, &syminfo); if (dladdr_ret != 0) { if (syminfo.dli_fname && syminfo.dli_fname[0] != '\0') { return(strdup(syminfo.dli_fname)); } } #endif /* HAVE_ACCEPTABLE_DLADDR */ #ifdef _WIN32 gmfn_ret = GetModuleFileName(TclWinGetTclInstance(), modulename, sizeof(modulename) / sizeof(modulename[0]) - 1); if (gmfn_ret != 0) { return(strdup(modulename)); } #endif /* _WIN32 */ return(NULL); } /* * This function exists to allow C code to initialize a particular * interpreter. */ static int tclkit_init_initinterp(ClientData cd, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { char *kitdll_path; kitdll_path = find_tclkit_dll_path(); if (kitdll_path != NULL) { Tcl_SetVar(interp, "tclKitFilename", kitdll_path, TCL_GLOBAL_ONLY); free(kitdll_path); } _Tclkit_Interp_Init(interp); return(TCL_OK); } /* * Create a package for initializing a particular interpreter. This is * our hook to have Tcl invoke C commands when creating an interpreter. * The preInitCmd will load the package in the new interpreter and invoke * this function. */ int Tclkit_init_Init(Tcl_Interp *interp) { Tcl_Command tclCreatComm_ret; int tclPkgProv_ret; tclCreatComm_ret = Tcl_CreateObjCommand(interp, "::tclkit::init::initInterp", tclkit_init_initinterp, NULL, NULL); if (!tclCreatComm_ret) { return(TCL_ERROR); } tclPkgProv_ret = Tcl_PkgProvide(interp, "tclkit::init", "1.0"); return(tclPkgProv_ret); } /* * Initialize the Tcl system when we are loaded, that way Tcl functions * are ready to be used when invoked. */ void __attribute__((constructor)) _Tclkit_Init(void) { Tcl_StaticPackage(0, "tclkit::init", Tclkit_init_Init, NULL); _Tclkit_Generic_Init(); return; } #endif |
Name change from kitdll/buildsrc/kitdll-0.0/tclsh.c to kitsh/buildsrc/kitsh-0.0/tclsh.c.
︙ | ︙ |
Name change from kitdll/buildsrc/kitdll-0.0/wish.c to kitsh/buildsrc/kitsh-0.0/wish.c.
︙ | ︙ |
Modified mk4tcl/build.sh from [9c93a36278] to [1ccf77c409].
︙ | ︙ | |||
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 | tryopts="--enable-shared --disable-shared" elif [ "${STATICMK4}" = "-1" ]; then tryopts="--enable-shared" else tryopts="--disable-shared" fi for tryopt in $tryopts __fail__; do # Clean up, if needed make distclean >/dev/null 2>/dev/null rm -rf "${INSTDIR}" mkdir "${INSTDIR}" if [ "${tryopt}" = "__fail__" ]; then exit 1 fi if [ "${tryopt}" == "--enable-shared" ]; then isshared="1" else isshared="0" fi ( echo "Running: ./configure $tryopt --prefix=\"${INSTDIR}\" --exec-prefix=\"${INSTDIR}\" --with-tcl=\"${TCLCONFIGDIR}/../generic\" ${CONFIGUREEXTRA}" ./configure $tryopt --prefix="${INSTDIR}" --exec-prefix="${INSTDIR}" --with-tcl="${TCLCONFIGDIR}/../generic" ${CONFIGUREEXTRA} echo "Running: ${MAKE:-make} tcllibdir=\"${INSTDIR}/lib\" AR=\"${AR:-ar}\" RANLIB=\"${RANLIB:-ranlib}\"" ${MAKE:-make} tcllibdir="${INSTDIR}/lib" AR="${AR:-ar}" RANLIB="${RANLIB:-ranlib}" || exit 1 | > > > > > > > > | 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 | tryopts="--enable-shared --disable-shared" elif [ "${STATICMK4}" = "-1" ]; then tryopts="--enable-shared" else tryopts="--disable-shared" fi SAVE_CXXFLAGS="${CXXFLAGS}" for tryopt in $tryopts __fail__; do # Clean up, if needed make distclean >/dev/null 2>/dev/null rm -rf "${INSTDIR}" mkdir "${INSTDIR}" if [ "${tryopt}" = "__fail__" ]; then exit 1 fi if [ "${tryopt}" == "--enable-shared" ]; then isshared="1" else isshared="0" fi # If build a static Mk4tcl for KitDLL, ensure that we use PIC # so that it can be linked into the shared object if [ "${isshared}" = "0" -a "${KITTARGET}" = "kitdll" ]; then CXXFLAGS="${SAVE_CXXFLAGS} -fPIC" export CXXFLAGS fi ( echo "Running: ./configure $tryopt --prefix=\"${INSTDIR}\" --exec-prefix=\"${INSTDIR}\" --with-tcl=\"${TCLCONFIGDIR}/../generic\" ${CONFIGUREEXTRA}" ./configure $tryopt --prefix="${INSTDIR}" --exec-prefix="${INSTDIR}" --with-tcl="${TCLCONFIGDIR}/../generic" ${CONFIGUREEXTRA} echo "Running: ${MAKE:-make} tcllibdir=\"${INSTDIR}/lib\" AR=\"${AR:-ar}\" RANLIB=\"${RANLIB:-ranlib}\"" ${MAKE:-make} tcllibdir="${INSTDIR}/lib" AR="${AR:-ar}" RANLIB="${RANLIB:-ranlib}" || exit 1 |
︙ | ︙ |
Added mk4tcl/patches/all/metakit-2.4.9.7-fixsharedobjlinker.diff version [6280191256].
> > > > > > > > > > > > > > > > > > > > > > > > > > | 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 | Binary files metakit-2.4.9.7.orig/unix/.Makefile.in.swp and metakit-2.4.9.7-1rsk/unix/.Makefile.in.swp differ Binary files metakit-2.4.9.7.orig/unix/.configure.in.swp and metakit-2.4.9.7-1rsk/unix/.configure.in.swp differ diff -uNr metakit-2.4.9.7.orig/unix/configure metakit-2.4.9.7-1rsk/unix/configure --- metakit-2.4.9.7.orig/unix/configure 2007-06-15 18:26:40.000000000 -0500 +++ metakit-2.4.9.7-1rsk/unix/configure 2011-03-09 07:39:59.000000000 -0600 @@ -1482,7 +1482,7 @@ if test $SHARED_BUILD = 1; then SHLIB_FLAGS="-shared" SHLIB_CFLAGS="-fPIC -DUSE_TCL_STUBS" - SHLIB_LD="g++ -shared" + SHLIB_LD="${CXX} -shared" else SHLIB_FLAGS="" SHLIB_CFLAGS="" diff -uNr metakit-2.4.9.7.orig/unix/configure.in metakit-2.4.9.7-1rsk/unix/configure.in --- metakit-2.4.9.7.orig/unix/configure.in 2007-06-15 18:26:40.000000000 -0500 +++ metakit-2.4.9.7-1rsk/unix/configure.in 2011-03-09 07:39:29.000000000 -0600 @@ -117,7 +117,7 @@ if test $SHARED_BUILD = 1; then SHLIB_FLAGS="-shared" SHLIB_CFLAGS="-fPIC -DUSE_TCL_STUBS" - SHLIB_LD="g++ -shared" + SHLIB_LD="${CXX} -shared" else SHLIB_FLAGS="" SHLIB_CFLAGS="" |
Modified tcl/build.sh from [805b596118] to [f8ef582bfc].
︙ | ︙ | |||
22 23 24 25 26 27 28 29 | rm -rf 'build' 'out' 'inst' mkdir 'build' 'out' 'inst' || exit 1 if [ ! -f "${SRC}" ]; then mkdir 'src' >/dev/null 2>/dev/null if echo "${TCLVERS}" | grep '^cvs_' >/dev/null; then | > > > | > > > > > > > > | > > > | > > > > > | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | > | > > > > | 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 | rm -rf 'build' 'out' 'inst' mkdir 'build' 'out' 'inst' || exit 1 if [ ! -f "${SRC}" ]; then mkdir 'src' >/dev/null 2>/dev/null use_fossil='0' if echo "${TCLVERS}" | grep '^cvs_' >/dev/null; then use_fossil='1' FOSSILTAG=$(echo "${TCLVERS}" | sed 's/^cvs_//g') if [ "${FOSSILTAG}" = "HEAD" ]; then FOSSILTAG="trunk" fi elif echo "${TCLVERS}" | grep '^fossil_' >/dev/null; then use_fossil='1' FOSSILTAG=$(echo "${TCLVERS}" | sed 's/^fossil_//g') fi export FOSSILTAG if [ "${use_fossil}" = "1" ]; then ( cd src || exit 1 workdir="tmp-$$${RANDOM}${RANDOM}${RANDOM}" rm -rf "${workdir}" mkdir "${workdir}" || exit 1 cd "${workdir}" || exit 1 # Handle Tcl first, since it will be used to base other packages on wget -O "tmp-tcl.tar.gz" "http://core.tcl.tk/tcl/tarball/tcl-fossil.tar.gz?uuid=${FOSSILTAG}" || rm -f 'tmp-tcl.tar.gz' gzip -dc 'tmp-tcl.tar.gz' | tar -xf - mv "tcl-fossil" "tcl${TCLVERS}" # Determine date of this Tcl release and use that date for all other dependent packages ## Unless the release we are talking about is "trunk", in which case we use that everywhere if [ "${FOSSILTAG}" = "trunk" ]; then FOSSILDATE="${FOSSILTAG}" else FOSSILDATE="$(echo 'cd "tcl'"${TCLVERS}"'"; set file [lindex [glob *] 0]; file stat $file finfo; set date $finfo(mtime); set date [expr {$date + 1}]; puts [clock format $date -format {%Y-%m-%dT%H:%M:%S}]' | TZ='UTC' "${TCLSH_NATIVE}")" fi ## If we are unable to determine the modification date, fall-back to the tag and hope for the best if [ -z "${FOSSILDATE}" ]; then FOSSILDATE="${FOSSILTAG}" fi # Handle other packages wget -O "tmp-itcl.tar.gz" "http://core.tcl.tk/itcl/tarball/itcl-fossil.tar.gz?uuid=${FOSSILDATE}" || rm -f 'tmp-itcl.tar.gz' wget -O "tmp-thread.tar.gz" "http://core.tcl.tk/thread/tarball/thread-fossil.tar.gz?uuid=${FOSSILDATE}" || rm -f "tmp-thread.tar.gz" wget -O "tmp-tclconfig.tar.gz" "http://core.tcl.tk/tclconfig/tarball/tclconfig-fossil.tar.gz?uuid=${FOSSILDATE}" || rm -f "tmp-tclconfig.tar.gz" gzip -dc "tmp-itcl.tar.gz" | tar -xf - gzip -dc "tmp-thread.tar.gz" | tar -xf - gzip -dc "tmp-tclconfig.tar.gz" | tar -xf - mkdir -p "tcl${TCLVERS}/pkgs/" >/dev/null 2>/dev/null mv "itcl-fossil" "tcl${TCLVERS}/pkgs/itcl" mv "thread-fossil" "tcl${TCLVERS}/pkgs/thread" cp -r "tclconfig-fossil" "tcl${TCLVERS}/pkgs/itcl/tclconfig" cp -r "tclconfig-fossil" "tcl${TCLVERS}/pkgs/thread/tclconfig" mv "tclconfig-fossil" "tcl${TCLVERS}/tclconfig" tar -cf - "tcl${TCLVERS}" | gzip -c > "../../${SRC}" echo "${FOSSILDATE}" > "../../${SRC}.date" cd .. rm -rf "${workdir}" ) || exit 1 else rm -f "${SRC}.tmp" wget -O "${SRC}.tmp" "${SRCURL}" || exit 1 mv "${SRC}.tmp" "${SRC}" fi fi |
︙ | ︙ | |||
75 76 77 78 79 80 81 | ( . "${patchscript}" ) fi done | < < < < < < < < < < < | 128 129 130 131 132 133 134 135 136 137 138 139 140 141 | ( . "${patchscript}" ) fi done 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 |
︙ | ︙ | |||
109 110 111 112 113 114 115 | ${MAKE:-make} || continue echo "Running: ${MAKE:-make} install" ${MAKE:-make} install || ( # Work with Tcl 8.6.x's TCLSH_NATIVE solution for # cross-compile installs | | | | | | | | 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 | ${MAKE:-make} || continue echo "Running: ${MAKE:-make} install" ${MAKE:-make} install || ( # Work with Tcl 8.6.x's TCLSH_NATIVE solution for # cross-compile installs echo "Running: ${MAKE:-make} install TCLSH_NATIVE=\"${TCLSH_NATIVE}\"" ${MAKE:-make} install TCLSH_NATIVE="${TCLSH_NATIVE}" ) || ( # Make install can fail if cross-compiling using Tcl 8.5.x # because the Makefile calls "$(TCLSH)". We can't simply # redefine TCLSH because it also uses TCLSH as a build target sed 's@^$(TCLSH)@blah@' Makefile > Makefile.new cat Makefile.new > Makefile rm -f Makefile.new echo "Running: ${MAKE:-make} install TCLSH=\"../../../../../../../../../../../../../../../../../$(which "${TCLSH_NATIVE}")\"" ${MAKE:-make} install TCLSH="../../../../../../../../../../../../../../../../../$(which "${TCLSH_NATIVE}")" ) || ( # Make install can fail if cross-compiling using Tcl 8.5.9 # because the Makefile calls "${TCL_EXE}". We can't simply # redefine TCL_EXE because it also uses TCL_EXE as a build target sed 's@^${TCL_EXE}@blah@' Makefile > Makefile.new cat Makefile.new > Makefile rm -f Makefile.new echo "Running: ${MAKE:-make} install TCL_EXE=\"../../../../../../../../../../../../../../../../../$(which "${TCLSH_NATIVE}")\"" ${MAKE:-make} install TCL_EXE="../../../../../../../../../../../../../../../../../$(which "${TCLSH_NATIVE}")" ) || exit 1 mkdir "${OUTDIR}/lib" || exit 1 cp -r "${INSTDIR}/lib"/* "${OUTDIR}/lib/" rm -rf "${OUTDIR}/lib/pkgconfig" rm -f "${OUTDIR}"/lib/* >/dev/null 2>/dev/null find "${OUTDIR}" -name '*.a' | xargs rm -f >/dev/null 2>/dev/null |
︙ | ︙ |
Added tcl/patchscripts/minbuild-nopkgs.sh version [d1143d6e77].
> > > > > | 1 2 3 4 5 | #! /bin/bash if [ -n "${KITCREATOR_MINBUILD}" ]; then rm -rf 'pkgs' 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 tclvfs/build.sh from [d1e2c23178] to [c20cbb9749].
︙ | ︙ | |||
81 82 83 84 85 86 87 | echo "Running: ./configure --disable-shared --prefix=\"${INSTDIR}\" --exec-prefix=\"${INSTDIR}\" --with-tcl=\"${TCLCONFIGDIR}\" ${CONFIGUREEXTRA}" ./configure --disable-shared --prefix="${INSTDIR}" --exec-prefix="${INSTDIR}" --with-tcl="${TCLCONFIGDIR}" ${CONFIGUREEXTRA} echo "Running: ${MAKE:-make}" ${MAKE:-make} || exit 1 echo "Running: ${MAKE:-make} install" | | | 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 | echo "Running: ./configure --disable-shared --prefix=\"${INSTDIR}\" --exec-prefix=\"${INSTDIR}\" --with-tcl=\"${TCLCONFIGDIR}\" ${CONFIGUREEXTRA}" ./configure --disable-shared --prefix="${INSTDIR}" --exec-prefix="${INSTDIR}" --with-tcl="${TCLCONFIGDIR}" ${CONFIGUREEXTRA} echo "Running: ${MAKE:-make}" ${MAKE:-make} || exit 1 echo "Running: ${MAKE:-make} install" ${MAKE:-make} install || exit 1 mkdir "${OUTDIR}/lib" || exit 1 cp -r "${INSTDIR}/lib"/vfs* "${OUTDIR}/lib/" rm -f "${OUTDIR}/lib"/vfs*/*.a "${OUTDIR}/lib"/vfs*/*.so exit 0 ) || exit 1 |
︙ | ︙ |
Modified tk/build.sh from [394ddd8947] to [12528bdfc5].
︙ | ︙ | |||
13 14 15 16 17 18 19 | 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" | > | > > > > > > | > > | > | > | > > | > > > > > | | | > > > | 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 | 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 PATCHSCRIPTDIR # Must be kept in-sync with "../tcl/build.sh" TCLFOSSILDATE="../tcl/src/tcl${TCLVERS}.tar.gz.date" export TCLFOSSILDATE rm -rf 'build' 'out' 'inst' mkdir 'build' 'out' 'inst' || exit 1 # Determine Tcl version TCL_VERSION="unknown" if [ -f "${TCLCONFIGDIR}/tclConfig.sh" ]; then source "${TCLCONFIGDIR}/tclConfig.sh" fi export TCL_VERSION if [ ! -f "${SRC}" ]; then mkdir 'src' >/dev/null 2>/dev/null use_fossil='0' if echo "${TCLVERS}" | grep '^cvs_' >/dev/null; then use_fossil='1' elif echo "${TCLVERS}" | grep '^fossil_' >/dev/null; then use_fossil='1' fi if [ "${use_fossil}" = "1" ]; then ( FOSSILDATE="$(cat "${TCLFOSSILDATE}" 2>/dev/null)" cd src || exit 1 workdir="tmp-$$${RANDOM}${RANDOM}${RANDOM}" rm -rf "${workdir}" mkdir "${workdir}" || exit 1 cd "${workdir}" || exit 1 wget -O "tmp-tk.tar.gz" "http://core.tcl.tk/tk/tarball/tk-fossil.tar.gz?uuid=${FOSSILDATE}" || rm -f 'tmp-tk.tar.gz' gzip -dc "tmp-tk.tar.gz" | tar -xf - mv "tk-fossil" "tk${TCLVERS}" tar -cf - "tk${TCLVERS}" | gzip -c > "../../${SRC}" cd .. rm -rf "${workdir}" ) else rm -f "${SRC}.tmp" wget -O "${SRC}.tmp" "${SRCURL}" || exit 1 mv "${SRC}.tmp" "${SRC}" fi fi |
︙ | ︙ | |||
82 83 84 85 86 87 88 89 90 91 92 93 94 95 | continue fi echo "Applying: ${patch}" ${PATCH:-patch} -p1 < "${patch}" done ) for dir in unix win macosx win64 __fail__; do if [ "${dir}" = "__fail__" ]; then exit 1 fi # Windows/amd64 workarounds | > > > > > > > > > > > | 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 | 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 |
︙ | ︙ | |||
139 140 141 142 143 144 145 146 147 148 149 150 151 152 | ) || continue echo "Running: ${MAKE:-make} install" ${MAKE:-make} install || continue # Update to include resources, if found if [ "${dir}" = "win" ]; then echo ' *** Creating tkbase.res.o to support Windows build' echo "\"${RC:-windres}\" -o tkbase.res.o --define STATIC_BUILD --include \"./../generic\" --include \"${TCLCONFIGDIR}/../generic\" --include \"${TCLCONFIGDIR}\" --include \"./rc\" \"./rc/tk_base.rc\"" "${RC:-windres}" -o tkbase.res.o --define STATIC_BUILD --include "./../generic" --include "${TCLCONFIGDIR}/../generic" --include "${TCLCONFIGDIR}" --include "./rc" "./rc/tk_base.rc" if [ -f "tkbase.res.o" ]; then cp "tkbase.res.o" "${INSTDIR}/lib/" fi | > > > > > > | 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 | ) || continue echo "Running: ${MAKE:-make} install" ${MAKE:-make} install || continue # Update to include resources, if found if [ "${dir}" = "win" ]; then echo ' *** Importing user-specified icon' cp "${KITCREATOR_ICON}" rc/tk.ico echo ' *** Importing user-specified resources' cat "${KITCREATOR_RC}" | grep -v '^ *tclsh *ICON' >> "./rc/tk_base.rc" echo ' *** Creating tkbase.res.o to support Windows build' echo "\"${RC:-windres}\" -o tkbase.res.o --define STATIC_BUILD --include \"./../generic\" --include \"${TCLCONFIGDIR}/../generic\" --include \"${TCLCONFIGDIR}\" --include \"./rc\" \"./rc/tk_base.rc\"" "${RC:-windres}" -o tkbase.res.o --define STATIC_BUILD --include "./../generic" --include "${TCLCONFIGDIR}/../generic" --include "${TCLCONFIGDIR}" --include "./rc" "./rc/tk_base.rc" if [ -f "tkbase.res.o" ]; then cp "tkbase.res.o" "${INSTDIR}/lib/" fi |
︙ | ︙ |
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 |