175 | | cd ${worksrcpath} |
176 | | system "autoreconf" |
| 173 | system "cd ${worksrcpath} && autoreconf" |
| 174 | |
| 175 | set cfg [open "${worksrcpath}/mk/build.mk" w] |
| 176 | puts $cfg "#" |
| 177 | puts $cfg "# Local configuration overrides for MacPorts" |
| 178 | puts $cfg "#" |
| 179 | puts $cfg "SRC_CC_OPTS += -I${prefix}/include" |
| 180 | puts $cfg "SRC_HC_OPTS += -I${prefix}/include -I/usr/include -L${prefix}/lib -L/usr/lib" |
| 181 | puts $cfg "EXTRA_HSC2HS_OPTS += -I${prefix}/include" |
| 182 | puts $cfg "EXTRA_LD_OPTS += -L${prefix}/lib" |
| 183 | puts $cfg "EXTRA_LD_OPTS += -L/usr/lib" |
| 184 | close $cfg |
| 185 | |
| 186 | reinplace "s|/opt/local|${workpath}/ghc-bootstrap|g" ${workpath}/ghc-bootstrap/lib/ghc-${ghc_bootversion}/package.conf |
| 187 | |
| 188 | reinplace "s|GHCBIN=\"/opt/local|GHCBIN=\"${workpath}/${name}-bootstrap|" ${workpath}/${name}-bootstrap/bin/ghc |
| 189 | |
| 190 | reinplace "s|TOPDIROPT=\"-B/opt/local|TOPDIROPT=\"-B${workpath}/${name}-bootstrap|" ${workpath}/${name}-bootstrap/bin/ghc |
| 191 | |
| 192 | reinplace "s|-L/opt/local|-L${prefix}|" ${workpath}/${name}-bootstrap/bin/ghc |
| 193 | |
| 194 | reinplace "s|-I/opt/local|-I${prefix}|" ${workpath}/${name}-bootstrap/bin/ghc |
| 195 | |
| 196 | reinplace "s|/opt/local|${prefix}|" ${workpath}/${name}-bootstrap/lib/ghc-${ghc_bootversion}/ghc-asm |
| 197 | |
| 198 | reinplace "s|/opt/local|${prefix}|" ${workpath}/${name}-bootstrap/lib/ghc-${ghc_bootversion}/ghc-split |
| 199 | } |
| 200 | |
| 201 | configure.args-append --with-ghc='${workpath}/${name}-bootstrap/bin/ghc' |
| 202 | } |
| 203 | |
| 204 | platform darwin 9 i386 { |
| 205 | global ghc_bootversion |
| 206 | set ghc_bootversion 6.6 |
| 207 | |
| 208 | master_sites-append ${homepage}/dist/${ghc_bootversion}/:bootstrap |
| 209 | |
| 210 | distfiles-append ${name}-${ghc_bootversion}-i386-apple-darwin-bootstrap.tar.bz2:bootstrap |
| 211 | |
| 212 | checksums-append ${name}-${ghc_bootversion}-i386-apple-darwin-bootstrap.tar.bz2 md5 0cb6d89efb0694a28b34bec0f04d8c62 |
| 213 | |
| 214 | extract.only ${name}-${version}-src.tar.bz2 \ |
| 215 | ${name}-${version}-src-extralibs.tar.bz2 \ |
| 216 | ${name}-${ghc_bootversion}-i386-apple-darwin-bootstrap.tar.bz2 |
| 217 | |
| 218 | pre-configure { |
| 219 | system "cd ${worksrcpath} && autoreconf" |