C2hs version 0.15.1 - How to Download and Install on Mac OS X
Saturday the 7th of November, 2009

    version 0.15.1

      View the most recent changes for the c2hs port at: c2hs.darwinports.com/diff
      Scroll down toward the bottom of the page to get installation instructions for c2hs.
      The raw portfile for c2hs 0.15.1 is located here:
      http://c2hs.darwinports.com/dports/devel/c2hs/Portfile
      Find related portfiles with the unique DarwinPorts.com search feature.
      Check for any related Fink projects here: pdb.finkproject.org/pdb/package.php/c2hs


      The c2hs Portfile 42538 2008-11-24 00:35:43Z gwright macports.org $

      PortSystem 1.0

      Name: c2hs
      Version: 0.15.1
      Category: devel haskell
      Maintainers: gwright
      Platform: darwin

      Description: Yet Another Interface Generator for Haskell
      Long Description: C->Haskell is an interface generator that simplifies the development of Haskell bindings to C libraries. The tool processes existing C header files that determine data layout and function signatures on the C side in conjunction with Haskell modules that specify Haskell-side type signatures and marshaling details.

      Homepage: http://www.cse.unsw.edu.au/~chak/haskell/c2hs/
      Master Sites: ${homepage}/

      Checksums: md5 69f99fba67419edd471b77efb0bd644f sha1 f690c87abf63329b6888cb2a3b8f4fb64d113150 rmd160 e43c39437dd3320cdb714ef2219d7bed2d25afab

      depends_build port:ghc

      universal_variant no

      pre-configure {
      system "cd ${worksrcpath} && ghc -o Setup Setup.hs -package Cabal"
      }

      configure {
      system "cd ${worksrcpath} && ./Setup configure --ghc --prefix=${prefix}"
      }

      build {
      system "cd ${worksrcpath} && ./Setup build -v"
      }

      destroot {
      system "cd ${worksrcpath} && ./Setup copy --copy-prefix=${destroot}${prefix}"
      }


    If you haven't already installed Darwin Ports, you can find easy instructions for doing so at the main Darwin Ports page.

    Once Darwin Ports has been installed, in a terminal window and while online, type the following and hit return:


      %  cd /opt/local/bin/portslocation/dports/c2hs
      % sudo port install c2hs
      Password:
    You will then be prompted for your root password, which you should enter. You may have to wait for a few minutes while the software is retrieved from the network and installed for you. Y ou should see something that looks similar to:

      ---> Fetching c2hs
      ---> Verifying checksum for c2hs
      ---> Extracting c2hs
      ---> Configuring c2hs
      ---> Building c2hs with target all
      ---> Staging c2hs into destroot
      ---> Installing c2hs
    - Make sure that you do not close the terminal window while Darwin Ports is working. Once the software has been installed, you can find further information about using c2hs with these commands:
      %  man c2hs
      % apropos c2hs
      % which c2hs
      % locate c2hs

     Where to find more information:

    Darwin Ports



    Lightbox this page.