-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild-foundation-pak-for-ghc-9.2.7.sh
executable file
·91 lines (69 loc) · 1.86 KB
/
build-foundation-pak-for-ghc-9.2.7.sh
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
set -x -e
############
# setup
############
unameOut="$(uname -s)"
case "${unameOut}" in
Linux*)
machine=Linux
sudo apt install python3-sphinx
;;
Darwin*)
machine=Mac
cp macos-data/fonts/* ~/Library/Fonts
brew install basictex
export PATH="/usr/local/texlive/2023basic/bin/universal-darwin:$PATH"
sudo tlmgr update --self
sudo tlmgr install texliveonfly
sudo tlmgr install tex-gyre
sudo tlmgr install fncychap
sudo tlmgr install wrapfig
sudo tlmgr install capt-of
sudo tlmgr install framed
sudo tlmgr install needspace
sudo tlmgr install tabulary
sudo tlmgr install varwidth
sudo tlmgr install titlesec
sudo tlmgr install adjustbox
sudo tlmgr install tcolorbox
sudo tlmgr install collectbox
sudo tlmgr install ucs
sudo tlmgr install environ
sudo tlmgr install trimspaces
sudo tlmgr install titling
sudo tlmgr install enumitem
sudo tlmgr install rsfs
brew install python@3.11
pip3 install sphinx==4.3.2
;;
CYGWIN*)
machine=Cygwin
;;
MINGW*)
machine=MinGw
;;
MSYS_NT*)
machine=Git
;;
*)
machine="UNKNOWN:${unameOut}"
esac
stack --resolver lts-20.24 install alex-3.2.6 happy-1.20.0 zip-cmd-1.0.1
############
# checkout GHC source and build
############
mkdir foundation-pak-ghc-9.2.7-wpc
cd foundation-pak-ghc-9.2.7-wpc
git clone https://github.com/grin-compiler/ghc-wpc.git
cd ghc-wpc
git checkout ghc-9.2-wpc-design2
git submodule update --init --recursive
./boot
./configure
./hadrian/build-stack foundation-pak -j --docs=no-sphinx
./hadrian/build-stack binary-dist-xz -j --docs=none
############
# output foundation pak and ghc-9.2.7-wpc bindist
############
ls -lah `pwd`/_build/foundation-pak/*.xz
ls -lah `pwd`/_build/bindist/*.xz