Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

crossroads: fix pgm build errors #15255

Closed
wants to merge 1 commit into from

2 participants

@2bits

crossroads builds an internal libpgm from source, but that causes
build errors because of a conflicting struct definition with OSX
netinet.h. So instead of dealing with that, link crossroads
against our libpgm-5.2 which builds without error. Add a couple
of ENV vars to override pkg-config and help crossroads find
the libpgm we now depend on, which it can't find otherwise because
it's looking for openpgm-5.1.pc and we offer openpgm-5.2.pc.
Crossroads passes make check on 10.8.2 with XCode-4.5.

Fixes #15217

@2bits 2bits crossroads: fix pgm build errors
crossroads builds an internal libpgm from source, but that causes
build errors because of a conflicting struct definition with OSX
`netinet.h`.  So instead of dealing with that, link crossroads
against our libpgm-5.2 which builds without error.  Add a couple
of ENV vars to override `pkg-config` and help crossroads find
the libpgm we now depend on, which it can't find otherwise because
it's looking for `openpgm-5.1.pc` and we offer `openpgm-5.2.pc`.
Crossroads passes `make check` on 10.8.2 with XCode-4.5.

Fixes #15217
b0949c7
@adamv adamv closed this pull request from a commit
@2bits 2bits crossroads: fix pgm build errors
crossroads builds an internal libpgm from source, but that causes
build errors because of a conflicting struct definition with OSX
`netinet.h`.  So instead of dealing with that, link crossroads
against our libpgm-5.2 which builds without error.  Add a couple
of ENV vars to override `pkg-config` and help crossroads find
the libpgm we now depend on, which it can't find otherwise because
it's looking for `openpgm-5.1.pc` and we offer `openpgm-5.2.pc`.
Crossroads passes `make check` on 10.8.2 with XCode-4.5.

Fixes #15217

Closes #15255.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
47cfcad
@adamv adamv closed this in 47cfcad
@allenhuang allenhuang referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
@theirix theirix referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
@snakeyroc3 snakeyroc3 referenced this pull request from a commit in snakeyroc3/homebrew
@2bits 2bits crossroads: fix pgm build errors
crossroads builds an internal libpgm from source, but that causes
build errors because of a conflicting struct definition with OSX
`netinet.h`.  So instead of dealing with that, link crossroads
against our libpgm-5.2 which builds without error.  Add a couple
of ENV vars to override `pkg-config` and help crossroads find
the libpgm we now depend on, which it can't find otherwise because
it's looking for `openpgm-5.1.pc` and we offer `openpgm-5.2.pc`.
Crossroads passes `make check` on 10.8.2 with XCode-4.5.

Fixes #15217

Closes #15255.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
6305618
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 2, 2012
  1. @2bits

    crossroads: fix pgm build errors

    2bits authored
    crossroads builds an internal libpgm from source, but that causes
    build errors because of a conflicting struct definition with OSX
    `netinet.h`.  So instead of dealing with that, link crossroads
    against our libpgm-5.2 which builds without error.  Add a couple
    of ENV vars to override `pkg-config` and help crossroads find
    the libpgm we now depend on, which it can't find otherwise because
    it's looking for `openpgm-5.1.pc` and we offer `openpgm-5.2.pc`.
    Crossroads passes `make check` on 10.8.2 with XCode-4.5.
    
    Fixes #15217
This page is out of date. Refresh to see the latest.
Showing with 11 additions and 1 deletion.
  1. +11 −1 Library/Formula/crossroads.rb
View
12 Library/Formula/crossroads.rb
@@ -9,8 +9,10 @@ class Crossroads < Formula
option 'with-pgm', 'Build with PGM extension'
+ depends_on 'pkg-config' => :build
depends_on :automake
depends_on :libtool
+ depends_on 'libpgm' if build.include? 'with-pgm'
fails_with :llvm do
build 2326
@@ -20,8 +22,16 @@ class Crossroads < Formula
def install
system "./autogen.sh" if build.head?
+ # Help it find openpgm-5.2 because it searches for openpgm-5.1.pc
+ # https://github.com/mxcl/homebrew/issues/15217
+ if build.include? 'with-pgm'
+ libpgm = Formula.factory('libpgm')
+ ENV['OpenPGM_CFLAGS'] = "-I#{libpgm.include}/pgm-5.2 -I#{libpgm.lib}/pgm-5.2/include"
+ ENV['OpenPGM_LIBS'] = "-L#{libpgm.lib} -lpgm"
+ end
+
args = ["--disable-dependency-tracking", "--prefix=#{prefix}"]
- args << "--with-pgm" if build.include? 'with-pgm'
+ args << "--with-system-pgm" if build.include? 'with-pgm'
system "./configure", *args
system "make"
Something went wrong with that request. Please try again.