This repository has been archived by the owner on May 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mmixware.cygport
68 lines (59 loc) · 2.15 KB
/
mmixware.cygport
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
NAME="mmixware"
VERSION=20160804
RELEASE=1
CATEGORY="System"
SUMMARY="MMIX simulators, assembler, and tools"
DESCRIPTION="MMIX is a computer intended to illustrate machine-level aspects
of programming. In the books The Art of Computer Programming, it replaces MIX,
the 1960s-style machine that formerly played such a role. MMIX was designed
so that its machine language would be simple, elegant, and easy to learn. At
the same time it includes all of the complexities needed to achieve high
performance in practice, so that MMIX could in principle be built and even
perhaps be competitive with some of the fastest general-purpose computers in
the marketplace."
HOMEPAGE="http://mmix.cs.hm.edu/"
SRC_URI="
http://mmix.cs.hm.edu/src/mmix-${VERSION}.tgz
https://github.com/ascherer/mmix/local/mmix-arith.ch
https://github.com/ascherer/mmix/local/mmix-config.ch
https://github.com/ascherer/mmix/local/mmix-io.ch
https://github.com/ascherer/mmix/local/mmix-mem.ch
https://github.com/ascherer/mmix/local/mmix-pipe.ch
https://github.com/ascherer/mmix/local/mmix-sim.ch
https://github.com/ascherer/mmix/local/mmixal.ch
https://github.com/ascherer/mmix/local/mmmix.ch
https://github.com/ascherer/mmix/local/mmotype.ch
http://mmix.cs.hm.edu/tools/mmoimg/mmoimg.ch
"
SRC_DIR="."
PATCH_URI="20160804-abstime.patch"
src_compile() {
lndirs
cd ${B}
# prepare mmoimg sources
ctangle mmotype.w mmoimg.ch mmoimg.c
cweave mmotype.w mmoimg.ch mmoimg.tex
cygmake -j1 all mmoimg CFLAGS="${CFLAGS}"
for f in mm*.w
do
cygmake -j1 ${f%.w}.pdf PDFTEX=pdftex
done
pdftex mmoimg.tex
}
src_test() {
cd ${B}
./mmixal -x -b 250 -l copy.mml copy.mms
./mmix copy copy.mms > copy.out
diff -u copy.mms copy.out
./mmixal -x -b 250 -l hello.mml hello.mms
./mmix -Dhello.mmb hello.mmo
echo -e '10000\nq' | ./mmmix plain.mmconfig hello.mmb
./mmixal -x -b 250 -l silly.mml silly.mms
./mmix -Dsilly.mmb silly.mmo
echo -e '10000\nq' | ./mmmix plain.mmconfig silly.mmb
}
src_install() {
cd ${B}
dobin mmix.exe mmixal.exe mmmix.exe mmotype.exe mmoimg.exe
dodoc *.pdf
}