Ticket #12591: Portfile.2.diff

File Portfile.2.diff, 2.5 KB (added by jgm@…, 17 years ago)

New Portfile.diff, not using cd

  • Portfile

    old new  
    1 # $Id: Portfile 28278 2007-08-27 18:43:20Z ryandesign@macports.org $
     1# $Id$
    22
    33PortSystem          1.0
    44
    55name                pandoc
    6 version             0.42
     6version             0.44
    77categories          textproc
    88maintainers         jgm@berkeley.edu
    99description         General markup converter
     
    1313    HTML, and LaTeX, and it can write markdown, reStructuredText, HTML, \
    1414    LaTeX, ConTeXt, DocBook, RTF, groff man pages, and S5 HTML slide shows.
    1515
    16 homepage            http://sophos.berkeley.edu/pandoc/
     16homepage            http://johnmacfarlane.net/pandoc/
    1717platforms           darwin
    1818master_sites        http://pandoc.googlecode.com/files/
    19 checksums           md5 e8c452fee346a57e82b24fbb2c801410
    20 depends_build       port:ghc
     19checksums           md5 3907e08f47e3aa8a8ded1ce742870a3b
     20depends_build       port:ghc port:haddock
    2121depends_lib         port:gmp
    2222
    2323use_configure       no
    2424build.args          PREFIX=${prefix}
     25build.target        build-all
     26
     27destroot            {
     28  # install pandoc executable, libraries, and library documentation:
     29  system "(cd ${worksrcpath}; ./setup copy --destdir=${destroot})"
     30  # strip the pandoc binary:
     31  system "strip ${destroot}${prefix}/bin/pandoc"
     32  # create scripts to register libraries in post-activate phase:
     33  system "(cd ${worksrcpath}; ./setup register --gen-script)"
     34  system "(cd ${worksrcpath}; ./setup unregister --gen-script)"
     35  # install register/unregister scripts:
     36  xinstall -d ${destroot}${prefix}/libexec/${name}-${version}
     37  xinstall -m 755 ${worksrcpath}/register.sh \
     38    ${destroot}${prefix}/libexec/${name}-${version}
     39  xinstall -m 755 ${worksrcpath}/unregister.sh \
     40    ${destroot}${prefix}/libexec/${name}-${version}
     41  # install shell scripts:
     42  xinstall -m 755 -W ${worksrcpath} html2markdown hsmarkdown markdown2pdf \
     43    ${destroot}${prefix}/bin
     44  # install user documentation and man pages:
     45  xinstall -d ${destroot}${prefix}/share/doc/${name}
     46  xinstall -m 644 -W ${worksrcpath} README README.html COPYRIGHT BUGS \
     47    ${destroot}${prefix}/share/doc/${name}
     48  xinstall -m 644 -W ${worksrcpath}/man/man1 pandoc.1 hsmarkdown.1 \
     49    markdown2pdf.1 html2markdown.1 ${destroot}${prefix}/share/man/man1
     50}
     51 
     52post-activate       {
     53  # Register the library with the ghc package database:
     54  system "${prefix}/libexec/${name}-${version}/register.sh"
     55}
     56
     57#pre-deactivate     {
     58#  system "${prefix}/libexec/${name}-${version}/unregister.sh"
     59#}