2009-12-18 20:07:13 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Pig < Formula
|
2011-11-17 15:31:58 +00:00
|
|
|
url 'http://www.apache.org/dyn/closer.cgi?path=pig/pig-0.9.1/pig-0.9.1.tar.gz'
|
2011-08-10 04:03:56 +00:00
|
|
|
homepage 'http://pig.apache.org/'
|
2011-11-17 15:31:58 +00:00
|
|
|
md5 'f9aef698536b67b2966e48d328caf071'
|
2009-12-18 20:07:13 +00:00
|
|
|
|
|
|
|
def patches
|
|
|
|
DATA
|
|
|
|
end
|
|
|
|
|
|
|
|
def install
|
2010-03-07 06:27:19 +00:00
|
|
|
rm_f Dir["bin/*.bat"]
|
2011-11-17 15:31:58 +00:00
|
|
|
prefix.install ['bin', "pig-#{version}.jar"]
|
2009-12-18 20:07:13 +00:00
|
|
|
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
|
2011-11-17 15:31:58 +00:00
|
|
|
@@ -61,6 +61,10 @@
|
|
|
|
script="$(basename -- "$this")"
|
|
|
|
this="$bin/$script"
|
2011-04-25 15:07:43 +00:00
|
|
|
|
2011-11-17 15:31:58 +00:00
|
|
|
+ls=`ls -ld "$this"`
|
|
|
|
+link=`expr "$ls" : '.*-> \(.*\)$'`
|
|
|
|
+this=`dirname "$this"`/"$link"
|
|
|
|
+
|
|
|
|
# the root of the Pig installation
|
|
|
|
export PIG_HOME=`dirname "$this"`/..
|