From 7c5b041b89499dafe521b8229b7aa2ef94c76088 Mon Sep 17 00:00:00 2001 From: Misty De Meo Date: Fri, 9 Dec 2011 09:33:47 -0600 Subject: glib: find libffi without pkg-config glib's dependency on pkg-config can be eliminated if a few environment variables are set. This needed to be updated for libffi in order to build correctly. Fixes #9045. Closes #9064. Signed-off-by: Jack Nagel --- Library/Formula/glib.rb | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'Library/Formula') diff --git a/Library/Formula/glib.rb b/Library/Formula/glib.rb index a16b168cc..499cbb328 100644 --- a/Library/Formula/glib.rb +++ b/Library/Formula/glib.rb @@ -56,10 +56,16 @@ class Glib < Formula system "autoconf" end - # hack so that we don't have to depend on pkg-config - # http://permalink.gmane.org/gmane.comp.package-management.pkg-config/627 + # glib and pkg-config <= 0.26 have circular dependencies, so we should build glib without pkg-config + # The pkg-config dependency can be eliminated if certain env variables are set + # Note that this *may* need to be updated if any new dependencies are added in the future + # See http://permalink.gmane.org/gmane.comp.package-management.pkg-config/627 ENV['ZLIB_CFLAGS'] = '' ENV['ZLIB_LIBZ'] = '-l' + # libffi include paths are dramatically ugly + libffi = Formula.factory('libffi') + ENV['LIBFFI_CFLAGS'] = "-I #{libffi.lib}/libffi-#{libffi.version}/include" + ENV['LIBFFI_LIBS'] = '-lffi' system "./configure", *args -- cgit v1.2.3 From bd71558188e0e0821e62e28b196e5195bbf3bdc6 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Fri, 9 Dec 2011 13:48:01 -0600 Subject: Avoid hard-coding 'make -j1' Signed-off-by: Jack Nagel --- Library/Formula/camlp5.rb | 3 ++- Library/Formula/jbigkit.rb | 3 ++- Library/Formula/ledit.rb | 3 ++- Library/Formula/neko.rb | 3 ++- Library/Formula/renameutils.rb | 4 +++- 5 files changed, 11 insertions(+), 5 deletions(-) (limited to 'Library/Formula') diff --git a/Library/Formula/camlp5.rb b/Library/Formula/camlp5.rb index b2bcfc497..374567075 100644 --- a/Library/Formula/camlp5.rb +++ b/Library/Formula/camlp5.rb @@ -22,7 +22,8 @@ class Camlp5 < Formula system "./configure -prefix #{prefix} -mandir #{man} #{strictness}" # this build fails if jobs are parallelized - system "make -j 1 world.opt" + ENV.deparallelize + system "make world.opt" system "make install" end end diff --git a/Library/Formula/jbigkit.rb b/Library/Formula/jbigkit.rb index f990ad3e3..fbe803043 100644 --- a/Library/Formula/jbigkit.rb +++ b/Library/Formula/jbigkit.rb @@ -19,7 +19,8 @@ class Jbigkit < Formula system "make" # It needs j1 to make the tests happen in sequence. - system "make -j1 test" if ARGV.include? '--with-check' + ENV.deparallelize + system "make test" if ARGV.include? '--with-check' # Install the files using three common styles of syntax: prefix.install %w[contrib examples] diff --git a/Library/Formula/ledit.rb b/Library/Formula/ledit.rb index ec47b8666..c126813e2 100644 --- a/Library/Formula/ledit.rb +++ b/Library/Formula/ledit.rb @@ -10,7 +10,8 @@ class Ledit < Formula def install # like camlp5, this build fails if the jobs are parallelized - system "make -j 1 BINDIR=#{bin} LIBDIR=#{lib} MANDIR=#{man}" + ENV.deparallelize + system "make BINDIR=#{bin} LIBDIR=#{lib} MANDIR=#{man}" system "make install BINDIR=#{bin} LIBDIR=#{lib} MANDIR=#{man}" end end diff --git a/Library/Formula/neko.rb b/Library/Formula/neko.rb index 4af2ba1ed..6fcc1d7ee 100644 --- a/Library/Formula/neko.rb +++ b/Library/Formula/neko.rb @@ -8,7 +8,8 @@ class Neko < Formula depends_on 'bdw-gc' def install - system "yes s | /usr/bin/gnumake -j1 MACOSX=1 INSTALL_PREFIX=#{prefix}" + ENV.deparallelize # parallel build fails + system "yes s | make MACOSX=1 INSTALL_PREFIX=#{prefix}" prefix.install %w{bin libs src} end end diff --git a/Library/Formula/renameutils.rb b/Library/Formula/renameutils.rb index 6ca2f30a8..1df0a79d3 100644 --- a/Library/Formula/renameutils.rb +++ b/Library/Formula/renameutils.rb @@ -7,6 +7,8 @@ class Renameutils < Formula def install system "./configure", "--disable-debug", "--disable-dependency-tracking", "--prefix=#{prefix}" - system "make -j1 install" # fails if run in parallel + system "make" + ENV.deparallelize # parallel install fails + system "make install" end end -- cgit v1.2.3