diff options
| author | Jay Soffian | 2014-03-05 11:32:17 -0500 | 
|---|---|---|
| committer | Mike McQuaid | 2014-03-13 18:59:24 +0000 | 
| commit | dc68a590b784fa8e786103ac218026aae7769b10 (patch) | |
| tree | 5444c746531ddb716f1ed38b62e83d563e631a73 /Library/Formula/openconnect.rb | |
| parent | e7329d8f8de24f20046f27f719d6a5532f1a6a22 (diff) | |
| download | homebrew-dc68a590b784fa8e786103ac218026aae7769b10.tar.bz2 | |
openconnect: fix --HEAD to report proper version
openconnect ships with a version.sh script to determine the current version,
but it expects to run from within a clean git clone, which it determines in
part by checking for [-d .git]. For it to work properly we need to:
1. symlink to the git clone (so that the [-d .git] test works).
2. clone without --shallow (so that git describe can find a proper tag)
3. copy autogen.sh before modifying it (so that the checkout isn't dirty)
Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
Diffstat (limited to 'Library/Formula/openconnect.rb')
| -rw-r--r-- | Library/Formula/openconnect.rb | 8 | 
1 files changed, 5 insertions, 3 deletions
diff --git a/Library/Formula/openconnect.rb b/Library/Formula/openconnect.rb index d88e3edfb..4e6d0870c 100644 --- a/Library/Formula/openconnect.rb +++ b/Library/Formula/openconnect.rb @@ -6,7 +6,7 @@ class Openconnect < Formula    sha1 '40344fc910a19c8781a79204808f1229acaee2a4'    head do -    url 'git://git.infradead.org/users/dwmw2/openconnect.git' +    url 'git://git.infradead.org/users/dwmw2/openconnect.git', :shallow => false      depends_on :autoconf => :build      depends_on :automake => :build      depends_on :libtool => :build @@ -25,8 +25,10 @@ class Openconnect < Formula      chmod 0755, "#{etc}/vpnc-script"      if build.head? -      inreplace "autogen.sh", /libtoolize/, "glibtoolize" -      system "./autogen.sh" +      ln_s cached_download/".git", ".git" +      cp "autogen.sh", "autogen_modified.sh" +      inreplace "autogen_modified.sh", /libtoolize/, "glibtoolize" +      system "./autogen_modified.sh"      end      args = %W[  | 
