libkml: force internal third-party libs to be linked statically

Closes Homebrew/homebrew#24282.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
master
Larry Shaffer 2013-11-13 18:43:30 -07:00 committed by Adam Vandenberg
parent 59eb641456
commit a2b2cbec3e
1 changed files with 18 additions and 4 deletions

View File

@ -13,11 +13,25 @@ class Libkml < Formula
depends_on :libtool
end
conflicts_with 'uriparser', :because => 'both install `liburiparser.dylib`'
def patches
p = []
# Fix compilation with clang and gcc 4.7+
# https://code.google.com/p/libkml/issues/detail?id=179
p << DATA
# Fix compilation with clang and gcc 4.7+
# https://code.google.com/p/libkml/issues/detail?id=179
def patches; DATA; end
# Correct an issue where internal third-party libs (libminizip and liburiparser)
# are installed as dylibs. liburiparser conflicts with uriparser formula.
# libminizip conflicts with new formula, and some of its symbols have been
# renamed with prefixes of "libkml_", i.e, can't be linked against for other builds
# Fix just forces internal libs to be linked statically until the following
# is addressed upstream: https://code.google.com/p/libkml/issues/detail?id=50
if build.head?
p << "https://gist.github.com/dakcarto/7420023/raw"
else
p << "https://gist.github.com/dakcarto/7419882/raw"
end
return p
end
def install
if build.head?