1
1
# Chocolatey GHC Dev
2
2
#
3
3
# Licensed under the MIT License
4
- #
4
+ #
5
5
# Copyright (C) 2016 Tamar Christina <tamar@zhox.com>
6
6
7
7
# Include the shared scripts
@@ -18,11 +18,11 @@ if ($arch -eq 'x86') {
18
18
$checksumType = ' SHA1'
19
19
}
20
20
21
- # Continue with package
21
+ # Continue with package
22
22
Write-Host " Installing to '$packageDir '"
23
23
Install-ChocolateyZipPackage $packageName $url $packageDir `
24
24
- checksum $checksum - checksumType $checksumType
25
-
25
+
26
26
# check if .tar.xz was only unzipped to tar file
27
27
# (shall work better with newer choco versions)
28
28
$tarFile = Join-Path $packageDir ($packageName + ' Install' )
@@ -39,13 +39,16 @@ execute "Processing MSYS2 bash for first time use" `
39
39
40
40
execute " Appending profile with path information" `
41
41
(' echo "export PATH=/mingw' + $osBitness + ' /bin:\$PATH" >>~/.bash_profile' )
42
-
42
+
43
43
execute " Setting default MSYSTEM" `
44
44
(' echo "export MSYSTEM=' + (" MINGW" + $osBitness ) + ' " >>~/.bash_profile' )
45
45
46
46
# Now perform commands to set up MSYS2 for GHC Developments
47
47
execute " Update pacman package DB" `
48
48
" pacman -Syy"
49
+ # Workaround for a stupid msys2 cycle they introduced
50
+ execute " Removing catgets libcatgets" `
51
+ " pacman --noconfirm -R catgets libcatgets"
49
52
50
53
execute " Updating system packages" `
51
54
" pacman --noconfirm --needed -Sy bash pacman pacman-mirrors msys2-runtime"
@@ -68,11 +71,11 @@ execute "Updating SSL root certificate authorities" `
68
71
execute " Ensuring /mingw folder exists" `
69
72
(' test -d /mingw' + $osBitness + ' || mkdir /mingw' + $osBitness )
70
73
71
- execute " Installing bootstrapping GHC 8.0 .2 version" `
72
- (' curl --stderr - -LO https://downloads.haskell.org/~ghc/8.0 .2/ghc-8.0 .2-' + $ghcArch + ' -unknown-mingw32-win10 .tar.xz && tar -xJ -C /mingw' + $osBitness + ' --strip-components=1 -f ghc-8.0 .2-' + $ghcArch + ' -unknown-mingw32-win10 .tar.xz && rm -f ghc-8.0 .2-' + $ghcArch + ' -unknown-mingw32-win10 .tar.xz' )
74
+ execute " Installing bootstrapping GHC 8.2 .2 version" `
75
+ (' curl --stderr - -LO https://downloads.haskell.org/~ghc/8.2 .2/ghc-8.2 .2-' + $ghcArch + ' -unknown-mingw32.tar.xz && tar -xJ -C /mingw' + $osBitness + ' --strip-components=1 -f ghc-8.2 .2-' + $ghcArch + ' -unknown-mingw32.tar.xz && rm -f ghc-8.2 .2-' + $ghcArch + ' -unknown-mingw32.tar.xz' )
73
76
74
77
execute " Installing alex, happy and cabal" `
75
- (' mkdir -p /usr/local/bin && curl --stderr - -LO https://www.haskell.org/cabal/release/cabal-install-1.24. 0.0/cabal-install-1.24. 0.0-i386-unknown-mingw32.zip && unzip cabal-install-1.24. 0.0-i386-unknown-mingw32.zip -d /usr/local/bin && rm -f cabal-install-1.24. 0.0-i386-unknown-mingw32.zip && cabal update && cabal install -j --prefix=/usr/local alex happy' )
78
+ (' mkdir -p /usr/local/bin && curl --stderr - -LO https://www.haskell.org/cabal/release/cabal-install-2. 0.0.1 /cabal-install-2. 0.0.1 -i386-unknown-mingw32.zip && unzip cabal-install-2. 0.0.1 -i386-unknown-mingw32.zip -d /usr/local/bin && rm -f cabal-install-2. 0.0.1 -i386-unknown-mingw32.zip && cabal update && cabal install -j --prefix=/usr/local alex happy' )
76
79
77
80
execute " Re-installing HsColour" `
78
81
' cabal install -j --prefix=/usr/local HsColour --reinstall'
@@ -86,7 +89,7 @@ echo "$cmd" | Out-File -Encoding ascii (Join-Path $packageDir ($packageName + ".
86
89
execute " Copying GHC gdb configuration..." `
87
90
(' cp "' + (Join-Path $toolsDir " .gdbinit" ) + ' " ~/.gdbinit' )
88
91
89
- # Install Arcanist
92
+ # Install Arcanist
90
93
if ($useArc -eq $true ) {
91
94
Write-Host " Setting up Arcanist as requested."
92
95
@@ -98,7 +101,7 @@ if ($useArc -eq $true) {
98
101
99
102
execute " Adding arcanist to path information" `
100
103
' echo "export PATH=$(pwd)/arcanist/bin:\$PATH" >>~/.bash_profile'
101
-
104
+
102
105
execute " Copying PHP configuration..." `
103
106
(' cp "' + (Join-Path $toolsDir " php.ini" ) + ' " /usr/local/bin/php.ini' )
104
107
}
@@ -108,7 +111,7 @@ if ($getSource -eq $true) {
108
111
Write-Host " Getting a checkout of GHC for your coding pleasure..."
109
112
110
113
execute " Fetching sources..." `
111
- " git clone --recursive git://git.haskell.org/ghc.git"
114
+ " git clone --recursive git://git.haskell.org/ghc.git"
112
115
113
116
# Configure Arcanist if it was installed
114
117
if ($useArc -eq $true ) {
@@ -117,15 +120,7 @@ if ($getSource -eq $true) {
117
120
}
118
121
}
119
122
120
- # Install Hadrian
121
- if ($useHadrian -eq $true ) {
122
- Write-Host " Setting up Hadrian as requested."
123
-
124
- execute " Fetching sources..." `
125
- " cd ghc && git clone https://github.com/snowleopard/hadrian.git && cd hadrian"
126
- }
127
-
128
- # Install SSHd
123
+ # Install SSHd
129
124
if ($useSsh -eq $true ) {
130
125
Write-Host " Setting up SSH as requested."
131
126
@@ -191,12 +186,11 @@ if ($getSource -eq $true) {
191
186
Write-Output " * A checkout of the GHC sources has been made in ~/ghc."
192
187
Write-Output " *"
193
188
}
194
- if ($useHadrian -eq $true ) {
195
- Write-Output " * Hadrian has been installed and configured in ~/ghc."
196
- Write-Output " * This means you can now use shake to build GHC."
197
- Write-Output " * See https://github.com/snowleopard/hadrian for instructions."
198
- Write-Output " *"
199
- }
189
+
190
+ Write-Output " * Hadrian has been installed and configured in ~/ghc."
191
+ Write-Output " * This means you can now use shake to build GHC."
192
+ Write-Output " * See https://github.com/snowleopard/hadrian for instructions."
193
+ Write-Output " *"
200
194
201
195
Write-Output " * For other information visit https://ghc.haskell.org/trac/ghc/wiki/Building"
202
196
Write-Output " *"
0 commit comments