homebrew-core/Formula/pig.rb
Max Howell 77c73ecb89 Use Apache’s closer.cgi where appropriate
Some of these were pointing at archive.apache.org. Now they aren’t, I investigated for good rationale for using the archive before altering it.

mod_python still uses archive.apache.org as that is the only place it exists that I could find.

jsvc *now* uses apache.archive.org as the formula was otherwise broken and the binary tarball it needs no longer exists on the main mirrors.
2011-07-27 10:41:17 +01:00

37 lines
916 B
Ruby

require 'formula'
class Pig < Formula
url 'http://www.apache.org/dyn/closer.cgi?path=pig/pig-0.8.1/pig-0.8.1.tar.gz'
homepage 'http://hadoop.apache.org/pig/'
md5 'd3325f5816b68fb3c1d405095fcf5c7a'
def patches
DATA
end
def install
rm_f Dir["bin/*.bat"]
prefix.install ['bin', "pig-#{version}-core.jar"]
end
end
# There's something weird with Pig's launch script, it doesn't find the correct
# path. This patch removes a test that should fail, but doesn't.
__END__
diff --git a/bin/pig b/bin/pig
index 97fc649..79056cf 100644
--- a/bin/pig
+++ b/bin/pig
@@ -56,11 +56,7 @@ this="$0"
while [ -h "$this" ]; do
ls=`ls -ld "$this"`
link=`expr "$ls" : '.*-> \(.*\)$'`
- if expr "$link" : '.*/.*' > /dev/null; then
- this="$link"
- else
- this=`dirname "$this"`/"$link"
- fi
+ this=`dirname "$this"`/"$link"
done
# convert relative path to absolute path