diff options
| author | Jack Nagel | 2012-02-24 16:51:33 -0600 |
|---|---|---|
| committer | Jack Nagel | 2012-02-24 16:51:33 -0600 |
| commit | a65e482b8b4bb8177802ddbdf990184672791256 (patch) | |
| tree | 8a1439927aab8b6ee268f6a82e62f4da5a036dbc /Library/Formula | |
| parent | f47581e372643144156fddf5219f3c5fd0a9c207 (diff) | |
| download | homebrew-a65e482b8b4bb8177802ddbdf990184672791256.tar.bz2 | |
Use Homebrew's pcre where appropriate
We provide a pcre formula as OS X does not provide libpcre headers.
However, it does provide the library itself and so occasionally things
will use Homebrew's pcre headers and link against the system library.
This should be avoided to prevent incompatibilities, so explicitly tell
the build system where to look for the library where necessary.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/ganglia.rb | 6 | ||||
| -rw-r--r-- | Library/Formula/imapfilter.rb | 3 | ||||
| -rw-r--r-- | Library/Formula/ledger.rb | 8 | ||||
| -rw-r--r-- | Library/Formula/ohcount.rb | 5 | ||||
| -rw-r--r-- | Library/Formula/pcre++.rb | 9 | ||||
| -rw-r--r-- | Library/Formula/pound.rb | 3 | ||||
| -rw-r--r-- | Library/Formula/qpdf.rb | 3 | ||||
| -rw-r--r-- | Library/Formula/tintin.rb | 37 | ||||
| -rw-r--r-- | Library/Formula/xastir.rb | 8 | ||||
| -rw-r--r-- | Library/Formula/yara.rb | 9 |
10 files changed, 52 insertions, 39 deletions
diff --git a/Library/Formula/ganglia.rb b/Library/Formula/ganglia.rb index 429e24cec..543acb6b3 100644 --- a/Library/Formula/ganglia.rb +++ b/Library/Formula/ganglia.rb @@ -33,12 +33,14 @@ class Ganglia < Formula system "/bin/sh ../autogen.sh --download" end - system "./configure", "--disable-debug", "--disable-dependency-tracking", + system "./configure", "--disable-debug", + "--disable-dependency-tracking", "--prefix=#{prefix}", "--sbindir=#{bin}", "--sysconfdir=#{etc}", "--with-gexec", - "--with-gmetad" + "--with-gmetad", + "--with-libpcre=#{HOMEBREW_PREFIX}" # build and install system "make install" diff --git a/Library/Formula/imapfilter.rb b/Library/Formula/imapfilter.rb index 9d85eb175..8da9f5fd2 100644 --- a/Library/Formula/imapfilter.rb +++ b/Library/Formula/imapfilter.rb @@ -13,6 +13,9 @@ class Imapfilter < Formula s.change_make_var! 'CFLAGS', "#{s.get_make_var 'CFLAGS'} #{ENV.cflags}" end + # find Homebrew's libpcre + ENV.append 'LDFLAGS', "-L#{HOMEBREW_PREFIX}/lib" + ENV.append 'LDFLAGS', '-liconv' system "make", "LDFLAGS=#{ENV.ldflags}" system "make", "PREFIX=#{prefix}", "MANDIR=#{man}", "install" diff --git a/Library/Formula/ledger.rb b/Library/Formula/ledger.rb index 9e4467493..551bd6a43 100644 --- a/Library/Formula/ledger.rb +++ b/Library/Formula/ledger.rb @@ -1,9 +1,10 @@ require 'formula' class Ledger < Formula + homepage 'http://ledger-cli.org' url 'ftp://ftp.newartisans.com/pub/ledger/ledger-2.6.3.tar.gz' md5 '6d5d8396b1cdde5f605854c7d21d1460' - homepage 'http://ledger-cli.org' + head 'https://github.com/jwiegley/ledger.git', :branch => 'next' depends_on 'gettext' @@ -18,7 +19,10 @@ class Ledger < Formula end def install - unless 'HEAD' == @version + # find Homebrew's libpcre + ENV.append 'LDFLAGS', "-L#{HOMEBREW_PREFIX}/lib" + + unless ARGV.build_head? system "./configure", "--prefix=#{prefix}", "--disable-debug", "--disable-dependency-tracking" else # gmp installs x86_64 only diff --git a/Library/Formula/ohcount.rb b/Library/Formula/ohcount.rb index bec753e80..5652b7295 100644 --- a/Library/Formula/ohcount.rb +++ b/Library/Formula/ohcount.rb @@ -1,8 +1,8 @@ require 'formula' class Ohcount < Formula - url 'http://downloads.sourceforge.net/project/ohcount/ohcount-3.0.0.tar.gz' homepage 'http://sourceforge.net/apps/trac/ohcount/' + url 'http://downloads.sourceforge.net/project/ohcount/ohcount-3.0.0.tar.gz' md5 '08f97d01adde8b45635abfe93f8a717a' depends_on 'ragel' @@ -13,6 +13,9 @@ class Ohcount < Formula end def install + # find Homebrew's libpcre + ENV.append 'LDFLAGS', "-L#{HOMEBREW_PREFIX}/lib" + system "./build", "ohcount" bin.install 'bin/ohcount' end diff --git a/Library/Formula/pcre++.rb b/Library/Formula/pcre++.rb index 1430db190..e5bdfba6e 100644 --- a/Library/Formula/pcre++.rb +++ b/Library/Formula/pcre++.rb @@ -1,15 +1,18 @@ require 'formula' class Pcrexx < Formula - url 'http://www.daemon.de/idisk/Apps/pcre++/pcre++-0.9.5.tar.gz' homepage 'http://www.daemon.de/PCRE' + url 'http://www.daemon.de/idisk/Apps/pcre++/pcre++-0.9.5.tar.gz' md5 '1fe6ea8e23ece01fde2ce5fb4746acc2' depends_on 'pcre' def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", - "--prefix=#{prefix}", "--mandir=#{man}" + system "./configure", "--disable-debug", + "--disable-dependency-tracking", + "--prefix=#{prefix}", + "--mandir=#{man}", + "--with-pcre-dir-lib=#{HOMEBREW_PREFIX}" system "make install" end end diff --git a/Library/Formula/pound.rb b/Library/Formula/pound.rb index e3dfec635..3e800c2cd 100644 --- a/Library/Formula/pound.rb +++ b/Library/Formula/pound.rb @@ -8,6 +8,9 @@ class Pound < Formula depends_on 'pcre' def install + # find Homebrew's libpcre + ENV.append 'LDFLAGS', "-L#{HOMEBREW_PREFIX}/lib" + system "./configure", "--prefix=#{prefix}" system "make" # Manual install to get around group issues diff --git a/Library/Formula/qpdf.rb b/Library/Formula/qpdf.rb index 772863ced..36d7bf0a0 100644 --- a/Library/Formula/qpdf.rb +++ b/Library/Formula/qpdf.rb @@ -8,6 +8,9 @@ class Qpdf < Formula depends_on 'pcre' def install + # find Homebrew's libpcre + ENV.append 'LDFLAGS', "-L#{HOMEBREW_PREFIX}/lib" + system "./configure", "--prefix=#{prefix}" system "make" system "make install" diff --git a/Library/Formula/tintin.rb b/Library/Formula/tintin.rb index f4c5f886d..1fc67ed10 100644 --- a/Library/Formula/tintin.rb +++ b/Library/Formula/tintin.rb @@ -7,33 +7,16 @@ class Tintin < Formula depends_on 'pcre' - # This puts brew's environ (CPPFLAGS and CFLAGS) in generated Makefile - def patches - DATA - end - def install - Dir.chdir "src" - system "./configure", "--prefix=#{prefix}" - system "make install" + # find Homebrew's libpcre + ENV.append 'LDFLAGS', "-L#{HOMEBREW_PREFIX}/lib" + + cd 'src' do + system "./configure", "--prefix=#{prefix}" + system "make", "CFLAGS=#{ENV.cflags}", + "INCS=#{ENV.cppflags}", + "LDFLAGS=#{ENV.ldflags}", + "install" + end end end - -__END__ -diff --git a/src/Makefile.in b/src/Makefile.in -index 067b5ff..d55bc74 100644 ---- a/src/Makefile.in -+++ b/src/Makefile.in -@@ -31,11 +31,11 @@ docdir = @prefix@/doc - - #this is the standard CFLAGS options, this is what most people should use - --CFLAGS += $(DEFINES) @BIG5@ -+CFLAGS += $(DEFINES) @CFLAGS@ @BIG5@ - - LDFLAGS = @LDFLAGS@ - --INCS = @MYINCLUDE@ -+INCS = @CPPFLAGS@ @MYINCLUDE@ - - LIBS = @MYLIB@ @LIBS@ diff --git a/Library/Formula/xastir.rb b/Library/Formula/xastir.rb index 8f9588832..8deda9203 100644 --- a/Library/Formula/xastir.rb +++ b/Library/Formula/xastir.rb @@ -1,8 +1,8 @@ require 'formula' class Xastir < Formula - url 'http://downloads.sourceforge.net/xastir/xastir-2.0.0.tar.gz' homepage 'http://www.xastir.org/' + url 'http://downloads.sourceforge.net/xastir/xastir-2.0.0.tar.gz' md5 '3e660b8168c9037b06e20b0579af3c80' depends_on 'proj' @@ -15,7 +15,11 @@ class Xastir < Formula depends_on 'graphicsmagick' def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", + # find Homebrew's libpcre + ENV.append 'LDFLAGS', "-L#{HOMEBREW_PREFIX}/lib" + + system "./configure", "--disable-debug", + "--disable-dependency-tracking", "--prefix=#{prefix}" system "make install" end diff --git a/Library/Formula/yara.rb b/Library/Formula/yara.rb index 8128b5a0e..3341c975a 100644 --- a/Library/Formula/yara.rb +++ b/Library/Formula/yara.rb @@ -1,14 +1,19 @@ require 'formula' class Yara < Formula - url 'http://yara-project.googlecode.com/files/yara-1.4.tar.gz' homepage 'http://code.google.com/p/yara-project/' + url 'http://yara-project.googlecode.com/files/yara-1.4.tar.gz' md5 'ecc744a67482dc9d717936ccd69dc39f' depends_on 'pcre' def install - system "./configure", "--disable-debug", "--disable-dependency-tracking", "--prefix=#{prefix}" + # find Homebrew's libpcre + ENV.append 'LDFLAGS', "-L#{HOMEBREW_PREFIX}/lib" + + system "./configure", "--disable-debug", + "--disable-dependency-tracking", + "--prefix=#{prefix}" system "make install" end end |
