Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

Commit

Permalink
git-annex: force-enable "webapp" flag
Browse files Browse the repository at this point in the history
To address issue #47346 (git-annex-webapp missing), we explicitly
enable the "webapp" flag for git-annex. This should prevent git-annex
from being built without the webapp and make the build fail if there is
e.g. a dependency issue.

Closes #47950.

Signed-off-by: Dominyk Tiller <[email protected]>
  • Loading branch information
Cedric Staub authored and DomT4 committed Feb 22, 2016
1 parent b253222 commit 9e3ee3e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Library/Formula/git-annex.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class GitAnnex < Formula
depends_on "quvi"

def install
install_cabal_package :using => ["alex", "happy", "c2hs"] do
install_cabal_package :using => ["alex", "happy", "c2hs"], :flags => ["Webapp"] do
# this can be made the default behavior again once git-union-merge builds properly when bottling
if build.with? "git-union-merge"
system "make", "git-union-merge", "PREFIX=#{prefix}"
Expand Down
19 changes: 18 additions & 1 deletion Library/Homebrew/language/haskell.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ def cabal_install(*args)
system "cabal", "install", "--jobs=#{ENV.make_jobs}", "--max-backjumps=100000", *args
end

def cabal_configure(flags)
system "cabal", "configure", flags
end

def cabal_install_tools(*tools)
# install tools sequentially, as some tools can depend on other tools
tools.each { |tool| cabal_install tool }
Expand All @@ -69,8 +73,21 @@ def install_cabal_package(*args)
cabal_sandbox do
cabal_install_tools(*options[:using]) if options[:using]

# if we have build flags, we have to pass them to cabal install to resolve the necessary
# dependencies, and call cabal configure afterwards to set the flags again for compile
flags = ""
if options[:flags]
flags = "--flags='#{options[:flags].join(" ")}'"
end

args_and_flags = args
args_and_flags << flags

# install dependencies in the sandbox
cabal_install "--only-dependencies", *args
cabal_install "--only-dependencies", *args_and_flags

# call configure if build flags are set
cabal_configure flags unless flags.empty?

# install the main package in the destination dir
cabal_install "--prefix=#{prefix}", *args
Expand Down

0 comments on commit 9e3ee3e

Please sign in to comment.