Ticket #17924: Portfile.diff

File Portfile.diff, 2.1 KB (added by mdippery@…, 15 years ago)

Patch to use haskell PortGroup in Portfile

  • Portfile

    old new  
    11# $Id$
    22
    33PortSystem          1.0
     4PortGroup           haskell 1.0
     5haskell.setup       parsec 3.0.0
    46
    5 set parsec          parsec
    6 set hackage         http://hackage.haskell.org
    7 
    8 name                hs-${parsec}
    9 version             3.0.0
    10 categories          devel haskell
    11 maintainers         cs.wm.edu:mpd
     7maintainers         gmail.com:mdippery
    128description         Monadic parser combinators for Haskell
    139long_description    Parsec is designed from scratch as an industrial-strength \
    1410                    parser library. It is simple, safe, well documented, has \
     
    1612                    fast. It is defined as a monad transformer that can be \
    1713                    stacked on arbitrary monads, and it is also parametric \
    1814                    in the input stream type.
    19 homepage            http://www.cs.uu.nl/~daan/parsec.html
     15
    2016platforms           darwin
    21 master_sites        ${hackage}/packages/archive/${parsec}/${version}
    2217
    2318checksums           md5 491350a185f0fa1f2d5bc7fb4862d0ca \
    2419                    sha1 169f9d024bcefed6640656ef93ba697e9980ef8a \
    2520                    rmd160 22e8bc558b0a539bdb179d00fa1b7780e1f2fd19
    26 distname            ${parsec}-${version}
    27 
    28 depends_build       port:ghc
    29 
    30 set libexec         ${destroot}${prefix}/libexec
    31 set parsecexec      ${libexec}/${name}
    32 
    33 configure {
    34     system "cd ${worksrcpath} && runhaskell Setup configure --ghc --prefix=${prefix} --with-compiler=${prefix}/bin/ghc --enable-library-profiling"
    35 }
    36 
    37 build {
    38     system "cd ${worksrcpath} && runhaskell Setup build -v"
    39 }
    40 
    41 destroot {
    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 
    51 post-activate {
    52     system "${parsecexec}/register.sh"
    53 }