diff options
| author | Max Howell | 2009-08-07 15:41:43 +0100 |
|---|---|---|
| committer | Max Howell | 2009-08-10 18:11:22 +0100 |
| commit | d21205067c2a77555f51f1ab74aa75d8092c3cae (patch) | |
| tree | b402b97adf7825230523066a00296f336d541637 | |
| parent | 6b6d3699a29359343725ad0eb1394c46a5c6406b (diff) | |
| download | homebrew-d21205067c2a77555f51f1ab74aa75d8092c3cae.tar.bz2 | |
Apply new ENV capabilities to all existing Formulae
| -rw-r--r-- | Library/Formula/ack.rb | 11 | ||||
| -rw-r--r-- | Library/Formula/cmake.rb | 9 | ||||
| -rw-r--r-- | Library/Formula/erlang.rb | 2 | ||||
| -rw-r--r-- | Library/Formula/fftw.rb | 17 | ||||
| -rw-r--r-- | Library/Formula/flac.rb | 5 | ||||
| -rw-r--r-- | Library/Formula/gettext.rb | 21 | ||||
| -rw-r--r-- | Library/Formula/glib.rb | 4 | ||||
| -rw-r--r-- | Library/Formula/gloox.rb | 6 | ||||
| -rw-r--r-- | Library/Formula/grc.rb | 4 | ||||
| -rw-r--r-- | Library/Formula/imagemagick.rb | 7 | ||||
| -rw-r--r-- | Library/Formula/libogg.rb | 2 | ||||
| -rw-r--r-- | Library/Formula/mysql-connector-c.rb | 3 | ||||
| -rw-r--r-- | Library/Formula/qt.rb | 18 | ||||
| -rw-r--r-- | Library/Formula/readline.rb | 1 | ||||
| -rw-r--r-- | Library/Formula/taglib.rb | 4 | ||||
| -rw-r--r-- | Library/Formula/unrar.rb | 2 | ||||
| -rw-r--r-- | Library/Formula/wireshark.rb | 6 | ||||
| -rw-r--r-- | Library/Formula/xmlrpc-c.rb | 2 | ||||
| -rw-r--r-- | Library/Formula/yajl.rb | 2 | ||||
| -rw-r--r-- | Library/Homebrew/brewkit.rb | 7 |
20 files changed, 77 insertions, 56 deletions
diff --git a/Library/Formula/ack.rb b/Library/Formula/ack.rb index c55144fc7..1c573d789 100644 --- a/Library/Formula/ack.rb +++ b/Library/Formula/ack.rb @@ -1,11 +1,8 @@ require 'brewkit' class Ack <ScriptFileFormula - def initialize name - @version='1.88' - @url="http://ack.googlecode.com/svn/tags/#{@version}/ack" - @md5='8009a13ab0fc66047bea0ea2ad89419c' - @homepage='http://betterthangrep.com/' - @name=name - end + @version='1.88' + @url="http://ack.googlecode.com/svn/tags/#{@version}/ack" + @md5='8009a13ab0fc66047bea0ea2ad89419c' + @homepage='http://betterthangrep.com/' end
\ No newline at end of file diff --git a/Library/Formula/cmake.rb b/Library/Formula/cmake.rb index a74516fa8..1a3415c5c 100644 --- a/Library/Formula/cmake.rb +++ b/Library/Formula/cmake.rb @@ -13,10 +13,11 @@ class Cmake <Formula "# Mention to the user what system libraries are being used.", "SET(CMAKE_USE_SYSTEM_XMLRPC 0)" - system "./bootstrap --prefix=#{prefix} --system-libs --datadir=/share/cmake --docdir=/share/cmake --mandir=/share/man" + system "./bootstrap", "--prefix=#{prefix}", + "--system-libs", + "--datadir=/share/cmake", + "--docdir=/share/doc/cmake", + "--mandir=/share/man" system "make install" - - # txt sucks, welcome to 1990 - Dir["#{prefix}/share/cmake/*.txt"].each {|f| File.unlink f} end end
\ No newline at end of file diff --git a/Library/Formula/erlang.rb b/Library/Formula/erlang.rb index 7dca96d6d..07e76939a 100644 --- a/Library/Formula/erlang.rb +++ b/Library/Formula/erlang.rb @@ -6,7 +6,7 @@ class Erlang <Formula @md5='6d8c256468a198458b9f08ba6aa1a384' def install - ENV['MAKEFLAGS']='' #parallel not work + ENV.deparallelize system "./configure --disable-debug --prefix='#{prefix}' --enable-kernel-poll --enable-threads --enable-dynamic-ssl-lib --enable-smp-support --enable-hipe" system "make" system "make install" diff --git a/Library/Formula/fftw.rb b/Library/Formula/fftw.rb index e79002fc4..68aacc45c 100644 --- a/Library/Formula/fftw.rb +++ b/Library/Formula/fftw.rb @@ -6,15 +6,16 @@ class Fftw <Formula @md5='712d3f33625a0a76f5758648d4b925f7' def install - configure=<<-EOS - ./configure --enable-shared --disable-debug --prefix='#{prefix}' - --enable-threads --enable-single --enable-sse - --disable-dependency-tracking - --disable-fortran - EOS - system configure.gsub("\n", ' ').strip.squeeze(' ') + system "./configure", "--enable-shared", + "--disable-debug", + "--prefix=#{prefix}", + "--enable-threads", + "--enable-single", + "--enable-sse", + "--disable-dependency-tracking", + "--disable-fortran" system "make install" - + #wtf file? (prefix+'share'+'info'+'dir').unlink end diff --git a/Library/Formula/flac.rb b/Library/Formula/flac.rb index 6b31c15a7..bcd3b26c8 100644 --- a/Library/Formula/flac.rb +++ b/Library/Formula/flac.rb @@ -14,7 +14,10 @@ class Flac <Formula # sadly the asm optimisations won't compile since Leopard, and nobody # cares or knows how to fix it # TODO --enable-sse - system "./configure --disable-debug --disable-asm-optimizations --prefix='#{prefix}' --mandir='#{prefix}/share/man'" + system "./configure", "--disable-debug", + "--disable-asm-optimizations", + "--prefix=#{prefix}", + "--mandir=#{prefix}/share/man" ENV['OBJ_FORMAT']='macho' system "make install" diff --git a/Library/Formula/gettext.rb b/Library/Formula/gettext.rb index 668dd0059..81a82abc7 100644 --- a/Library/Formula/gettext.rb +++ b/Library/Formula/gettext.rb @@ -6,22 +6,25 @@ class Gettext <Formula @homepage='http://www.gnu.org/software/gettext/' def install + ENV.libxml2 # TODO seems like this package needs more optmisation # maybe someone can tell me how glib depends on gettext, but gettext # depends on glib and thus includes its own?! - - ENV['CFLAGS']+=' -I/usr/include/libxml2' - system "./configure --disable-debug --prefix='#{prefix}' --disable-dependency-tracking "+ -# '--disable-nls '+ - '--without-emacs --without-included-gettext '+ - '--without-included-glib --without-included-libcroco '+ - '--without-included-libxml' + system "./configure", "--disable-debug", + "--prefix=#{prefix}", + "--disable-dependency-tracking", + # '--disable-nls ', + '--without-emacs', + '--without-included-gettext', + '--without-included-glib', + '--without-included-libcroco', + '--without-included-libxml' system "make" - ENV['MAKEFLAGS']='' # can't parallel the install + ENV.deparallelize # install doesn't support multiple make jobs system "make install" (doc+'examples').rmtree unless ARGV.include? '--with-examples' - + def caveats "GNU gettext is bloated and manky, please try not to depend on it" end diff --git a/Library/Formula/glib.rb b/Library/Formula/glib.rb index a66735380..1c6831dcd 100644 --- a/Library/Formula/glib.rb +++ b/Library/Formula/glib.rb @@ -6,8 +6,8 @@ class Glib <Formula @homepage='http://www.gtk.org' def install - # indeed, amazingly, -w causes gcc to emit spurious errors! - ENV['CFLAGS']=ENV['CFLAGS'].gsub '-w', '' + # indeed, amazingly, -w causes gcc to emit spurious errors for this package! + ENV.enable_warnings system "./configure --disable-debug --prefix='#{prefix}' --disable-dependency-tracking" system "make" diff --git a/Library/Formula/gloox.rb b/Library/Formula/gloox.rb index b5364d60c..66abb6c89 100644 --- a/Library/Formula/gloox.rb +++ b/Library/Formula/gloox.rb @@ -6,7 +6,11 @@ class Gloox <Formula @md5='482bf5ed8e4c14f2788efdd9c39e9acf' def install - system "./configure --without-openssl --with-gnutls --with-zlib --disable-debug --prefix='#{prefix}'" + system "./configure", "--without-openssl", + "--with-gnutls", + "--with-zlib", + "--disable-debug", + "--prefix=#{prefix}" system "make install" end end
\ No newline at end of file diff --git a/Library/Formula/grc.rb b/Library/Formula/grc.rb index 1f9c9c617..368426cc3 100644 --- a/Library/Formula/grc.rb +++ b/Library/Formula/grc.rb @@ -12,7 +12,7 @@ class Grc <Formula exit end - ohai "make" + ohai "make" #TODO we should deprefixify since it's python and thus possible inreplace 'grc', '/etc', prefix+'etc' inreplace 'grc.1', '/etc', prefix+'etc' @@ -32,7 +32,7 @@ class Grc <Formula `cp -fv grc.conf #{prefix}/etc` `cp -fv grc.1 grcat.1 #{prefix}/share/man/man1` end - + def caveats <<-EOS grc won't work as is. One option is to add some aliases to your ~/.profile diff --git a/Library/Formula/imagemagick.rb b/Library/Formula/imagemagick.rb index 16296f57b..4c4543f80 100644 --- a/Library/Formula/imagemagick.rb +++ b/Library/Formula/imagemagick.rb @@ -10,8 +10,11 @@ class Imagemagick <Formula end def install - system "./configure --disable-debug --disable-dependency-tracking --without-maximum-compile-warnings --prefix='#{prefix}'" - ENV['MAKEFLAGS']='' + system "./configure", "--disable-debug", + "--disable-dependency-tracking", + "--without-maximum-compile-warnings", + "--prefix=#{prefix}" + ENV.deparallelize system "make install" end end
\ No newline at end of file diff --git a/Library/Formula/libogg.rb b/Library/Formula/libogg.rb index 239be1f99..08d86572d 100644 --- a/Library/Formula/libogg.rb +++ b/Library/Formula/libogg.rb @@ -8,7 +8,7 @@ class Libogg <Formula def install system "./configure --disable-debug --disable-dependency-tracking --prefix='#{prefix}'" system "make" - ENV['MAKEFLAGS']='' + ENV.deparallelize system "make install" end end
\ No newline at end of file diff --git a/Library/Formula/mysql-connector-c.rb b/Library/Formula/mysql-connector-c.rb index c661aacac..f97945135 100644 --- a/Library/Formula/mysql-connector-c.rb +++ b/Library/Formula/mysql-connector-c.rb @@ -10,8 +10,7 @@ class MysqlConnectorC <Formula end def install - system "cmake -G 'Unix Makefiles' -DCMAKE_INSTALL_PREFIX=#{prefix}" - system 'make' + system "cmake . #{std_cmake_parameters}" system 'make install' end end diff --git a/Library/Formula/qt.rb b/Library/Formula/qt.rb index 3e318c981..8c4c95d25 100644 --- a/Library/Formula/qt.rb +++ b/Library/Formula/qt.rb @@ -12,17 +12,13 @@ class Qt <Formula makefiles.each { |makefile| `echo 'LIBS += -lsqlite3' >> src/#{makefile}` } end - configure=<<-EOS - ./configure -prefix '#{prefix}' - -system-sqlite -system-libpng -system-zlib - -nomake demos -nomake examples -no-qt3support - -release -cocoa -arch x86 - -confirm-license -opensource - -I/usr/X11R6/include -L/usr/X11R6/lib - -fast - EOS - - system configure.gsub("\n", '\\') + system "configure", "-prefix", prefix, + "-system-sqlite", "-system-libpng", "-system-zlib", + "-nomake", "demos", "-nomake", "examples", "-no-qt3support", + "-release", "-cocoa", "-arch x86", + "-confirm-license", "-opensource", + "-I/usr/X11R6/include", "-L/usr/X11R6/lib", + "-fast" system "make install" # fuck weird prl files diff --git a/Library/Formula/readline.rb b/Library/Formula/readline.rb index b9e157064..8ad485e3c 100644 --- a/Library/Formula/readline.rb +++ b/Library/Formula/readline.rb @@ -12,7 +12,6 @@ class Readline <Formula def install system "./configure --prefix='#{prefix}'" - system "make" system "make install" end end diff --git a/Library/Formula/taglib.rb b/Library/Formula/taglib.rb index acd157989..59129a16a 100644 --- a/Library/Formula/taglib.rb +++ b/Library/Formula/taglib.rb @@ -10,6 +10,10 @@ class Taglib <Formula @md5='7b557dde7425c6deb7bbedd65b4f2717' @homepage='http://developer.kde.org/~wheeler/taglib.html' + def deps + BinaryDep.new 'cmake' + end + def install system "./configure --disable-debug --prefix='#{prefix}'" system "make install" diff --git a/Library/Formula/unrar.rb b/Library/Formula/unrar.rb index 3a28b0487..fd7db4098 100644 --- a/Library/Formula/unrar.rb +++ b/Library/Formula/unrar.rb @@ -54,6 +54,8 @@ class Unrar <Formula def install # by compiling all in one unit, g++ optimises slightly better + # be warned: this trick doesn't work very often! And I'd only do it for + # very stable source trees as if they change stuff it sucks for you. File.open('all.cpp', 'w') {|f| f.write ALL_CPP} system "g++ #{ENV['CXXFLAGS']} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE all.cpp -o unrar" bin.install 'unrar' diff --git a/Library/Formula/wireshark.rb b/Library/Formula/wireshark.rb index 0688532ae..2027e8778 100644 --- a/Library/Formula/wireshark.rb +++ b/Library/Formula/wireshark.rb @@ -6,8 +6,10 @@ class Wireshark <Formula @homepage='http://www.wireshark.org' def install - system "./configure --disable-debug --prefix='#{prefix}' --disable-dependency-tracking "+ - '--disable-wireshark' + system "./configure", "--disable-debug", + "--prefix=#{prefix}", + "--disable-dependency-tracking", + "--disable-wireshark" # actually just disables the GTK GUI system "make install" end diff --git a/Library/Formula/xmlrpc-c.rb b/Library/Formula/xmlrpc-c.rb index 27d6f3a1e..db25f10c0 100644 --- a/Library/Formula/xmlrpc-c.rb +++ b/Library/Formula/xmlrpc-c.rb @@ -6,7 +6,7 @@ class XmlrpcC <Formula @homepage='http://xmlrpc-c.sourceforge.net/' def install - ENV['MAKEFLAGS']='' #parallel build doesn't work + ENV.deparallelize # choosing --enable-libxml2-backend to lose some weight and not statically # link in expat #NOTE seemingly it isn't possible to build dylibs with this thing diff --git a/Library/Formula/yajl.rb b/Library/Formula/yajl.rb index 962feba81..d90576009 100644 --- a/Library/Formula/yajl.rb +++ b/Library/Formula/yajl.rb @@ -10,7 +10,7 @@ class Yajl <Formula end def install - ENV['MAKEFLAGS']='' # can't do parallel builds + ENV.deparallelize # I have pushed this fix upstream inreplace 'configure', 'cmake \.\.', "cmake -DCMAKE_INSTALL_PREFIX='#{prefix}' \.\." if @version == "1.0.5" diff --git a/Library/Homebrew/brewkit.rb b/Library/Homebrew/brewkit.rb index bddc2cca6..7171006b8 100644 --- a/Library/Homebrew/brewkit.rb +++ b/Library/Homebrew/brewkit.rb @@ -79,6 +79,13 @@ module HomebrewEnvExtension def generic_i386 %w[-mfpmath=sse -msse3 -mmmx -march=\w+].each {|s| remove_from_cflags s} end + def libxml2 + self['CXXFLAGS']=self['CFLAGS']+=' -I/usr/include/libxml2' + end + # we've seen some packages fail to build when warnings are disabled! + def enable_warnings + remove_from_cflags '-w' + end private def remove key, rx # sub! doesn't work as "the string is frozen" |
