Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove more options #31830

Merged
merged 25 commits into from
Sep 5, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
91 changes: 32 additions & 59 deletions Formula/agda.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,42 +31,28 @@ class Agda < Formula
end
end

deprecated_option "without-ghc@8.2" => "without-ghc"
deprecated_option "without-malonzo" => "without-ghc"

option "without-stdlib", "Don't install the Agda standard library"
option "without-ghc", "Disable the GHC backend"

depends_on "ghc" => :recommended
if build.with? "ghc"
depends_on "cabal-install" => [:build, :test]
else
depends_on "cabal-install" => :build
depends_on "ghc" => :build
end

depends_on "cabal-install" => [:build, :test]
depends_on "ghc"
depends_on "emacs" => :recommended

def install
# install Agda core
install_cabal_package :using => ["alex", "happy", "cpphs"]

if build.with? "stdlib"
resource("stdlib").stage lib/"agda"
resource("stdlib").stage lib/"agda"

# generate the standard library's bytecode
cd lib/"agda" do
cabal_sandbox :home => buildpath, :keep_lib => true do
cabal_install "--only-dependencies"
cabal_install
system "GenerateEverything"
end
# generate the standard library's bytecode
cd lib/"agda" do
cabal_sandbox :home => buildpath, :keep_lib => true do
cabal_install "--only-dependencies"
cabal_install
system "GenerateEverything"
end
end

# generate the standard library's documentation and vim highlighting files
cd lib/"agda" do
system bin/"agda", "-i", ".", "-i", "src", "--html", "--vim", "README.agda"
end
# generate the standard library's documentation and vim highlighting files
cd lib/"agda" do
system bin/"agda", "-i", ".", "-i", "src", "--html", "--vim", "README.agda"
end

# compile the included Emacs mode
Expand All @@ -76,19 +62,12 @@ def install
end
end

def caveats
s = ""

if build.with? "stdlib"
s += <<~EOS
To use the Agda standard library by default:
mkdir -p ~/.agda
echo #{HOMEBREW_PREFIX}/lib/agda/standard-library.agda-lib >>~/.agda/libraries
echo standard-library >>~/.agda/defaults
EOS
end

s
def caveats; <<~EOS
To use the Agda standard library by default:
mkdir -p ~/.agda
echo #{HOMEBREW_PREFIX}/lib/agda/standard-library.agda-lib >>~/.agda/libraries
echo standard-library >>~/.agda/defaults
EOS
end

test do
Expand Down Expand Up @@ -159,30 +138,24 @@ module StdlibIOTest where
system bin/"agda", simpletest

# typecheck a module that uses the standard library
if build.with? "stdlib"
system bin/"agda", "-i", lib/"agda"/"src", stdlibtest
end
system bin/"agda", "-i", lib/"agda"/"src", stdlibtest

# compile a simple module using the JS backend
system bin/"agda", "--js", simpletest

# test the GHC backend
if build.with? "ghc"
cabal_sandbox do
cabal_install "text", "ieee754"
dbpath = Dir["#{testpath}/.cabal-sandbox/*-packages.conf.d"].first
dbopt = "--ghc-flag=-package-db=#{dbpath}"

# compile and run a simple program
system bin/"agda", "-c", dbopt, iotest
assert_equal "", shell_output(testpath/"IOTest")

# compile and run a program that uses the standard library
if build.with? "stdlib"
system bin/"agda", "-c", "-i", lib/"agda"/"src", dbopt, stdlibiotest
assert_equal "Hello, world!", shell_output(testpath/"StdlibIOTest")
end
end
cabal_sandbox do
cabal_install "text", "ieee754"
dbpath = Dir["#{testpath}/.cabal-sandbox/*-packages.conf.d"].first
dbopt = "--ghc-flag=-package-db=#{dbpath}"

# compile and run a simple program
system bin/"agda", "-c", dbopt, iotest
assert_equal "", shell_output(testpath/"IOTest")

# compile and run a program that uses the standard library
system bin/"agda", "-c", "-i", lib/"agda"/"src", dbopt, stdlibiotest
assert_equal "Hello, world!", shell_output(testpath/"StdlibIOTest")
end
end
end
6 changes: 0 additions & 6 deletions Formula/bitlbee.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ class Bitlbee < Formula
end

option "with-pidgin", "Use finch/libpurple for all communication with instant messaging networks"
option "with-libotr", "Build with otr (off the record) support"
option "with-libevent", "Use libevent for the event-loop handling rather than glib."

deprecated_option "with-finch" => "with-pidgin"

Expand All @@ -39,8 +37,6 @@ class Bitlbee < Formula
depends_on "gnutls"
depends_on "libgcrypt"
depends_on "pidgin" => :optional
depends_on "libotr" => :optional
depends_on "libevent" => :optional

def install
args = %W[
Expand All @@ -55,8 +51,6 @@ def install
]

args << "--purple=1" if build.with? "pidgin"
args << "--otr=1" if build.with? "libotr"
args << "--events=libevent" if build.with? "libevent"

system "./configure", *args

Expand Down
34 changes: 2 additions & 32 deletions Formula/cppcheck.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,50 +12,20 @@ class Cppcheck < Formula
sha256 "55c59fc078a4c2311ed7d4c1f048ae1114dbcf30956249441979e6bc91e7762b" => :el_capitan
end

option "without-rules", "Build without rules (no pcre dependency)"
option "with-qt", "Build the cppcheck GUI (requires Qt)"

deprecated_option "no-rules" => "without-rules"
deprecated_option "with-gui" => "with-qt"
deprecated_option "with-qt5" => "with-qt"

depends_on "pcre" if build.with? "rules"
depends_on "qt" => :optional
depends_on "pcre"

needs :cxx11

def install
ENV.cxx11

# Man pages aren't installed as they require docbook schemas.

# Pass to make variables.
if build.with? "rules"
system "make", "HAVE_RULES=yes", "CFGDIR=#{prefix}/cfg"
else
system "make", "HAVE_RULES=no", "CFGDIR=#{prefix}/cfg"
end
system "make", "HAVE_RULES=yes", "CFGDIR=#{prefix}/cfg"

# CFGDIR is relative to the prefix for install, don't add #{prefix}.
system "make", "DESTDIR=#{prefix}", "BIN=#{bin}", "CFGDIR=/cfg", "install"

# Move the python addons to the cppcheck pkgshare folder
(pkgshare/"addons").install Dir.glob(bin/"*.py")

if build.with? "qt"
cd "gui" do
if build.with? "rules"
system "qmake", "HAVE_RULES=yes",
"INCLUDEPATH+=#{Formula["pcre"].opt_include}",
"LIBS+=-L#{Formula["pcre"].opt_lib}"
else
system "qmake", "HAVE_RULES=no"
end

system "make"
prefix.install "cppcheck-gui.app"
end
end
end

test do
Expand Down
24 changes: 2 additions & 22 deletions Formula/dovecot.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,47 +13,29 @@ class Dovecot < Formula

option "with-pam", "Build with PAM support"
option "with-pigeonhole", "Add Sieve addon for Dovecot mailserver"
option "with-pigeonhole-unfinished-features", "Build unfinished new Sieve addon features/extensions"
option "with-stemmer", "Build with libstemmer support"

depends_on "openssl"
depends_on "clucene" => :optional

resource "pigeonhole" do
url "https://pigeonhole.dovecot.org/releases/2.3/dovecot-2.3-pigeonhole-0.5.2.tar.gz"
sha256 "950e8e15c58e539761255e140dd3678dd2477fa432a5f2b804e53821bdc02535"
end

resource "stemmer" do
url "https://github.com/snowballstem/snowball.git",
:revision => "1964ce688cbeca505263c8f77e16ed923296ce7a"
end

def install
args = %W[
--prefix=#{prefix}
--disable-dependency-tracking
--libexecdir=#{libexec}
--sysconfdir=#{etc}
--localstatedir=#{var}
--with-ssl=openssl
--with-bzlib
--with-sqlite
--with-ssl=openssl
--with-zlib
--with-bzlib
]

args << "--with-lucene" if build.with? "clucene"
args << "--with-pam" if build.with? "pam"

if build.with? "stemmer"
args << "--with-libstemmer"

resource("stemmer").stage do
system "make", "dist_libstemmer_c"
system "tar", "xzf", "dist/libstemmer_c.tgz", "-C", buildpath
end
end

system "./configure", *args
system "make", "install"

Expand All @@ -65,8 +47,6 @@ def install
--prefix=#{prefix}
]

args << "--with-unfinished-features" if build.with? "pigeonhole-unfinished-features"

system "./configure", *args
system "make"
system "make", "install"
Expand Down
11 changes: 3 additions & 8 deletions Formula/ghc.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,9 @@ class Ghc < Formula
end
end

option "with-test", "Verify the build using the testsuite"
option "without-docs", "Do not build documentation (including man page)"
deprecated_option "tests" => "with-test"
deprecated_option "with-tests" => "with-test"

depends_on :macos => :lion
depends_on "python" => :build if build.bottle? || build.with?("test")
depends_on "sphinx-doc" => :build if build.with? "docs"
depends_on "python" => :build if build.bottle?
depends_on "sphinx-doc" => :build

resource "gmp" do
url "https://ftp.gnu.org/gnu/gmp/gmp-6.1.2.tar.xz"
Expand Down Expand Up @@ -146,7 +141,7 @@ def install
system "./configure", "--prefix=#{prefix}", *args
system "make"

if build.bottle? || build.with?("test")
if build.bottle?
resource("testsuite").stage { buildpath.install Dir["*"] }
cd "testsuite" do
system "make", "clean"
Expand Down
13 changes: 1 addition & 12 deletions Formula/gwenhywfar.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,18 @@ class Gwenhywfar < Formula
sha256 "1760007de92dd5e7282a82f2534feb65380338fd8cb11632eef8914c2ddb56a4" => :el_capitan
end

option "without-cocoa", "Build without cocoa support"
option "with-test", "Run build-time check"

deprecated_option "with-check" => "with-test"

depends_on "pkg-config" => :build
depends_on "gettext"
depends_on "gnutls"
depends_on "openssl"
depends_on "libgcrypt"
depends_on "gtk+" => :optional

def install
guis = []
guis << "gtk2" if build.with? "gtk+"
guis << "cocoa" if build.with? "cocoa"

system "autoreconf", "-fiv" if build.head?
system "./configure", "--disable-debug",
"--disable-dependency-tracking",
"--prefix=#{prefix}",
"--with-guis=#{guis.join(" ")}"
system "make", "check" if build.with? "test"
"--with-guis=cocoa"
system "make", "install"
end

Expand Down
5 changes: 1 addition & 4 deletions Formula/hydra.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,7 @@ class Hydra < Formula
depends_on "pkg-config" => :build
depends_on "mysql-client"
depends_on "openssl"
depends_on "subversion" => :optional
depends_on "libidn" => :optional
depends_on "libssh" => :optional
depends_on "pcre" => :optional
depends_on "gtk+" => :optional

def install
Expand All @@ -31,7 +28,7 @@ def install
s.gsub! "/opt/local/*ssl", Formula["openssl"].opt_lib
s.gsub! "/opt/*ssl/include", Formula["openssl"].opt_include
# Avoid opportunistic linking of subversion
s.gsub! "libsvn", "oh_no_you_dont" if build.without? "subversion"
s.gsub! "libsvn", "oh_no_you_dont"
# Avoid opportunistic linking of libssh
s.gsub! "libssh", "certainly_not" if build.without? "libssh"
end
Expand Down
15 changes: 2 additions & 13 deletions Formula/liblunar.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,14 @@ class Liblunar < Formula
sha256 "66a40eb29dedc1cecc5947e5837e221a233273b130361eecb3488d51eede35be" => :mountain_lion
end

option "with-python", "Build python bindings using pygobject"

deprecated_option "with-python" => "with-python@2"

depends_on "pkg-config" => :build
depends_on "intltool" => :build
depends_on "glib"
depends_on "gettext"
depends_on "vala" => :optional
depends_on "python@2" => :optional
depends_on "pygobject" if build.with? "python@2"

def install
args = %W[
--disable-dependency-tracking
--prefix=#{prefix}
]
args << "--disable-python" if build.without? "python@2"
system "./configure", *args
system "./configure", "--disable-dependency-tracking",
"--prefix=#{prefix}"
system "make", "install"
end
end
Loading