This repository has been archived by the owner. It is now read-only.

brew pgrouting #14393

Closed
dkalisch opened this Issue Aug 22, 2012 · 11 comments

Comments

Projects
None yet
5 participants
@dkalisch

I saw, that there is a formular for pgrouting and gaul but a brew install pgrouting give mie an error:
Error: No available formula for pgrouting

How can I brew pgrouting and gaul?

Thanks for your help.

@2bits

This comment has been minimized.

Show comment Hide comment
@2bits

2bits Sep 8, 2012

Contributor

I could probably craft a new formula for pgrouting. I'm working on gaul too. So far so good.

Contributor

2bits commented Sep 8, 2012

I could probably craft a new formula for pgrouting. I'm working on gaul too. So far so good.

@2bits

This comment has been minimized.

Show comment Hide comment
@2bits

2bits Sep 9, 2012

Contributor

ping @charlax do you have a working pgrouting.rb?

Contributor

2bits commented Sep 9, 2012

ping @charlax do you have a working pgrouting.rb?

@charlax

This comment has been minimized.

Show comment Hide comment
@charlax

charlax Sep 10, 2012

Contributor

Hey, unfortunately I deleted it, so I don't have it anymore.

Contributor

charlax commented Sep 10, 2012

Hey, unfortunately I deleted it, so I don't have it anymore.

@2bits

This comment has been minimized.

Show comment Hide comment
@2bits

2bits Sep 10, 2012

Contributor

Right on. I only found your gaul formula, but I was hoping pgrouting formula was at least committed. Then I could look it up in your history. My formula is getting a set of missing symbols that has been complained about before when I enable DD or TSP.

Contributor

2bits commented Sep 10, 2012

Right on. I only found your gaul formula, but I was hoping pgrouting formula was at least committed. Then I could look it up in your history. My formula is getting a set of missing symbols that has been complained about before when I enable DD or TSP.

@dkalisch

This comment has been minimized.

Show comment Hide comment
@dkalisch

dkalisch Sep 12, 2012

ping @2bits here is a formular, that I modified a bit but was originally from charlax:

require 'formula'

class Pgrouting < Formula
  url 'http://download.osgeo.org/pgrouting/source/pgrouting-1.05.tar.gz'
  homepage 'http://www.pgrouting.org/'
  md5 'bd7c106e3db3c38f7081f1ee9b0e12ae'
  version '1.05'

  depends_on "cmake"
  depends_on "postgresql"
  depends_on "postgis"
  depends_on "boost"
  depends_on "proj"
  depends_on "geos"
  depends_on "gaul"

  def install
    # Copy generated SQL files to the share folder
    pgrouting_sql = share + 'postlbs'

    system "cmake . #{std_cmake_parameters} -DPOSTGRESQL_INCLUDE_DIR='#{Formula.factory('postgresql').prefix}/include/server/' -DPOSTGRESQL_LIBRARIES='#{Formula.factory('postgresql').prefix}' -DBoost_INCLUDE_DIR='#{Formula.factory('boost').prefix}/include/boost/' -DSQL_INSTALL_PATH='#{pgrouting_sql}'"
    system "make"
    system "make install"
  end

  def patches
    # fixes various issues to make compilation possible on Mac Os X
    "https://gist.github.com/raw/1271301/c65876cb798647c15e641835370ecb2bcefa8e0c/pgrouting-mac-os-x.patch"
  end
end```

ping @2bits here is a formular, that I modified a bit but was originally from charlax:

require 'formula'

class Pgrouting < Formula
  url 'http://download.osgeo.org/pgrouting/source/pgrouting-1.05.tar.gz'
  homepage 'http://www.pgrouting.org/'
  md5 'bd7c106e3db3c38f7081f1ee9b0e12ae'
  version '1.05'

  depends_on "cmake"
  depends_on "postgresql"
  depends_on "postgis"
  depends_on "boost"
  depends_on "proj"
  depends_on "geos"
  depends_on "gaul"

  def install
    # Copy generated SQL files to the share folder
    pgrouting_sql = share + 'postlbs'

    system "cmake . #{std_cmake_parameters} -DPOSTGRESQL_INCLUDE_DIR='#{Formula.factory('postgresql').prefix}/include/server/' -DPOSTGRESQL_LIBRARIES='#{Formula.factory('postgresql').prefix}' -DBoost_INCLUDE_DIR='#{Formula.factory('boost').prefix}/include/boost/' -DSQL_INSTALL_PATH='#{pgrouting_sql}'"
    system "make"
    system "make install"
  end

  def patches
    # fixes various issues to make compilation possible on Mac Os X
    "https://gist.github.com/raw/1271301/c65876cb798647c15e641835370ecb2bcefa8e0c/pgrouting-mac-os-x.patch"
  end
end```
@2bits

This comment has been minimized.

Show comment Hide comment
@2bits

2bits Sep 13, 2012

Contributor

tyvm for that. my problem is when I try to add

-DENABLE_DD=ON

or the same with tsp. I just figured it would be nice to have whatever functionality that brings, Driving Distance, or Traveling Salesperson.

Contributor

2bits commented Sep 13, 2012

tyvm for that. my problem is when I try to add

-DENABLE_DD=ON

or the same with tsp. I just figured it would be nice to have whatever functionality that brings, Driving Distance, or Traveling Salesperson.

@tomciopp

This comment has been minimized.

Show comment Hide comment
@tomciopp

tomciopp Sep 30, 2012

I was writing a formula for pgrouting as well, but it looks like you guys have beaten me to the punch. I was having issues with make not working and wondering if others were encountering the same issue.

My formula:

require 'formula'

class Pgrouting < Formula
  homepage 'www.pgrouting.org'
  url 'http://download.osgeo.org/pgrouting/source/pgrouting-1.05.tar.gz'
  version '1.05'
  sha1 '582b37eebf86416ca8936e2f3992b5319abc5325'

  depends_on 'cmake' => :build
  depends_on :x11 # if your formula requires any X11/XQuartz components
  depends_on 'postgis'
  depends_on 'postgresql'
  depends_on 'freexl'
  depends_on 'libspatialite'

  def postgresql
    # Follow the PostgreSQL linked keg back to the active Postgres installation
    # as it is common for people to avoid upgrading Postgres.
    Formula.factory('postgresql').linked_keg.realpath
  end

  def postgis
    # Follow the PostGIS linked keg back to the active PostGIS installation
    Formula.factory('postgis').linked_keg.realpath
  end

  def install
    # ENV.j1  # if your formula's build system can't parallelize

    system "./configure", "--disable-debug", "--disable-dependency-tracking",
                      "--prefix=#{prefix}"
    # system "cmake", ".", *std_cmake_args
    system "make install" # if this fails, try separate make/make install steps
  end
end

I was writing a formula for pgrouting as well, but it looks like you guys have beaten me to the punch. I was having issues with make not working and wondering if others were encountering the same issue.

My formula:

require 'formula'

class Pgrouting < Formula
  homepage 'www.pgrouting.org'
  url 'http://download.osgeo.org/pgrouting/source/pgrouting-1.05.tar.gz'
  version '1.05'
  sha1 '582b37eebf86416ca8936e2f3992b5319abc5325'

  depends_on 'cmake' => :build
  depends_on :x11 # if your formula requires any X11/XQuartz components
  depends_on 'postgis'
  depends_on 'postgresql'
  depends_on 'freexl'
  depends_on 'libspatialite'

  def postgresql
    # Follow the PostgreSQL linked keg back to the active Postgres installation
    # as it is common for people to avoid upgrading Postgres.
    Formula.factory('postgresql').linked_keg.realpath
  end

  def postgis
    # Follow the PostGIS linked keg back to the active PostGIS installation
    Formula.factory('postgis').linked_keg.realpath
  end

  def install
    # ENV.j1  # if your formula's build system can't parallelize

    system "./configure", "--disable-debug", "--disable-dependency-tracking",
                      "--prefix=#{prefix}"
    # system "cmake", ".", *std_cmake_args
    system "make install" # if this fails, try separate make/make install steps
  end
end
@2bits

This comment has been minimized.

Show comment Hide comment
@2bits

2bits Sep 30, 2012

Contributor

Here's my pgrouting formula: https://gist.github.com/3807003
Currently it doesn't work because our boost-1.51 is too new and does not contain the necessary symbol definitions anymore. Here is the error log. I get the same error with llvm-gcc in case someone is wondering. So unless people are willing to use brew versions boost and install an older 1.4x, I think we need a patch.

brew install https://gist.github.com/raw/3807003/104b299a0ef95a3394435f210930ef7b4ef528bf/pgrouting.rb
Contributor

2bits commented Sep 30, 2012

Here's my pgrouting formula: https://gist.github.com/3807003
Currently it doesn't work because our boost-1.51 is too new and does not contain the necessary symbol definitions anymore. Here is the error log. I get the same error with llvm-gcc in case someone is wondering. So unless people are willing to use brew versions boost and install an older 1.4x, I think we need a patch.

brew install https://gist.github.com/raw/3807003/104b299a0ef95a3394435f210930ef7b4ef528bf/pgrouting.rb
@adamv

This comment has been minimized.

Show comment Hide comment
@adamv

adamv Oct 4, 2012

Contributor

@2bits - thanks for the investigation

Contributor

adamv commented Oct 4, 2012

@2bits - thanks for the investigation

@adamv

This comment has been minimized.

Show comment Hide comment
@adamv

adamv Oct 24, 2012

Contributor

I'm adding a Boost149 formula here #15299

Contributor

adamv commented Oct 24, 2012

I'm adding a Boost149 formula here #15299

@adamv

This comment has been minimized.

Show comment Hide comment
@adamv

adamv Oct 27, 2012

Contributor

Ok, someone open a real pull request for this software and I'll review it and make sure it works against the boost149 formula.

Contributor

adamv commented Oct 27, 2012

Ok, someone open a real pull request for this software and I'll review it and make sure it works against the boost149 formula.

@adamv adamv closed this Oct 27, 2012

@xu-cheng xu-cheng locked and limited conversation to collaborators Feb 16, 2016

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.