aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorAdam Vandenberg2010-04-27 18:43:16 -0700
committerAdam Vandenberg2010-05-05 21:20:11 -0700
commit4ebc9b465225387eff1ab85527a418f84fde6ef4 (patch)
tree910d4873864ff6fa919632b65a5d112b86365960 /Library
parent7d065840de08460eb0965e98d3d7dee5f0dd99e9 (diff)
downloadhomebrew-4ebc9b465225387eff1ab85527a418f84fde6ef4.tar.bz2
Formula for a standalone build of shocco
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/shocco.rb38
1 files changed, 38 insertions, 0 deletions
diff --git a/Library/Formula/shocco.rb b/Library/Formula/shocco.rb
new file mode 100644
index 000000000..109751504
--- /dev/null
+++ b/Library/Formula/shocco.rb
@@ -0,0 +1,38 @@
+require 'formula'
+
+# Include a private copy of this Python app
+# so we don't have to worry about clashing dependencies.
+class Pygments <Formula
+ url 'http://pypi.python.org/packages/source/P/Pygments/Pygments-1.3.1.tar.gz'
+ homepage 'http://pygments.org/'
+ md5 '54be67c04834f13d7e255e1797d629a5'
+end
+
+# Build against Adam V's branch until the change is taken upstream
+class Shocco <Formula
+ head 'git://github.com/adamv/shocco.git', :branch => 'homebrew'
+ homepage 'http://rtomayko.github.com/shocco/'
+
+ depends_on 'markdown'
+
+ def install
+ Pygments.new.brew { libexec.install ['pygmentize','pygments'] }
+
+ # Brew into libexec, along with Pygments
+ system "./configure", "PYGMENTIZE=#{libexec}/pygmentize", "--prefix=#{libexec}"
+ system "make"
+ libexec.install "shocco"
+
+ # Link the script into bin
+ bin.mkpath
+ ln_s libexec+"shocco", bin
+ end
+
+ def caveats
+ <<-EOS.undent
+ You may also want to install browser:
+ brew install browser
+ shocco `which shocco` | browser
+ EOS
+ end
+end