Changeset 96921


Ignore:
Timestamp:
Aug 21, 2012, 7:34:17 PM (7 years ago)
Author:
cal@…
Message:

ghc-devel: Mark obsolete and replaced_by the newer ghc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/lang/ghc-devel/Portfile

    r96513 r96921  
     1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
    12# $Id$
    23
    3 PortSystem 1.0
     4PortSystem  1.0
    45
    5 name            ghc-devel
    6 version         6.11
    7 categories      lang
    8 license         BSD
    9 maintainers     nomaintainer
    10 platforms       darwin
    11 description     The Glorious Glasgow Haskell Compilation System (development version)
    12 long_description        \
    13                 The Glasgow Haskell Compiler is a robust,               \
    14                 fully-featured, optimising compiler and interactive     \
    15                 environment for Haskell 98, GHC compiles Haskell to     \
    16                 either native code or C.  It implements numerous        \
    17                 experimental language extensions to Haskell 98,         \
    18                 for example: concurrency, a foreign language interface, \
    19                 multi-parameter type classes, scoped type variables,    \
    20                 existential and universal quantification, unboxed       \
    21                 types, exceptions, weak pointers, and so on.            \
    22                 GHC comes with a generational garbage collector,        \
    23                 and a space and time profiler.
    24 
    25 homepage        http://www.haskell.org/ghc/
    26 set darcs_site  http://darcs.haskell.org/
    27 
    28 # Fetch using git is not yet supported in the released version
    29 # of MacPorts (requires 1.7).
    30 #
    31 #fetch.type     git
    32 #git.url        http://darcs.haskell.org/ghc.git
    33 
    34 set worksrcdir  ghc
    35 
    36 pre-fetch {
    37          return -code error "ghc-devel is not currently supported"
    38 }
    39 
    40 fetch           {
    41                   system "cd ${workpath} && git clone ${darcs_site}/ghc.git"
    42 }
    43  
    44 variant test description {build testsuite and nofb benchmarks} {
    45          ui_msg "testsuite and nofib benchmarks will be built"
    46 }
    47 
    48 post-fetch      {
    49                   system "cd ${worksrcpath} && chmod +x ./sync-all"
    50                   system "cd ${worksrcpath} && ./sync-all get"
    51                   system "cd ${worksrcpath} && ./sync-all --extralibs get"
    52 
    53                   if { [variant_isset test] } {
    54                         system "cd ${worksrcpath} && ./sync-all --testsuite get"
    55                         system "cd ${worksrcpath} && ./sync-all --nofib get"
    56                   }
    57                 }
    58 
    59 extract         { }
    60 checksum        { }
    61 
    62 depends_build   port:ghc        \
    63                 port:hs-platform-alex   \
    64                 port:hs-platform-happy  \
    65                 port:git-core
    66 
    67 depends_lib     port:libedit    \
    68                 port:gmp
    69 
    70 #user_notes     All of the executables have the version as a suffix,    \
    71 #               so you must invoke ghc-6.9 or ghci-6.9 or hsc2hs-6.9... \
    72 #               Not all of the files in /bin are different from the     \
    73 #               production version, but it seems safer not to overwrite \
    74 #               the versions that are officially supported.
    75 
    76 #bugs           GHC does not support DESTDIR. Instead, we install       \
    77 #               everything into ${destroot}${prefix}, and then fix up   \
    78 #               the five scripts which actually have the installation   \
    79 #               path hard coded.
    80 
    81 post-patch      {
    82                 system "touch ${worksrcpath}/libraries/base3-compat/LICENSE"
    83 }
    84 
    85 pre-configure   {
    86                 set cfg [open "${worksrcpath}/mk/build.mk" w]
    87                 puts $cfg "#"
    88                 puts $cfg "# Local configuration overrides for MacPorts"
    89                 puts $cfg "#"
    90                 puts $cfg "SRC_CC_OPTS += -I${prefix}/include"
    91                 puts $cfg "SRC_HC_OPTS += -I${prefix}/include -I/usr/include -L${prefix}/lib -L/usr/lib"
    92                 puts $cfg "EXTRA_HSC2HS_OPTS += -I${prefix}/include"
    93                 puts $cfg "EXTRA_LD_OPTS += -L${prefix}/lib"
    94                 puts $cfg "EXTRA_LD_OPTS += -L/usr/lib"
    95                 close $cfg
    96 
    97                 system "cd ${worksrcpath} && sh boot"
    98 }
    99 
    100 
    101 configure.env   DYLD_FALLBACK_LIBRARY_PATH=${prefix}/lib
    102 configure.cflags-append "-I${prefix}/include"
    103 
    104 configure.args  --prefix=${destroot}${prefix}                   \
    105                 --mandir=${destroot}${prefix}/share/man/        \
    106                 --with-readline-includes=${prefix}/include      \
    107                 --with-readline-libraries=${prefix}/lib         \
    108                 --with-gmp-includes=${prefix}/include           \
    109                 --with-gmp-libraries=${prefix}/lib              \
    110                 --disable-openal                                \
    111                 --disable-alut
    112 
    113 variant no_opengl       {
    114                 configure.args-append --disable-opengl
    115                 configure.args-append --disable-glut
    116 }
    117 
    118 build.env       DYLD_FALLBACK_LIBRARY_PATH=${prefix}/lib
    119 
    120 post-destroot   { cd ${destroot}${prefix}/bin
    121                   set ghc_script     [ glob ${destroot}${prefix}/bin/ghc-${version}.* ]
    122                   set ghci_script    [ glob ${destroot}${prefix}/bin/ghci-${version}.* ]
    123                   set ghc-pkg_script [ glob ${destroot}${prefix}/bin/ghc-pkg-${version}.* ]
    124 
    125                   foreach script_name [concat ${ghc_script} ${ghci_script} ${ghc-pkg_script} ] {
    126                         reinplace s|${destroot}${prefix}|${prefix}|g ${destroot}${prefix}/bin/${script_name}
    127                   }
    128 
    129                   foreach script_name { ghcprof hsc2hs-ghc } {
    130                         reinplace s|${destroot}${prefix}|${prefix}|g ${destroot}${prefix}/bin/${script_name}
    131                   }
    132 
    133                   reinplace "s|\\\$@\"\}|\\\$@\"\} -L${prefix}/lib -I${prefix}/include |" ${destroot}${prefix}/bin/ghc
    134 
    135                   set ghc_libdir [ glob ${destroot}${prefix}/bin/ghc-${version}.* ]
    136                   reinplace s|${destroot}${prefix}|${prefix}|g ${destroot}${prefix}/lib/${ghc_libdir}/package.conf
    137 
    138                   file delete ${destroot}${prefix}/bin/ghc
    139                   file delete ${destroot}${prefix}/bin/ghci
    140                   file delete ${destroot}${prefix}/bin/ghc-pkg
    141 
    142                   set ghc_date [ lindex [ split ${ghc_libdir} "." ] 2 ]
    143 
    144                   foreach bin_name { ghcprof hasktags hp2ps hsc2hs-ghc runghc } {
    145                         file rename ${destroot}${prefix}/bin/${bin_name} ${destroot}${prefix}/bin/${bin_name}-${version}.${ghc_date}
    146                   }
    147 
    148                   system "cd ${destroot}${prefix}/lib/${ghc_libdir} && ranlib *.a"
    149 }
    150 
     6name        ghc-devel
     7version     6.11
     8revision    1
     9categories  lang
     10license     BSD
     11replaced_by ghc
     12PortGroup   obsolete 1.0
Note: See TracChangeset for help on using the changeset viewer.