diff options
| author | Mike McQuaid | 2012-09-02 01:13:33 -0700 |
|---|---|---|
| committer | Mike McQuaid | 2012-09-04 19:44:45 -0700 |
| commit | cb00084fe5403625c7619419dcce4c7a8f282fdc (patch) | |
| tree | 3f8a25fa50613db73347956c959e956b2b8b69da /Library/Formula | |
| parent | 49572b7f1089da9422857e8fa7b479c109d3211b (diff) | |
| download | homebrew-cb00084fe5403625c7619419dcce4c7a8f282fdc.tar.bz2 | |
swi-prolog: fix test, Java and X11 dependencies.
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/swi-prolog.rb | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/Library/Formula/swi-prolog.rb b/Library/Formula/swi-prolog.rb index 4db103f0b..84352e031 100644 --- a/Library/Formula/swi-prolog.rb +++ b/Library/Formula/swi-prolog.rb @@ -7,16 +7,18 @@ class SwiProlog < Formula head 'git://www.swi-prolog.org/home/pl/git/pl.git' - option 'lite', "Don't install any packages" - option 'without-jpl', "Don't include JPL, the Java-Prolog Bridge" + option 'lite', "Disable all packages" + option 'with-jpl', "Enable JPL (Java Prolog Bridge)" + option 'with-xpce', "Enable XPCE (Prolog Native GUI Library)" - depends_on 'pkg-config' => :build depends_on 'readline' depends_on 'gmp' - depends_on 'jpeg' - depends_on 'mcrypt' - depends_on 'gawk' - depends_on :x11 if MacOS::X11.installed? + + if build.include? 'with-xpce' + depends_on 'pkg-config' => :build + depends_on :x11 + depends_on 'jpeg' + end # 10.5 versions of these are too old if MacOS.leopard? @@ -31,13 +33,8 @@ class SwiProlog < Formula def install args = ["--prefix=#{prefix}", "--mandir=#{man}"] - ENV.append 'DISABLE_PKGS', "jpl" if build.include? "without-jpl" - - unless MacOS::X11.installed? - # SWI-Prolog requires X11 for XPCE - opoo "It appears that X11 is not installed. The XPCE packages will not be built." - ENV.append 'DISABLE_PKGS', "xpce" - end + ENV.append 'DISABLE_PKGS', "jpl" unless build.include? "with-jpl" + ENV.append 'DISABLE_PKGS', "xpce" unless build.include? 'with-xpce' # SWI-Prolog's Makefiles don't add CPPFLAGS to the compile command, but do # include CIFLAGS. Setting it here. Also, they clobber CFLAGS, so including @@ -56,4 +53,8 @@ class SwiProlog < Formula system "make" system "make install" end + + def test + system "#{bin}/swipl", "--version" + end end |
