diff -ruN tinderbox.orig/lib/buildscript tinderbox/lib/buildscript --- tinderbox.orig/lib/buildscript 2009-01-18 22:35:21.000000000 +0100 +++ tinderbox/lib/buildscript 2009-01-18 22:40:52.000000000 +0100 @@ -110,7 +110,11 @@ cd $dir || exit 1 echo "build started at $(date)" echo "port directory: ${dir}" - echo "building for: $(uname -rm)" + if echo ${jailName} | grep -q i386; then + echo "building for: $(uname -rm |sed -e 's|amd64|i386|g')" + else + echo "building for: $(uname -rm)" + fi echo "maintained by: $(make maintainer)" echo "Makefile ident: $(ident ${dir}/Makefile | grep 'FreeBSD:' | sed 's/^[ \t]*//')" echo "prefixes: LOCALBASE=${L} X11BASE=${X} PREFIX=$(make -V PREFIX)" diff -ruN tinderbox.orig/lib/tc_command.sh tinderbox/lib/tc_command.sh --- tinderbox.orig/lib/tc_command.sh 2009-01-18 22:35:21.000000000 +0100 +++ tinderbox/lib/tc_command.sh 2009-01-18 22:41:07.000000000 +0100 @@ -1112,6 +1112,14 @@ fi } +wrapFile () { + cp $1 $1.orig + cat > $1 << _END +#!/bin/sh +\$0.orig \$@ | sed -e 's|amd64|i386|g' +_END +} + makeBuild () { # set up defaults buildName="" @@ -1165,6 +1173,12 @@ echo "makeBuild: extracting jail tarball" tar -C ${BUILD_DIR} -xpf ${JAIL_TARBALL} + if echo ${jailName} | grep -q i386; then + ln -s ld-elf.so.1 ${BUILD_DIR}/libexec/ld-elf32.so.1 + wrapFile ${BUILD_DIR}/usr/bin/uname + wrapFile ${BUILD_DIR}/sbin/sysctl + fi + execute_hook "postBuildExtract" "BUILD=${buildName} DESTDIR=${BUILD_DIR} JAIL=${jailName} PB=${pb} RC=0" # Finalize environment