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

    version 2.5

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


      The llvm Portfile 58531 2009-09-30 11:48:05Z nox macports.org $

      PortSystem 1.0

      Name: llvm
      Version: 2.5
      Revision: 1
      Category: lang
      Platform: darwin
      use_parallel_build yes
      Maintainers: erickt openmaintainer
      Description: llvm is a next generation compiler infrastructure
      Long Description: llvm brings tools to work on the llvm intermediate language incl. a C and C++ frontend.

      Homepage: http://llvm.org/
      Master Sites: ${homepage}releases/${version}/

      Checksums: md5 55df2ea8665c8094ad2ef85187b9fc74 sha1 67f4bace9e64cc39255583aa837470d9b9de0aa5 rmd160 2c904b8d0bcce565ed11114b921321a0404e23fe

      universal_variant no

      depends_build bin:flex:flex bin:bison:bison

      configure.dir ${workpath}/build
      build.dir ${configure.dir}
      destroot.dir ${configure.dir}

      post-extract {
      file mkdir ${configure.dir}
      }

      Patch Files: patch-Makefile.config.in.diff patch-Makefile.ocaml.diff

      configure.cppflags
      configure.ldflags
      configure.cmd ${worksrcpath}/configure
      configure.args --enable-optimized --enable-jit --enable-bindings=none

      post-destroot {
      file mkdir ${destroot}${prefix}/lib/llvm
      file mkdir ${destroot}${prefix}/lib/llvm/src
      file mkdir ${destroot}${prefix}/lib/llvm/obj

      file copy ${worksrcpath}/include ${destroot}${prefix}/lib/llvm/src
      file copy ${configure.dir}/include ${destroot}${prefix}/lib/llvm/obj
      file copy ${configure.dir}/Release ${destroot}${prefix}/lib/llvm/obj

      reinplace "s|${worksrcpath}|${prefix}/lib/llvm/src|g" ${destroot}${prefix}/bin/llvm-config ${destroot}${prefix}/lib/llvm/obj/Release/bin/llvm-config
      reinplace "s|${configure.dir}|${prefix}/lib/llvm/obj|g" ${destroot}${prefix}/bin/llvm-config ${destroot}${prefix}/lib/llvm/obj/Release/bin/llvm-config

      fs-traverse item ${destroot} {
      if {[file isfile ${item}] && ".dir" == [file tail ${item}]} {
      delete ${item}
      }
      }
      }

      Variant: ocaml description {Enable generation of OCaml binding} {
      depends_build-append port:ocaml
      depends_lib-append port:ocaml

      configure.args-delete --enable-bindings=none
      configure.args-append --enable-bindings=ocaml

      destroot.args-append OVERRIDE_libdir=${prefix}/lib
      }

      Variant: pic description {Enable generation of position independent code} {
      configure.args-append --enable-pic
      }

    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/llvm
      % sudo port install llvm
      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 llvm
      ---> Verifying checksum for llvm
      ---> Extracting llvm
      ---> Configuring llvm
      ---> Building llvm with target all
      ---> Staging llvm into destroot
      ---> Installing llvm
    - 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 llvm with these commands:
      %  man llvm
      % apropos llvm
      % which llvm
      % locate llvm

     Where to find more information:

    Darwin Ports



    Lightbox this page.