aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorThomas Jachmann2010-05-31 18:13:59 +0200
committerAdam Vandenberg2010-06-25 22:18:46 -0700
commit84e17f1df681a28a459c4bea697ee7443eea12c3 (patch)
tree51b5fe6c9253e6a7cc8d094b34b87d8932c8a19a /Library/Formula
parent355aa2522d8f3d989b5a35ff807cb99e975f8049 (diff)
downloadhomebrew-84e17f1df681a28a459c4bea697ee7443eea12c3.tar.bz2
Added formula for portmidi v200
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/portmidi.rb34
1 files changed, 34 insertions, 0 deletions
diff --git a/Library/Formula/portmidi.rb b/Library/Formula/portmidi.rb
new file mode 100644
index 000000000..f6f94d8c8
--- /dev/null
+++ b/Library/Formula/portmidi.rb
@@ -0,0 +1,34 @@
+require 'formula'
+
+class Portmidi <Formula
+ url 'http://downloads.sourceforge.net/project/portmedia/portmidi/200/portmidi-src-200.zip'
+ homepage 'http://sourceforge.net/apps/trac/portmedia/wiki/portmidi'
+ md5 '26053a105d938395227bb6ae1d78643b'
+
+ depends_on 'cmake'
+
+ def caveats
+ <<-EOS.undent
+ NOTE: "brew install -v portmidi" will fail! You must install
+ in non-verbose mode for this to succeed.
+ EOS
+ end
+
+ def install
+ # PATCH for Snow Leopard, see http://github.com/halfbyte/portmidi
+ # hopefully not needed anymymore in the next version of portmidi
+ architectures = archs_for_command('/bin/sh').join(' ')
+ inreplace 'CMakeLists.txt',
+ 'CMAKE_OSX_ARCHITECTURES i386 ppc CACHE STRING "do not build for 64-bit"',
+ "CMAKE_OSX_ARCHITECTURES #{architectures} CACHE STRING \"do only build for required architectures\""
+
+ inreplace 'pm_mac/Makefile.osx', 'PF=/usr/local', "PF=#{prefix}"
+
+ # need to create include/lib directories since make won't create them itself
+ include.mkpath
+ lib.mkpath
+
+ system 'make -f pm_mac/Makefile.osx'
+ system 'make -f pm_mac/Makefile.osx install'
+ end
+end