add gdchart formula #14849

Closed
wants to merge 9 commits into
from
@@ -0,0 +1,60 @@
+require 'formula'
+
+class Gdchart < Formula
+ homepage 'http://www.fred.net/brv/chart/'
+ url 'http://www.fred.net/brv/chart/gdchart0.11.5dev.tar.gz'
+ sha1 'c23e1cd233c38ac007b57420c20a5fa7fa206841'
+ version "0.11.5"
+
+ depends_on :x11
+ depends_on :libpng
+ depends_on 'gd'
+
+ def patches
+ DATA
+ end
+
+ def install
+ inreplace 'Makefile' do |s|
+ s.change_make_var! "PREFIX_INC", include
+ s.change_make_var! "PREFIX_LIB", lib
+ end
+ lib.mkpath
+ include.mkpath
+ system "make install"
+ end
+
+ def test
+ end
+end
+
+__END__
+--- gdchart0.11.5dev/Makefile 2004-12-17 12:53:47.000000000 -0500
++++ gdchart0.11.5dev-j/Makefile 2012-09-07 14:33:24.000000000 -0400
+@@ -20,7 +20,7 @@
+ # if it's not installed in a standard location edit these lines for your installation
+ GD_INCL=/usr/local/include/
+ GD_LD=/usr/local/lib/
+-GD_LIB=libgd.so
++GD_LIB=libgd.dylib
+ # a static libgd is also available
+ # GD_LIB=libgd.a
+
+@@ -29,6 +29,8 @@
+ # if it's not installed in a standard location edit these lines for your installation
+ # PNG_INCL = ../libpng-1.0.8
+ # PNG_LD = ../libpng-1.0.8
++PNG_INCL = /usr/X11/include
++PNG_LD = /usr/X11/lib
@jacknagel
jacknagel Sep 11, 2012 Contributor

Can't assume /usr/X11 for libpng; on 10.8 it will be a Homebrew-built libpng, and on other versions it may be in /usr/X11 or /opt/X11.

Note that these variables can be set without patching; pass them to make e.g.

system "make", "PNG_LD=#{foo}", "PNG_INCL=#{bar}", "install"
+
+ # ----- lib z -----
+ # libgd requires zlib
+@@ -51,7 +53,7 @@
+ DEFS = $(FT_DEF) $(JPEG_DEF)
+ LIBS = $(FT_LK) $(JPEG_LK)
+
+-LIB_PATHS = -L$(GD_LD) -L$(GDC_LD)
++LIB_PATHS = -L$(GD_LD) -L$(GDC_LD) -L$(PNG_LD)
+ # if not installed in standard paths (/lib, /usr/lib), or LD_LIBRARY_PATH
+ # LIB_PATHS = -L$(GD_LD) -L$(PNG_LD) -L$(ZLIB_LD) -L$(JPEG_LD)
+
@@ -31,7 +31,7 @@ class Gfortran < Formula
md5 'eb64ba9f8507da22e582814a69fbb7ca'
version "4.2.4-5664"
end
- else
+ elsif MACOS_VERSION == 10.7
# Lion
if MacOS::Xcode.version >= '4.2'
# This version contains an entire Apple-GCC 4.2 (i386/x86_64) build for
@@ -45,6 +45,9 @@ class Gfortran < Formula
md5 '7eb140822c89bec17db5666859868b3b'
version "4.2.4-5666.3"
end
+ elsif MACOS_VERSION == 10.8
+
+ else
end
# For more information about GFortran, see:
@@ -15,7 +15,7 @@ class Gtkx < Formula
depends_on 'jasper' => :optional
depends_on 'atk' => :optional
depends_on 'cairo'
- depends_on :x11
+# depends_on :x11
fails_with :llvm do
build 2326
@@ -28,7 +28,9 @@ def install
"--prefix=#{prefix}",
"--disable-glibtest",
"--disable-introspection",
- "--disable-visibility"
+ "--disable-visibility",
+ "--with-gdktarget=quartz",
+ "--enable-quartz-relocation"
system "make install"
end
@@ -0,0 +1,18 @@
+require 'formula'
+
+class Libevhtp < Formula
+ homepage 'http://github.com/ellzey/libevhtp'
+ url 'https://github.com/ellzey/libevhtp/tarball/1.1.4'
+ version '1.1.4'
+ sha1 'd221d1fdbf68e44d1e19546cc025014b5d120f85'
+
+ head 'git://github.com/ellzey/libevhtp.git'
+
+ depends_on 'cmake' => :build
+ depends_on 'libevent'
+
+ def install
+ system "cmake", ".", *std_cmake_args
+ system "make install" # if this fails, try separate make/make install steps
+ end
+end
@@ -5,12 +5,12 @@ class Pango < Formula
url 'http://ftp.gnome.org/pub/GNOME/sources/pango/1.30/pango-1.30.1.tar.xz'
sha256 '3a8c061e143c272ddcd5467b3567e970cfbb64d1d1600a8f8e62435556220cbe'
- option 'without-x', 'Build without X11 support'
+# option 'without-x', 'Build without X11 support'
depends_on 'pkg-config' => :build
depends_on 'xz' => :build
depends_on 'glib'
- depends_on :x11 unless build.include? 'without-x'
+# depends_on :x11 unless build.include? 'without-x'
if MacOS.version == :leopard
depends_on 'fontconfig'
@@ -36,9 +36,10 @@ def install
--enable-man
--with-html-dir=#{share}/doc
--disable-introspection
+ --without-x
]
- args << '--with-x' unless build.include? 'without-x'
+# args << '--with-x' unless build.include? 'without-x'
system "./configure", *args
system "make"
@@ -5,7 +5,7 @@ class Pygtk < Formula
homepage 'http://www.pygtk.org/'
sha1 '344e6a32a5e8c7e0aaeb807e0636a163095231c2'
- depends_on :x11
+# depends_on :x11
depends_on 'glib'
depends_on 'gtk+'
depends_on 'pygobject'
@@ -10,6 +10,7 @@ class Wireshark < Formula
depends_on 'c-ares' => :optional
depends_on 'pcre' => :optional
depends_on 'glib'
+ depends_on 'gtk+'
if build.include? 'with-x'
depends_on :x11
@@ -28,7 +29,7 @@ def install
args << '--without-python' unless build.include? 'with-python'
# actually just disables the GTK GUI
- args << '--disable-wireshark' unless build.include? 'with-x'
+# args << '--disable-wireshark' unless build.include? 'with-x'
system "./configure", *args
system "make"