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

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

     8      8   server/buildpkgs/Tclx/src/*
     9      9   server/buildpkgs/dict/build
    10     10   server/buildpkgs/dict/build/*
    11     11   server/buildpkgs/dict/out
    12     12   server/buildpkgs/dict/out/*
    13     13   server/buildpkgs/dict/src
    14     14   server/buildpkgs/dict/src/*
           15  +server/buildpkgs/platform.magic.*
           16  +server/buildpkgs/platform.magic.*/*
    15     17   server/buildpkgs/tcl
    16     18   server/buildpkgs/tcl/*
    17     19   server/buildpkgs/tclpkgs-*.tar.*
    18     20   server/buildpkgs/tclpkgs-*.tar.*/*
    19     21   server/buildpkgs/tls/build
    20     22   server/buildpkgs/tls/build/*
    21     23   server/buildpkgs/tls/out
    22     24   server/buildpkgs/tls/out/*
    23     25   server/buildpkgs/tls/src
    24     26   server/buildpkgs/tls/src/*
    25     27   server/pkgs
    26     28   server/pkgs/*

Modified server/buildpkgs/Tclx/build.sh from [efebbc9ef2] to [e6281d406a].

     7      7   fi
     8      8   
     9      9   VERS=8.4
    10     10   SRC="src/tclx${VERS}.tar.bz2"
    11     11   SRCURL="http://sourceforge.net/projects/tclx/files/TclX/${VERS}.0/tclx${VERS}.tar.bz2/download"
    12     12   BUILDDIR="tclx${VERS}"
    13     13   WORKDIR="${TMPDIR:-/tmp}/tclx-$$${RANDOM}${RANDOM}${RANDOM}"
    14         -PLATFORM="$(../platform)"
    15     14   PLATDIR="$(pwd)/out/${PLATFORM}"
    16     15   
    17         -export VERS SRC SRCURL BUILDDIR WORKDIR PLATFORM PLATDIR
           16  +export VERS SRC SRCURL BUILDDIR WORKDIR PLATDIR
    18     17   
    19     18   (
    20     19   	rm -rf build
    21     20   	mkdir build
    22     21   ) || exit 1
    23     22   
    24     23   if [ ! -f "${SRC}" ]; then
................................................................................
    77     76   +    char *srcChannelId = NULL, *targetChannelId;
    78     77    
    79     78        if ((objc < 2) || (objc > 3)) {
    80     79            return TclX_WrongArgs (interp, objv [0],
    81     80   __EOF__
    82     81   
    83     82   
    84         -	bash ./configure --enable-shared --with-tcl="${TCLCONFIGDIR}" --libdir="${PLATDIR}"
           83  +	bash ./configure --enable-shared --with-tcl="${TCLCONFIGDIR}" --libdir="${PLATDIR}" ${CONFIGUREEXTRA}
    85     84   	${MAKE:-make} || exit 1
    86     85   
    87     86   	mkdir -p "${PLATDIR}" >/dev/null 2>/dev/null
    88     87   
    89     88   	${MAKE:-make} install-lib-binaries PKG_DIR='' || exit 1
    90     89   
    91     90   ) || exit 1
    92     91   
    93     92   ../create_teapot "${PLATDIR}/teapot.txt" "Tclx" "${VERS}" "${SRCURL}" "${PLATFORM}" "Tcl 8.4" "Extended Tcl"
    94     93   
    95     94   exit 0

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

     5      5   
     6      6   	exit 1
     7      7   fi
     8      8   
     9      9   CLEANONLY=0
    10     10   DISTCLEAN=0
    11     11   if [ "$1" = "clean" ]; then
           12  +	shift
    12     13   	CLEANONLY=1
    13     14   fi
    14     15   if [ "$1" = "distclean" ]; then
           16  +	shift
    15     17   	CLEANONLY=1
    16     18   	DISTCLEAN=1
    17     19   fi
    18     20   export CLEANONLY DISTCLEAN
    19     21   
           22  +CONFIGUREEXTRA="$@"
           23  +export CONFIGUREEXTRA
           24  +
    20     25   # Determine path to "tclConfig.sh"
    21     26   rm -rf tcl/build
           27  +rm -f platform.magic.*
    22     28   if [ "${DISTCLEAN}" = "1" ]; then
    23     29   	rm -rf tcl
    24     30   fi
    25     31   
    26     32   if [ "${CLEANONLY}" = "0" ]; then
    27     33   	TCLVERS="8.4.19"
    28     34   	TCLPRIVATE="$(pwd)/tcl/build/tcl${TCLVERS}"
           35  +	PROJROOTDIR="$(pwd)"
           36  +	export TCLVERS TCLPRIVATE PROJROOTDIR
    29     37   
    30     38   	mkdir tcl tcl/build >/dev/null 2>/dev/null
    31     39   
    32     40   	if [ ! -f "tcl/src/tcl${TCLVERS}.tar.gz" ]; then
    33     41   		mkdir tcl/src >/dev/null 2>/dev/null
    34     42   		wget -o /dev/null -O "tcl/src/tcl${TCLVERS}.tar.gz" "http://prdownloads.sourceforge.net/tcl/tcl${TCLVERS}-src.tar.gz"
    35     43   	fi
................................................................................
    36     44   
    37     45   	echo "Building Tcl ${TCLVERS}"
    38     46   	(
    39     47   		mkdir tcl/build >/dev/null 2>/dev/null
    40     48   		cd tcl/build || exit 1
    41     49   		gzip -dc "../src/tcl${TCLVERS}.tar.gz" | tar -xf -
    42     50   
    43         -		cd "${TCLPRIVATE}/unix" || exit 1
           51  +		for dir in unix win macosx; do
           52  +			cd "${TCLPRIVATE}/${dir}" || exit 1
    44     53   
    45         -		./configure --enable-shared
           54  +			echo " Executing: ./configure ${CONFIGUREEXTRA}"
           55  +			./configure --disable-threads ${CONFIGUREEXTRA}
    46     56   
    47         -		${MAKE:-make}
    48         -	) > "tcl/build/build.log" 2>&1
           57  +			${MAKE:-make} || continue
    49     58   
    50         -	if [ -d "${TCLPRIVATE}" -a -f "${TCLPRIVATE}/unix/tclConfig.sh" ]; then
    51         -		TCLCONFIGDIR="${TCLPRIVATE}/unix"
           59  +			LD_LIBRARY_PATH=".:${LD_LIBRARY_PATH}"
           60  +			LD_RUN_PATH=".:${LD_RUN_PATH}"
           61  +			export LD_LIBRARY_PATH LD_RUN_PATH
           62  +
           63  +			file tclsh tclsh*.exe 2>/dev/null | grep -iv 'No such file' > "${PROJROOTDIR}/platform.magic.file"
           64  +			if [ -f tclsh*.exe ]; then
           65  +				echo 'puts "$::tcl_platform(os)"' | ./tclsh*.exe > "${PROJROOTDIR}/platform.magic.os" 2>/dev/null
           66  +			else
           67  +				echo 'puts "$::tcl_platform(os)"' | ./tclsh > "${PROJROOTDIR}/platform.magic.os" 2>/dev/null
           68  +			fi
           69  +			echo "${dir}" > "${PROJROOTDIR}/platform.magic.platform"
           70  +			pwd > "${PROJROOTDIR}/platform.magic.dir"
           71  +
           72  +			break
           73  +		done
           74  +	) > "tcl/build/build.log" 2>&1 || (
           75  +		echo 'Failed to build Tcl.  See "./tcl/build/build.log"'
           76  +		echo 'Proceeding with system Tcl.  Building might fail.'
           77  +	)
           78  +
           79  +	TCLBUILDDIR="$(cat "${PROJROOTDIR}/platform.magic.dir")"
           80  +	export TCLBUILDDIR
           81  +
           82  +	if [ -d "${TCLBUILDDIR}" -a -f "${TCLBUILDDIR}/tclConfig.sh" ]; then
           83  +		TCLCONFIGDIR="${TCLBUILDDIR}"
    52     84   	else
    53     85   		unset TCLPRIVATE
    54     86   
    55     87   		TCLCONFIGDIR=$(
    56     88   			(
    57     89   				echo "${LD_LIBRARY_PATH}" | tr ':' "\n"
    58     90   				cat /etc/ld.so.conf 2>/dev/null
................................................................................
    64     96   				fi
    65     97   			done
    66     98   		)
    67     99   		if [ -z "${TCLCONFIGDIR}" ]; then
    68    100   			TCLCONFIGDIR="/usr/lib"
    69    101   		fi
    70    102   
    71         -		TCLPRIVATE="${TCLCONFIGDIR}/../include/tcl-private"
          103  +		TCLPRIVATE="$(dirname "${TCLCONFIGDIR}")/include/tcl-private"
    72    104   	fi
    73    105   
    74         -	ADDFLAGS="-I${TCLPRIVATE} -I${TCLPRIVATE}/generic -I${TCLPRIVATE}/unix"
          106  +	ADDFLAGS="-I${TCLPRIVATE} -I${TCLPRIVATE}/generic -I${TCLBUILDDIR}"
    75    107   	CFLAGS="${ADDFLAGS} ${CFLAGS}"
    76    108   	CPPFLAGS="${ADDFLAGS} ${CPPFLAGS}"
    77    109   
    78    110   	unset TCLVERS
    79    111   	unset ADDFLAGS
          112  +	unset TCLBUILDDIR
    80    113   	export TCLCONFIGDIR TCLPRIVATE CFLAGS CPPFLAGS
    81    114   fi
    82    115   
    83    116   # Determine platform
    84    117   PLATFORM="$(./platform)"
    85    118   export PLATFORM
    86    119   

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

     7      7   fi
     8      8   
     9      9   VERS=8.5.2
    10     10   SRC="src/tclDict-${VERS}.tar.gz"
    11     11   SRCURL="http://pascal.scheffers.net/software/tclDict-${VERS}.tar.gz"
    12     12   BUILDDIR="tclDict-${VERS}"
    13     13   WORKDIR="${TMPDIR:-/tmp}/dict-$$${RANDOM}${RANDOM}${RANDOM}"
    14         -PLATFORM="$(../platform)"
    15     14   PLATDIR="$(pwd)/out/${PLATFORM}"
    16     15   
    17         -export VERS SRC SRCURL BUILDDIR WORKDIR PLATFORM PLATDIR
           16  +export VERS SRC SRCURL BUILDDIR WORKDIR PLATDIR
    18     17   
    19     18   if [ ! -f "${SRC}" ]; then
    20     19   	mkdir src >/dev/null 2>/dev/null
    21     20   
    22     21   	wget -O "${SRC}" "${SRCURL}" || exit 1
    23     22   fi
    24     23   
    25     24   (
    26         -	rm -rf build out
           25  +	rm -rf build
    27     26   	mkdir -p "${PLATDIR}" >/dev/null 2>/dev/null
    28     27   	mkdir build
    29     28   
    30     29   	cd build/ || exit 1
    31     30   
    32     31   	gzip -dc "../${SRC}" | tar -xf -
    33     32   	cd "${BUILDDIR}" || exit 1
................................................................................
    34     33   
    35     34   	# This fixes a well-known, long-standing failure in many Tcl
    36     35   	# configure scripts
    37     36   	sed "s@ /etc/\\.relid'@ '/etc/.relid'@" configure > configure.new
    38     37   	cat configure.new > configure
    39     38   	rm -f configure.new
    40     39   
    41         -	./configure --enable-shared --with-tcl="${TCLCONFIGDIR}" --prefix="${PLATDIR}" --libdir="${PLATDIR}" --bindir="${PLATDIR}"
           40  +	bash ./configure --enable-shared --with-tcl="${TCLCONFIGDIR}" --prefix="${PLATDIR}" --libdir="${PLATDIR}" --bindir="${PLATDIR}" ${CONFIGUREEXTRA}
    42     41   
    43     42   	${MAKE:-make} || exit 1
    44     43   
    45     44   	${MAKE:-make} install-binaries PKG_DIR='' || exit 1
    46     45   
    47     46   	rm -f "${PLATDIR}"/*.a
    48     47   ) || exit 1
    49     48   
    50     49   ../create_teapot "${PLATDIR}/teapot.txt" "dict" "${VERS}" "${SRCURL}" "${PLATFORM}" "Tcl 8.4" "Dict Backports for Tcl 8.4"
    51     50   
    52     51   exit 0

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

     1      1   #! /bin/bash
     2      2   
     3         -case "`uname -s`" in
            3  +MAGICFILEFILE="$0.magic.file"
            4  +MAGICOSFILE="$0.magic.os"
            5  +MAGICPLATFILE="$0.magic.platform"
            6  +
            7  +OSNAME="`uname -s`"
            8  +CPUPLAT="`uname -m`"
            9  +
           10  +if [ -f "${MAGICFILEFILE}" -a -f "${MAGICOSFILE}" -a -f "${MAGICPLATFILE}" ]; then
           11  +	MAGICPLAT="$(cat "${MAGICPLATFILE}")"
           12  +	MAGICOS="$(cat "${MAGICOSFILE}")"
           13  +	MAGICFILE="$(cat "${MAGICFILEFILE}" | dd conv=lcase 2>/dev/null)"
           14  +
           15  +	case "${MAGICPLAT}" in
           16  +		unix)
           17  +			case "${MAGICFILE}" in
           18  +				*elf*x86-64*)
           19  +					CPUPLAT="x86_64"
           20  +					;;
           21  +				*elf*intel\ 80386*)
           22  +					CPUPLAT="ix86"
           23  +					;;
           24  +				*parisc*)
           25  +					CPUPLAT="parisc"
           26  +					;;
           27  +				*elf*32-bit*sparc*)
           28  +					CPUPLAT="sparc"
           29  +					;;
           30  +				*elf*64-bit*sparc*)
           31  +					CPUPLAT="sparc64"
           32  +					;;
           33  +			esac
           34  +
           35  +			if [ "${MAGICOS}" != "`uname -s`" ]; then
           36  +				# Cross compiling, try to determine OS ...
           37  +				true
           38  +			fi
           39  +			;;
           40  +		win)
           41  +			if grep "64-bit" "${MAGICFILEFILE}" >/dev/null; then
           42  +				echo "win32-x86_64"
           43  +			else
           44  +				echo "win32-ix86"
           45  +			fi
           46  +
           47  +			exit 0
           48  +			;;
           49  +		macosx)
           50  +			;;
           51  +	esac
           52  +fi
           53  +
           54  +case "${OSNAME}" in
     4     55   	Linux)
     5     56   		GLIBCVERS=$(strings /lib/libc.so.6 | grep '^GLIBC_[0-9][0-9]*\.[0-9]*' | cut -f 2- -d _ | cut -f 1-2 -d . | sed 's@\.@ @g' |  sort -n +0 +1 | tail -1 | sed 's@ @\.@g')
     6     57   
     7         -		case "`uname -m`" in
           58  +		case "${CPUPLAT}" in
     8     59   			i?86)
     9     60   				CPUPLAT="ix86"
    10     61   				;;
    11     62   			sun4?)
    12     63   				CPUPLAT="sparc"
    13     64   				;;
    14         -			*)
    15         -				CPUPLAT="`uname -m`"
    16         -				;;
    17     65   		esac
    18     66   
    19     67   		echo "linux-glibc${GLIBCVERS}-${CPUPLAT}"
    20     68   		;;
    21     69   	SunOS)
    22     70   		SUNMAJVER=$(uname -r | cut -f 1 -d .)
    23     71   		SUNMINVER=$(uname -r | cut -f 2 -d .)

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

     7      7   fi
     8      8   
     9      9   VERS=1.6
    10     10   SRC="src/tls${VERS}-src.tar.gz"
    11     11   SRCURL="http://sourceforge.net/projects/tls/files/tls/${VERS}/tls${VERS}-src.tar.gz/download"
    12     12   BUILDDIR="tls${VERS}"
    13     13   WORKDIR="${TMPDIR:-/tmp}/tls-$$${RANDOM}${RANDOM}${RANDOM}"
    14         -PLATFORM="$(../platform)"
    15     14   PLATDIR="$(pwd)/out/${PLATFORM}"
    16     15   
    17         -export VERS SRC SRCURL BUILDDIR WORKDIR PLATFORM PLATDIR
           16  +export VERS SRC SRCURL BUILDDIR WORKDIR PLATDIR
    18     17   
    19     18   if [ ! -f "${SRC}" ]; then
    20     19   	mkdir src >/dev/null 2>/dev/null
    21     20   
    22     21   	wget -O "${SRC}" "${SRCURL}" || exit 1
    23     22   fi
    24     23   
................................................................................
    35     34   			SSLDIR=$(echo "${chkssldir}" | sed 's@/[^/]*/*$@@')
    36     35   		fi
    37     36   	done
    38     37   	if [ -z "${SSLDIR}" ]; then
    39     38   		SSLDIR="/usr"
    40     39   	fi
    41     40   
    42         -	./configure --enable-shared --with-tcl="${TCLCONFIGDIR}" --with-ssl-dir="${SSLDIR}"
           41  +	bash ./configure --enable-shared --with-tcl="${TCLCONFIGDIR}" --with-ssl-dir="${SSLDIR}" ${CONFIGUREEXTRA}
    43     42   	${MAKE:-make} || exit 1
    44     43   ) || exit 1
    45     44   
    46     45   (
    47     46   	mkdir -p "${PLATDIR}" >/dev/null 2>/dev/null
    48     47   
    49     48   	cp "build/${BUILDDIR}/libtls1.6.so" "${PLATDIR}/"