swi-prolog: remove options, fix head
Closes #35595. Signed-off-by: FX Coudert <fxcoudert@gmail.com>
This commit is contained in:
parent
cde9c27483
commit
3425e8ffb3
1 changed files with 25 additions and 31 deletions
|
@ -3,6 +3,7 @@ class SwiProlog < Formula
|
|||
homepage "http://www.swi-prolog.org/"
|
||||
url "http://www.swi-prolog.org/download/stable/src/swipl-7.6.4.tar.gz"
|
||||
sha256 "2d3d7aabd6d99a02dcc2da5d7604e3500329e541c6f857edc5aa06a3b1267891"
|
||||
revision 1
|
||||
|
||||
bottle do
|
||||
sha256 "5076f120b7f2775fc0968885d2d0e82cb7a93f3040c1c39243abdd8ec3ba1e59" => :mojave
|
||||
|
@ -14,33 +15,29 @@ class SwiProlog < Formula
|
|||
head do
|
||||
url "https://github.com/SWI-Prolog/swipl-devel.git"
|
||||
|
||||
depends_on "autoconf" => :build
|
||||
depends_on "cmake" => :build
|
||||
end
|
||||
|
||||
option "with-jpl", "Enable JPL (Java Prolog Bridge)"
|
||||
option "with-xpce", "Enable XPCE (Prolog Native GUI Library)"
|
||||
|
||||
depends_on "pkg-config" => :build
|
||||
depends_on "gmp"
|
||||
depends_on "libarchive"
|
||||
depends_on "openssl"
|
||||
depends_on "readline"
|
||||
depends_on "libarchive" => :optional
|
||||
|
||||
if build.with? "xpce"
|
||||
depends_on :x11
|
||||
depends_on "jpeg"
|
||||
end
|
||||
|
||||
def install
|
||||
if build.with? "libarchive"
|
||||
ENV["ARPREFIX"] = Formula["libarchive"].opt_prefix
|
||||
else
|
||||
ENV.append "DISABLE_PKGS", "archive"
|
||||
if build.head?
|
||||
mkdir "build" do
|
||||
system "cmake", "..", *std_cmake_args,
|
||||
"-DSWIPL_PACKAGES_JAVA=OFF",
|
||||
"-DSWIPL_PACKAGES_JAVA=OFF",
|
||||
"-DSWIPL_PACKAGES_X=OFF",
|
||||
"-DCMAKE_INSTALL_PREFIX=#{libexec}"
|
||||
system "make", "install"
|
||||
end
|
||||
|
||||
args = ["--prefix=#{libexec}", "--mandir=#{man}"]
|
||||
ENV.append "DISABLE_PKGS", "jpl" if build.without? "jpl"
|
||||
ENV.append "DISABLE_PKGS", "xpce" if build.without? "xpce"
|
||||
else
|
||||
ENV["ARPREFIX"] = Formula["libarchive"].opt_prefix
|
||||
ENV.append "DISABLE_PKGS", "jpl"
|
||||
ENV.append "DISABLE_PKGS", "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
|
||||
|
@ -48,13 +45,10 @@ class SwiProlog < Formula
|
|||
ENV["CIFLAGS"] = ENV.cppflags
|
||||
ENV["COFLAGS"] = ENV.cflags
|
||||
|
||||
# './prepare' prompts the user to build documentation
|
||||
# (which requires other modules). '3' is the option
|
||||
# to ignore documentation.
|
||||
system "echo 3 | ./prepare" if build.head?
|
||||
system "./configure", *args
|
||||
system "./configure", "--prefix=#{libexec}", "--mandir=#{man}"
|
||||
system "make"
|
||||
system "make", "install"
|
||||
end
|
||||
|
||||
bin.write_exec_script Dir["#{libexec}/bin/*"]
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue