Pgrouting version 1.03 - How to Download and Install on Mac OS X
Sunday the 22nd of November, 2009

    pgrouting  most recent diff


    version 1.03

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


      # -*- coding: utf-8; mode: tcl; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=2:ts=2:sts=2

      PortSystem 1.0

      Name: pgRouting
      Version: 1.03
      license GPL
      Category: gis
      Maintainers: vince
      Description: Routing algorithms for PostGIS
      Long Description: pgRouting adds the following algorithms to PostGRES: Dijkstra: shortest path, A*: boosted dijkstra, Isochrones computation, TSP and shooting star, an algorithm to compute shortest path on real road networks.
      Platform: darwin
      Homepage: http://pgrouting.postlbs.org/
      Master Sites: http://files.postlbs.org/pgrouting/source
      distname ${name}-${version}

      extract.suffix .tgz

      Checksums: md5 ee700d18a984b8fd78c1a739ca078683 sha1 012d4e8655774aa1a170ef404cc34f3606f9b245 rmd160 1ff5eae093b69775ea98a04e1015268623e5b914

      depends_lib port:cmake
      depends_lib-append port:geos port:gaul-devel port:cgal port:postgresql84

      worksrcdir pgrouting

      configure.cmd cmake .

      # Locate postgres

      set PGLIB ${prefix}/lib/postgresql84
      set PGINC ${prefix}/include/postgresql84

      Variant: postgresql83 {
      set PGLIB ${prefix}/lib/postgresql83
      set PGINC ${prefix}/include/postgresql83
      }

      Variant: postgresql82 {
      set PGLIB ${prefix}/lib/postgresql82
      set PGINC ${prefix}/include/postgresql82
      }


      Patch Files: patch-astar_c.diff patch-dijkstra_c.diff patch-shooting_star_c.diff

      # Configuration
      # Start with no configure arguments: override defaults
      configure.pre_args
      configure.args
      configure.universal_args
      configure.cflags
      configure.cxxflags

      configure.env-append PATH=$env(PATH):${PGLIB}/bin

      configure.args-append -DCMAKE_INSTALL_PREFIX=${prefix}
      configure.args-append -DPOSTGRESQL_INCLUDE_DIR=${PGINC}/server
      configure.args-append -DPOSTGRESQL_LIBRARIES=${PGLIB}
      configure.args-append -DCMAKE_C_COMPILER=${configure.cc}
      configure.args-append -DCMAKE_CXX_COMPILER=${configure.cxx}
      configure.args-append -DWITH_TSP=TRUE

      Variant: universal {
      set archs "-DCMAKE_OSX_ARCHITECTURES=\""

      foreach arch ${configure.universal_archs} {
      append archs ${arch} ";"
      }
      configure.args-append "${archs}\""
      set sysroot [lindex [exec ls /Developer/SDKs] end]
      configure.args-append "-DCMAKE_OSX_SYSROOT=/Developer/SDKs/${sysroot}"
      }

      post-configure {
      reinplace -E "s|-dynamiclib|-bundle|" ${worksrcpath}/core/src/CMakeFiles/routing.dir/link.txt
      reinplace -E "s|-dynamiclib|-bundle|" ${worksrcpath}/extra/tsp/src/CMakeFiles/routing_tsp.dir/link.txt

      reinplace -E "s|-install_name \[^ ]+|-bundle_loader ${PGLIB}/bin/postgres|" ${worksrcpath}/core/src/CMakeFiles/routing.dir/link.txt
      reinplace -E "s|-install_name \[^ ]+|-bundle_loader ${PGLIB}/bin/postgres|" ${worksrcpath}/extra/tsp/src/CMakeFiles/routing_tsp.dir/link.txt

      reinplace -E "s|librouting\.dylib|librouting\\.so|" ${worksrcpath}/core/src/CMakeFiles/routing.dir/link.txt
      reinplace -E "s|librouting_tsp\.dylib|librouting_tsp\\.so|" ${worksrcpath}/extra/tsp/src/CMakeFiles/routing_tsp.dir/link.txt

      reinplace -E "s|librouting\.dylib|librouting\\.so|" ${worksrcpath}/core/src/cmake_install.cmake
      reinplace -E "s|librouting_tsp\.dylib|librouting_tsp\\.so|" ${worksrcpath}/extra/tsp/src/cmake_install.cmake

      reinplace -E "s|/usr/share|${prefix}/share|" ${worksrcpath}/core/sql/cmake_install.cmake
      reinplace -E "s|/usr/share|${prefix}/share|" ${worksrcpath}/extra/tsp/sql/cmake_install.cmake
      }

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

     Where to find more information:

    Darwin Ports



    Lightbox this page.