Check-in [6305420046]
Overview
Comment:Updated build procedure to use a common handler
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:6305420046e3d70154c2eb97811bb28efdc06f5b
User & Date: rkeene on 2011-07-06 02:03:56
Other Links: manifest | tags
Context
2011-07-06
02:15
Fixed issue with dbus-tcl putting files in weird places Updated to clean-up "out" directories up run check-in: 32e6a2e492 user: rkeene tags: trunk
02:03
Updated build procedure to use a common handler check-in: 6305420046 user: rkeene tags: trunk
2011-06-30
00:29
Corrected typo check-in: 0fb44ad541 user: rkeene tags: trunk
Changes

Modified server/buildpkgs/Tclx/build.sh from [d5a82463ec] to [8402b3d3d2].

     1      1   #! /bin/bash
     2      2   
     3         -if [ ! -x "../platform" ]; then
     4         -	echo "No platform script found, aborting." >&2
     5         -
     6         -	exit 1
     7         -fi
     8         -
     9         -if [ "${PLATFORM}" = "tcl" ]; then
    10         -	rm -rf out
    11         -
    12         -	exit 0
    13         -fi
    14         -
            3  +# Define parameters
    15      4   VERS=8.4
    16      5   SRC="src/tclx${VERS}.tar.bz2"
    17      6   SRCURL="http://sourceforge.net/projects/tclx/files/TclX/${VERS}.0/tclx${VERS}.tar.bz2/download"
    18      7   BUILDDIR="tclx${VERS}"
    19         -WORKDIR="${TMPDIR:-/tmp}/tclx-$$${RANDOM}${RANDOM}${RANDOM}"
    20         -PLATDIR="$(pwd)/out/${PLATFORM}"
            8  +export VERS SRC SRCURL BUILDDIR
    21      9   
    22         -export VERS SRC SRCURL BUILDDIR WORKDIR PLATDIR
           10  +# Load common functions
           11  +source ../common.sh
           12  +
           13  +# Do not build if the "tcl" platform has been requested
           14  +not_platforms 'tcl'
           15  +
           16  +# Download source
           17  +download_src
    23     18   
    24     19   (
    25     20   	rm -rf build
    26     21   	mkdir build
    27         -) || exit 1
    28     22   
    29         -if [ ! -f "${SRC}" ]; then
    30         -	mkdir src >/dev/null 2>/dev/null
    31         -
    32         -	wget -O "${SRC}" "${SRCURL}" || exit 1
    33         -fi
    34         -
    35         -(
    36     23   	cd build/ || exit 1
    37     24   
    38     25   	bzip2 -dc "../${SRC}" | tar -xf -
    39     26   	cd "${BUILDDIR}" || exit 1
    40     27   
    41     28   	cat << \__EOF__ | patch -p1
    42     29   --- tclx8.4/configure.relid	2006-02-03 16:13:25.000000000 -0500

Modified server/buildpkgs/build_all.sh from [4d38f54be3] to [9154479c58].

    26     26   rm -rf tcl/build tcl/inst
    27     27   rm -f platform.magic.*
    28     28   if [ "${DISTCLEAN}" = "1" ]; then
    29     29   	rm -rf tcl
    30     30   fi
    31     31   
    32     32   if [ "${CLEANONLY}" = "0" ]; then
    33         -	TCLVERS="8.5.9"
    34         -	TCLPRIVATE="$(pwd)/tcl/build/tcl${TCLVERS}"
    35     33   	PROJROOTDIR="$(pwd)"
    36         -	TCLINSTDIR="$(pwd)/tcl/inst"
    37         -	export TCLVERS TCLPRIVATE PROJROOTDIR TCLINSTDIR
    38         -
    39         -	mkdir tcl tcl/build >/dev/null 2>/dev/null
    40         -
    41         -	if [ ! -f "tcl/src/tcl${TCLVERS}.tar.gz" ]; then
    42         -		mkdir tcl/src >/dev/null 2>/dev/null
    43         -		wget -o /dev/null -O "tcl/src/tcl${TCLVERS}.tar.gz" "http://prdownloads.sourceforge.net/tcl/tcl${TCLVERS}-src.tar.gz"
    44         -	fi
    45         -
    46         -	echo "Building Tcl ${TCLVERS}"
    47         -	(
    48         -		mkdir tcl/build >/dev/null 2>/dev/null
    49         -		cd tcl/build || exit 1
    50         -		gzip -dc "../src/tcl${TCLVERS}.tar.gz" | tar -xf -
    51         -
    52         -		# DDE and Reg can fail to compile, but we don't care
    53         -		echo '' > "${TCLPRIVATE}/win/tclWinDde.c"
    54         -		echo '' > "${TCLPRIVATE}/win/tclWinReg.c"
    55         -
    56         -		for dir in unix win macosx; do
    57         -			cd "${TCLPRIVATE}/${dir}" || exit 1
    58         -
    59         -			echo " Executing: ./configure ${CONFIGUREEXTRA}"
    60         -			./configure --disable-threads ${CONFIGUREEXTRA} --prefix="${TCLINSTDIR}"
    61         -
    62         -			${MAKE:-make} || continue
    63         -			${MAKE:-make} install || break
    64         -
    65         -			LD_LIBRARY_PATH=".:${LD_LIBRARY_PATH}"
    66         -			LD_RUN_PATH=".:${LD_RUN_PATH}"
    67         -			export LD_LIBRARY_PATH LD_RUN_PATH
    68         -
    69         -			file tclsh tclsh*.exe 2>/dev/null | grep -iv 'No such file' > "${PROJROOTDIR}/platform.magic.file"
    70         -			if [ -f tclsh*.exe ]; then
    71         -				echo 'puts "$::tcl_platform(os)"' | ./tclsh*.exe > "${PROJROOTDIR}/platform.magic.os" 2>/dev/null
    72         -			else
    73         -				echo 'puts "$::tcl_platform(os)"' | ./tclsh > "${PROJROOTDIR}/platform.magic.os" 2>/dev/null
    74         -			fi
    75         -			echo "${dir}" > "${PROJROOTDIR}/platform.magic.platform"
    76         -			pwd > "${PROJROOTDIR}/platform.magic.dir"
    77         -
    78         -			break
    79         -		done
    80         -	) > "tcl/build/build.log" 2>&1 || (
    81         -		echo 'Failed to build Tcl.  See "./tcl/build/build.log"'
    82         -		echo 'Proceeding with system Tcl.  Building might fail.'
    83         -	)
    84         -
    85         -	TCLBUILDDIR="$(cat "${PROJROOTDIR}/platform.magic.dir")"
    86         -	export TCLBUILDDIR
    87         -
    88         -	if [ -d "${TCLINSTDIR}" -a -f "${TCLINSTDIR}/lib/tclConfig.sh" ]; then
    89         -		TCLCONFIGDIR="${TCLINSTDIR}/lib"
    90         -	elif [ -d "${TCLBUILDDIR}" -a -f "${TCLBUILDDIR}/tclConfig.sh" ]; then
    91         -		TCLCONFIGDIR="${TCLBUILDDIR}"
    92         -	else
    93         -		unset TCLPRIVATE
    94         -
    95         -		TCLCONFIGDIR=$(
    96         -			(
    97         -				echo "${LD_LIBRARY_PATH}" | tr ':' "\n"
    98         -				cat /etc/ld.so.conf 2>/dev/null
    99         -				crle 2>/dev/null | grep '^ *Default Library Path' | sed 's@^ *Default Library Path[^:]*:[^:]*/@/@' | tr ':' "\n"
   100         -			) | grep '^/' | while read chklibdir; do
   101         -				if [ -f "${chklibdir}/tclConfig.sh" ]; then
   102         -					echo "${chklibdir}"
   103         -					break
   104         -				fi
   105         -			done
   106         -		)
   107         -		if [ -z "${TCLCONFIGDIR}" ]; then
   108         -			TCLCONFIGDIR="/usr/lib"
           34  +	export PROJROOTDIR
           35  +
           36  +	for TCLVERS in 8.5.9 8.4.19; do
           37  +		TCLSHORTVERS="$(echo "${TCLVERS}" | cut -f 1-2 -d '.')"
           38  +		TCLPRIVATE="$(pwd)/tcl/build/tcl${TCLVERS}"
           39  +		TCLINSTDIR="$(pwd)/tcl/inst-${TCLSHORTVERS}"
           40  +		export TCLVERS TCLPRIVATE TCLINSTDIR
           41  +
           42  +		mkdir tcl tcl/build >/dev/null 2>/dev/null
           43  +
           44  +		if [ ! -f "tcl/src/tcl${TCLVERS}.tar.gz" ]; then
           45  +			mkdir tcl/src >/dev/null 2>/dev/null
           46  +			wget -o /dev/null -O "tcl/src/tcl${TCLVERS}.tar.gz" "http://prdownloads.sourceforge.net/tcl/tcl${TCLVERS}-src.tar.gz"
   109     47   		fi
   110     48   
   111         -		TCLPRIVATE="$(dirname "${TCLCONFIGDIR}")/include/tcl-private"
   112         -	fi
   113         -
   114         -	ADDFLAGS=""
   115         -	if [ -n "${TCLPRIVATE}" ]; then
   116         -		ADDFLAGS="${ADDFLAGS} -I${TCLPRIVATE} -I${TCLPRIVATE}/generic"
   117         -	fi
   118         -	if [ -n "${TCLBUILDDIR}" ]; then
   119         -		ADDFLAGS="${ADDFLAGS} -I${TCLBUILDDIR}"
   120         -	fi
   121         -	CFLAGS="${ADDFLAGS} ${CFLAGS}"
   122         -	CPPFLAGS="${ADDFLAGS} ${CPPFLAGS}"
   123         -
   124         -	unset TCLVERS
   125         -	unset ADDFLAGS
   126         -	export TCLBUILDDIR TCLCONFIGDIR TCLPRIVATE CFLAGS CPPFLAGS
           49  +		echo "Building Tcl ${TCLVERS}"
           50  +		(
           51  +			mkdir tcl/build >/dev/null 2>/dev/null
           52  +			cd tcl/build || exit 1
           53  +			gzip -dc "../src/tcl${TCLVERS}.tar.gz" | tar -xf -
           54  +
           55  +			# DDE and Reg can fail to compile, but we don't care
           56  +			echo '' > "${TCLPRIVATE}/win/tclWinDde.c"
           57  +			echo '' > "${TCLPRIVATE}/win/tclWinReg.c"
           58  +
           59  +			for dir in unix win macosx; do
           60  +				cd "${TCLPRIVATE}/${dir}" || exit 1
           61  +
           62  +				echo " Executing: ./configure --enable-threads ${CONFIGUREEXTRA} --prefix=\"${TCLINSTDIR}\""
           63  +				./configure --enable-threads ${CONFIGUREEXTRA} --prefix="${TCLINSTDIR}"
           64  +
           65  +				echo " Executing: ${MAKE:-make}"
           66  +				${MAKE:-make} || continue
           67  +
           68  +				echo " Executing: ${MAKE:-make} install"
           69  +				${MAKE:-make} install || break
           70  +
           71  +				LD_LIBRARY_PATH=".:${LD_LIBRARY_PATH}"
           72  +				LD_RUN_PATH=".:${LD_RUN_PATH}"
           73  +				export LD_LIBRARY_PATH LD_RUN_PATH
           74  +
           75  +				file tclsh tclsh*.exe 2>/dev/null | grep -iv 'No such file' > "${PROJROOTDIR}/platform.magic.file"
           76  +				if [ -f tclsh*.exe ]; then
           77  +					echo 'puts "$::tcl_platform(os)"' | ./tclsh*.exe > "${PROJROOTDIR}/platform.magic.os" 2>/dev/null
           78  +				else
           79  +					echo 'puts "$::tcl_platform(os)"' | ./tclsh > "${PROJROOTDIR}/platform.magic.os" 2>/dev/null
           80  +				fi
           81  +				echo "${dir}" > "${PROJROOTDIR}/platform.magic.platform"
           82  +				pwd > "${PROJROOTDIR}/platform.magic.dir"
           83  +
           84  +				break
           85  +			done
           86  +
           87  +			exit 0
           88  +		) > "tcl/build/build-${TCLVERS}.log" 2>&1 || (
           89  +			echo "Failed to build Tcl.  See \"./tcl/build/build-${TCLVERS}.log\"" >&2
           90  +			echo 'Aborting.' >&2
           91  +
           92  +			exit 1
           93  +		) || exit 1
           94  +
           95  +		(
           96  +			TCLBUILDDIR="$(cat "${PROJROOTDIR}/platform.magic.dir")"
           97  +			export TCLBUILDDIR
           98  +
           99  +			if [ -d "${TCLINSTDIR}" -a -f "${TCLINSTDIR}/lib/tclConfig.sh" ]; then
          100  +				TCLCONFIGDIR="${TCLINSTDIR}/lib"
          101  +			elif [ -d "${TCLBUILDDIR}" -a -f "${TCLBUILDDIR}/tclConfig.sh" ]; then
          102  +				TCLCONFIGDIR="${TCLBUILDDIR}"
          103  +			else
          104  +				echo 'Unable to find appropriate tclConfig.sh, aborting' >&2
          105  +
          106  +				exit 1
          107  +			fi
          108  +
          109  +			ADDFLAGS=""
          110  +			if [ -n "${TCLPRIVATE}" ]; then
          111  +				ADDFLAGS="${ADDFLAGS} -I${TCLPRIVATE} -I${TCLPRIVATE}/generic"
          112  +			fi
          113  +			if [ -n "${TCLBUILDDIR}" ]; then
          114  +				ADDFLAGS="${ADDFLAGS} -I${TCLBUILDDIR}"
          115  +			fi
          116  +			CFLAGS="${ADDFLAGS} ${CFLAGS}"
          117  +			CPPFLAGS="${ADDFLAGS} ${CPPFLAGS}"
          118  +
          119  +			unset TCLVERS
          120  +			unset ADDFLAGS
          121  +			export TCLBUILDDIR TCLCONFIGDIR TCLPRIVATE CFLAGS CPPFLAGS
          122  +
          123  +			rm -f "${PROJROOTDIR}/platform.magic.env-${TCLSHORTVERS}"
          124  +			set > "${PROJROOTDIR}/platform.magic.env-${TCLSHORTVERS}"
          125  +			export >> "${PROJROOTDIR}/platform.magic.env-${TCLSHORTVERS}"
          126  +		)
          127  +	done
          128  +
          129  +	rm -f "${PROJROOTDIR}/platform.magic.dir"
   127    130   fi
   128    131   
   129    132   # Determine platform
   130    133   if [ -z "${FORCE_PLATFORM}" ]; then
   131    134   	PLATFORM="$(./platform)"
   132    135   else
   133    136   	PLATFORM="${FORCE_PLATFORM}"
................................................................................
   136    139   
   137    140   # Build all appropriate directories
   138    141   faileddirs=""
   139    142   if [ -z "${DIRS}" ]; then
   140    143   	DIRS="`echo */`"
   141    144   	PKGHASHCODE=''
   142    145   else
   143         -	PKGHASHCODE="$(echo "${DIRS}" | sed 's@[/ ]@@g' | openssl sha1 | awk '{ print $1 }')"
          146  +	PKGHASHCODE="$((echo "${DIRS}" | tr ' ' "\n" | sort | tr "\n" ' '; echo ) | sed 's@[/ ]@@g' | openssl sha1 | awk '{ print $1 }')"
   144    147   fi
   145    148   for dir in ${DIRS}; do
   146    149   	export dir
   147    150   
   148    151   	if [ ! -f "${dir}/build.sh" ]; then
   149    152   		continue
   150    153   	fi
................................................................................
   175    178   		cp "${dir}/out/${PLATFORM}/build.log" "${dir}/failed-${PLATFORM}-`hostname`.log"
   176    179   
   177    180   		rm -rf "${dir}/out"
   178    181   		faileddirs="${faileddirs} ${dir}"
   179    182   		echo "Failed to build ${dir}"
   180    183   	fi
   181    184   done
          185  +
          186  +# Clean magic-related files
          187  +rm -f platform.magic.*
   182    188   
   183    189   # Cleanup is done at this point
   184    190   if [ "${CLEANONLY}" = "1" ]; then
   185    191   	exit 0
   186    192   fi
   187    193   
   188    194   # Let the user know what failed to build

Added server/buildpkgs/common.sh version [0a6dc891a3].

            1  +#! /bin/bash
            2  +
            3  +function setup_tcl85 () {
            4  +	source "${PROJROOTDIR}/platform.magic.env-8.5" 2>/dev/null
            5  +}
            6  +
            7  +function setup_tcl84 () {
            8  +	source "${PROJROOTDIR}/platform.magic.env-8.4" 2>/dev/null
            9  +}
           10  +
           11  +function not_platforms () {
           12  +	local platform
           13  +
           14  +	for platform in "$@"; do
           15  +		if [ "${PLATFORM}" = "${platform}" ]; then
           16  +			rm -rf out
           17  +
           18  +			exit 0
           19  +		fi
           20  +	done
           21  +}
           22  +
           23  +function only_platforms () {
           24  +	local platform
           25  +
           26  +	for platform in "$@"; do
           27  +		if [ "${PLATFORM}" = "${platform}" ]; then
           28  +			return 0
           29  +		fi
           30  +	done
           31  +
           32  +	rm -rf out
           33  +
           34  +	exit 0
           35  +}
           36  +
           37  +function download () {
           38  +	local url file
           39  +
           40  +	file="$1"
           41  +	url="$2"
           42  +
           43  +	if [ -s "${file}" ]; then
           44  +		return 0
           45  +	fi
           46  +
           47  +	rm -f "${file}.tmp" "${file}"
           48  +
           49  +	wget -O "${file}.tmp" "${url}" || return 1
           50  +
           51  +	mv "${file}.tmp" "${file}"
           52  +}
           53  +
           54  +function download_src () {
           55  +	if [ ! -f "${SRC}" -a -n "${SRC}" -a -n "${SRCURL}" ]; then
           56  +		mkdir -p "$(dirname "${SRC}")" >/dev/null 2>/dev/null
           57  +
           58  +		download "${SRC}" "${SRCURL}" || exit 1
           59  +	fi
           60  +}
           61  +
           62  +WORKDIR="${TMPDIR:-/tmp}/tcl-buildpkgs-$$${RANDOM}${RANDOM}${RANDOM}"
           63  +PLATDIR="$(pwd)/out/${PLATFORM}"
           64  +export WORKDIR PLATDIR
           65  +
           66  +setup_tcl84

Modified server/buildpkgs/dbus-tcl/build.sh from [c0964a4cb2] to [1141247fa7].

     1      1   #! /bin/bash
     2      2   
     3         -if [ ! -x "../platform" ]; then
     4         -	echo "No platform script found, aborting." >&2
     5         -
     6         -	exit 1
     7         -fi
     8         -
     9         -if [ "${PLATFORM}" = "tcl" ]; then
    10         -	rm -rf out
    11         -
    12         -	exit 0
    13         -fi
    14         -
            3  +# Define parameters
    15      4   VERS=1.0
    16      5   SRC="src/dbus-tcl-${VERS}.tar.gz"
    17      6   SRCURL="http://sourceforge.net/projects/dbus-tcl/files/dbus-tcl/${VERS}/dbus-tcl${VERS}.tar.gz/download"
    18      7   BUILDDIR="dbus-tcl${VERS}"
    19         -WORKDIR="${TMPDIR:-/tmp}/dbus-tcl-$$${RANDOM}${RANDOM}${RANDOM}"
    20         -PLATDIR="$(pwd)/out/${PLATFORM}"
            8  +export VERS SRC SRCURL BUILDDIR
            9  +
           10  +# Load common functions
           11  +source ../common.sh
           12  +
           13  +# Do not build if the "tcl" platform has been requested
           14  +not_platforms 'tcl'
    21     15   
    22         -export VERS SRC SRCURL BUILDDIR WORKDIR PLATDIR
           16  +# Require Tcl 8.5 to build
           17  +setup_tcl85
    23     18   
    24         -if [ ! -f "${SRC}" ]; then
    25         -	mkdir src >/dev/null 2>/dev/null
           19  +# Download source
           20  +download_src
    26     21   
    27         -	wget -O "${SRC}" "${SRCURL}" || exit 1
    28         -fi
    29         -
           22  +# Build package
    30     23   (
    31     24   	rm -rf build
    32     25   	mkdir -p "${PLATDIR}" >/dev/null 2>/dev/null
    33     26   	mkdir build
    34     27   
    35     28   	cd build/ || exit 1
    36     29   
................................................................................
    42     35   	${MAKE:-make} || exit 1
    43     36   
    44     37   	${MAKE:-make} install-binaries PKG_DIR='' || exit 1
    45     38   
    46     39   	rm -f "${PLATDIR}"/*.a
    47     40   ) || exit 1
    48     41   
           42  +# Create metadata
    49     43   ../create_teapot "${PLATDIR}/teapot.txt" "dbus-tcl" "${VERS}" "${SRCURL}" "${PLATFORM}" "Tcl 8.5" "The DBus-Tcl project provides a Tcl interface to the dbus message bus system. It contains packages that allow Tcl programs to send and receive dbus signals, as well as invoke and respond to dbus method calls.  http://dbus-tcl.sourceforge.net/"
    50     44   
    51     45   exit 0

Modified server/buildpkgs/dict/build.sh from [ee8fedb377] to [11168404cf].

     1      1   #! /bin/bash
     2      2   
     3         -if [ ! -x "../platform" ]; then
     4         -	echo "No platform script found, aborting." >&2
     5         -
     6         -	exit 1
     7         -fi
     8         -
     9         -if [ "${PLATFORM}" = "tcl" ]; then
    10         -	rm -rf out
    11         -
    12         -	exit 0
    13         -fi
    14         -
    15         -# We only do anything on Tcl 8.4.x
    16         -if echo "${TCLVERS}" | grep '^8\.4\.'; then
    17         -	true
    18         -else
    19         -	rm -rf out
    20         -
    21         -	exit 0
    22         -fi
    23         -
            3  +# Define parameters
    24      4   VERS=8.5.2
    25      5   SRC="src/tclDict-${VERS}.tar.gz"
    26      6   SRCURL="http://pascal.scheffers.net/software/tclDict-${VERS}.tar.gz"
    27      7   BUILDDIR="tclDict-${VERS}"
    28         -WORKDIR="${TMPDIR:-/tmp}/dict-$$${RANDOM}${RANDOM}${RANDOM}"
    29         -PLATDIR="$(pwd)/out/${PLATFORM}"
            8  +export VERS SRC SRCURL BUILDDIR
    30      9   
    31         -export VERS SRC SRCURL BUILDDIR WORKDIR PLATDIR
           10  +# Load common functions
           11  +source ../common.sh
           12  +
           13  +# Do not build if the "tcl" platform has been requested
           14  +not_platforms 'tcl'
    32     15   
    33         -if [ ! -f "${SRC}" ]; then
    34         -	mkdir src >/dev/null 2>/dev/null
           16  +# Require Tcl 8.4 to build
           17  +setup_tcl84
    35     18   
    36         -	wget -O "${SRC}" "${SRCURL}" || exit 1
    37         -fi
           19  +# Download source
           20  +download_src
    38     21   
    39     22   (
    40     23   	rm -rf build
    41     24   	mkdir -p "${PLATDIR}" >/dev/null 2>/dev/null
    42     25   	mkdir build
    43     26   
    44     27   	cd build/ || exit 1

Modified server/buildpkgs/platform from [f9b9ccb779] to [55d33286bc].

    58     58   	Linux)
    59     59   		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')
    60     60   
    61     61   		case "${CPUPLAT}" in
    62     62   			i?86)
    63     63   				CPUPLAT="ix86"
    64     64   				;;
    65         -			sun4?)
           65  +			sun4m)
    66     66   				CPUPLAT="sparc"
    67     67   				;;
    68     68   		esac
    69     69   
    70     70   		echo "linux-glibc${GLIBCVERS}-${CPUPLAT}"
    71     71   		;;
    72     72   	SunOS)
    73     73   		SUNMAJVER=$(uname -r | cut -f 1 -d .)
    74     74   		SUNMINVER=$(uname -r | cut -f 2 -d .)
    75     75   		SOLVER="$[${SUNMAJVER} - 3].${SUNMINVER}"
    76     76   
           77  +		if [ -z "${CPUPLAT}" ]; then
           78  +			echo 'Unable to determine platform' >&2
    77     79   
    78         -		case "`uname -m`" in
    79         -			sun4?)
    80         -				CPUPLAT="sparc"
    81         -				;;
    82         -			*)
    83         -				CPUPLAT="ix86"
    84         -				;;
    85         -		esac
           80  +			exit 1
           81  +		fi
    86     82   
    87     83   		echo "solaris${SOLVER}-${CPUPLAT}"
    88     84   		;;
    89     85   	HP-UX)
    90     86   		echo "hpux-${CPUPLAT}"
    91     87   		;;
    92     88   	*)
    93         -		echo "`uname -s | dd conv=lcase 2>/dev/null`-`uname -m | dd conv=lcase 2>/dev/null`"
           89  +		if [ -z "${CPUPLAT}" ]; then
           90  +			CPUPLAT="`uname -m | dd conv=lcase 2>/dev/null`"
           91  +		fi
           92  +
           93  +		echo "`uname -s | dd conv=lcase 2>/dev/null`-${CPUPLAT}"
    94     94   		;;
    95     95   esac

Modified server/buildpkgs/sqlite3/build.sh from [09724f9222] to [2e77c6d186].

     1      1   #! /bin/bash
     2      2   
     3         -if [ ! -x "../platform" ]; then
     4         -	echo "No platform script found, aborting." >&2
     5         -
     6         -	exit 1
     7         -fi
     8         -
     9         -if [ "${PLATFORM}" = "tcl" ]; then
    10         -	rm -rf out
    11         -
    12         -	exit 0
    13         -fi
    14         -
            3  +# Define parameters
    15      4   VERS=3.7.2
    16      5   VERSUNDER="$(echo "${VERS}" | sed 's@\.@_@g')"
    17      6   SRC="src/sqlite-${VERSUNDER}.tar.gz"
    18      7   SRCURL="http://www.sqlite.org/sqlite-${VERSUNDER}-tea.tar.gz"
    19      8   BUILDDIR="sqlite${VERS}"
    20         -WORKDIR="${TMPDIR:-/tmp}/sqlite-$$${RANDOM}${RANDOM}${RANDOM}"
    21         -PLATDIR="$(pwd)/out/${PLATFORM}"
            9  +export VERS SRC SRCURL BUILDDIR
    22     10   
    23         -export VERS SRC SRCURL BUILDDIR WORKDIR PLATDIR
           11  +# Load common functions
           12  +source ../common.sh
    24     13   
    25         -if [ ! -f "${SRC}" ]; then
    26         -	mkdir src >/dev/null 2>/dev/null
           14  +# Do not build if the "tcl" platform has been requested
           15  +not_platforms 'tcl'
    27     16   
    28         -	wget -O "${SRC}" "${SRCURL}" || exit 1
    29         -fi
           17  +# Download source
           18  +download_src
    30     19   
    31     20   (
    32     21   	rm -rf build
    33     22   	mkdir -p "${PLATDIR}" >/dev/null 2>/dev/null
    34     23   	mkdir build
    35     24   
    36     25   	cd build/ || exit 1

Modified server/buildpkgs/tcllib/build.sh from [9be2fc0b9c] to [55c7ca7ba6].

     1      1   #! /bin/bash
     2      2   
     3         -if [ ! -x "../platform" ]; then
     4         -	echo "No platform script found, aborting." >&2
     5         -
     6         -	exit 1
     7         -fi
     8         -
     9         -if [ "${PLATFORM}" != "tcl" ]; then
    10         -	rm -rf out
    11         -
    12         -	exit 0
    13         -fi
    14         -
    15      3   VERS=1.13
    16      4   SRC="src/tcllib-${VERS}.tar.gz"
    17      5   SRCURL="http://sourceforge.net/projects/tcllib/files/tcllib/${VERS}/tcllib-${VERS}.tar.gz/download"
    18      6   BUILDDIR="tcllib-${VERS}"
    19         -WORKDIR="${TMPDIR:-/tmp}/tcllib-$$${RANDOM}${RANDOM}${RANDOM}"
    20         -PLATDIR="$(pwd)/out/${PLATFORM}"
            7  +export VERS SRC SRCURL BUILDDIR
    21      8   
    22         -export VERS SRC SRCURL BUILDDIR WORKDIR PLATFORM PLATDIR
            9  +# Load common functions
           10  +source ../common.sh
    23     11   
    24         -if [ ! -f "${SRC}" ]; then
    25         -	mkdir src >/dev/null 2>/dev/null
           12  +# Do not build if the "tcl" platform has NOT been requested
           13  +only_platforms 'tcl'
    26     14   
    27         -	wget -O "${SRC}" "${SRCURL}" || exit 1
    28         -fi
           15  +# Download source
           16  +download_src
    29     17   
    30     18   rm -rf "${WORKDIR}" >/dev/null 2>/dev/null
    31     19   mkdir -p "${WORKDIR}" || exit 1
    32     20   
    33     21   retval=0
    34     22   (
    35     23   	rm -rf build

Modified server/buildpkgs/tclpkcs11/build.sh from [273f6727b7] to [7eb1b5631b].

     1      1   #! /bin/bash
     2      2   
     3         -if [ ! -x "../platform" ]; then
     4         -	echo "No platform script found, aborting." >&2
     5         -
     6         -	exit 1
     7         -fi
     8         -
     9         -if [ "${PLATFORM}" = "tcl" ]; then
    10         -	rm -rf out
    11         -
    12         -	exit 0
    13         -fi
    14         -
            3  +# Define parameters
    15      4   VERS=0.9.9
    16      5   SRC="src/tclpkcs11-${VERS}.tar.gz"
    17      6   SRCURL="http://www.rkeene.org/devel/tclpkcs11-${VERS}.tar.gz"
    18      7   BUILDDIR="tclpkcs11-${VERS}"
    19         -WORKDIR="${TMPDIR:-/tmp}/tclpkcs11-$$${RANDOM}${RANDOM}${RANDOM}"
    20         -PLATDIR="$(pwd)/out/${PLATFORM}"
            8  +export VERS SRC SRCURL BUILDDIR
    21      9   
    22         -export VERS SRC SRCURL BUILDDIR WORKDIR PLATDIR
           10  +# Load common functions
           11  +source ../common.sh
    23     12   
    24         -if [ ! -f "${SRC}" ]; then
    25         -	mkdir src >/dev/null 2>/dev/null
           13  +# Do not build if the "tcl" platform has been requested
           14  +not_platforms 'tcl'
    26     15   
    27         -	wget -O "${SRC}" "${SRCURL}" || exit 1
    28         -fi
           16  +# Download source
           17  +download_src
    29     18   
    30     19   (
    31     20   	rm -rf build
    32     21   	mkdir -p "${PLATDIR}" >/dev/null 2>/dev/null
    33     22   	mkdir build
    34     23   
    35     24   	cd build/ || exit 1

Modified server/buildpkgs/tls/build.sh from [ce188ee01b] to [6e15606227].

     1      1   #! /bin/bash
     2      2   
     3         -if [ ! -x "../platform" ]; then
     4         -	echo "No platform script found, aborting." >&2
     5         -
     6         -	exit 1
     7         -fi
     8         -
     9         -if [ "${PLATFORM}" = "tcl" ]; then
    10         -	rm -rf out
    11         -
    12         -	exit 0
    13         -fi
    14         -
            3  +# Define parameters
    15      4   VERS=1.6
    16      5   SRC="src/tls${VERS}-src.tar.gz"
    17      6   SRCURL="http://sourceforge.net/projects/tls/files/tls/${VERS}/tls${VERS}-src.tar.gz/download"
    18      7   BUILDDIR="tls${VERS}"
    19         -WORKDIR="${TMPDIR:-/tmp}/tls-$$${RANDOM}${RANDOM}${RANDOM}"
    20      8   PATCHDIR="$(pwd)/patches"
    21         -PLATDIR="$(pwd)/out/${PLATFORM}"
            9  +export VERS SRC SRCURL BUILDDIR PATCHDIR
    22     10   
    23         -export VERS SRC SRCURL BUILDDIR WORKDIR PATCHDIR PLATDIR
           11  +# Load common functions
           12  +source ../common.sh
    24     13   
    25         -if [ ! -f "${SRC}" ]; then
    26         -	mkdir src >/dev/null 2>/dev/null
           14  +# Do not build if the "tcl" platform has been requested
           15  +not_platforms 'tcl'
    27     16   
    28         -	wget -O "${SRC}" "${SRCURL}" || exit 1
    29         -fi
           17  +# Download source
           18  +download_src
    30     19   
    31     20   (
    32     21   	rm -rf build
    33     22   	mkdir build
    34     23   	cd build/ || exit 1
    35     24   
    36     25   	gzip -dc "../${SRC}" | tar -xf -