From dc68a590b784fa8e786103ac218026aae7769b10 Mon Sep 17 00:00:00 2001 From: Jay Soffian Date: Wed, 5 Mar 2014 11:32:17 -0500 Subject: 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 --- Library/Formula/openconnect.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'Library/Formula') 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[ -- cgit v1.2.3