# --- T2-COPYRIGHT-NOTE-BEGIN --- # T2 SDE: package/*/plan9port/hotfix-cross.patch # Copyright (C) 2022 - 2024 The T2 SDE Project # # This Copyright note is generated by scripts/Create-CopyPatch, # more information can be found in the files COPYING and README. # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms # of the GNU General Public License version 2 as used by the T2 SDE. # --- T2-COPYRIGHT-NOTE-END --- --- plan9port-d0d4408/INSTALL.vanilla 2022-01-09 18:35:54.589000000 +0100 +++ plan9port-d0d4408/INSTALL 2022-01-09 18:36:13.447000000 +0100 @@ -30,8 +30,12 @@ echo "* Resetting $PLAN9/config" rm -f config -PLAN9=`pwd` export PLAN9 -PATH=/bin:/usr/bin:$PLAN9/bin:$PATH export PATH +PLAN9=`pwd` export PLAN9 +if [ -z "$HOSTPLAN9" ]; then + # Native compiling, set HOSTPLAN9 to PLAN9 + export HOSTPLAN9="$PLAN9" +fi +PATH=/bin:/usr/bin:$HOSTPLAN9/bin:$PLAN9/bin:$PATH export PATH [ -z "$PLAN9_TARGET" ] && PLAN9_TARGET="$PLAN9" export PLAN9_TARGET @@ -127,12 +133,14 @@ cd src if $dobuild; then - echo "* Building mk..." - ../dist/buildmk 2>&1 | sed 's/^[+] //' - - if [ ! -x ../bin/mk ]; then - echo "* Error: mk failed to build." - exit 1 + if [ ! -e "$HOSTPLAN9/bin/mk" ]; then + echo "* Building mk..." + ../dist/buildmk 2>&1 | sed 's/^[+] //' + + if [ ! -x ../bin/mk ]; then + echo "* Error: mk failed to build." + exit 1 + fi fi echo "* Building everything (be patient)..." --- plan9port-d0d4408/src/cmd/awk/mkfile.vanilla 2022-01-09 11:12:50.334000000 +0100 +++ plan9port-d0d4408/src/cmd/awk/mkfile 2022-01-09 11:58:39.322000000 +0100 @@ -29,7 +29,7 @@ ./$O.maketab >proctab.c maketab.$O: maketab.c - $CC $CFLAGS maketab.c + PLAN9=$HOSTPLAN9 CC9=$HOSTCC $CC $CFLAGS maketab.c $O.maketab:V: y.tab.h maketab.$O - $LD -o $O.maketab maketab.$O + PLAN9=$HOSTPLAN9 CC9=$HOSTCC $LD -o $O.maketab maketab.$O --- plan9port-d0d4408/src/cmd/jpg/mkfile.vanilla 2022-01-09 16:01:44.661000000 +0100 +++ plan9port-d0d4408/src/cmd/jpg/mkfile 2022-01-09 16:01:18.174000000 +0100 @@ -34,13 +34,13 @@ torgbv.$O: ycbcr.h rgbv.h ycbcr.h: rgbycc.c - 9c rgbycc.c - 9l -o o.rgbycc rgbycc.o -ldraw -l9 + PLAN9=$HOSTPLAN9 CC9=$HOSTCC 9c rgbycc.c + PLAN9=$HOSTPLAN9 CC9=$HOSTCC 9l -o o.rgbycc rgbycc.o -ldraw -l9 ./o.rgbycc >ycbcr.h rgbv.h: rgbrgbv.c - 9c rgbrgbv.c - 9l -o o.rgbrgbv rgbrgbv.o -ldraw -l9 + PLAN9=$HOSTPLAN9 CC9=$HOSTCC 9c rgbrgbv.c + PLAN9=$HOSTPLAN9 CC9=$HOSTCC 9l -o o.rgbrgbv rgbrgbv.o -ldraw -l9 ./o.rgbrgbv >rgbv.h nuke:V: nuke-headers