Diff

Differences From Artifact [93c05ef384]:

To Artifact [f8a9b7f22e]:


    82     82   				FOSSILDATE="${FOSSILTAG}"
    83     83   			fi
    84     84   
    85     85   			# Handle other packages
    86     86   			wget -O "tmp-itcl.tar.gz" "http://core.tcl.tk/itcl/tarball/itcl-fossil.tar.gz?uuid=${FOSSILDATE}" || rm -f 'tmp-itcl.tar.gz'
    87     87   			wget -O "tmp-thread.tar.gz" "http://core.tcl.tk/thread/tarball/thread-fossil.tar.gz?uuid=${FOSSILDATE}" || rm -f "tmp-thread.tar.gz"
    88     88   			wget -O "tmp-tclconfig.tar.gz" "http://core.tcl.tk/tclconfig/tarball/tclconfig-fossil.tar.gz?uuid=${FOSSILDATE}" || rm -f "tmp-tclconfig.tar.gz"
           89  +			if [ "${FOSSILDATE}" = "trunk" ] || [ "$(echo "${FOSSILDATE}" | cut -f 1 -d '-')" -ge '2012' ]; then
           90  +				_USE_TDBC='1'
           91  +				_USE_SQLITE='1'
           92  +				SQLITEVERS='3071401'
           93  +			fi
           94  +
           95  +			if [ "${_USE_TDBC}" = '1' ]; then
           96  +				wget -O "tmp-tdbc.tar.gz" "http://core.tcl.tk/tdbc/tarball/tdbc-fossil.tar.gz?uuid=${FOSSILDATE}" || rm -f "tmp-tdbc.tar.gz"
           97  +			fi
           98  +
           99  +			if [ "${_USE_SQLITE}" = '1' ]; then
          100  +				wget -O "tmp-sqlite3.tar.gz" "http://www.sqlite.org/sqlite-autoconf-${SQLITEVERS}.tar.gz" || rm -f "tmp-sqlite3.tar.gz"
          101  +			fi
    89    102   
    90    103   			gzip -dc "tmp-itcl.tar.gz" | tar -xf -
    91    104   			gzip -dc "tmp-thread.tar.gz" | tar -xf -
    92    105   			gzip -dc "tmp-tclconfig.tar.gz" | tar -xf -
    93    106   
    94    107   			mkdir -p "tcl${TCLVERS}/pkgs/" >/dev/null 2>/dev/null
    95    108   			mv "itcl-fossil" "tcl${TCLVERS}/pkgs/itcl"
    96    109   			mv "thread-fossil" "tcl${TCLVERS}/pkgs/thread"
    97    110   			cp -r "tclconfig-fossil" "tcl${TCLVERS}/pkgs/itcl/tclconfig"
    98    111   			cp -r "tclconfig-fossil" "tcl${TCLVERS}/pkgs/thread/tclconfig"
    99    112   			mv "tclconfig-fossil" "tcl${TCLVERS}/tclconfig"
          113  +
          114  +			if [ "${_USE_TDBC}" = '1' ]; then
          115  +				gzip -dc "tmp-tdbc.tar.gz" | tar -xf -
          116  +				mv "tdbc-fossil/tdbc" "tcl${TCLVERS}/pkgs/tdbc"
          117  +				mv "tdbc-fossil/tdbcsqlite3" "tcl${TCLVERS}/pkgs/tdbcsqlite3"
          118  +			fi
          119  +
          120  +			if [ "${_USE_SQLITE}" = '1' ]; then
          121  +				gzip -dc "tmp-sqlite3.tar.gz" | tar -xf -
          122  +
          123  +				mv "sqlite-autoconf-${SQLITEVERS}" sqlite-fossil
          124  +				(
          125  +					cd sqlite-fossil || exit
          126  +
          127  +					mv sqlite3.c tea/generic/
          128  +					for file in *; do
          129  +						if [ "${file}" = "tea" ]; then
          130  +							continue
          131  +						fi
          132  +
          133  +						rm -f "${file}"
          134  +					done
          135  +					mv tea/* .
          136  +					rmdir tea
          137  +
          138  +					sed 's@\.\./\.\./sqlite3\.c@./sqlite3.c@' generic/tclsqlite3.c > generic/tclsqlite3.c.new
          139  +					cat generic/tclsqlite3.c.new > generic/tclsqlite3.c
          140  +					rm -f generic/tclsqlite3.c.new
          141  +				)
          142  +				mv sqlite-fossil "tcl${TCLVERS}/pkgs/sqlite3" >/dev/null 2>/dev/null
          143  +			fi
   100    144   
   101    145   			tar -cf - "tcl${TCLVERS}" | gzip -c > "../../${SRC}"
   102    146   			echo "${FOSSILDATE}" > "../../${SRC}.date"
   103    147   
   104    148   			cd ..
   105    149   
   106    150   			rm -rf "${workdir}"