Ticket #17924: Portfile

File Portfile, 1.9 KB (added by mpdippery@…, 15 years ago)

Portfile for the hs-parsec port

Line 
1# $Id$
2
3PortSystem          1.0
4
5set parsec          parsec
6set hackage         http://hackage.haskell.org
7
8name                hs-${parsec}
9version             3.0.0
10categories          devel haskell
11maintainers         cs.wm.edu:mpd
12description         Monadic parser combinators for Haskell
13long_description    Parsec is designed from scratch as an industrial-strength \
14                    parser library. It is simple, safe, well documented, has \
15                    extensive libraries and good error messages, and is also \
16                    fast. It is defined as a monad transformer that can be \
17                    stacked on arbitrary monads, and it is also parametric \
18                    in the input stream type.
19homepage            http://www.cs.uu.nl/~daan/parsec.html
20platforms           darwin
21master_sites        ${hackage}/packages/archive/${parsec}/${version}
22
23checksums           md5 491350a185f0fa1f2d5bc7fb4862d0ca \
24                    sha1 169f9d024bcefed6640656ef93ba697e9980ef8a \
25                    rmd160 22e8bc558b0a539bdb179d00fa1b7780e1f2fd19
26distname            ${parsec}-${version}
27
28depends_build       port:ghc
29
30set libexec         ${destroot}${prefix}/libexec
31set parsecexec      ${libexec}/${name}
32
33configure {
34    system "cd ${worksrcpath} && runhaskell Setup configure --ghc --prefix=${prefix} --with-compiler=${prefix}/bin/ghc --enable-library-profiling"
35}
36
37build {
38    system "cd ${worksrcpath} && runhaskell Setup build -v"
39}
40
41destroot {
42    system "cd ${worksrcpath} && runhaskell Setup copy --copy-prefix=${destroot}${prefix}"
43    system "cd ${worksrcpath} && runhaskell Setup register --gen-script"
44    system "cd ${worksrcpath} && runhaskell Setup unregister --gen-script"
45   
46    file mkdir ${parsecexec}
47    file copy ${worksrcpath}/register.sh ${parsecexec}
48    file copy ${worksrcpath}/unregister.sh ${parsecexec}
49}
50
51post-activate {
52    system "${parsecexec}/register.sh"
53}