aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorEdward George2010-08-02 23:00:03 +0100
committerAdam Vandenberg2010-08-02 21:17:34 -0700
commit2859b0c3cdeb2753e7ac87b5460bb82132b3538f (patch)
treeb55ea74eec6f01a9900c3129bdf30d47fad8aeb2 /Library/Formula
parentf1feeebc18714b5c8d9ba054eb0721c8d64dbb52 (diff)
downloadhomebrew-2859b0c3cdeb2753e7ac87b5460bb82132b3538f.tar.bz2
New Formula: parsley
Parsley is a simple language for extracting structured data from web pages. Parsley consists of an powerful selector language wrapped with a JSON structure that can represent page-wide formatting. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/parsley.rb34
1 files changed, 34 insertions, 0 deletions
diff --git a/Library/Formula/parsley.rb b/Library/Formula/parsley.rb
new file mode 100644
index 000000000..d07265dd1
--- /dev/null
+++ b/Library/Formula/parsley.rb
@@ -0,0 +1,34 @@
+require 'formula'
+
+class ArgpStandalone <Formula
+ url 'http://www.lysator.liu.se/~nisse/misc/argp-standalone-1.3.tar.gz'
+ homepage 'http://www.freshports.org/devel/argp-standalone/?ref=darwinports.com'
+ md5 '720704bac078d067111b32444e24ba69'
+end
+
+class Parsley <Formula
+ head 'git://github.com/fizx/parsley.git'
+ homepage 'http://github.com/fizx/parsley'
+
+ depends_on 'json-c'
+ depends_on 'pcre'
+
+ def install
+ argpwd = Pathname.getwd+'argp'
+ argpwd.mkpath
+
+ ArgpStandalone.new.brew do
+ system "./configure", "--disable-debug", "--disable-dependency-tracking",
+ "--prefix=#{argpwd}"
+ system "make"
+ argpwd.install ["libargp.a"]
+ argpwd.install ["argp.h", "argp-fmtstream.h", "argp-namefrob.h"]
+ end
+
+ # remove the refs to /opt/local and use this opportunity to link to argp
+ inreplace 'configure', '-L/opt/local/lib', "-L#{argpwd}"
+ inreplace 'configure', '-I/opt/local/include', "-I#{argpwd}"
+ system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}"
+ system "make install"
+ end
+end