Ticket #14696: Portfile.2.diff

File Portfile.2.diff, 4.6 KB (added by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez), 17 years ago)
  • Portfile

    old new  
    1 # $Id: Portfile 32946 2008-01-15 12:10:40Z ryandesign@macports.org $
     1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
     2# $Id$
    23
    34PortSystem 1.0
     5
    46name            nhc98
    5 version         1.18
    6 revision        4
     7version         1.20
    78categories      lang
    89maintainers     nomaintainer
    910platforms       darwin
    1011description     The nhc98 Haskell Compiler
    11 long_description        \
    12                 nhc98 is a small, easy to install, standards-compliant  \
    13                 compiler for Haskell 98, the lazy functional            \
    14                 programming language.  It is very portable, and aims to \
    15                 produce small executables that run in small amounts of  \
    16                 memory. It produces medium-fast code, and compilation   \
    17                 is itself quite fast. It also comes with extensive tool \
    18                 support for automatic compilation, foreign language     \
    19                 interfacing, heap and time profiling, tracing, and      \
    20                 debugging.  (Some of its advanced kinds of heap         \
    21                 profiles are not found in any other Haskell compiler.) 
    22 
    23 homepage        http://www.haskell.org/${name}/
    24 master_sites    http://www.cs.york.ac.uk/fp/${name}/            \
    25                 ftp://ftp.cs.york.ac.uk/pub/haskell/${name}/
    26 
    27 distfiles       ${name}src-${version}${extract.suffix}  \
    28                 ${name}-${version}-library-interfaces${extract.suffix}
    29 
    30 checksums       ${name}src-${version}${extract.suffix}                 md5 f38b74481ec01a066cc9314b7bd18c90     \
    31                 ${name}-${version}-library-interfaces${extract.suffix} md5 f99f413a85462fe719ea634fd319d94f
    32 
    33 patchfiles      patch-cLowUnboxedArray.c        \
    34                 patch-confhc                    \
    35                 patch-config-errno.c            \
    36                 patch-errnogen.c
    37 
    38 configure.args  --mandir=${prefix}/share/man/man1       \
    39                 --buildwith=gcc
    40 
    41 build           {       if {${os.platform} == "darwin" && ${os.arch} == "i386"} {
    42                                 ui_error "nhc98 is not supported on OS X i386 yet"
    43                                 return 1
    44                         }
    45                        
    46                         system "cd ${worksrcpath} && ulimit -s unlimited && make"
    47                 }
    48 
    49 post-destroot   { file delete -force ${destroot}${prefix}/lib/hmake
    50 
    51                   file delete ${destroot}${prefix}/bin/cpphs
    52                   file delete ${destroot}${prefix}/bin/hi
    53                   file delete ${destroot}${prefix}/bin/hmake
    54                   file delete ${destroot}${prefix}/bin/hmake-config
    55 
    56                   file rename ${destroot}${prefix}/bin/harch ${destroot}${prefix}/bin/harch-${name}
    57 
    58 #
    59 # NB - The greencard-nhc98 and hp2graph scripts are hardlinks to
    60 #      the same file. Change one, all are changed.
    61 #
    62                   reinplace "s|${prefix}/bin/harch|${prefix}/bin/harch\-nhc98|"     ${destroot}${prefix}/bin/greencard\-nhc98
    63                   reinplace "s|\{NHC98BINDIR\}/harch|\{NHC98BINDIR\}/harch\-nhc98|" ${destroot}${prefix}/bin/hood
    64                   reinplace "s|NHC98BINDIR/harch|NHC98BINDIR/harch\-nhc98|"         ${destroot}${prefix}/bin/nhc98
    65 
    66                   file delete ${destroot}${prefix}/share/man/man1/harch.1
    67                   file delete ${destroot}${prefix}/share/man/man1/hi.1
    68                   file delete ${destroot}${prefix}/share/man/man1/hmake.1
     12long_description \
     13    nhc98 is a small, easy to install, standards-compliant \
     14    compiler for Haskell 98, the lazy functional \
     15    programming language. It is very portable, and aims to      \
     16    produce small executables that run in small amounts of \
     17    memory. It produces medium-fast code, and compilation \
     18    is itself quite fast. It also comes with extensive tool     \
     19    support for automatic compilation, foreign language \
     20    interfacing, heap and time profiling, tracing, and \
     21    debugging. Some of its advanced kinds of heap \
     22    profiles are not found in any other Haskell compiler.
     23
     24homepage http://www.haskell.org/${name}
     25master_sites \
     26    http://www.cs.york.ac.uk/fp/${name} \
     27    ftp://ftp.cs.york.ac.uk/pub/haskell/${name}
     28
     29distfiles ${name}src-${version}${extract.suffix}
     30
     31checksums \
     32    md5 55c102408da8085aa56984af4151eb9c \
     33    sha1 5bcfa0e8cc192afc5a54aab0bd4c1812dafa7b45 \
     34    rmd160 011e723a956f2fb9029357d00ddb705c350309af
     35
     36depends_lib port:readline port:ncurses
     37
     38configure.args \
     39    --buildwith=gcc \
     40    +docs \
     41    --docdir=${prefix}/share/doc/${name} \
     42    --mandir=${prefix}/share/man/man1 \
     43    --heap=8M
     44
     45patchfiles Makefile.nhc98.diff
     46
     47post-patch {
     48    reinplace "s|-\$(CC)|-\${BUILDCOMP}|g" ${worksrcpath}/Makefile
     49}
     50
     51post-destroot {
     52    set rexp1 "'s|${worksrcpath}/script|${prefix}/bin|g'"
     53    set rexp2 "'s|${worksrcpath}/include|${prefix}/include/nhc98|g'"
     54    set rfile "${destroot}${prefix}/lib/hmake/`${worksrcpath}/script/harch`/hmakerc"
     55    system "sed -i '' -e ${rexp1} -e ${rexp2} ${rfile}"
    6956}
    7057
    71 post-activate   { system "find ${prefix}/lib/${name} -name \"*.a\" -exec ranlib -s {} \\;"
    72                 }
     58livecheck.check  regex
     59livecheck.regex  "Version (.*) released"