Dash:
[t2.git] / package / emulators / plan9port / cross.patch
blob6d04baaddf27b862452963be4ba9b926624ef7b2
1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # T2 SDE: package/*/plan9port/cross.patch
3 # Copyright (C) 2022 The T2 SDE Project
4 #
5 # This Copyright note is generated by scripts/Create-CopyPatch,
6 # more information can be found in the files COPYING and README.
7 #
8 # This patch file is dual-licensed. It is available under the license the
9 # patched project is licensed under, as long as it is an OpenSource license
10 # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
11 # of the GNU General Public License version 2 as used by the T2 SDE.
12 # --- T2-COPYRIGHT-NOTE-END ---
14 --- plan9port-d0d4408/INSTALL.vanilla 2022-01-09 18:35:54.589000000 +0100
15 +++ plan9port-d0d4408/INSTALL 2022-01-09 18:36:13.447000000 +0100
16 @@ -31,7 +31,13 @@
17 rm -f config
19 PLAN9=`pwd` export PLAN9
20 -PATH=/bin:/usr/bin:$PLAN9/bin:$PATH export PATH
22 +if [ -z "$HOSTPLAN9" ]; then
23 + # Native compiling, set HOSTPLAN9 to PLAN9
24 + export HOSTPLAN9="$PLAN9"
25 +fi
27 +PATH=/bin:/usr/bin:$HOSTPLAN9/bin:$PLAN9/bin:$PATH export PATH
28 case `uname` in
29 SunOS)
30 awk=nawk
31 @@ -127,12 +133,14 @@
33 cd src
34 if $dobuild; then
35 - echo "* Building mk..."
36 - ../dist/buildmk 2>&1 | sed 's/^[+] //'
38 - if [ ! -x ../bin/mk ]; then
39 - echo "* Error: mk failed to build."
40 - exit 1
41 + if [ ! -e "$HOSTPLAN9/bin/mk" ]; then
42 + echo "* Building mk..."
43 + ../dist/buildmk 2>&1 | sed 's/^[+] //'
45 + if [ ! -x ../bin/mk ]; then
46 + echo "* Error: mk failed to build."
47 + exit 1
48 + fi
51 echo "* Building everything (be patient)..."
52 --- plan9port-d0d4408/src/cmd/awk/mkfile.vanilla 2022-01-09 11:12:50.334000000 +0100
53 +++ plan9port-d0d4408/src/cmd/awk/mkfile 2022-01-09 11:58:39.322000000 +0100
54 @@ -29,7 +29,7 @@
55 ./$O.maketab >proctab.c
57 maketab.$O: maketab.c
58 - $CC $CFLAGS maketab.c
59 + PLAN9=$HOSTPLAN9 CC9=$HOSTCC $CC $CFLAGS maketab.c
61 $O.maketab:V: y.tab.h maketab.$O
62 - $LD -o $O.maketab maketab.$O
63 + PLAN9=$HOSTPLAN9 CC9=$HOSTCC $LD -o $O.maketab maketab.$O
64 --- plan9port-d0d4408/src/cmd/jpg/mkfile.vanilla 2022-01-09 16:01:44.661000000 +0100
65 +++ plan9port-d0d4408/src/cmd/jpg/mkfile 2022-01-09 16:01:18.174000000 +0100
66 @@ -34,13 +34,13 @@
67 torgbv.$O: ycbcr.h rgbv.h
69 ycbcr.h: rgbycc.c
70 - 9c rgbycc.c
71 - 9l -o o.rgbycc rgbycc.o -ldraw -l9
72 + PLAN9=$HOSTPLAN9 CC9=$HOSTCC 9c rgbycc.c
73 + PLAN9=$HOSTPLAN9 CC9=$HOSTCC 9l -o o.rgbycc rgbycc.o -ldraw -l9
74 ./o.rgbycc >ycbcr.h
76 rgbv.h: rgbrgbv.c
77 - 9c rgbrgbv.c
78 - 9l -o o.rgbrgbv rgbrgbv.o -ldraw -l9
79 + PLAN9=$HOSTPLAN9 CC9=$HOSTCC 9c rgbrgbv.c
80 + PLAN9=$HOSTPLAN9 CC9=$HOSTCC 9l -o o.rgbrgbv rgbrgbv.o -ldraw -l9
81 ./o.rgbrgbv >rgbv.h
83 nuke:V: nuke-headers