diff options
| author | Jack Nagel | 2012-06-06 20:35:12 -0500 | 
|---|---|---|
| committer | Jack Nagel | 2012-07-01 12:41:00 -0500 | 
| commit | a2d4d9d832e60e2b007990f394b22e77b6dfa3ba (patch) | |
| tree | 61d17f0eb86471a00b2bf117d13f067f73e372b8 /Library | |
| parent | 06c2ea036322bd1d05330711aa41273cddc77ede (diff) | |
| download | homebrew-a2d4d9d832e60e2b007990f394b22e77b6dfa3ba.tar.bz2 | |
Update formulae for XQuartz compatibility
Diffstat (limited to 'Library')
136 files changed, 240 insertions, 211 deletions
diff --git a/Library/Formula/aalib.rb b/Library/Formula/aalib.rb index b7093ae39..06c5c9a3e 100644 --- a/Library/Formula/aalib.rb +++ b/Library/Formula/aalib.rb @@ -5,10 +5,7 @@ class Aalib < Formula    url 'http://downloads.sourceforge.net/aa-project/aalib-1.4rc4.tar.gz'    md5 'd5aa8e9eae07b7441298b5c30490f6a6' -  # Fix malloc/stdlib issue on OS X -  def patches -    DATA -  end +  depends_on :x11    if MacOS.xcode_version >= "4.3"      # remove the autoreconf if possible, no comment provided about why it is there @@ -17,17 +14,21 @@ class Aalib < Formula      depends_on "libtool" => :build    end +  # Fix malloc/stdlib issue on OS X +  def patches +    DATA +  end +    def install -    # Build fails some of the time without `ENV.x11`! -    # See: https://github.com/mxcl/homebrew/pull/10356 -    ENV.x11      ENV.ncurses_define      system 'autoreconf --force --install' -    system "./configure", "--disable-debug", "--disable-dependency-tracking", +    system "./configure", "--disable-debug", +                          "--disable-dependency-tracking",                            "--prefix=#{prefix}",                            "--mandir=#{man}",                            "--infodir=#{info}", -                          "--enable-shared=yes", "--enable-static=yes" +                          "--enable-shared=yes", +                          "--enable-static=yes"      system "make install"    end  end diff --git a/Library/Formula/abiword.rb b/Library/Formula/abiword.rb index 349b7111c..4b44a2acb 100644 --- a/Library/Formula/abiword.rb +++ b/Library/Formula/abiword.rb @@ -10,6 +10,7 @@ class Abiword < Formula      sha1 '34a6e4e9c5619e8f2d619ac844519fc9378405b3'    end +  depends_on :libpng    depends_on 'jpeg'    depends_on 'fribidi'    depends_on 'libgsf' @@ -20,7 +21,6 @@ class Abiword < Formula    depends_on 'imagemagick'    def install -    ENV.libpng      system "./configure", "--disable-debug", "--disable-dependency-tracking",                            "--prefix=#{prefix}"      system "make install" diff --git a/Library/Formula/aview.rb b/Library/Formula/aview.rb index 6e9304d08..3445a4e6e 100644 --- a/Library/Formula/aview.rb +++ b/Library/Formula/aview.rb @@ -6,14 +6,15 @@ class Aview < Formula    md5 '093f298e7787591e229b59d039c72f4d'    depends_on 'aalib' +  depends_on :x11    def patches      DATA    end    def install -    ENV.x11 -    system "./configure", "--disable-debug", "--disable-dependency-tracking", +    system "./configure", "--disable-debug", +                          "--disable-dependency-tracking",                            "--prefix=#{prefix}",                            "--mandir=#{man}"      system "make install" diff --git a/Library/Formula/bsdmake.rb b/Library/Formula/bsdmake.rb index e3fd5113e..3c6d4f843 100644 --- a/Library/Formula/bsdmake.rb +++ b/Library/Formula/bsdmake.rb @@ -32,7 +32,7 @@ class Bsdmake < Formula                   '@PREFIX@', prefix      # X11 path shouldn't be munged -    inreplace 'mk/sys.mk', '@PREFIX@', '/usr/X11' +    inreplace 'mk/sys.mk', '@PREFIX@', MacOS.x11_prefix      inreplace 'mk/bsd.own.mk' do |s|        s.gsub! '@INSTALL_USER@', `id -un`.chomp diff --git a/Library/Formula/clusterit.rb b/Library/Formula/clusterit.rb index a7d4cbf65..4cc33e276 100644 --- a/Library/Formula/clusterit.rb +++ b/Library/Formula/clusterit.rb @@ -5,8 +5,9 @@ class Clusterit < Formula    url 'http://downloads.sourceforge.net/project/clusterit/clusterit/clusterit-2.5/clusterit-2.5.tar.gz'    md5 'f0e772e07122e388de629fb57f7237ab' +  depends_on :x11 +    def install -    ENV.x11      system "./configure", "--disable-debug", "--disable-dependency-tracking",                            "--prefix=#{prefix}"      system "make install" diff --git a/Library/Formula/clutter.rb b/Library/Formula/clutter.rb index 4cfe02644..e4d8b0db4 100644 --- a/Library/Formula/clutter.rb +++ b/Library/Formula/clutter.rb @@ -7,12 +7,11 @@ class Clutter < Formula    depends_on 'pkg-config' => :build    depends_on 'atk' -  # Cairo is keg-only and usually only used for Leopard builds. -  # But Clutter requires a newer version of Cairo that what comes with Snow Leopard. -  depends_on 'cairo'    depends_on 'intltool'    depends_on 'json-glib'    depends_on 'pango' +  depends_on 'cairo' # for cairo-gobject +  depends_on :x11    def install      system "./configure", "--prefix=#{prefix}", diff --git a/Library/Formula/dcmtk.rb b/Library/Formula/dcmtk.rb index f4e0035a8..23b44c4d2 100644 --- a/Library/Formula/dcmtk.rb +++ b/Library/Formula/dcmtk.rb @@ -5,6 +5,7 @@ class Dcmtk < Formula    url 'ftp://dicom.offis.de/pub/dicom/offis/software/dcmtk/dcmtk360/dcmtk-3.6.0.tar.gz'    md5 '19409e039e29a330893caea98715390e' +  depends_on :x11    depends_on 'libtiff'    depends_on 'doxygen' if ARGV.include? '--with-docs' @@ -18,7 +19,6 @@ class Dcmtk < Formula    def install      ENV.m64 if MacOS.prefer_64_bit? -    ENV.x11      args = std_cmake_args      args << '-DDCMTK_WITH_DOXYGEN=YES' if ARGV.include? '--with-docs' diff --git a/Library/Formula/devil.rb b/Library/Formula/devil.rb index b55f29267..d0a2c2b35 100644 --- a/Library/Formula/devil.rb +++ b/Library/Formula/devil.rb @@ -5,6 +5,7 @@ class Devil < Formula    homepage 'http://sourceforge.net/projects/openil/'    md5 '7918f215524589435e5ec2e8736d5e1d' +  depends_on :x11    depends_on 'jpeg'    depends_on 'libtiff'    depends_on 'little-cms' @@ -22,9 +23,6 @@ class Devil < Formula    def patches; DATA; end    def install -    # devil won't find libpng without ENV.x11 -    ENV.x11 -      system "./configure", "--disable-debug", "--disable-dependency-tracking",                            "--prefix=#{prefix}", "--enable-ILU"      system "make install" diff --git a/Library/Formula/dia.rb b/Library/Formula/dia.rb index 339d6d660..e56720c68 100644 --- a/Library/Formula/dia.rb +++ b/Library/Formula/dia.rb @@ -12,6 +12,7 @@ class Dia < Formula    depends_on 'pango'    depends_on 'libtiff'    depends_on 'gtk+' +  depends_on :x11    def patches      # fixes compilation with glib 2.31+ @@ -21,7 +22,6 @@ class Dia < Formula    end    def install -    ENV.x11      # fix for Leopard, potentially others with isspecial defined elswhere      inreplace 'objects/GRAFCET/boolequation.c', 'isspecial', 'char_isspecial'      system "./configure", "--enable-debug=no", diff --git a/Library/Formula/dvdauthor.rb b/Library/Formula/dvdauthor.rb index ab7f8385a..a6b2fba35 100644 --- a/Library/Formula/dvdauthor.rb +++ b/Library/Formula/dvdauthor.rb @@ -10,6 +10,7 @@ class Dvdauthor < Formula    depends_on 'pkg-config' => :build    depends_on 'libdvdread' +  depends_on :x11    # Fix build with png-1.5. Patch has been applied upstream, but no tagged    # release has been made since 2010. See: @@ -20,7 +21,6 @@ class Dvdauthor < Formula    end    def install -    ENV.x11 # For libpng, etc.      system "./configure", "--disable-dependency-tracking",                            "--prefix=#{prefix}",                            "--mandir=#{man}" diff --git a/Library/Formula/dzen2.rb b/Library/Formula/dzen2.rb index 1da4647a4..b4168c006 100644 --- a/Library/Formula/dzen2.rb +++ b/Library/Formula/dzen2.rb @@ -5,8 +5,9 @@ class Dzen2 < Formula    homepage 'http://sites.google.com/site/gotmor/dzen'    md5 '5978620c2124c8a8ad52d7f17ce94fd7' +  depends_on :x11 +    def install -    ENV.x11      ENV.append 'LDFLAGS', '-lX11 -lXinerama -lXpm'      ENV.append_to_cflags '-DVERSION=\"${VERSION}\" -DDZEN_XINERAMA -DDZEN_XPM' diff --git a/Library/Formula/emacs.rb b/Library/Formula/emacs.rb index 022768120..66119fa70 100644 --- a/Library/Formula/emacs.rb +++ b/Library/Formula/emacs.rb @@ -12,6 +12,8 @@ class Emacs < Formula      head 'bzr://http://bzr.savannah.gnu.org/r/emacs/trunk'    end +  depends_on :x11 if ARGV.include? "--with-x" +    # Stripping on Xcode 4 causes malformed object errors.    # Just skip everything.    skip_clean :all @@ -69,7 +71,6 @@ class Emacs < Formula        prefix.install "nextstep/Emacs.app"      else        if ARGV.include? "--with-x" -        ENV.x11          # These libs are not specified in xft's .pc. See:          # https://trac.macports.org/browser/trunk/dports/editors/emacs/Portfile#L74          # https://github.com/mxcl/homebrew/issues/8156 diff --git a/Library/Formula/feh.rb b/Library/Formula/feh.rb index 8e30aa96c..71c412051 100644 --- a/Library/Formula/feh.rb +++ b/Library/Formula/feh.rb @@ -6,10 +6,9 @@ class Feh < Formula    md5 '7dee285e8dd34f69058b0977283b3a8a'    depends_on 'giblib' => :build +  depends_on :x11    def install -    ENV.x11 -      system "make", "PREFIX=#{prefix}"      system "make", "PREFIX=#{prefix}", "install"    end diff --git a/Library/Formula/ffmbc.rb b/Library/Formula/ffmbc.rb index 4b4d5fc1f..1870f8260 100644 --- a/Library/Formula/ffmbc.rb +++ b/Library/Formula/ffmbc.rb @@ -6,6 +6,7 @@ class Ffmbc < Formula    md5 '547bb7b7963224dd66dffa8b25e623b3'    depends_on 'yasm' => :build +  depends_on :x11    depends_on 'x264' => :optional    depends_on 'faac' => :optional    depends_on 'lame' => :optional @@ -16,7 +17,6 @@ class Ffmbc < Formula    depends_on 'xvid' => :optional    def install -    ENV.x11      args = ["--prefix=#{prefix}",              "--disable-debug",              "--disable-shared", diff --git a/Library/Formula/ffmpeg.rb b/Library/Formula/ffmpeg.rb index 2825b3475..a21002459 100644 --- a/Library/Formula/ffmpeg.rb +++ b/Library/Formula/ffmpeg.rb @@ -16,6 +16,7 @@ class Ffmpeg < Formula    head 'git://git.videolan.org/ffmpeg.git'    depends_on 'yasm' => :build +  depends_on :x11    depends_on 'x264' => :optional    depends_on 'faac' => :optional    depends_on 'lame' => :optional @@ -41,7 +42,6 @@ class Ffmpeg < Formula    end    def install -    ENV.x11      args = ["--prefix=#{prefix}",              "--enable-shared",              "--enable-gpl", diff --git a/Library/Formula/fltk.rb b/Library/Formula/fltk.rb index b03dacb2c..809515192 100644 --- a/Library/Formula/fltk.rb +++ b/Library/Formula/fltk.rb @@ -11,6 +11,7 @@ class Fltk < Formula      version '1.3.x-r9327'    end +  depends_on :libpng    depends_on 'jpeg'    fails_with :clang do @@ -19,7 +20,6 @@ class Fltk < Formula    end    def install -    ENV.libpng      system "./configure", "--prefix=#{prefix}", "--enable-threads"      system "make install"    end diff --git a/Library/Formula/fontconfig.rb b/Library/Formula/fontconfig.rb index f4a2b9fce..224d97b39 100644 --- a/Library/Formula/fontconfig.rb +++ b/Library/Formula/fontconfig.rb @@ -9,9 +9,9 @@ class Fontconfig < Formula      "Leopard comes with version 2.4.x, which is too old for many packages."    depends_on 'pkg-config' => :build +  depends_on :x11    def install -    ENV.x11      system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}"      system "make install"    end diff --git a/Library/Formula/fontforge.rb b/Library/Formula/fontforge.rb index 8d91676ef..e26cc73a7 100644 --- a/Library/Formula/fontforge.rb +++ b/Library/Formula/fontforge.rb @@ -11,6 +11,7 @@ class Fontforge < Formula    depends_on 'gettext'    depends_on 'pango'    depends_on 'potrace' +  depends_on :x11    def options      [['--without-python', 'Build without Python.']] @@ -28,7 +29,6 @@ class Fontforge < Formula      args << "--without-python" if ARGV.include? "--without-python" -    ENV.x11      # Fix linker error; see: http://trac.macports.org/ticket/25012      ENV.append "LDFLAGS", "-lintl"      system "./configure", *args diff --git a/Library/Formula/fox.rb b/Library/Formula/fox.rb index 7a8772b18..cc4d8c662 100644 --- a/Library/Formula/fox.rb +++ b/Library/Formula/fox.rb @@ -11,17 +11,17 @@ class Fox < Formula      md5 '1cf2607d15ffad5b664cf65bfcd249bc'    end +  depends_on :x11 +    fails_with :llvm do      cause "Inline asm errors during build"    end if ARGV.build_devel?    def install -    ENV.x11 -      # Yep, won't find freetype unless this is all set. -    ENV.append "CFLAGS", "-I/usr/X11/include/freetype2" -    ENV.append "CPPFLAGS", "-I/usr/X11/include/freetype2" -    ENV.append "CXXFLAGS", "-I/usr/X11/include/freetype2" +    ENV.append "CFLAGS", "-I#{MacOS.x11_prefix}/include/freetype2" +    ENV.append "CPPFLAGS", "-I#{MacOS.x11_prefix}/include/freetype2" +    ENV.append "CXXFLAGS", "-I#{MacOS.x11_prefix}/include/freetype2"      system "./configure", "--enable-release",                            "--prefix=#{prefix}", diff --git a/Library/Formula/ftgl.rb b/Library/Formula/ftgl.rb index 53227b5d1..32a295f99 100644 --- a/Library/Formula/ftgl.rb +++ b/Library/Formula/ftgl.rb @@ -6,10 +6,9 @@ class Ftgl < Formula    md5 'fcf4d0567b7de9875d4e99a9f7423633'    depends_on 'pkg-config' => :build +  depends_on :x11    def install -    ENV.x11 # Put freetype-config in path -      # If doxygen is installed, the docs may still fail to build.      # So we disable building docs.      inreplace "configure", "set dummy doxygen;", "set dummy no_doxygen;" diff --git a/Library/Formula/gd.rb b/Library/Formula/gd.rb index 80f2802f5..6d9700de6 100644 --- a/Library/Formula/gd.rb +++ b/Library/Formula/gd.rb @@ -1,13 +1,14 @@  require 'formula'  class Gd < Formula -  url "http://www.libgd.org/releases/gd-2.0.36RC1.tar.gz" -  homepage "http://bitbucket.org/pierrejoye/gd-libgd" -  mirror "http://download.osgeo.org/mapserver/libgd/gd-2.0.36RC1.tar.gz" -  md5 "39ac48e6d5e0012a3bd2248a0102f209" +  homepage 'http://bitbucket.org/pierrejoye/gd-libgd' +  url 'http://www.libgd.org/releases/gd-2.0.36RC1.tar.gz' +  mirror 'http://download.osgeo.org/mapserver/libgd/gd-2.0.36RC1.tar.gz' +  md5 '39ac48e6d5e0012a3bd2248a0102f209' -  head "http://bitbucket.org/pierrejoye/gd-libgd", :using => :hg +  head 'http://bitbucket.org/pierrejoye/gd-libgd', :using => :hg +  depends_on :x11    depends_on 'jpeg' => :recommended    fails_with :llvm do @@ -16,8 +17,7 @@ class Gd < Formula    end    def install -    ENV.x11 -    system "./configure", "--prefix=#{prefix}", "--with-freetype=/usr/X11" +    system "./configure", "--prefix=#{prefix}", "--with-freetype=#{MacOS.x11_prefix}"      system "make install"      (lib+'pkgconfig/gdlib.pc').write pkg_file    end diff --git a/Library/Formula/gdal.rb b/Library/Formula/gdal.rb index d9877db13..2b5cde1cd 100644 --- a/Library/Formula/gdal.rb +++ b/Library/Formula/gdal.rb @@ -39,6 +39,8 @@ class Gdal < Formula    # For creating up to date man pages.    depends_on 'doxygen' => :build if ARGV.build_head? +  depends_on :x11 +    depends_on 'jpeg'    depends_on 'giflib'    depends_on 'proj' @@ -108,7 +110,7 @@ class Gdal < Formula        # Backends supported by OS X.        "--with-libz=/usr", -      "--with-png=/usr/X11", +      "--with-png=#{MacOS.x11_prefix}",        "--with-expat=/usr",        # Default Homebrew backends. diff --git a/Library/Formula/gdk-pixbuf.rb b/Library/Formula/gdk-pixbuf.rb index f4e277920..8ddb03d87 100644 --- a/Library/Formula/gdk-pixbuf.rb +++ b/Library/Formula/gdk-pixbuf.rb @@ -10,6 +10,7 @@ class GdkPixbuf < Formula    depends_on 'glib'    depends_on 'jasper'    depends_on 'libtiff' +  depends_on :x11    # 'loaders.cache' must be writable by other packages    skip_clean 'lib/gdk-pixbuf-2.0' diff --git a/Library/Formula/geda-gaf.rb b/Library/Formula/geda-gaf.rb index 42ad3d0e2..1bcc145ed 100644 --- a/Library/Formula/geda-gaf.rb +++ b/Library/Formula/geda-gaf.rb @@ -15,6 +15,7 @@ class GedaGaf < Formula    depends_on 'gtk+'    depends_on 'guile'    depends_on 'gawk' +  depends_on :x11    # MacPorts fix for glib 2.32 includes    # Needed for 1.6.2 and 1.7.x @@ -24,7 +25,6 @@ class GedaGaf < Formula    def install      # Help configure find libraries -    ENV.x11      gettext = Formula.factory('gettext')      system "./configure", "--prefix=#{prefix}", diff --git a/Library/Formula/geomview.rb b/Library/Formula/geomview.rb index 0a3296b4e..9cefea720 100644 --- a/Library/Formula/geomview.rb +++ b/Library/Formula/geomview.rb @@ -5,14 +5,13 @@ class Geomview < Formula    homepage 'http://www.geomview.org'    md5 '29c7e6d678af7b9968980f92954419bb' +  depends_on :x11    depends_on 'lesstif'    def install -    ENV.x11 - -    system "./configure", "--disable-debug", "--disable-dependency-tracking", +    system "./configure", "--disable-debug", +                          "--disable-dependency-tracking",                            "--prefix=#{prefix}" -      system "make install"    end  end diff --git a/Library/Formula/gerbv.rb b/Library/Formula/gerbv.rb index 55fb5ea7e..7dedf8be1 100644 --- a/Library/Formula/gerbv.rb +++ b/Library/Formula/gerbv.rb @@ -8,15 +8,13 @@ class Gerbv < Formula    depends_on 'pkg-config' => :build    depends_on 'gtk+'    depends_on 'cairo' if MacOS.leopard? +  depends_on :x11    def install -    system "./configure", "--disable-debug", "--disable-dependency-tracking", +    system "./configure", "--disable-debug", +                          "--disable-dependency-tracking",                            "--prefix=#{prefix}",                            "--disable-update-desktop-database"      system "make install"    end - -  def caveats -    "Note: gerbv is an X11 application." -  end  end diff --git a/Library/Formula/ggobi.rb b/Library/Formula/ggobi.rb index ce3ca12cc..71ab872fe 100644 --- a/Library/Formula/ggobi.rb +++ b/Library/Formula/ggobi.rb @@ -12,6 +12,7 @@ class Ggobi < Formula    depends_on 'fontconfig'    depends_on 'pango'    depends_on 'gettext' +  depends_on :x11    def install      # Necessary for ggobi to build - based on patch from MacPorts diff --git a/Library/Formula/ghostscript.rb b/Library/Formula/ghostscript.rb index 87e3f82b4..57b7bc90d 100644 --- a/Library/Formula/ghostscript.rb +++ b/Library/Formula/ghostscript.rb @@ -18,6 +18,7 @@ class Ghostscript < Formula    depends_on 'libtiff'    depends_on 'jbig2dec'    depends_on 'little-cms2' +  depends_on :libpng    if ARGV.build_head? and MacOS.xcode_version >= "4.3"      depends_on "automake" => :build @@ -36,10 +37,9 @@ class Ghostscript < Formula    end    def install -    ENV.libpng      ENV.deparallelize      # ghostscript configure ignores LDFLAGs apparently -    ENV['LIBS'] = "-L/usr/X11/lib" +    ENV['LIBS'] = "-L#{MacOS.x11_prefix}/lib"      src_dir = ARGV.build_head? ? "gs" : "." diff --git a/Library/Formula/gifsicle.rb b/Library/Formula/gifsicle.rb index 13bcab574..90806381c 100644 --- a/Library/Formula/gifsicle.rb +++ b/Library/Formula/gifsicle.rb @@ -5,8 +5,9 @@ class Gifsicle < Formula    url 'http://www.lcdf.org/gifsicle/gifsicle-1.64.tar.gz'    md5 'dabe9ee0d6d9cea099d9a7e6ecdcc443' +  depends_on :x11 +    def install -    ENV.x11      system "./configure", "--disable-dependency-tracking",                            "--prefix=#{prefix}",                            "--enable-all" diff --git a/Library/Formula/glade.rb b/Library/Formula/glade.rb index 5e9e66a07..b28ee7041 100644 --- a/Library/Formula/glade.rb +++ b/Library/Formula/glade.rb @@ -11,6 +11,7 @@ class Glade < Formula    depends_on 'intltool'    depends_on 'libglade'    depends_on 'hicolor-icon-theme' +  depends_on :x11    def install      pydir = 'python' + `python -c 'import sys;print(sys.version[:3])'`.strip diff --git a/Library/Formula/gle.rb b/Library/Formula/gle.rb index a5aa01999..c25c8d010 100644 --- a/Library/Formula/gle.rb +++ b/Library/Formula/gle.rb @@ -7,12 +7,11 @@ class Gle < Formula    md5 '5eef0a63ee0077237b8a36fe1a24407f'    depends_on 'pkg-config' => :build +  depends_on :x11    depends_on 'jpeg' => :optional    depends_on 'libtiff' => :optional    def install -    ENV.x11 -      arch = MacOS.prefer_64_bit? ? "x86_64" : "i386"      system "./configure", "--prefix=#{prefix}",                            "--with-arch=#{arch}", diff --git a/Library/Formula/gnu-shogi.rb b/Library/Formula/gnu-shogi.rb index b654b0211..37dd14538 100644 --- a/Library/Formula/gnu-shogi.rb +++ b/Library/Formula/gnu-shogi.rb @@ -5,6 +5,8 @@ class GnuShogi < Formula    homepage 'http://www.cs.caltech.edu/~mvanier/hacking/gnushogi/gnushogi.html'    md5 'a18eae93afc89bfd368ed5f6768be791' +  depends_on :x11 +    def patches        # gcc 4.2.1 flags the following error        # In file included from attacks.c:32: @@ -21,8 +23,8 @@ class GnuShogi < Formula    def install      system "./configure", "--disable-debug", "--disable-dependency-tracking",                            "--prefix=#{prefix}", -                          "--x-include=/usr/X11/include", -                          "--x-lib=/usr/X11/lib" +                          "--x-include=#{MacOS.x11_prefix}/include", +                          "--x-lib=#{MacOS.x11_prefix}/lib"      system "make"      system "make", "install", "MANDIR=#{man6}", "INFODIR=#{info}"    end diff --git a/Library/Formula/gnuplot.rb b/Library/Formula/gnuplot.rb index 477feccde..99fe68b2e 100644 --- a/Library/Formula/gnuplot.rb +++ b/Library/Formula/gnuplot.rb @@ -9,6 +9,7 @@ class Gnuplot < Formula    depends_on 'pkg-config' => :build    depends_on 'readline'    depends_on 'pango' +  depends_on :x11    depends_on 'pdflib-lite' if ARGV.include? "--pdf"    depends_on 'lua' unless ARGV.include? '--nolua'    depends_on 'gd' unless ARGV.include? "--nogd" @@ -30,7 +31,6 @@ class Gnuplot < Formula    def install      # Help configure find libraries -    ENV.x11      readline = Formula.factory 'readline'      pdflib = Formula.factory 'pdflib-lite'      gd = Formula.factory 'gd' diff --git a/Library/Formula/gobby.rb b/Library/Formula/gobby.rb index 6ff1fd137..4f7c42496 100644 --- a/Library/Formula/gobby.rb +++ b/Library/Formula/gobby.rb @@ -16,9 +16,9 @@ class Gobby < Formula    depends_on 'gettext'    depends_on 'hicolor-icon-theme'    depends_on 'libinfinity' +  depends_on :x11    def install -    ENV.x11      system "./configure", "--disable-dependency-tracking",                            "--prefix=#{prefix}"      system "make install" diff --git a/Library/Formula/gource.rb b/Library/Formula/gource.rb index 7e0f66f60..9baba0eb3 100644 --- a/Library/Formula/gource.rb +++ b/Library/Formula/gource.rb @@ -9,6 +9,7 @@ class Gource < Formula    depends_on 'glm' => :build    depends_on 'pkg-config' => :build +  depends_on :x11 # for Freetype    depends_on 'boost'    depends_on 'glew'    depends_on 'jpeg' @@ -22,8 +23,6 @@ class Gource < Formula    end    def install -    ENV.x11 # Put freetype-config in path -      # For non-/usr/local installs      ENV.append "CXXFLAGS", "-I#{HOMEBREW_PREFIX}/include" diff --git a/Library/Formula/gpac.rb b/Library/Formula/gpac.rb index 75d53c356..33601361b 100644 --- a/Library/Formula/gpac.rb +++ b/Library/Formula/gpac.rb @@ -17,6 +17,8 @@ class Gpac < Formula    head 'https://gpac.svn.sourceforge.net/svnroot/gpac/trunk/gpac', :using => :svn +  depends_on :x11 +    depends_on 'a52dec' => :optional    depends_on 'jpeg' => :optional    depends_on 'faad2' => :optional @@ -35,9 +37,9 @@ class Gpac < Formula              "--prefix=#{prefix}",              "--mandir=#{man}",              # gpac build system is barely functional -            "--extra-cflags=-I/usr/X11/include", +            "--extra-cflags=-I#{MacOS.x11_prefix}/include",              # Force detection of X libs on 64-bit kernel -            "--extra-ldflags=-L/usr/X11/lib"] +            "--extra-ldflags=-L#{MacOS.x11_prefix}/lib"]      system "chmod +x configure"      system "./configure", *args diff --git a/Library/Formula/grace.rb b/Library/Formula/grace.rb index df23731ce..e01fde691 100644 --- a/Library/Formula/grace.rb +++ b/Library/Formula/grace.rb @@ -5,6 +5,7 @@ class Grace < Formula    url 'ftp://plasma-gate.weizmann.ac.il/pub/grace/src/grace5/grace-5.1.22.tar.gz'    sha1 '3ce88c7c264d2de73b8935f835a1c1f8e368c78f' +  depends_on :x11    depends_on 'pdflib-lite'    depends_on 'jpeg'    depends_on 'fftw' @@ -17,7 +18,6 @@ class Grace < Formula    end    def install -    ENV.x11      system "./configure", "--disable-debug",                            "--disable-dependency-tracking",                            "--prefix=#{prefix}", diff --git a/Library/Formula/graphicsmagick.rb b/Library/Formula/graphicsmagick.rb index cd968054a..b4e4e0b5c 100644 --- a/Library/Formula/graphicsmagick.rb +++ b/Library/Formula/graphicsmagick.rb @@ -29,6 +29,7 @@ class Graphicsmagick < Formula    head 'hg://http://graphicsmagick.hg.sourceforge.net:8000/hgroot/graphicsmagick/graphicsmagick' +  depends_on :x11    depends_on 'jpeg'    depends_on 'libwmf' if use_wmf?    depends_on 'libtiff' => :optional @@ -55,8 +56,6 @@ class Graphicsmagick < Formula    end    def install -    ENV.x11 -      # versioned stuff in main tree is pointless for us      inreplace 'configure', '${PACKAGE_NAME}-${PACKAGE_VERSION}', '${PACKAGE_NAME}' diff --git a/Library/Formula/graphviz.rb b/Library/Formula/graphviz.rb index fe95d3f96..a15aedd9b 100644 --- a/Library/Formula/graphviz.rb +++ b/Library/Formula/graphviz.rb @@ -28,7 +28,6 @@ class Graphviz < Formula    end    def install -    ENV.x11      args = ["--disable-debug",              "--disable-dependency-tracking",              "--prefix=#{prefix}", diff --git a/Library/Formula/grass.rb b/Library/Formula/grass.rb index 8d7ffe042..b1f2f21e5 100644 --- a/Library/Formula/grass.rb +++ b/Library/Formula/grass.rb @@ -31,8 +31,8 @@ class Grass < Formula    depends_on "libtiff"    depends_on "unixodbc"    depends_on "fftw" -    depends_on "cairo" if MacOS.leopard? +  depends_on :x11    # Patches ensure 32 bit system python is used for wxWidgets and that files    # are not installed outside of the prefix. @@ -60,7 +60,7 @@ class Grass < Formula      args = [        "--disable-debug", "--disable-dependency-tracking", -      "--with-libs=/usr/X11/lib #{HOMEBREW_PREFIX}/lib", +      "--with-libs=#{MacOS.x11_prefix}/lib #{HOMEBREW_PREFIX}/lib",        "--with-includes=#{HOMEBREW_PREFIX}/include",        "--enable-largefile",        "--enable-shared", @@ -74,7 +74,7 @@ class Grass < Formula        "--with-sqlite",        "--with-odbc",        "--with-geos=#{HOMEBREW_PREFIX}/bin/geos-config", -      "--with-png-includes=/usr/X11/include", +      "--with-png-includes=#{MacOS.x11_prefix}/include",        "--with-png",        "--with-readline-includes=#{readline.include}",        "--with-readline-libs=#{readline.lib}", @@ -82,7 +82,7 @@ class Grass < Formula        "--with-nls-includes=#{gettext.include}",        "--with-nls-libs=#{gettext.lib}",        "--with-nls", -      "--with-freetype-includes=/usr/X11/include /usr/X11/include/freetype2", +      "--with-freetype-includes=#{MacOS.x11_prefix}/include #{MacOS.x11_prefix}/include/freetype2",        "--with-freetype",        "--without-tcltk" # Disabled due to compatibility issues with OS X Tcl/Tk      ] @@ -106,7 +106,7 @@ class Grass < Formula        args << "--with-cairo-includes=#{cairo.include}/cairo"        args << "--with-cairo-libs=#{cairo.lib}"      else -      args << "--with-cairo-includes=/usr/X11/include /usr/X11/include/cairo" +      args << "--with-cairo-includes=#{MacOS.x11_prefix}/include #{MacOS.x11_prefix}/include/cairo"      end      args << "--with-cairo" diff --git a/Library/Formula/gtk+.rb b/Library/Formula/gtk+.rb index f4bc8c15e..e0c908aa9 100644 --- a/Library/Formula/gtk+.rb +++ b/Library/Formula/gtk+.rb @@ -14,6 +14,7 @@ class Gtkx < Formula    depends_on 'pango'    depends_on 'jasper' => :optional    depends_on 'atk' => :optional +  depends_on :x11    fails_with :llvm do      build 2326 diff --git a/Library/Formula/gtk-chtheme.rb b/Library/Formula/gtk-chtheme.rb index 766d9b33f..1ee036856 100644 --- a/Library/Formula/gtk-chtheme.rb +++ b/Library/Formula/gtk-chtheme.rb @@ -11,6 +11,7 @@ class GtkChtheme < Formula    depends_on 'glib'    depends_on 'gtk+'    depends_on 'pango' +  depends_on :x11    def install      # Unfortunately chtheme relies on some deprecated functionality diff --git a/Library/Formula/gtkglext.rb b/Library/Formula/gtkglext.rb index caa4adbf9..a14ecf7f9 100644 --- a/Library/Formula/gtkglext.rb +++ b/Library/Formula/gtkglext.rb @@ -8,6 +8,7 @@ class Gtkglext < Formula    depends_on 'pkg-config' => :build    depends_on 'glib'    depends_on 'gtk+' +  depends_on :x11    def patches        # fixes an incompatibility with recent GTK versions @@ -16,7 +17,6 @@ class Gtkglext < Formula    end    def install -    ENV.x11      system "./configure", "--disable-debug", "--disable-dependency-tracking",                            "--prefix=#{prefix}"      system "make install" diff --git a/Library/Formula/gtkglextmm.rb b/Library/Formula/gtkglextmm.rb index 1c6eb5b29..bdc338c7b 100644 --- a/Library/Formula/gtkglextmm.rb +++ b/Library/Formula/gtkglextmm.rb @@ -8,6 +8,7 @@ class Gtkglextmm < Formula    depends_on 'pkg-config' => :build    depends_on 'gtkglext'    depends_on 'gtkmm' +  depends_on :x11    # Fixes header include order, using patch from macports: https://trac.macports.org/ticket/27059    # Upstream bug report: https://bugzilla.gnome.org/show_bug.cgi?id=636831 diff --git a/Library/Formula/gtkmm.rb b/Library/Formula/gtkmm.rb index 5a08462f9..2d1f857b1 100644 --- a/Library/Formula/gtkmm.rb +++ b/Library/Formula/gtkmm.rb @@ -11,6 +11,7 @@ class Gtkmm < Formula    depends_on 'libsigc++'    depends_on 'pangomm'    depends_on 'atkmm' +  depends_on :x11    def install      system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" diff --git a/Library/Formula/gtkwave.rb b/Library/Formula/gtkwave.rb index 304b6c1f1..231874b4e 100644 --- a/Library/Formula/gtkwave.rb +++ b/Library/Formula/gtkwave.rb @@ -7,6 +7,7 @@ class Gtkwave < Formula    depends_on 'gtk+'    depends_on 'xz' +  depends_on :x11    def install      system './configure', "--prefix=#{prefix}", '--disable-dependency-tracking' diff --git a/Library/Formula/gv.rb b/Library/Formula/gv.rb index 52bc4ff20..435916b5b 100644 --- a/Library/Formula/gv.rb +++ b/Library/Formula/gv.rb @@ -8,11 +8,11 @@ class Gv < Formula    depends_on 'ghostscript'    depends_on 'xaw3d' +  depends_on :x11    skip_clean 'share/gv/safe-gs-workdir'    def install -    ENV.x11      system "./configure", "--disable-dependency-tracking",                            "--prefix=#{prefix}", "--enable-SIGCHLD-fallback"      system "make install" diff --git a/Library/Formula/icoutils.rb b/Library/Formula/icoutils.rb index 52e3cab56..032f1207c 100644 --- a/Library/Formula/icoutils.rb +++ b/Library/Formula/icoutils.rb @@ -5,8 +5,9 @@ class Icoutils < Formula    homepage 'http://www.nongnu.org/icoutils/'    md5 'b58f375e0f8731595e8d0ecdc3a0acb9' +  depends_on :libpng +    def install -    ENV.libpng      system "./configure", "--disable-dependency-tracking",                            "--disable-rpath",                            "--prefix=#{prefix}" diff --git a/Library/Formula/imagemagick.rb b/Library/Formula/imagemagick.rb index 6963870e8..16335721d 100644 --- a/Library/Formula/imagemagick.rb +++ b/Library/Formula/imagemagick.rb @@ -63,6 +63,8 @@ class Imagemagick < Formula    depends_on 'pkg-config' => :build    depends_on 'jpeg' +  depends_on :x11 +    depends_on 'ghostscript' => :recommended if ghostscript_srsly?    depends_on 'libtiff' => :optional @@ -103,8 +105,6 @@ class Imagemagick < Formula    end    def install -    ENV.x11 # Add to PATH for freetype-config on Snow Leopard -      args = [ "--disable-osx-universal-binary",               "--without-perl", # I couldn't make this compile               "--prefix=#{prefix}", diff --git a/Library/Formula/imake.rb b/Library/Formula/imake.rb index ec7c90bff..3ef9ee2f1 100644 --- a/Library/Formula/imake.rb +++ b/Library/Formula/imake.rb @@ -11,10 +11,9 @@ class Imake < Formula    sha1 '1fd3dca267d125ad86583d7f9663b6ff532cddd1'    depends_on 'pkg-config' => :build +  depends_on :x11    def install -    # So it can find xorg-macros.pc.  Using ENV.x11 didn't work. -    ENV['PKG_CONFIG_PATH'] = '/usr/X11/share/pkgconfig'      ENV.deparallelize      system './configure', "--prefix=#{prefix}", '--disable-dependency-tracking'      system "make install" diff --git a/Library/Formula/imlib2.rb b/Library/Formula/imlib2.rb index baf302d6f..ba61ca6fb 100644 --- a/Library/Formula/imlib2.rb +++ b/Library/Formula/imlib2.rb @@ -6,9 +6,9 @@ class Imlib2 < Formula    md5 '859e5fede51ec819f4314eee11da3ea5'    depends_on 'pkg-config' => :build +  depends_on :x11 # for Freetype    def install -    ENV.x11 # For freetype      system "./configure", "--disable-dependency-tracking",                            "--prefix=#{prefix}",                            "--enable-amd64=no" diff --git a/Library/Formula/ipe.rb b/Library/Formula/ipe.rb index d46a0ab33..305653fed 100644 --- a/Library/Formula/ipe.rb +++ b/Library/Formula/ipe.rb @@ -9,6 +9,7 @@ class Ipe < Formula    depends_on 'makeicns' => :build    depends_on 'lua'    depends_on 'qt' +  depends_on :x11    # configure library paths using pkg-config    # because ipe assumes that Qt and other libs are installed in diff --git a/Library/Formula/leptonica.rb b/Library/Formula/leptonica.rb index 62ab61959..c514e41d2 100644 --- a/Library/Formula/leptonica.rb +++ b/Library/Formula/leptonica.rb @@ -5,6 +5,7 @@ class Leptonica < Formula    url 'http://www.leptonica.org/source/leptonica-1.68.tar.gz'    md5 '5cd7092f9ff2ca7e3f3e73bfcd556403' +  depends_on :x11    depends_on 'jpeg'    depends_on 'libtiff' @@ -16,7 +17,6 @@ class Leptonica < Formula    end    def install -    ENV.x11      system "./configure", "--disable-dependency-tracking",                            "--prefix=#{prefix}"      system "make install" diff --git a/Library/Formula/lesstif.rb b/Library/Formula/lesstif.rb index a0cc9e44f..163b5271d 100644 --- a/Library/Formula/lesstif.rb +++ b/Library/Formula/lesstif.rb @@ -1,13 +1,13 @@  require 'formula'  class Lesstif < Formula +  homepage 'http://lesstif.sourceforge.net'    url 'http://sourceforge.net/projects/lesstif/files/lesstif/0.95.2/lesstif-0.95.2.tar.bz2'    md5 '754187dbac09fcf5d18296437e72a32f' -  homepage 'http://lesstif.sourceforge.net' -  def install -    ENV.x11 +  depends_on :x11 +  def install      # LessTif does naughty, naughty, things by assuming we want autoconf macros      # to live in wherever `aclocal --print-ac-dir` says they should. diff --git a/Library/Formula/libagg.rb b/Library/Formula/libagg.rb index a3e1eb1d3..d5cc2325c 100644 --- a/Library/Formula/libagg.rb +++ b/Library/Formula/libagg.rb @@ -8,6 +8,7 @@ class Libagg < Formula    depends_on "automake" => :build if MacOS.xcode_version >= "4.3"    depends_on 'pkg-config' => :build    depends_on 'sdl' +  depends_on :x11 # for Freetype    fails_with :clang do      build 318 @@ -18,8 +19,6 @@ class Libagg < Formula    end    def install -    ENV.x11 # For freetype -      # AM_C_PROTOTYPES was removed in automake 1.12, as it's only needed for      # pre-ANSI compilers      inreplace 'configure.in', 'AM_C_PROTOTYPES', '' diff --git a/Library/Formula/libass.rb b/Library/Formula/libass.rb index 677b827f7..a358289fc 100644 --- a/Library/Formula/libass.rb +++ b/Library/Formula/libass.rb @@ -7,6 +7,7 @@ class Libass < Formula    depends_on 'pkg-config' => :build    depends_on 'fribidi' +  depends_on :x11    def install      system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" diff --git a/Library/Formula/libcaca.rb b/Library/Formula/libcaca.rb index ac66ac756..ff6a3e5e1 100644 --- a/Library/Formula/libcaca.rb +++ b/Library/Formula/libcaca.rb @@ -8,6 +8,7 @@ class Libcaca < Formula    depends_on 'pkg-config' => :build    depends_on 'imlib2' +  depends_on :x11    fails_with :llvm do      cause "Unsupported inline asm: input constraint with a matching output constraint of incompatible type" diff --git a/Library/Formula/libgaiagraphics.rb b/Library/Formula/libgaiagraphics.rb index 958eefa57..acc8abd54 100644 --- a/Library/Formula/libgaiagraphics.rb +++ b/Library/Formula/libgaiagraphics.rb @@ -7,13 +7,11 @@ class Libgaiagraphics < Formula    depends_on 'libgeotiff'    depends_on 'jpeg' - -  # Leopard's Cairo is too old.    depends_on 'cairo' if MacOS.leopard? +  depends_on :x11    def install -    system "./configure", "--disable-dependency-tracking", -                          "--prefix=#{prefix}" +    system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}"      system "make install"    end  end diff --git a/Library/Formula/libglade.rb b/Library/Formula/libglade.rb index 2ca71a9b6..3fad62670 100644 --- a/Library/Formula/libglade.rb +++ b/Library/Formula/libglade.rb @@ -7,6 +7,7 @@ class Libglade < Formula    depends_on 'libxml2'    depends_on 'gtk+' +  depends_on :x11    def install      ENV.append 'LDFLAGS', '-lgmodule-2.0' diff --git a/Library/Formula/libharu.rb b/Library/Formula/libharu.rb index 5b6440dbc..e18f491b1 100644 --- a/Library/Formula/libharu.rb +++ b/Library/Formula/libharu.rb @@ -5,6 +5,8 @@ class Libharu < Formula    url 'http://libharu.org/files/libharu-2.2.1.tar.bz2'    md5 '4febd7e677b1c5d54db59a608b84e79f' +  depends_on :libpng +    def patches      # Fixes compilation against LibPNG 1.5. Can be removed on next release.      # Based on a commit in the LibHaru repository which does not apply cleanly @@ -15,10 +17,11 @@ class Libharu < Formula    end    def install -    system "./configure", "--disable-debug", "--disable-dependency-tracking", +    system "./configure", "--disable-debug", +                          "--disable-dependency-tracking",                            "--prefix=#{prefix}", -                          # ENV.x11 doesn't get picked up -                          "--with-png=/usr/X11" +                          # libpng doesn't get picked up +                          "--with-png=#{MacOS.x11_prefix}"      system "make install"    end  end diff --git a/Library/Formula/libicns.rb b/Library/Formula/libicns.rb index b3951e27b..0ec86aea6 100644 --- a/Library/Formula/libicns.rb +++ b/Library/Formula/libicns.rb @@ -6,12 +6,12 @@ class Libicns < Formula    sha256 '335f10782fc79855cf02beac4926c4bf9f800a742445afbbf7729dab384555c2'    depends_on 'jasper' +  depends_on :libpng    def install      # Fix for libpng 1.5 on Lion, may not be needed in head version of libicns      inreplace 'icnsutils/png2icns.c', 'png_set_gray_1_2_4_to_8', 'png_set_expand_gray_1_2_4_to_8' -    ENV.libpng      ENV.universal_binary # Also build 32-bit so Wine can use it      system "./configure", "--disable-debug", "--disable-dependency-tracking", diff --git a/Library/Formula/libkate.rb b/Library/Formula/libkate.rb index d8eb6cb9f..eeebd41b9 100644 --- a/Library/Formula/libkate.rb +++ b/Library/Formula/libkate.rb @@ -5,6 +5,7 @@ class Libkate < Formula    url 'http://libkate.googlecode.com/files/libkate-0.4.1.tar.gz'    sha1 '87fd8baaddb7120fb4d20b0a0437e44ea8b6c9d8' +  depends_on :libpng    depends_on 'libogg' => :recommended    fails_with :gcc do @@ -13,7 +14,6 @@ class Libkate < Formula    end    def install -    ENV.libpng      system "./configure", "--disable-debug",                            "--disable-dependency-tracking",                            "--prefix=#{prefix}" diff --git a/Library/Formula/libmikmod.rb b/Library/Formula/libmikmod.rb index a17aade68..f5ce600b4 100644 --- a/Library/Formula/libmikmod.rb +++ b/Library/Formula/libmikmod.rb @@ -5,12 +5,13 @@ class Libmikmod < Formula    url 'http://mikmod.shlomifish.org/files/libmikmod-3.2.0b4.tar.gz'    sha256 'da0c4fcfc5ca15c653baeb62b8cf91b35cfa11c1081a1aacc1e443a7d35db870' +  depends_on :x11 +    def options      [[ '--with-debug', 'Enable debugging symbols']]    end    def install -    ENV.x11      if ARGV.include? '--with-debug' then        (ENV.compiler == :clang) ? ENV.Og : ENV.O2      end diff --git a/Library/Formula/libming.rb b/Library/Formula/libming.rb index abeed9d87..de0fbb0d5 100644 --- a/Library/Formula/libming.rb +++ b/Library/Formula/libming.rb @@ -5,9 +5,9 @@ class Libming < Formula    md5 'db6bae65d000e2f2ac78583fd453f99a'    homepage 'http://www.libming.org' -  def install -    ENV.x11 # For PNG support. +  depends_on :libpng +  def install      # TODO: Libming also includes scripting front-ends for Perl, Python, TCL      # and PHP.  These are disabled by default.  Figure out what it would take to      # enable them. diff --git a/Library/Formula/libpano.rb b/Library/Formula/libpano.rb index 67f0acc70..0540c30c3 100644 --- a/Library/Formula/libpano.rb +++ b/Library/Formula/libpano.rb @@ -6,11 +6,11 @@ class Libpano < Formula    homepage 'http://panotools.sourceforge.net/'    md5 '9c3a4fce8b6f1d79e395896ce5d8776e' +  depends_on :libpng    depends_on 'jpeg'    depends_on 'libtiff'    def install -    ENV.x11 # for libpng      system "./configure", "--disable-debug", "--disable-dependency-tracking",                            "--prefix=#{prefix}",                            "--mandir=#{man}" diff --git a/Library/Formula/librasterlite.rb b/Library/Formula/librasterlite.rb index 2a7682c07..3b7fdf867 100644 --- a/Library/Formula/librasterlite.rb +++ b/Library/Formula/librasterlite.rb @@ -5,11 +5,11 @@ class Librasterlite < Formula    url 'http://www.gaia-gis.it/gaia-sins/librasterlite-sources/librasterlite-1.1c.tar.gz'    sha1 'c54f38ef2974bc92410e2c2196088af14bd9c21a' +  depends_on :x11    depends_on "libgeotiff"    depends_on "libspatialite"    def install -    ENV.x11 # For image format libraries      # Ensure Homebrew SQLite libraries are found before the system SQLite      ENV.append 'LDFLAGS', "-L#{HOMEBREW_PREFIX}/lib"      system "./configure", "--disable-dependency-tracking", diff --git a/Library/Formula/librsvg.rb b/Library/Formula/librsvg.rb index 961185f03..786446a1d 100644 --- a/Library/Formula/librsvg.rb +++ b/Library/Formula/librsvg.rb @@ -8,6 +8,7 @@ class Librsvg < Formula    depends_on 'pkg-config' => :build    depends_on 'gtk+'    depends_on 'libcroco' +  depends_on :x11    def install      system "./configure", "--disable-dependency-tracking", diff --git a/Library/Formula/libsvg-cairo.rb b/Library/Formula/libsvg-cairo.rb index 686097686..18aedbc99 100644 --- a/Library/Formula/libsvg-cairo.rb +++ b/Library/Formula/libsvg-cairo.rb @@ -8,6 +8,7 @@ class LibsvgCairo < Formula    depends_on 'pkg-config' => :build    depends_on 'libsvg'    depends_on 'cairo' if MacOS.leopard? +  depends_on :x11    def install      system "./configure", "--disable-dependency-tracking", "--disable-debug", "--prefix=#{prefix}" diff --git a/Library/Formula/libsvg.rb b/Library/Formula/libsvg.rb index a7567084c..6060ea672 100644 --- a/Library/Formula/libsvg.rb +++ b/Library/Formula/libsvg.rb @@ -5,10 +5,10 @@ class Libsvg < Formula    homepage 'http://cairographics.org/'    md5 'ce0715e3013f78506795fba16e8455d3' +  depends_on :libpng    depends_on 'jpeg'    def install -    ENV.x11 # for libpng      system "./configure", "--prefix=#{prefix}"      system "make install"    end diff --git a/Library/Formula/libtiff.rb b/Library/Formula/libtiff.rb index f0a6a7fb3..06d55a7f2 100644 --- a/Library/Formula/libtiff.rb +++ b/Library/Formula/libtiff.rb @@ -5,12 +5,13 @@ class Libtiff < Formula    url 'http://download.osgeo.org/libtiff/tiff-4.0.1.tar.gz'    sha256 '9a7a039e516c37478038740f1642818250bfb1414cf404cc8b569e5f9d4bf2f0' +  depends_on :x11 +    def options      [["--universal", "Builds a universal binary"]]    end    def install -    ENV.x11 # Needed to pick up GL/gL.h, otherwise compile error.      ENV.universal_binary if ARGV.build_universal?      system "./configure", "--disable-dependency-tracking",                            "--prefix=#{prefix}" diff --git a/Library/Formula/libwmf.rb b/Library/Formula/libwmf.rb index ba8cc6e52..86d9c7b6c 100644 --- a/Library/Formula/libwmf.rb +++ b/Library/Formula/libwmf.rb @@ -7,12 +7,12 @@ class Libwmf < Formula    depends_on 'pkg-config' => :build    depends_on 'gd' +  depends_on :libpng    def install -    ENV.libpng      system "./configure", "--disable-debug", "--disable-dependency-tracking",                            "--prefix=#{prefix}", -                          "--with-freetype=/usr/X11" +                          "--with-freetype=#{MacOS.x11_prefix}"      system "make"      ENV.j1 # yet another rubbish Makefile      system "make install" diff --git a/Library/Formula/logstalgia.rb b/Library/Formula/logstalgia.rb index 4bada4a68..d07010ec2 100644 --- a/Library/Formula/logstalgia.rb +++ b/Library/Formula/logstalgia.rb @@ -12,6 +12,7 @@ class Logstalgia < Formula    depends_on 'ftgl'    depends_on 'jpeg'    depends_on 'pcre' +  depends_on :x11    if ARGV.build_head? and MacOS.xcode_version >= "4.3"      depends_on "automake" => :build @@ -20,8 +21,6 @@ class Logstalgia < Formula    def install -    ENV.x11 # Put freetype-config in path -      # For non-/usr/local installs      ENV.append "CXXFLAGS", "-I#{HOMEBREW_PREFIX}/include" diff --git a/Library/Formula/mapnik.rb b/Library/Formula/mapnik.rb index c33f3459d..0b467bc78 100644 --- a/Library/Formula/mapnik.rb +++ b/Library/Formula/mapnik.rb @@ -13,6 +13,7 @@ class Mapnik < Formula    depends_on 'icu4c'    depends_on 'boost'    depends_on 'cairomm' => :optional +  depends_on :x11    # Reported upstream: https://github.com/mapnik/mapnik/issues/1171    # Fix is in head.  Remove at 2.0.2. @@ -21,8 +22,6 @@ class Mapnik < Formula    end    def install -    ENV.x11 # for freetype-config -      icu = Formula.factory("icu4c")      # mapnik compiles can take ~1.5 GB per job for some .cpp files      # so lets be cautious by limiting to CPUS/2 diff --git a/Library/Formula/mapserver.rb b/Library/Formula/mapserver.rb index d9c3c4e58..f27dae923 100644 --- a/Library/Formula/mapserver.rb +++ b/Library/Formula/mapserver.rb @@ -5,6 +5,7 @@ class Mapserver < Formula    url 'http://download.osgeo.org/mapserver/mapserver-6.0.2.tar.gz'    md5 'd831c905b1b0df7ac09a80c3f9387374' +  depends_on :x11    depends_on 'gd'    depends_on 'proj'    depends_on 'gdal' @@ -28,7 +29,7 @@ class Mapserver < Formula        "--with-proj",        "--with-gdal",        "--with-ogr", -      "--with-png=/usr/X11" +      "--with-png=#{MacOS.x11_prefix}"      ]      args.push "--with-geos" if ARGV.include? '--with-geos' @@ -56,7 +57,6 @@ class Mapserver < Formula    end    def install -    ENV.x11      system "./configure", *configure_args      system "make"      bin.install %w(mapserv shp2img legend shptree shptreevis diff --git a/Library/Formula/mathgl.rb b/Library/Formula/mathgl.rb index c9a78096d..2b79003af 100644 --- a/Library/Formula/mathgl.rb +++ b/Library/Formula/mathgl.rb @@ -6,9 +6,9 @@ class Mathgl < Formula    md5 'acd33e68911d9506f60d769dce23f95e'    depends_on 'gsl' +  depends_on :x11    def install -    ENV.x11      ENV['LIBS'] = '-lz'      # Fixed upstream: this line can be removed when v2 is released diff --git a/Library/Formula/meld.rb b/Library/Formula/meld.rb index feb91039f..0ac31b578 100644 --- a/Library/Formula/meld.rb +++ b/Library/Formula/meld.rb @@ -7,6 +7,7 @@ class Meld < Formula    depends_on 'intltool' => :build    depends_on 'xz' => :build +  depends_on :x11    depends_on 'pygtk'    depends_on 'pygobject'    depends_on 'rarian' diff --git a/Library/Formula/mesalib-glw.rb b/Library/Formula/mesalib-glw.rb index 5d218177e..aba6160af 100644 --- a/Library/Formula/mesalib-glw.rb +++ b/Library/Formula/mesalib-glw.rb @@ -5,6 +5,8 @@ class MesalibGlw < Formula    homepage 'http://www.mesa3d.org'    md5 '81a2a4b7cbfce7553f7ad8d924edbe2f' +  depends_on :x11 +    def options      [        ['--enable-static', "build static library"] @@ -28,7 +30,7 @@ class MesalibGlw < Formula      inreplace 'configs/autoconf' do |s|        s.gsub! /.so/, '.dylib'        s.gsub! /SRC_DIRS = mesa glw/, 'SRC_DIRS = glw' -      s.gsub! /-L\$\(TOP\)\/\$\(LIB_DIR\)/, '-L/usr/X11/lib' +      s.gsub! /-L\$\(TOP\)\/\$\(LIB_DIR\)/, "-L#{MacOS.x11_prefix}/lib"      end      inreplace 'src/glw/Makefile' do |s| diff --git a/Library/Formula/mjpegtools.rb b/Library/Formula/mjpegtools.rb index 3beb3981a..8d0c6df0d 100644 --- a/Library/Formula/mjpegtools.rb +++ b/Library/Formula/mjpegtools.rb @@ -7,6 +7,7 @@ class Mjpegtools < Formula    depends_on 'pkg-config' => :build    depends_on 'jpeg' +  depends_on :x11    depends_on 'libquicktime' => :optional    depends_on 'libdv' => :optional    depends_on 'gtk+' => :optional @@ -28,7 +29,6 @@ class Mjpegtools < Formula    end    def install -    ENV.x11      args = ["--disable-dependency-tracking",              "--enable-simd-accel",              "--prefix=#{prefix}"] diff --git a/Library/Formula/mldonkey.rb b/Library/Formula/mldonkey.rb index 5b3c22385..e0304cf9b 100644 --- a/Library/Formula/mldonkey.rb +++ b/Library/Formula/mldonkey.rb @@ -6,6 +6,7 @@ class Mldonkey < Formula    sha1 'be8c261e2fbd365dd3866af15a854b074fbc59c1'    depends_on 'objective-caml' +  depends_on :libpng    if ARGV.include? "--with-x"      depends_on 'librsvg' @@ -26,8 +27,6 @@ class Mldonkey < Formula    end    def install -    ENV.libpng -      # Fix compiler selection      ENV['OCAMLC'] = "#{HOMEBREW_PREFIX}/bin/ocamlc.opt -cc #{ENV.cc}" diff --git a/Library/Formula/mupdf.rb b/Library/Formula/mupdf.rb index 881cc0948..e6a638a4a 100644 --- a/Library/Formula/mupdf.rb +++ b/Library/Formula/mupdf.rb @@ -29,6 +29,7 @@ class Mupdf < Formula    depends_on 'jpeg'    depends_on 'openjpeg'    depends_on 'jbig2dec' +  depends_on :x11 # libpng, freetype    def patches      # Fix up the Makefile so it doesn't mess with our CFLAGS. @@ -36,7 +37,6 @@ class Mupdf < Formula    end    def install -    ENV.x11 # For LibPNG and Freetype      system "make", "install", "prefix=#{prefix}"    end  end diff --git a/Library/Formula/nagios.rb b/Library/Formula/nagios.rb index e309e9eb5..771e23ee1 100644 --- a/Library/Formula/nagios.rb +++ b/Library/Formula/nagios.rb @@ -7,6 +7,7 @@ class Nagios < Formula    depends_on 'gd'    depends_on 'nagios-plugins' +  depends_on :x11 # Required to compile some CGI's against the build-in libpng.    def nagios_sbin;  prefix+'cgi-bin';       end    def nagios_etc;   etc+'nagios';           end @@ -16,7 +17,6 @@ class Nagios < Formula    def group;        `id -gn`.chomp;         end    def install -    ENV.x11 # Required to compile some CGI's against the build-in libpng.      system "./configure", "--disable-debug",                            "--disable-dependency-tracking",                            "--prefix=#{prefix}", diff --git a/Library/Formula/ncview.rb b/Library/Formula/ncview.rb index 1e4dd9af9..faf66e1b3 100644 --- a/Library/Formula/ncview.rb +++ b/Library/Formula/ncview.rb @@ -5,6 +5,7 @@ class Ncview < Formula    homepage 'http://meteora.ucsd.edu/~pierce/ncview_home_page.html'    md5 '34e25f5949af342a1783542799f51bed' +  depends_on :x11    depends_on "netcdf"    # Disable a block in configure that tries to pass an RPATH to the compiler. @@ -14,8 +15,6 @@ class Ncview < Formula    end    def install -    ENV.x11 # For GUI and libpng. -      system "./configure", "--prefix=#{prefix}",                            "--disable-dependency-tracking"      system "make install" diff --git a/Library/Formula/netpbm.rb b/Library/Formula/netpbm.rb index dcaa711b8..4134a0ed4 100644 --- a/Library/Formula/netpbm.rb +++ b/Library/Formula/netpbm.rb @@ -9,10 +9,9 @@ class Netpbm < Formula    depends_on "libtiff"    depends_on "jasper" +  depends_on :libpng    def install -    ENV.x11 # For PNG -      if ARGV.build_head?        system "cp", "config.mk.in", "config.mk"        config = "config.mk" diff --git a/Library/Formula/octave.rb b/Library/Formula/octave.rb index 2fd3767e2..9f9055302 100644 --- a/Library/Formula/octave.rb +++ b/Library/Formula/octave.rb @@ -27,6 +27,7 @@ class Octave < Formula    depends_on 'gnu-sed' => :build    depends_on 'texinfo' => :build     # OS X's makeinfo won't work for this +  depends_on :x11    depends_on 'fftw'    # When building 64-bit binaries on Snow Leopard, there are naming issues with    # the dot product functions in the BLAS library provided by Apple's @@ -69,7 +70,6 @@ class Octave < Formula      # build time with -O3: user 58m58.054s  sys 7m52.221s      ENV.m64 if MacOS.prefer_64_bit?      ENV.append_to_cflags "-D_REENTRANT" -    ENV.x11      args = [        "--disable-dependency-tracking", diff --git a/Library/Formula/openjpeg.rb b/Library/Formula/openjpeg.rb index e301d985f..543ab7d9a 100644 --- a/Library/Formula/openjpeg.rb +++ b/Library/Formula/openjpeg.rb @@ -9,9 +9,9 @@ class Openjpeg < Formula    depends_on 'little-cms2'    depends_on 'libtiff' +  depends_on :libpng    def install -    ENV.x11  # So it can find libpng      system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}"      system "make install"    end diff --git a/Library/Formula/pango.rb b/Library/Formula/pango.rb index 61b6602ac..d1ad7736b 100644 --- a/Library/Formula/pango.rb +++ b/Library/Formula/pango.rb @@ -8,6 +8,7 @@ class Pango < Formula    depends_on 'pkg-config' => :build    depends_on 'xz' => :build    depends_on 'glib' +  depends_on :x11    if MacOS.leopard?      depends_on 'fontconfig' # Leopard's fontconfig is too old. @@ -26,7 +27,6 @@ class Pango < Formula    end    def install -    ENV.x11      system "./configure", "--disable-dependency-tracking",                            "--disable-debug",                            "--prefix=#{prefix}", diff --git a/Library/Formula/pangomm.rb b/Library/Formula/pangomm.rb index f06853a0f..817355120 100644 --- a/Library/Formula/pangomm.rb +++ b/Library/Formula/pangomm.rb @@ -9,6 +9,7 @@ class Pangomm < Formula    depends_on 'pango'    depends_on 'glibmm'    depends_on 'cairomm' +  depends_on :x11    def install      system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" diff --git a/Library/Formula/pcb.rb b/Library/Formula/pcb.rb index c420fd2d9..7b45f2541 100644 --- a/Library/Formula/pcb.rb +++ b/Library/Formula/pcb.rb @@ -16,6 +16,7 @@ class Pcb < Formula    depends_on 'gd'    depends_on 'glib'    depends_on 'gtkglext' +  depends_on :x11    # See comments in intltool formula    depends_on 'XML::Parser' => :perl @@ -25,8 +26,6 @@ class Pcb < Formula    end    def install -    ENV.x11 -      system "./autogen.sh" if ARGV.build_head?      system "./configure", "--disable-debug", "--disable-dependency-tracking", diff --git a/Library/Formula/pdf2image.rb b/Library/Formula/pdf2image.rb index 9667e6896..95a7587de 100644 --- a/Library/Formula/pdf2image.rb +++ b/Library/Formula/pdf2image.rb @@ -5,6 +5,8 @@ class Pdf2image < Formula    url 'http://pdf2image.googlecode.com/files/pdf2image-0.53-source.tar.gz'    md5 'df9614aa45284d2aa4c6e2596062eeb7' +  depends_on :x11 +    def install      system "./configure", "--prefix=#{prefix}" @@ -12,9 +14,8 @@ class Pdf2image < Formula      # http://code.google.com/p/pdf2json/issues/detail?id=2      inreplace "Makefile", "/man/", "/share/man/" -    # Add X11 libs manually; the Makefiles don't use LDFLAGS properly, so ENV.x11 doesn't work -    # - @adamv -    inreplace ["src/Makefile", "xpdf/Makefile"], "LDFLAGS =", "LDFLAGS=-L/usr/X11/lib" +    # Add X11 libs manually; the Makefiles don't use LDFLAGS properly +    inreplace ["src/Makefile", "xpdf/Makefile"], "LDFLAGS =", "LDFLAGS=-L#{MacOS.x11_prefix}/lib"      system "make"      system "make install" diff --git a/Library/Formula/pdf2svg.rb b/Library/Formula/pdf2svg.rb index f1cd119da..ad907ac35 100644 --- a/Library/Formula/pdf2svg.rb +++ b/Library/Formula/pdf2svg.rb @@ -25,20 +25,18 @@ class Pdf2svg < Formula    depends_on "pkg-config" => :build +  depends_on :x11    depends_on "poppler"    depends_on PopplerGlib.new    depends_on "gtk+"    depends_on "cairo" # Poppler-glib needs a newer cairo than provided by OS X 10.6.x                       # and pdf2svg needs it to be on PKG_CONFIG_PATH during the build -    def patches      # fix call to poppler to render normal thickness lines in firefox      DATA    end    def install -    ENV.x11 -      system "./configure", "--prefix=#{prefix}", "--disable-debug", "--disable-dependency-tracking"      system "make install"    end diff --git a/Library/Formula/pil.rb b/Library/Formula/pil.rb index 96f363dc1..607625901 100644 --- a/Library/Formula/pil.rb +++ b/Library/Formula/pil.rb @@ -5,6 +5,7 @@ class Pil < Formula    homepage 'http://www.pythonware.com/products/pil/'    md5 'fc14a54e1ce02a0225be8854bfba478e' +  depends_on :x11    depends_on 'jpeg' => :recommended    depends_on 'little-cms' => :optional @@ -21,10 +22,10 @@ class Pil < Formula      inreplace "setup.py" do |s|        # Tell setup where Freetype2 is on 10.5/10.6        s.gsub! 'add_directory(include_dirs, "/sw/include/freetype2")', -              'add_directory(include_dirs, "/usr/X11/include")' +              'add_directory(include_dirs, "#{MacOS.x11_prefix}/include")'        s.gsub! 'add_directory(include_dirs, "/sw/lib/freetype2/include")', -              'add_directory(library_dirs, "/usr/X11/lib")' +              'add_directory(library_dirs, "#{MacOS.x11_prefix}/lib")'        # Tell setup where our stuff is        s.gsub! 'add_directory(library_dirs, "/sw/lib")', diff --git a/Library/Formula/pixie.rb b/Library/Formula/pixie.rb index ff7897db6..8f4a2adda 100644 --- a/Library/Formula/pixie.rb +++ b/Library/Formula/pixie.rb @@ -8,12 +8,12 @@ class Pixie < Formula    depends_on 'libtiff'    depends_on 'fltk'    depends_on 'openexr' +  depends_on :libpng    def install      openexr = Formula.factory('openexr')      ilmbase = Formula.factory('ilmbase') -    ENV.x11 # For libpng      ENV.append "CPPFLAGS", "-I#{openexr.include}/OpenEXR -I#{ilmbase.include}/OpenEXR"      ENV.append "LDFLAGS",  "-L#{openexr.lib} -L#{ilmbase.lib}"      system "./configure", "--disable-dependency-tracking", diff --git a/Library/Formula/pixman.rb b/Library/Formula/pixman.rb index a302d4bae..a7710608a 100644 --- a/Library/Formula/pixman.rb +++ b/Library/Formula/pixman.rb @@ -6,6 +6,7 @@ class Pixman < Formula    sha1 'efaa09789128ebc42d17a11d2e350b7217a7cd05'    depends_on 'pkg-config' => :build +  depends_on :x11    fails_with :llvm do      build 2336 @@ -21,7 +22,6 @@ class Pixman < Formula    end    def install -    ENV.x11      ENV.universal_binary if ARGV.build_universal?      # Disable gtk as it is only used to build tests diff --git a/Library/Formula/plotutils.rb b/Library/Formula/plotutils.rb index 71ecc94af..224fa8297 100644 --- a/Library/Formula/plotutils.rb +++ b/Library/Formula/plotutils.rb @@ -6,9 +6,9 @@ class Plotutils < Formula    homepage 'http://www.gnu.org/software/plotutils/'    md5 'c08a424bd2438c80a786a7f4b5bb6a40' -  def install -    ENV.x11 # enable libpng support +  depends_on :libpng +  def install      # Fix usage of libpng to be 1.5 compatible      inreplace 'libplot/z_write.c', 'png_ptr->jmpbuf', 'png_jmpbuf (png_ptr)' diff --git a/Library/Formula/png2ico.rb b/Library/Formula/png2ico.rb index 73dd9632b..80af78361 100644 --- a/Library/Formula/png2ico.rb +++ b/Library/Formula/png2ico.rb @@ -5,8 +5,9 @@ class Png2ico < Formula    url 'http://www.winterdrache.de/freeware/png2ico/data/png2ico-src-2002-12-08.tar.gz'    md5 '9b663df81c826cd564638cba2e6bc75b' +  depends_on :libpng +    def install -    ENV.libpng      inreplace 'Makefile', 'g++', '$(CXX)'      system "make", "CPPFLAGS=#{ENV.cxxflags} #{ENV.cppflags} #{ENV.ldflags}"      bin.install 'png2ico' diff --git a/Library/Formula/pngnq.rb b/Library/Formula/pngnq.rb index e1640a9b5..5502dcbdc 100644 --- a/Library/Formula/pngnq.rb +++ b/Library/Formula/pngnq.rb @@ -6,6 +6,7 @@ class Pngnq < Formula    md5 'fdbb94d504931b50c54202b62f98aa44'    depends_on 'pkg-config' => :build +  depends_on :libpng    # Fixes compilation on OSX Lion    # png.h on Lion does not, in fact, include zlib.h @@ -16,7 +17,6 @@ class Pngnq < Formula    end    def install -    ENV.x11 # for libpng      system "./configure", "--disable-dependency-tracking",                            "--prefix=#{prefix}"      system "make install" diff --git a/Library/Formula/pngrewrite.rb b/Library/Formula/pngrewrite.rb index 304063002..3b2ccc6c5 100644 --- a/Library/Formula/pngrewrite.rb +++ b/Library/Formula/pngrewrite.rb @@ -5,8 +5,9 @@ class Pngrewrite < Formula    homepage 'http://entropymine.com/jason/pngrewrite/'    md5 '37216932d12bf9b47dca1f45724080d6' +  depends_on :libpng +    def install -    ENV.libpng      system "#{ENV.cc} #{ENV.cflags} #{ENV.cppflags} -o pngrewrite pngrewrite.c #{ENV.ldflags} -lpng"      bin.install 'pngrewrite'    end diff --git a/Library/Formula/podofo.rb b/Library/Formula/podofo.rb index 2bbf7fe39..793fe3f65 100644 --- a/Library/Formula/podofo.rb +++ b/Library/Formula/podofo.rb @@ -8,13 +8,12 @@ class Podofo < Formula    depends_on 'pkg-config' => :build    depends_on 'cmake' => :build +  depends_on :x11    depends_on 'jpeg'    depends_on 'libtiff'    depends_on 'lua'    def install -    ENV.x11 # For Freetype and Fontconfig -      mkdir 'build' do        # Build shared to simplify linking for other programs.        system "cmake", "..", diff --git a/Library/Formula/poppler.rb b/Library/Formula/poppler.rb index db1f2f8f1..9aca1f9cc 100644 --- a/Library/Formula/poppler.rb +++ b/Library/Formula/poppler.rb @@ -17,6 +17,7 @@ class Poppler < Formula    depends_on 'qt' if qt?    depends_on 'glib' if glib?    depends_on 'cairo' if glib? # Needs a newer Cairo build than OS X 10.6.7 provides +  depends_on :x11 # Fontconfig headers    def options      [ @@ -26,8 +27,6 @@ class Poppler < Formula    end    def install -    ENV.x11 # For Fontconfig headers -      if qt?        ENV['POPPLER_QT4_CFLAGS'] = `#{HOMEBREW_PREFIX}/bin/pkg-config QtCore QtGui --libs`.chomp        ENV.append 'LDFLAGS', "-Wl,-F#{HOMEBREW_PREFIX}/lib" diff --git a/Library/Formula/py2cairo.rb b/Library/Formula/py2cairo.rb index 1d6d445a5..93bbdf30c 100644 --- a/Library/Formula/py2cairo.rb +++ b/Library/Formula/py2cairo.rb @@ -6,6 +6,7 @@ class Py2cairo < Formula    md5 '20337132c4ab06c1146ad384d55372c5'    depends_on 'cairo' +  depends_on :x11    def options      [['--universal', 'Build universal binaries']] diff --git a/Library/Formula/qrencode.rb b/Library/Formula/qrencode.rb index bb6c94f3e..1bf0b2b87 100644 --- a/Library/Formula/qrencode.rb +++ b/Library/Formula/qrencode.rb @@ -6,9 +6,9 @@ class Qrencode < Formula    sha1 'a5a99f47f4215ec17e74999fdb893a4e542f790c'    depends_on 'pkg-config' => :build +  depends_on :libpng    def install -    ENV.x11 # For libpng      system "./configure", "--disable-dependency-tracking",                            "--prefix=#{prefix}"      system "make" diff --git a/Library/Formula/qt.rb b/Library/Formula/qt.rb index 399b2012b..f156ef977 100644 --- a/Library/Formula/qt.rb +++ b/Library/Formula/qt.rb @@ -12,6 +12,8 @@ class Qt < Formula    head 'git://gitorious.org/qt/qt.git', :branch => 'master' +  depends_on :x11 +    fails_with :clang do      build 318    end @@ -39,11 +41,10 @@ class Qt < Formula    end    def install -    ENV.x11      ENV.append "CXXFLAGS", "-fvisibility=hidden"      args = ["-prefix", prefix,              "-system-libpng", "-system-zlib", -            "-L/usr/X11/lib", "-I/usr/X11/include", +            "-L#{MacOS.x11_prefix}/lib", "-I#{MacOS.x11_prefix}/include",              "-confirm-license", "-opensource",              "-cocoa", "-fast" ] diff --git a/Library/Formula/r.rb b/Library/Formula/r.rb index 9eb91dad6..24ee781bd 100644 --- a/Library/Formula/r.rb +++ b/Library/Formula/r.rb @@ -19,6 +19,7 @@ class R < Formula    depends_on 'readline'    depends_on 'libtiff'    depends_on 'jpeg' +  depends_on :x11    depends_on 'valgrind' if valgrind? @@ -31,7 +32,6 @@ class R < Formula    def install      ENV.Og if valgrind?      ENV.fortran -    ENV.x11 # So PNG gets added to the x11 and cairo plotting devices      args = [        "--prefix=#{prefix}", diff --git a/Library/Formula/rdesktop.rb b/Library/Formula/rdesktop.rb index ff1834a99..2042d9b81 100644 --- a/Library/Formula/rdesktop.rb +++ b/Library/Formula/rdesktop.rb @@ -5,8 +5,9 @@ class Rdesktop < Formula    homepage 'http://www.rdesktop.org/'    md5 'c4b39115951c4a6d74f511c99b18fcf9' +  depends_on :x11 +    def install -    ENV.x11      system "./configure", "--prefix=#{prefix}", "--disable-debug"      system "make install"    end diff --git a/Library/Formula/rrdtool.rb b/Library/Formula/rrdtool.rb index 775021d2f..533959d39 100644 --- a/Library/Formula/rrdtool.rb +++ b/Library/Formula/rrdtool.rb @@ -11,6 +11,7 @@ class Rrdtool < Formula    depends_on 'intltool'    depends_on 'expat'    depends_on 'pango' +  depends_on :x11    # Can use lua if it is found, but don't force users to install    depends_on 'lua' => :optional if ARGV.include? "--lua" @@ -24,7 +25,6 @@ class Rrdtool < Formula    def install      ENV.libxml2 -    ENV.x11      which_perl = which 'perl'      which_ruby = which 'ruby' diff --git a/Library/Formula/s-lang.rb b/Library/Formula/s-lang.rb index d67db475d..656f7b15b 100644 --- a/Library/Formula/s-lang.rb +++ b/Library/Formula/s-lang.rb @@ -5,12 +5,13 @@ class SLang < Formula    homepage 'http://www.jedsoft.org/slang/'    md5 '7fcfd447e378f07dd0c0bae671fe6487' +  depends_on :x11    depends_on 'pcre' => :optional    depends_on 'oniguruma' => :optional    def install      system "./configure", "--prefix=#{prefix}", -                          "--with-png=/usr/X11" +                          "--with-png=#{MacOS.x11_prefix}"      ENV.j1      system "make"      system "make install" diff --git a/Library/Formula/scantailor.rb b/Library/Formula/scantailor.rb index 8cc61f266..b1646c930 100644 --- a/Library/Formula/scantailor.rb +++ b/Library/Formula/scantailor.rb @@ -16,6 +16,7 @@ class Scantailor < Formula    depends_on 'boost'    depends_on 'jpeg'    depends_on 'libtiff' +  depends_on :x11    fails_with :clang do      build 318 @@ -23,7 +24,7 @@ class Scantailor < Formula    end    def install -    system "cmake", ".", "-DPNG_INCLUDE_DIR=/usr/X11/include", *std_cmake_args +    system "cmake", ".", "-DPNG_INCLUDE_DIR=#{MacOS.x11_prefix}/include", *std_cmake_args      system "make install"    end  end diff --git a/Library/Formula/scummvm.rb b/Library/Formula/scummvm.rb index 388dc09ad..5444b31df 100644 --- a/Library/Formula/scummvm.rb +++ b/Library/Formula/scummvm.rb @@ -6,13 +6,13 @@ class Scummvm < Formula    md5 'aa094c2224aad22d5340a1d2d919c883'    depends_on 'sdl' +  depends_on :libpng    depends_on 'flac' => :recommended    depends_on 'libvorbis' => :recommended    depends_on 'libogg' => :recommended    depends_on 'fluid-synth' => :optional    def install -    ENV.libpng      system "./configure", "--prefix=#{prefix}", "--disable-debug"      system "make"      system "make install" diff --git a/Library/Formula/sdl.rb b/Library/Formula/sdl.rb index 055aec1b5..2792723ac 100644 --- a/Library/Formula/sdl.rb +++ b/Library/Formula/sdl.rb @@ -7,6 +7,8 @@ class Sdl < Formula    head 'http://hg.libsdl.org/SDL', :using => :hg +  depends_on :x11 +    if ARGV.build_head? and MacOS.xcode_version >= "4.3"      depends_on "automake" => :build      depends_on "libtool" => :build @@ -24,8 +26,6 @@ class Sdl < Formula      ENV.universal_binary if ARGV.build_universal? -    # Sdl assumes X11 is present on UNIX -    ENV.x11      system "./autogen.sh" if ARGV.build_head?      args = %W[--prefix=#{prefix} --disable-nasm] diff --git a/Library/Formula/sdl_image.rb b/Library/Formula/sdl_image.rb index 6e412c7cf..af45b55cf 100644 --- a/Library/Formula/sdl_image.rb +++ b/Library/Formula/sdl_image.rb @@ -6,6 +6,7 @@ class SdlImage < Formula    md5 '6c06584b31559e2b59f2b982d0d1f628'    depends_on 'sdl' +  depends_on :x11 # for Freetype    def options      [['--universal', 'Build universal binaries.']] @@ -13,13 +14,12 @@ class SdlImage < Formula    def install      ENV.universal_binary if ARGV.build_universal? -    ENV.x11 # For Freetype      inreplace 'SDL_image.pc.in', '@prefix@', HOMEBREW_PREFIX      system "./configure", "--prefix=#{prefix}",                            "--disable-dependency-tracking",                            "--disable-sdltest", -                          "--with-freetype-exec-prefix=/usr/X11" +                          "--with-freetype-exec-prefix=#{MacOS.x11_prefix}"      system "make install"    end  end diff --git a/Library/Formula/sdl_rtf.rb b/Library/Formula/sdl_rtf.rb index 2947d92af..2a43cbe6c 100644 --- a/Library/Formula/sdl_rtf.rb +++ b/Library/Formula/sdl_rtf.rb @@ -9,10 +9,9 @@ class SdlRtf < Formula    depends_on 'sdl'    depends_on 'sdl_ttf' +  depends_on :x11    def install -    # Sdl assumes X11 is present on UNIX -    ENV.x11      system "./configure", "--prefix=#{prefix}"      system "make install"    end diff --git a/Library/Formula/sdl_ttf.rb b/Library/Formula/sdl_ttf.rb index eee49b900..11faa053d 100644 --- a/Library/Formula/sdl_ttf.rb +++ b/Library/Formula/sdl_ttf.rb @@ -6,6 +6,7 @@ class SdlTtf < Formula    md5 '6dd5a85e4924689a35a5fb1cb3336156'    depends_on 'sdl' +  depends_on :x11 # for Freetype    def options      [['--universal', 'Build universal binaries.']] @@ -13,12 +14,11 @@ class SdlTtf < Formula    def install      ENV.universal_binary if ARGV.build_universal? -    ENV.x11 # For Freetype      system "./configure", "--disable-debug", "--disable-dependency-tracking",                            "--prefix=#{prefix}",                            "--disable-sdltest", -                          "--with-freetype-exec-prefix=/usr/X11" +                          "--with-freetype-exec-prefix=#{MacOS.x11_prefix}"      system "make install"    end  end diff --git a/Library/Formula/sox.rb b/Library/Formula/sox.rb index 15a982d78..5eb70454d 100644 --- a/Library/Formula/sox.rb +++ b/Library/Formula/sox.rb @@ -6,15 +6,16 @@ class Sox < Formula    md5 'b0c15cff7a4ba0ec17fdc74e6a1f9cf1'    depends_on 'pkg-config' => :build +  depends_on :libpng +  depends_on 'mad'    depends_on 'libvorbis' => :optional    depends_on 'flac' => :optional    depends_on 'libsndfile' => :optional    depends_on 'libao' => :optional -  depends_on 'mad'    def install -    ENV.x11  # For libpng, used for the optional "spectrogram" effect. -    system "./configure", "--disable-debug", "--disable-dependency-tracking", +    system "./configure", "--disable-debug", +                          "--disable-dependency-tracking",                            "--prefix=#{prefix}",                            "--disable-gomp"      system "make install" diff --git a/Library/Formula/sqsh.rb b/Library/Formula/sqsh.rb index dfa6ea840..781f6ec7f 100644 --- a/Library/Formula/sqsh.rb +++ b/Library/Formula/sqsh.rb @@ -5,6 +5,7 @@ class Sqsh < Formula    homepage 'http://www.sqsh.org/'    md5 'ce929dc8e23cedccac98288d24785e2d' +  depends_on :x11    depends_on 'freetds'    depends_on 'readline' @@ -23,8 +24,8 @@ class Sqsh < Formula      if ARGV.include? "--with-x"        args << "--with-x" -      args << "--x-libraries=/usr/X11/lib" -      args << "--x-includes=/usr/X11/includes" +      args << "--x-libraries=#{MacOS.x11_prefix}/lib" +      args << "--x-includes=#{MacOS.x11_prefix}/includes"      end      ENV['SYBASE'] = Freetds.new("freetds").prefix diff --git a/Library/Formula/swftools.rb b/Library/Formula/swftools.rb index 7580773f3..0ff7a1e49 100644 --- a/Library/Formula/swftools.rb +++ b/Library/Formula/swftools.rb @@ -10,6 +10,7 @@ class Swftools < Formula    url 'http://www.swftools.org/swftools-0.9.2.tar.gz'    sha1 'd7cf8874c4187d2edd3e40d20ba325ca17b91973' +  depends_on :x11    depends_on 'jpeg'    depends_on 'lame'    depends_on 'giflib' @@ -24,7 +25,6 @@ class Swftools < Formula    end    def install -    ENV.x11 # Add to PATH for freetype-config on Snow Leopard      Xpdf.new.brew { (buildpath+'lib/pdf').install Dir['*'] }      system "./configure", "--prefix=#{prefix}"      system "make" diff --git a/Library/Formula/swi-prolog.rb b/Library/Formula/swi-prolog.rb index 64bb503c7..daab5d10e 100644 --- a/Library/Formula/swi-prolog.rb +++ b/Library/Formula/swi-prolog.rb @@ -12,6 +12,7 @@ class SwiProlog < Formula    depends_on 'jpeg'    depends_on 'mcrypt'    depends_on 'gawk' +  depends_on :x11 if x11_installed?    # 10.5 versions of these are too old    if MacOS.leopard? @@ -33,11 +34,9 @@ class SwiProlog < Formula      args = ["--prefix=#{prefix}", "--mandir=#{man}"]      ENV.append 'DISABLE_PKGS', "jpl" if ARGV.include? "--without-jpl" -    if x11_installed? +    unless x11_installed?        # SWI-Prolog requires X11 for XPCE -      ENV.x11 -    else -      opoo  "It appears that X11 is not installed. The XPCE packages will not be built." +      opoo "It appears that X11 is not installed. The XPCE packages will not be built."        ENV.append 'DISABLE_PKGS', "xpce"      end diff --git a/Library/Formula/synfig.rb b/Library/Formula/synfig.rb index 98084e179..298d1084b 100644 --- a/Library/Formula/synfig.rb +++ b/Library/Formula/synfig.rb @@ -13,10 +13,11 @@ class Synfig < Formula    depends_on 'libsigc++'    depends_on 'libxml++'    depends_on 'imagemagick' +  depends_on :libpng    def install -    ENV.libpng -    system "./configure", "--disable-debug", "--disable-dependency-tracking", +    system "./configure", "--disable-debug", +                          "--disable-dependency-tracking",                            "--prefix=#{prefix}"      system "make install"    end diff --git a/Library/Formula/tabbed.rb b/Library/Formula/tabbed.rb index f45f97100..8194d8fc7 100644 --- a/Library/Formula/tabbed.rb +++ b/Library/Formula/tabbed.rb @@ -6,8 +6,10 @@ class Tabbed < Formula    md5 '4a30458f9adc38db549f735b8fb6451b'    head 'http://hg.suckless.org/tabbed' +  depends_on :x11 +    def install -    inreplace 'config.mk', 'LIBS = -L/usr/lib -lc -lX11', 'LIBS = -L/usr/X11/lib -lc -lX11' +    inreplace 'config.mk', "LIBS = -L/usr/lib -lc -lX11', 'LIBS = -L#{MacOS.x11_prefix}/lib -lc -lX11"      inreplace 'tabbed.1', 'new surf-window.', 'new xterm-window.'      inreplace 'config.def.h',        '{ MODKEY|ShiftMask,             XK_Return, spawn,          { .v = (char*[]){ "surf", "-e", winid, NULL} } },', diff --git a/Library/Formula/thrift.rb b/Library/Formula/thrift.rb index 481fcbd7c..07520fc28 100644 --- a/Library/Formula/thrift.rb +++ b/Library/Formula/thrift.rb @@ -13,7 +13,7 @@ class Thrift < Formula      # No reason for this step is known. On Lion at least the pkg.m4 doesn't      # even exist. Turns out that it isn't needed on Lion either. Possibly it      # isn't needed anymore at all but I can't test that. -    cp "/usr/X11/share/aclocal/pkg.m4", "aclocal" if MACOS_VERSION < 10.7 +    cp "#{MacOS.x11_prefix}/share/aclocal/pkg.m4", "aclocal" if MACOS_VERSION < 10.7      system "./bootstrap.sh" if ARGV.build_head? diff --git a/Library/Formula/tiff2png.rb b/Library/Formula/tiff2png.rb index 8585c71ef..d7caae35d 100644 --- a/Library/Formula/tiff2png.rb +++ b/Library/Formula/tiff2png.rb @@ -5,6 +5,7 @@ class Tiff2png < Formula    url 'ftp://ftp.simplesystems.org/pub/libpng/png/applications/tiff2png/tiff2png-0.91.tar.gz'    md5 'b5db7add863c5cf469197aa327c0b202' +  depends_on :x11    depends_on 'libtiff'    depends_on 'jpeg' @@ -17,8 +18,8 @@ class Tiff2png < Formula                                           "LIBTIFF=#{HOMEBREW_PREFIX}/lib",                                           "TIFFINC=#{HOMEBREW_PREFIX}/include",                                           "LIBJPEG=#{HOMEBREW_PREFIX}/lib", -                                         "LIBPNG=/usr/X11/lib", -                                         "PNGINC=/usr/X11/include", +                                         "LIBPNG=#{MacOS.x11_prefix}/lib", +                                         "PNGINC=#{MacOS.x11_prefix}/include",                                           "ZLIB=/usr/lib",                                           "DEBUGFLAGS="      bin.install 'tiff2png' diff --git a/Library/Formula/vice.rb b/Library/Formula/vice.rb index 4956a5262..00c5e8d8a 100644 --- a/Library/Formula/vice.rb +++ b/Library/Formula/vice.rb @@ -6,6 +6,7 @@ class Vice < Formula    homepage 'http://vice-emu.sourceforge.net/'    depends_on 'jpeg' +  depends_on :libpng    def remove_unused_icons      Pathname.glob libexec+'*.app' do |d| @@ -22,8 +23,6 @@ class Vice < Formula    end    def install -    ENV.libpng -      # Use Cocoa instead of X      system "./configure", "--disable-debug", "--disable-dependency-tracking",                            "--prefix=#{prefix}", diff --git a/Library/Formula/vips.rb b/Library/Formula/vips.rb index 26f512057..a15e04768 100644 --- a/Library/Formula/vips.rb +++ b/Library/Formula/vips.rb @@ -6,6 +6,7 @@ class Vips < Formula    md5 '16429e3b82d869936312c0a35faaf5d0'    depends_on 'pkg-config' => :build +  depends_on :libpng    depends_on 'gettext'    depends_on 'glib'    depends_on 'jpeg' => :optional @@ -19,7 +20,6 @@ class Vips < Formula    depends_on 'openexr' => :optional    def install -    ENV.x11 # for libpng      system "./configure", "--prefix=#{prefix}"      system "make install"    end diff --git a/Library/Formula/vtk.rb b/Library/Formula/vtk.rb index ae6e06338..8dc517551 100644 --- a/Library/Formula/vtk.rb +++ b/Library/Formula/vtk.rb @@ -6,6 +6,7 @@ class Vtk < Formula    md5 '37b7297d02d647cc6ca95b38174cb41f'    depends_on 'cmake' => :build +  depends_on :x11    depends_on 'qt' if ARGV.include? '--qt'    def options @@ -62,9 +63,9 @@ class Vtk < Formula      args << "-DVTK_USE_COCOA:BOOL=ON" unless ARGV.include? "--x11"      if ARGV.include? '--x11' -      args << "-DOPENGL_INCLUDE_DIR:PATH='/usr/X11R6/include'" -      args << "-DOPENGL_gl_LIBRARY:FILEPATH='/usr/X11R6/lib/libGL.dylib'" -      args << "-DOPENGL_glu_LIBRARY:FILEPATH='/usr/X11R6/lib/libGLU.dylib" +      args << "-DOPENGL_INCLUDE_DIR:PATH='#{MacOS.x11_prefix}/include'" +      args << "-DOPENGL_gl_LIBRARY:FILEPATH='#{MacOS.x11_prefix}/lib/libGL.dylib'" +      args << "-DOPENGL_glu_LIBRARY:FILEPATH='#{MacOS.x11_prefix}/lib/libGLU.dylib"        args << "-DVTK_USE_COCOA:BOOL=OFF"        args << "-DVTK_USE_X:BOOL=ON"      end diff --git a/Library/Formula/webalizer.rb b/Library/Formula/webalizer.rb index 9ca502b0c..b8e95966a 100644 --- a/Library/Formula/webalizer.rb +++ b/Library/Formula/webalizer.rb @@ -8,10 +8,11 @@ class Webalizer < Formula    depends_on 'gd'    depends_on 'berkeley-db' +  depends_on :libpng    def install -    ENV.x11 # For libpng -    system "./configure", "--disable-debug", "--disable-dependency-tracking", +    system "./configure", "--disable-debug", +                          "--disable-dependency-tracking",                            "--prefix=#{prefix}"      system "make install"    end diff --git a/Library/Formula/webp.rb b/Library/Formula/webp.rb index 7435a8e42..4985a8085 100644 --- a/Library/Formula/webp.rb +++ b/Library/Formula/webp.rb @@ -5,11 +5,10 @@ class Webp < Formula    homepage 'http://code.google.com/speed/webp/'    md5 '254d4670e14e9ed881f0536b006ab336' +  depends_on :x11    depends_on 'jpeg'    def install -    ENV.x11 -      system "./configure", "--prefix=#{prefix}", "--disable-dependency-tracking"      system "make install"    end diff --git a/Library/Formula/wine.rb b/Library/Formula/wine.rb index c468e4bae..53ebad1df 100644 --- a/Library/Formula/wine.rb +++ b/Library/Formula/wine.rb @@ -21,6 +21,7 @@ class Wine < Formula      sha256 'b178bc34a69341a8f0a7ff73f7dadf2562ed2e5eb03dc0522b7c4d6002e53994'    end +  depends_on :x11    depends_on 'jpeg'    depends_on 'libicns' @@ -45,13 +46,11 @@ class Wine < Formula    def wine_wrapper; <<-EOS.undent      #!/bin/sh -    DYLD_FALLBACK_LIBRARY_PATH="/usr/X11/lib:#{HOMEBREW_PREFIX}/lib:/usr/lib" "#{bin}/wine.bin" "$@" +    DYLD_FALLBACK_LIBRARY_PATH="#{MacOS.x11_prefix}/lib:#{HOMEBREW_PREFIX}/lib:/usr/lib" "#{bin}/wine.bin" "$@"      EOS    end    def install -    ENV.x11 -      # Build 32-bit; Wine doesn't support 64-bit host builds on OS X.      build32 = "-arch i386 -m32" @@ -68,8 +67,8 @@ class Wine < Formula      ENV.append "LDFLAGS", "#{build32} -framework CoreServices -lz -lGL -lGLU"      args = ["--prefix=#{prefix}", -            "--x-include=/usr/X11/include/", -            "--x-lib=/usr/X11/lib/", +            "--x-include=#{MacOS.x11_prefix}/include/", +            "--x-lib=#{MacOS.x11_prefix}/lib/",              "--with-x",              "--with-coreaudio",              "--with-opengl"] diff --git a/Library/Formula/wmctrl.rb b/Library/Formula/wmctrl.rb index 74a203327..2dc60d0d8 100644 --- a/Library/Formula/wmctrl.rb +++ b/Library/Formula/wmctrl.rb @@ -8,9 +8,9 @@ class Wmctrl < Formula    depends_on 'pkg-config' => :build    depends_on 'glib'    depends_on 'gettext' +  depends_on :x11    def install -    ENV.x11      system "./configure", "--disable-debug", "--disable-dependency-tracking",                            "--prefix=#{prefix}", "--mandir=#{man}"      system "make install" diff --git a/Library/Formula/wv.rb b/Library/Formula/wv.rb index 6f0b2f465..4211c8b0d 100644 --- a/Library/Formula/wv.rb +++ b/Library/Formula/wv.rb @@ -8,10 +8,10 @@ class Wv < Formula    depends_on 'glib'    depends_on 'libgsf'    depends_on 'libwmf' +  depends_on :libpng    def install      ENV.libxml2 -    ENV.libpng      system "./configure", "--disable-debug", "--disable-dependency-tracking",                            "--prefix=#{prefix}",                            "--mandir=#{man}" diff --git a/Library/Formula/xaw3d.rb b/Library/Formula/xaw3d.rb index 52bcc96a1..9994a35e8 100644 --- a/Library/Formula/xaw3d.rb +++ b/Library/Formula/xaw3d.rb @@ -6,9 +6,9 @@ class Xaw3d < Formula    md5 '29ecfdcd6bcf47f62ecfd672d31269a1'    depends_on 'imake' => :build +  depends_on :x11    def install -    ENV.x11      inreplace 'lib/Xaw3d/Imakefile', 'XCOMM EXTRA_INCLUDES', 'EXTRA_INCLUDES'      cd 'lib/Xaw3d' do        mkdir 'X11' do diff --git a/Library/Formula/xchat.rb b/Library/Formula/xchat.rb index 761c3e958..7eb0916c0 100644 --- a/Library/Formula/xchat.rb +++ b/Library/Formula/xchat.rb @@ -8,6 +8,7 @@ class Xchat < Formula    depends_on 'pkg-config' => :build    depends_on 'gettext'    depends_on 'gtk+' +  depends_on :x11    # Adjust to newer glib include conventions    # Reported at https://sourceforge.net/tracker/?func=detail&aid=3446968&group_id=239&atid=100239 diff --git a/Library/Formula/xclip.rb b/Library/Formula/xclip.rb index 119e965c7..f0fe103fb 100644 --- a/Library/Formula/xclip.rb +++ b/Library/Formula/xclip.rb @@ -5,8 +5,9 @@ class Xclip < Formula    url 'http://downloads.sourceforge.net/project/xclip/xclip/0.12/xclip-0.12.tar.gz'    md5 'f7e19d3e976fecdc1ea36cd39e39900d' +  depends_on :x11 +    def install -    ENV.x11      system "./configure", "--prefix=#{prefix}"      system "make install"    end diff --git a/Library/Formula/xpa.rb b/Library/Formula/xpa.rb index 44f3e4015..48fc40075 100644 --- a/Library/Formula/xpa.rb +++ b/Library/Formula/xpa.rb @@ -5,9 +5,11 @@ class Xpa < Formula    url 'http://hea-www.harvard.edu/saord/download/xpa/xpa-2.1.13.tar.gz'    md5 '052053e329a8a03fa6f512f9aadf4828' +  depends_on :x11 +    def install -    ENV.x11 -    system "./configure", "--disable-debug", "--disable-dependency-tracking", +    system "./configure", "--disable-debug", +                          "--disable-dependency-tracking",                            "--prefix=#{prefix}"      system "make install" diff --git a/Library/Formula/xpdf.rb b/Library/Formula/xpdf.rb index fb14550f8..0f06f02b4 100644 --- a/Library/Formula/xpdf.rb +++ b/Library/Formula/xpdf.rb @@ -6,13 +6,13 @@ class Xpdf < Formula    md5 'af75f772bee0e5ae4a811ff9d03eac5a'    depends_on 'lesstif' +  depends_on :x11    # see: http://gnats.netbsd.org/45562    def patches; DATA; end    def install -    ENV.x11 -    ENV.append_to_cflags '-I/usr/X11/include -I/usr/X11/include/freetype2' +    ENV.append_to_cflags "-I#{MacOS.x11_prefix}/include -I#{MacOS.x11_prefix}/include/freetype2"      system "./configure", "--prefix=#{prefix}", "--mandir=#{man}"      system "make" diff --git a/Library/Formula/xplanet.rb b/Library/Formula/xplanet.rb index 59d90b01f..062ee4e7b 100644 --- a/Library/Formula/xplanet.rb +++ b/Library/Formula/xplanet.rb @@ -9,6 +9,7 @@ class Xplanet < Formula    depends_on 'jpeg'    depends_on 'giflib'    depends_on 'libtiff' +  depends_on :x11    def options      [['--with-x', "Build for X11 instead of Aqua."]] @@ -22,7 +23,6 @@ class Xplanet < Formula        args << "--with-aqua" << "--without-x"      end -    ENV.x11      system "./configure", *args      system "make install"    end diff --git a/Library/Formula/xspringies.rb b/Library/Formula/xspringies.rb index 05319122c..fb562cc15 100644 --- a/Library/Formula/xspringies.rb +++ b/Library/Formula/xspringies.rb @@ -5,9 +5,11 @@ class Xspringies < Formula    url 'http://www.cs.rutgers.edu/~decarlo/software/xspringies-1.12.tar.Z'    md5 '14b14916471874e9d0569ab5f4e8d492' +  depends_on :x11 +    def install      inreplace 'Makefile.std' do |s| -      s.change_make_var! "LIBS", '-L/usr/X11/lib -lm -lX11' +      s.change_make_var! "LIBS", "-L#{MacOS.x11_prefix}/lib -lm -lX11"        s.gsub! 'mkdirhier', 'mkdir -p'      end      system "make", "-f", "Makefile.std", "DDIR=#{prefix}/", "install" diff --git a/Library/Formula/zint.rb b/Library/Formula/zint.rb index 974293e35..3721b3744 100644 --- a/Library/Formula/zint.rb +++ b/Library/Formula/zint.rb @@ -8,12 +8,13 @@ class Zint < Formula    head 'git://zint.git.sourceforge.net/gitroot/zint/zint'    depends_on 'cmake' => :build +  depends_on :x11    def install      mkdir 'zint-build' do        system "cmake", "..",                        "-DCMAKE_PREFIX_PATH=#{prefix}", -                      "-DCMAKE_C_FLAGS=-I/usr/X11/include", +                      "-DCMAKE_C_FLAGS=-I#{MacOS.x11_prefix}/include",                        *std_cmake_args        system "make install"      end  | 
