2009-12-18 20:07:13 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Pig < Formula
|
2011-08-10 04:03:56 +00:00
|
|
|
url 'http://www.apache.org/dyn/closer.cgi?path=pig/pig-0.9.0/pig-0.9.0.tar.gz'
|
|
|
|
homepage 'http://pig.apache.org/'
|
|
|
|
md5 '89e3bd3dbe3a9739ce54472421db6484'
|
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-04-25 15:07:43 +00:00
|
|
|
prefix.install ['bin', "pig-#{version}-core.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
|
|
|
|
@@ -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
|
2011-04-25 15:07:43 +00:00
|
|
|
|
2009-12-18 20:07:13 +00:00
|
|
|
# convert relative path to absolute path
|