aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/swi-prolog.rb
diff options
context:
space:
mode:
authorAdam Vandenberg2014-04-24 21:20:51 -0700
committerAdam Vandenberg2014-04-24 22:12:43 -0700
commit726d3d9dc8c705c8e55583374ae3043f6ab7b082 (patch)
tree8713891f3ae9d13ff2dc8214c591d5939fc37174 /Library/Formula/swi-prolog.rb
parent10a2c2898a247b94167773e7ff61ee8a0c02203a (diff)
downloadhomebrew-726d3d9dc8c705c8e55583374ae3043f6ab7b082.tar.bz2
swi-prolog: optional libarchive support
Also prevent finding a MacPorts installed libarchive. Closes #28666.
Diffstat (limited to 'Library/Formula/swi-prolog.rb')
-rw-r--r--Library/Formula/swi-prolog.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/Library/Formula/swi-prolog.rb b/Library/Formula/swi-prolog.rb
index dc0862a6f..7d15a5ab8 100644
--- a/Library/Formula/swi-prolog.rb
+++ b/Library/Formula/swi-prolog.rb
@@ -22,6 +22,7 @@ class SwiProlog < Formula
depends_on 'readline'
depends_on 'gmp'
+ depends_on 'libarchive' => :optional
if build.with? "xpce"
depends_on 'pkg-config' => :build
@@ -41,6 +42,15 @@ class SwiProlog < Formula
end
def install
+ # The archive package hard-codes a check for MacPort libarchive
+ # Replace this with a check for Homebrew's libarchive, or nowhere
+ if build.with? "libarchive"
+ inreplace "packages/archive/configure.in", "/opt/local",
+ Formula['libarchive'].opt_prefix
+ else
+ ENV.append "DISABLE_PKGS", "archive"
+ end
+
args = ["--prefix=#{libexec}", "--mandir=#{man}"]
ENV.append 'DISABLE_PKGS', "jpl" if build.without? "jpl"
ENV.append 'DISABLE_PKGS', "xpce" if build.without? "xpce"