Import used formulae from homebrew/dupes

This commit is contained in:
Misty De Meo committed 2017-04-05 11:41:26 +10:00
1 parent 1171b8092b
commit 1b61e85644
32 files changed
+569 -33

No files matched your search

+1 -1
View File
@@ -18,7 +18,7 @@ class ArpScan < Formula
depends_on "autoconf" => :build
end
depends_on "homebrew/dupes/libpcap" => :optional
depends_on "libpcap" => :optional
def install
system "autoreconf", "--install" if build.head?
+1 -1
View File
@@ -15,7 +15,7 @@ class Autoconf < Formula
end
# Tiger's m4 is too old.
depends_on 'homebrew/dupes/m4' if MacOS.version == :tiger
depends_on "m4" if MacOS.version == :tiger
keg_only :provided_until_xcode43
+1 -1
View File
@@ -16,7 +16,7 @@ class Bison < Formula
depends_on "automake"
# "It also requires GNU Autoconf, GNU m4 and Perl in order to run"
depends_on "autoconf"
depends_on "homebrew/dupes/m4"
depends_on "m4"
end
keg_only :provided_by_osx, "Some formulae require a newer version of bison."
+1 -1
View File
@@ -13,7 +13,7 @@ class Chicken < Formula
end
# needs make 3.81 or newer
depends_on "homebrew/dupes/make" => :build if MacOS.version < :leopard
depends_on "make" => :build if MacOS.version < :leopard
def install
ENV.deparallelize
+1 -1
View File
@@ -27,7 +27,7 @@ class Coq < Formula
sha256 "dd082d214e2540429c6f757a41e4df23307e339d50ae68cd108dbd569c6b9ed1" => :mountain_lion
end
depends_on 'homebrew/dupes/make' => :build if MacOS.version < :leopard
depends_on "make" => :build if MacOS.version < :leopard
depends_on :ld64 # needs -no_compact_unwind
depends_on Camlp5TransitionalModeRequirement
depends_on "camlp5"
+2 -2
View File
@@ -21,8 +21,8 @@ class CrosstoolNg < Formula
depends_on "gawk"
depends_on "binutils"
depends_on "libelf"
depends_on "homebrew/dupes/grep" => :optional
depends_on "homebrew/dupes/make" => :optional
depends_on "grep" => :optional
depends_on "make" => :optional
# Avoid superenv to prevent https://github.com/mxcl/homebrew/pull/10552#issuecomment-9736248
env :std
+1 -1
View File
@@ -25,7 +25,7 @@ class Dcmtk < Formula
depends_on "libpng"
depends_on "libtiff"
depends_on "openssl"
depends_on "homebrew/dupes/libiconv" => :optional
depends_on "libiconv" => :optional
def install
ENV.m64 if MacOS.prefer_64_bit?
+2 -2
View File
@@ -12,8 +12,8 @@ class Dex < Formula
sha256 "6f2d7d8c6a1e54dbe6d815915ac0eb0100fd68426b3d91ec9d04a5356ca0a48b" => :mountain_lion
end
depends_on "homebrew/dupes/ncurses" => :optional
depends_on "homebrew/dupes/libiconv" => :optional
depends_on "ncurses" => :optional
depends_on "libiconv" => :optional
def install
args = ["prefix=#{prefix}",
+1 -1
View File
@@ -36,7 +36,7 @@ class Ffmpeg < Formula
depends_on "pkg-config" => :build
# Tiger's make is too old
depends_on "homebrew/dupes/make" => :build if MacOS.version < :leopard
depends_on "make" => :build if MacOS.version < :leopard
# Tiger's ld doesn't like -install_name
depends_on :ld64
# manpages won't be built without texi2html
+1 -1
View File
@@ -5,7 +5,7 @@ class Ghi < Formula
head "https://github.com/stephencelis/ghi.git"
sha256 "1b58c7ec6e9339c44175808719694d7ee21cbd254d3a2e6d31a70d31027e9bea"
depends_on 'homebrew/dupes/less' if MacOS.version == :tiger
depends_on "less" if MacOS.version == :tiger
def install
bin.install "ghi"
+1 -1
View File
@@ -23,7 +23,7 @@ class Glib < Formula
depends_on :python if MacOS.version < :leopard
# the version of zlib which comes with Tiger does not
# export some symbols glib expects
depends_on 'homebrew/dupes/zlib' if MacOS.version == :tiger
depends_on "zlib" if MacOS.version == :tiger
fails_with :llvm do
build 2334
+1 -1
View File
@@ -14,7 +14,7 @@ class GobjectIntrospection < Formula
option :universal
depends_on "homebrew/dupes/make" => :build if MacOS.version < :leopard
depends_on "make" => :build if MacOS.version < :leopard
depends_on "pkg-config" => :run
depends_on "glib"
depends_on "libffi"
+54
View File
@@ -0,0 +1,54 @@
class Grep < Formula
desc "GNU grep, egrep and fgrep"
homepage "https://www.gnu.org/software/grep/"
url "https://ftpmirror.gnu.org/grep/grep-3.0.tar.xz"
mirror "https://ftp.gnu.org/gnu/grep/grep-3.0.tar.xz"
sha256 "e2c81db5056e3e8c5995f0bb5d0d0e1cad1f6f45c3b2fc77b6e81435aed48ab5"
bottle do
cellar :any
sha256 "bb9a99c94bca06d1ac13a26db05916cd069e1f58aba803ee3290ee2caa15b326" => :sierra
sha256 "d97ddcf459bf893cbabc2129ff2425c2ff8668ad996c3d96fcef85f0a06fd948" => :el_capitan
sha256 "4674ad09c934d919a5251461cb2b200627d5ad950875f131da3ddb517835af32" => :yosemite
end
option "with-default-names", "Do not prepend 'g' to the binary"
deprecated_option "default-names" => "with-default-names"
depends_on "pkg-config" => :build
depends_on "pcre"
def install
args = %W[
--disable-dependency-tracking
--disable-nls
--prefix=#{prefix}
--infodir=#{info}
--mandir=#{man}
--with-packager=Homebrew
]
args << "--program-prefix=g" if build.without? "default-names"
system "./configure", *args
system "make"
system "make", "install"
end
def caveats
if build.without? "default-names" then <<-EOS.undent
The command has been installed with the prefix "g".
If you do not want the prefix, install using the "with-default-names"
option.
EOS
end
end
test do
text_file = testpath/"file.txt"
text_file.write "This line should be matched"
cmd = build.with?("default-names") ? "grep" : "ggrep"
grepped = shell_output("#{bin}/#{cmd} match #{text_file}")
assert_match "should be matched", grepped
end
end
+1 -1
View File
@@ -54,7 +54,7 @@ class Imagemagick < Formula
depends_on "fftw" => :optional
depends_on "pango" => :optional
depends_on "perl" => ["5.5", :optional]
depends_on "homebrew/dupes/zlib" if MacOS.version < :snow_leopard # for PNG support
depends_on "zlib" if MacOS.version < :snow_leopard # for PNG support
needs :openmp if build.with? "openmp"
+33
View File
@@ -0,0 +1,33 @@
class Less < Formula
desc "Pager program similar to more"
homepage "http://www.greenwoodsoftware.com/less/index.html"
url "https://ftpmirror.gnu.org/less/less-481.tar.gz"
mirror "http://www.greenwoodsoftware.com/less/less-481.tar.gz"
sha256 "3fa38f2cf5e9e040bb44fffaa6c76a84506e379e47f5a04686ab78102090dda5"
bottle do
rebuild 2
sha256 "5894668335c7ba7b3bce8d7e3db1fd899e05db8a251e9ac39d33dd0be94b6d88" => :sierra
sha256 "b64e1e151c141f2d9bd67529e1c877542e337447c9aae4ab42409a38ee06e80d" => :el_capitan
sha256 "1a3f2691a70564b5e4935d01fc6760a97a42b7a4cf372b6feb55f197925bf0d9" => :yosemite
end
devel do
url "http://www.greenwoodsoftware.com/less/less-487.tar.gz"
sha256 "f3dc8455cb0b2b66e0c6b816c00197a71bf6d1787078adeee0bcf2aea4b12706"
end
depends_on "pcre" => :optional
depends_on "ncurses" unless OS.mac?
def install
args = ["--prefix=#{prefix}"]
args << "--with-regex=pcre" if build.with? "pcre"
system "./configure", *args
system "make", "install"
end
test do
system "#{bin}/lesskey", "-V"
end
end
+55
View File
@@ -0,0 +1,55 @@
class Libiconv < Formula
desc "Conversion library"
homepage "https://www.gnu.org/software/libiconv/"
url "https://ftpmirror.gnu.org/libiconv/libiconv-1.15.tar.gz"
mirror "https://ftp.gnu.org/gnu/libiconv/libiconv-1.15.tar.gz"
sha256 "ccf536620a45458d26ba83887a983b96827001e92a13847b45e4925cc8913178"
bottle do
cellar :any
sha256 "b3594af5de946fdbaa5d45a1ab2107b82f81e689ac15c13ad7ad309aef32780e" => :sierra
sha256 "731b3b0d234747a3fdd8b7152d46bba4d790acb55f411ac9970e448b43fe2457" => :el_capitan
sha256 "c3fd281560ecc86d2453d4916a67267207dff4c19baeb42ce2db8cfbfb52eadb" => :yosemite
end
keg_only :provided_by_osx
patch do
url "https://raw.githubusercontent.com/Homebrew/patches/9be2793af/libiconv/patch-utf8mac.diff"
sha256 "e8128732f22f63b5c656659786d2cf76f1450008f36bcf541285268c66cabeab"
end
patch :DATA
def install
ENV.deparallelize
system "./configure", "--disable-debug",
"--disable-dependency-tracking",
"--prefix=#{prefix}",
"--enable-extra-encodings",
"--enable-static",
"--docdir=#{doc}"
system "make", "-f", "Makefile.devel", "CFLAGS=#{ENV.cflags}", "CC=#{ENV.cc}"
system "make", "install"
end
test do
system bin/"iconv", "--help"
end
end
__END__
diff --git a/lib/flags.h b/lib/flags.h
index d7cda21..4cabcac 100644
--- a/lib/flags.h
+++ b/lib/flags.h
@@ -14,6 +14,7 @@
#define ei_ascii_oflags (0)
#define ei_utf8_oflags (HAVE_ACCENTS | HAVE_QUOTATION_MARKS | HAVE_HANGUL_JAMO)
+#define ei_utf8mac_oflags (HAVE_ACCENTS | HAVE_QUOTATION_MARKS | HAVE_HANGUL_JAMO)
#define ei_ucs2_oflags (HAVE_ACCENTS | HAVE_QUOTATION_MARKS | HAVE_HANGUL_JAMO)
#define ei_ucs2be_oflags (HAVE_ACCENTS | HAVE_QUOTATION_MARKS | HAVE_HANGUL_JAMO)
#define ei_ucs2le_oflags (HAVE_ACCENTS | HAVE_QUOTATION_MARKS | HAVE_HANGUL_JAMO)
+32
View File
@@ -0,0 +1,32 @@
class Libpcap < Formula
desc "Portable library for network traffic capture"
homepage "http://www.tcpdump.org/"
url "http://www.tcpdump.org/release/libpcap-1.8.1.tar.gz"
sha256 "673dbc69fdc3f5a86fb5759ab19899039a8e5e6c631749e48dcd9c6f0c83541e"
head "git://bpf.tcpdump.org/libpcap"
bottle do
cellar :any
sha256 "95a69600f13a8fae57c9d96f436a5161a0eb30f7c121dad25518039381663661" => :sierra
sha256 "a68ac5c1c4b570fdf288c0049524c232d9122ef2c6eeae95e4f7a87f9fd6f4a4" => :el_capitan
sha256 "e7d313172264c39a22038ac0c6fa67e1ce796406a761511b6a854a4e5a3f05dc" => :yosemite
end
keg_only :provided_by_osx
unless OS.mac?
depends_on "bison" => :build
depends_on "flex" => :build
end
def install
system "./configure", "--prefix=#{prefix}",
"--enable-ipv6",
"--disable-universal"
system "make", "install"
end
test do
assert_match /lpcap/, shell_output("#{bin}/pcap-config --libs")
end
end
+1 -1
View File
@@ -15,7 +15,7 @@ class Libtool < Formula
sha256 "f14f7c9f863be4c820839eb403e5a994986f8c4d2d19ff60ea011adcceb2ed81" => :leopard_altivec
end
depends_on "homebrew/dupes/m4" if MacOS.version < :leopard
depends_on "m4" if MacOS.version < :leopard
keg_only :provided_until_xcode43
+1 -1
View File
@@ -14,7 +14,7 @@ class Libvpx < Formula
end
depends_on :macos => :tiger
depends_on "homebrew/dupes/make" => :build if MacOS.version == :tiger
depends_on "make" => :build if MacOS.version == :tiger
depends_on "yasm" => :build
option "gcov", "Enable code coverage"
+1 -1
View File
@@ -27,7 +27,7 @@ class Libxmp < Formula
# https://github.com/cmatsuoka/libxmp/issues/1
depends_on :ld64
# a bug in gnumake 3.80 causes the build to instantly fail
depends_on "homebrew/dupes/make" => :build if MacOS.version < :leopard
depends_on "make" => :build if MacOS.version < :leopard
def install
system "autoconf" if build.head?
+27
View File
@@ -0,0 +1,27 @@
class M4 < Formula
desc "Macro processing language"
homepage "https://www.gnu.org/software/m4"
url "https://ftpmirror.gnu.org/m4/m4-1.4.18.tar.xz"
mirror "https://ftp.gnu.org/gnu/m4/m4-1.4.18.tar.xz"
sha256 "f2c1e86ca0a404ff281631bdc8377638992744b175afb806e25871a24a934e07"
bottle do
cellar :any_skip_relocation
sha256 "2b72de8c334cf6faa6f29a420bb87d9ff4d25b4ded8c83a47c27f60840ea96d6" => :sierra
sha256 "a740efe575f7b6a0b64bf42afdd9d2d64b67f7551fde00c628e1d6317a084166" => :el_capitan
sha256 "a3d45ad75fabb47348fa84fe3ddf2c0aae917e43a65db4959b803ca298faccd3" => :yosemite
end
keg_only :provided_by_osx
def install
system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}"
system "make"
system "make", "install"
end
test do
assert_match "Homebrew",
pipe_output("#{bin}/m4", "define(TEST, Homebrew)\nTEST\n")
end
end
+42
View File
@@ -0,0 +1,42 @@
class Make < Formula
desc "Utility for directing compilation"
homepage "https://www.gnu.org/software/make/"
url "https://ftpmirror.gnu.org/make/make-4.2.1.tar.bz2"
mirror "https://ftp.gnu.org/gnu/make/make-4.2.1.tar.bz2"
sha256 "d6e262bf3601b42d2b1e4ef8310029e1dcf20083c5446b4b7aa67081fdffc589"
bottle do
sha256 "0f0c4fa8340fa5b5269deed987867a647bceecb17d6687276c035dad4753ca8b" => :el_capitan
sha256 "8839228946c326de73eec5c256493e00d5130eecffac609c8aa9783f0e103304" => :yosemite
sha256 "e36e0bbdd7f750ffdf8726e91a112a8e1145cdf91a6f9fb73cfe0ac1278aea33" => :mavericks
end
option "with-default-names", "Do not prepend 'g' to the binary"
depends_on "guile" => :optional
def install
args = %W[
--disable-dependency-tracking
--prefix=#{prefix}
]
args << "--with-guile" if build.with? "guile"
args << "--program-prefix=g" if build.without? "default-names"
system "./configure", *args
system "make", "install"
end
test do
(testpath/"Makefile").write <<-EOS.undent
default:
\t@echo Homebrew
EOS
cmd = build.with?("default-names") ? "make" : "gmake"
assert_equal "Homebrew\n",
shell_output("#{bin}/#{cmd}")
end
end
+1 -1
View File
@@ -35,7 +35,7 @@ class Moc < Formula
depends_on "faad2" => :optional
depends_on "timidity" => :optional
depends_on "libmagic" => :optional
depends_on "homebrew/dupes/ncurses" => :optional
depends_on "ncurses" => :optional
def install
system "autoreconf", "-fvi" if build.head?
+1 -1
View File
@@ -26,7 +26,7 @@ class Mplayer < Formula
option "without-osd", "Build without OSD"
# dupe make needed because of "make: *** virtual memory exhausted. Stop."
depends_on "homebrew/dupes/make" => :build if MacOS.version < :leopard
depends_on "make" => :build if MacOS.version < :leopard
depends_on "yasm" => :build
depends_on "libcaca" => :optional
+106
View File
@@ -0,0 +1,106 @@
class Ncurses < Formula
desc "Text-based UI library"
homepage "https://www.gnu.org/s/ncurses/"
url "https://ftpmirror.gnu.org/ncurses/ncurses-6.0.tar.gz"
mirror "https://ftp.gnu.org/gnu/ncurses/ncurses-6.0.tar.gz"
sha256 "f551c24b30ce8bfb6e96d9f59b42fbea30fa3a6123384172f9e7284bcf647260"
revision 3
bottle do
sha256 "0b9103ce95f809c4ac104679a0c44f54bc2374c517447da9eb55b85bcad7d675" => :sierra
sha256 "daf1454abfe7785a642cc614e1b671f1e95ea797d9d1d0daaa5e7cb3800e0b69" => :el_capitan
sha256 "a73f869e5dc82d43fa05cdb86200a8a7b7e04b4da1902e9cdf77c90a94d678ad" => :yosemite
end
keg_only :provided_by_osx
depends_on "pkg-config" => :build
# stable rollup patch created by upstream see
# http://invisible-mirror.net/archives/ncurses/6.0/README
resource "ncurses-6.0-20160910-patch.sh" do
url "http://invisible-mirror.net/archives/ncurses/6.0/ncurses-6.0-20160910-patch.sh.bz2"
mirror "https://www.mirrorservice.org/sites/lynx.invisible-island.net/ncurses/6.0/ncurses-6.0-20160910-patch.sh.bz2"
sha256 "f570bcfe3852567f877ee6f16a616ffc7faa56d21549ad37f6649022f8662538"
end
def install
# Fix the build for GCC 5.1
# error: expected ')' before 'int' in definition of macro 'mouse_trafo'
# See https://lists.gnu.org/archive/html/bug-ncurses/2014-07/msg00022.html
# and http://trac.sagemath.org/ticket/18301
# Disable linemarker output of cpp
ENV.append "CPPFLAGS", "-P"
(lib/"pkgconfig").mkpath
# stage and apply patch
buildpath.install resource("ncurses-6.0-20160910-patch.sh")
system "sh", "ncurses-6.0-20160910-patch.sh"
system "./configure", "--prefix=#{prefix}",
"--enable-pc-files",
"--with-pkg-config-libdir=#{lib}/pkgconfig",
"--enable-sigwinch",
"--enable-symlinks",
"--enable-widec",
"--mandir=#{man}",
"--with-manpage-format=normal",
"--with-shared",
"--with-gpm=no"
system "make"
ENV.deparallelize
system "make", "install"
make_libncurses_symlinks
prefix.install "test"
(prefix/"test").install "install-sh", "config.sub", "config.guess"
end
def make_libncurses_symlinks
major = version.to_s.split(".")[0]
%w[form menu ncurses panel].each do |name|
if OS.mac?
lib.install_symlink "lib#{name}w.#{major}.dylib" => "lib#{name}.dylib"
lib.install_symlink "lib#{name}w.#{major}.dylib" => "lib#{name}.#{major}.dylib"
else
lib.install_symlink "lib#{name}w.so.#{major}" => "lib#{name}.so"
lib.install_symlink "lib#{name}w.so.#{major}" => "lib#{name}.so.#{major}"
end
lib.install_symlink "lib#{name}w.a" => "lib#{name}.a"
lib.install_symlink "lib#{name}w_g.a" => "lib#{name}_g.a"
end
lib.install_symlink "libncurses++w.a" => "libncurses++.a"
lib.install_symlink "libncurses.a" => "libcurses.a"
if OS.mac?
lib.install_symlink "libncurses.dylib" => "libcurses.dylib"
else
lib.install_symlink "libncurses.so" => "libcurses.so"
lib.install_symlink "libncurses.so" => "libtinfo.so"
end
(lib/"pkgconfig").install_symlink "ncursesw.pc" => "ncurses.pc"
bin.install_symlink "ncursesw#{major}-config" => "ncurses#{major}-config"
include.install_symlink [
"ncursesw/curses.h", "ncursesw/form.h", "ncursesw/ncurses.h",
"ncursesw/panel.h", "ncursesw/term.h", "ncursesw/termcap.h"
]
end
test do
ENV["TERM"] = "xterm"
system bin/"tput", "cols"
system prefix/"test/configure", "--prefix=#{testpath}/test",
"--with-curses-dir=#{prefix}"
system "make", "install"
system testpath/"test/bin/keynames"
system testpath/"test/bin/test_arrays"
system testpath/"test/bin/test_vidputs"
end
end
+1 -1
View File
@@ -12,7 +12,7 @@ class Pianobar < Formula
sha1 "2d79864486410f89d28ebe287bd13d5b14c6267a" => :leopard_altivec
end
depends_on "homebrew/dupes/make" => :build if MacOS.version < :leopard
depends_on "make" => :build if MacOS.version < :leopard
depends_on "pkg-config" => :build
depends_on "libao"
depends_on "mad"
+5 -5
View File
@@ -35,9 +35,9 @@ class Python < Formula
depends_on "sqlite" => :recommended
depends_on "gdbm" => :recommended
depends_on "openssl"
depends_on "homebrew/dupes/tcl-tk" => :optional
depends_on "tcl-tk" => :optional
depends_on "berkeley-db4" => :optional
depends_on :x11 if build.with?("tcl-tk") && Tab.for_name("homebrew/dupes/tcl-tk").with?("x11")
depends_on :x11 if build.with?("tcl-tk") && Tab.for_name("tcl-tk").with?("x11")
skip_clean "bin/pip", "bin/pip-2.7"
skip_clean "bin/easy_install", "bin/easy_install-2.7"
@@ -168,7 +168,7 @@ class Python < Formula
end
if build.with? "tcl-tk"
tcl_tk = Formula["homebrew/dupes/tcl-tk"].opt_prefix
tcl_tk = Formula["tcl-tk"].opt_prefix
cppflags << "-I#{tcl_tk}/include"
ldflags << "-L#{tcl_tk}/lib"
end
@@ -279,8 +279,8 @@ class Python < Formula
end
if build.with? "tcl-tk"
include_dirs << Formula["homebrew/dupes/tcl-tk"].opt_include
library_dirs << Formula["homebrew/dupes/tcl-tk"].opt_lib
include_dirs << Formula["tcl-tk"].opt_include
library_dirs << Formula["tcl-tk"].opt_lib
end
cfg = lib_cellar/"distutils/distutils.cfg"
+4 -4
View File
@@ -27,8 +27,8 @@ class Python3 < Formula
depends_on "gdbm" => :recommended
depends_on "openssl"
depends_on "xz" => :recommended # for the lzma module added in 3.3
depends_on "homebrew/dupes/tcl-tk" => :optional
depends_on :x11 if build.with?("tcl-tk") && Tab.for_name("homebrew/dupes/tcl-tk").with?("x11")
depends_on "tcl-tk" => :optional
depends_on :x11 if build.with?("tcl-tk") && Tab.for_name("tcl-tk").with?("x11")
skip_clean "bin/pip3", "bin/pip-3.4", "bin/pip-3.5"
skip_clean "bin/easy_install3", "bin/easy_install-3.4", "bin/easy_install-3.5"
@@ -247,8 +247,8 @@ class Python3 < Formula
end
if build.with? "tcl-tk"
include_dirs << Formula["homebrew/dupes/tcl-tk"].opt_include
library_dirs << Formula["homebrew/dupes/tcl-tk"].opt_lib
include_dirs << Formula["tcl-tk"].opt_include
library_dirs << Formula["tcl-tk"].opt_lib
end
cfg = lib_cellar/"distutils/distutils.cfg"
+1 -1
View File
@@ -12,7 +12,7 @@ class Qpdf < Formula
sha256 "927c353822d0ae21b0d822931121c4ff36a2a0e2905dd04075c60de4d0b023bf" => :mavericks
end
depends_on "homebrew/dupes/make" => :build if MacOS.version == :tiger
depends_on "make" => :build if MacOS.version == :tiger
depends_on "pcre"
def install
+149
View File
@@ -0,0 +1,149 @@
class TclTk < Formula
desc "Tool Command Language"
homepage "https://www.tcl.tk/"
url "https://downloads.sourceforge.net/project/tcl/Tcl/8.6.6/tcl8.6.6-src.tar.gz"
mirror "ftp://ftp.tcl.tk/pub/tcl/tcl8_6/tcl8.6.6-src.tar.gz"
version "8.6.6"
sha256 "a265409781e4b3edcc4ef822533071b34c3dc6790b893963809b9fe221befe07"
revision 1
bottle do
sha256 "4ab93b570b42e79fef6f154e4ffc1be7faf792eaedda3ea995edfe846670efac" => :sierra
sha256 "7749a9306ad76868443c254d2191d7809b89fd536d3c723095a60879bff01abd" => :el_capitan
sha256 "dde73a5b17f8dc6acfd974f88605a97e9b50ca12b1af9071825c67c69b33cf7c" => :yosemite
end
keg_only :provided_by_osx,
"Tk installs some X11 headers and OS X provides an (older) Tcl/Tk."
deprecated_option "enable-threads" => "with-threads"
option "with-threads", "Build with multithreading support"
option "without-tcllib", "Don't build tcllib (utility modules)"
option "without-tk", "Don't build the Tk (window toolkit)"
option "with-x11", "Build X11-based Tk instead of Aqua-based Tk"
depends_on :x11 => :optional
depends_on "pkg-config" => :build if build.with? "x11"
resource "tk" do
url "https://downloads.sourceforge.net/project/tcl/Tcl/8.6.6/tk8.6.6-src.tar.gz"
mirror "ftp://ftp.tcl.tk/pub/tcl/tcl8_6/tk8.6.6-src.tar.gz"
version "8.6.6"
sha256 "d62c371a71b4744ed830e3c21d27968c31dba74dd2c45f36b9b071e6d88eb19d"
end
resource "tcllib" do
url "https://downloads.sourceforge.net/project/tcllib/tcllib/1.18/tcllib-1.18.tar.gz"
sha256 "72667ecbbd41af740157ee346db77734d1245b41dffc13ac80ca678dd3ccb515"
end
# sqlite won't compile on Tiger due to missing function;
# patch submitted upstream: http://thread.gmane.org/gmane.comp.db.sqlite.general/83257
patch :DATA if OS.mac? && MacOS.version < :leopard
def install
args = ["--prefix=#{prefix}", "--mandir=#{man}"]
args << "--enable-threads" if build.with? "threads"
args << "--enable-64bit" if MacOS.prefer_64_bit?
cd "unix" do
system "./configure", *args
system "make"
system "make", "install"
system "make", "install-private-headers"
ln_s bin/"tclsh8.6", bin/"tclsh"
end
if build.with? "tk"
ENV.prepend_path "PATH", bin # so that tk finds our new tclsh
resource("tk").stage do
args = ["--prefix=#{prefix}", "--mandir=#{man}", "--with-tcl=#{lib}"]
args << "--enable-threads" if build.with? "threads"
args << "--enable-64bit" if MacOS.prefer_64_bit?
if build.with? "x11"
args << "--with-x"
else
args << "--enable-aqua=yes"
args << "--without-x"
end
cd "unix" do
system "./configure", *args
system "make", "TK_LIBRARY=#{lib}"
# system "make", "test" # for maintainers
system "make", "install"
system "make", "install-private-headers"
ln_s bin/"wish8.6", bin/"wish"
end
end
end
if build.with? "tcllib"
resource("tcllib").stage do
system "./configure", "--prefix=#{prefix}",
"--mandir=#{man}"
system "make", "install"
end
end
end
test do
assert_equal "honk", pipe_output("#{bin}/tclsh", "puts honk\n").chomp
end
end
__END__
diff --git a/pkgs/sqlite3.8.8.3/generic/sqlite3.c b/pkgs/sqlite3.8.8.3/generic/sqlite3.c
index 7d513fa..b1d968a 100644
--- a/pkgs/sqlite3.8.8.3/generic/sqlite3.c
+++ b/pkgs/sqlite3.8.8.3/generic/sqlite3.c
@@ -16805,6 +16805,7 @@ SQLITE_PRIVATE void sqlite3MemSetDefault(void){
#include <sys/sysctl.h>
#include <malloc/malloc.h>
#include <libkern/OSAtomic.h>
+
static malloc_zone_t* _sqliteZone_;
#define SQLITE_MALLOC(x) malloc_zone_malloc(_sqliteZone_, (x))
#define SQLITE_FREE(x) malloc_zone_free(_sqliteZone_, (x));
@@ -16812,6 +16813,29 @@ static malloc_zone_t* _sqliteZone_;
#define SQLITE_MALLOCSIZE(x) \
(_sqliteZone_ ? _sqliteZone_->size(_sqliteZone_,x) : malloc_size(x))
+/*
+** If compiling for Mac OS X 10.4, the OSAtomicCompareAndSwapPtrBarrier
+** function will not be available, but individual 32-bit and 64-bit
+** versions will.
+*/
+
+#ifdef __MAC_OS_X_MIN_REQUIRED
+# include <AvailabilityMacros.h>
+#elif defined(__IPHONE_OS_MIN_REQUIRED)
+# include <Availability.h>
+#endif
+
+typedef int fc_atomic_int_t;
+#if (MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_4 || __IPHONE_VERSION_MIN_REQUIRED >= 20100)
+# define fc_atomic_ptr_cmpexch(O,N,P) OSAtomicCompareAndSwapPtrBarrier ((void *) (O), (void *) (N), (void **) (P))
+#else
+# if __ppc64__ || __x86_64__
+# define fc_atomic_ptr_cmpexch(O,N,P) OSAtomicCompareAndSwap64Barrier ((int64_t) (O), (int64_t) (N), (int64_t*) (P))
+# else
+# define fc_atomic_ptr_cmpexch(O,N,P) OSAtomicCompareAndSwap32Barrier ((int32_t) (O), (int32_t) (N), (int32_t*) (P))
+# endif
+#endif
+
#else /* if not __APPLE__ */
/*
@@ -16998,7 +17022,7 @@ static int sqlite3MemInit(void *NotUsed){
malloc_zone_t* newzone = malloc_create_zone(4096, 0);
malloc_set_zone_name(newzone, "Sqlite_Heap");
do{
- success = OSAtomicCompareAndSwapPtrBarrier(NULL, newzone,
+ success = fc_atomic_ptr_cmpexch(NULL, newzone,
(void * volatile *)&_sqliteZone_);
}while(!_sqliteZone_);
if( !success ){
+2 -2
View File
@@ -11,7 +11,7 @@ class Wireshark < Formula
# Reported upstream: https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9290
patch :DATA
depends_on "homebrew/dupes/libpcap" => :optional
depends_on "libpcap" => :optional
end
bottle do
@@ -26,7 +26,7 @@ class Wireshark < Formula
mirror "https://1.eu.dl.wireshark.org/src/wireshark-1.99.9.tar.bz2"
sha256 "be7ac8f8eb2c08e0e3d62da9f781db0dc5322a9cbcb024d3f86a66a06185e182"
depends_on "homebrew/dupes/libpcap" if MacOS.version == :mavericks
depends_on "libpcap" if MacOS.version == :mavericks
end
head do
+38
View File
@@ -0,0 +1,38 @@
class Zlib < Formula
desc "General-purpose lossless data-compression library"
homepage "http://www.zlib.net/"
url "http://zlib.net/zlib-1.2.11.tar.gz"
mirror "https://downloads.sourceforge.net/project/libpng/zlib/1.2.11/zlib-1.2.11.tar.gz"
sha256 "c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1"
bottle do
cellar :any
sha256 "6765c51c09a7aa0ad7c06379a9c7a6b7b3b1bfaaf6a37d111cee44153eaab6e2" => :sierra
sha256 "c37af2435a876fed3d8ced49698159ac7ab05efeed265de3c40a8e6c3868e332" => :el_capitan
sha256 "1c3d8a42f15b8f8f5427e5038c76538178b2b57759c57101fb07cbbe92d0ba21" => :yosemite
end
keg_only :provided_by_osx
# http://zlib.net/zlib_how.html
resource "test_artifact" do
url "http://zlib.net/zpipe.c"
version "20051211"
sha256 "68140a82582ede938159630bca0fb13a93b4bf1cb2e85b08943c26242cf8f3a6"
end
def install
system "./configure", "--prefix=#{prefix}"
system "make", "install"
end
test do
testpath.install resource("test_artifact")
system ENV.cc, "zpipe.c", "-I#{include}", "-L#{lib}", "-lz", "-o", "zpipe"
touch "foo.txt"
output = "./zpipe < foo.txt > foo.txt.z"
system output
assert File.exist?("foo.txt.z")
end
end