diff options
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/tcpreplay.rb | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/Library/Formula/tcpreplay.rb b/Library/Formula/tcpreplay.rb index de3bf7ffd..1f253c840 100644 --- a/Library/Formula/tcpreplay.rb +++ b/Library/Formula/tcpreplay.rb @@ -5,10 +5,28 @@ class Tcpreplay < Formula url 'http://downloads.sourceforge.net/project/tcpreplay/tcpreplay/3.4.4/tcpreplay-3.4.4.tar.gz' sha1 '9e4cca81cfbfb919f8759e1a27ce1b3b963ff3b8' - # Hard-code use of dylib instead of so - def patches; DATA; end + def patches + [ + # Hard-code use of dylib instead of so + DATA, + # Use system strlcpy; fixed upstream + "https://github.com/synfinatic/tcpreplay/commit/6f45329ba7e6300f07f253032e6feb8a650bea23.patch", + "https://github.com/synfinatic/tcpreplay/commit/0983f589a21bbd0d248e9b408bdf5aeacb61ce19.patch", + ] + end def install + # Don't attempt to compile strlcpy; fixed upstream + inreplace "lib/Makefile.in" do |s| + s.remove_make_var! "libstrl_a_SOURCES" + s.remove_make_var! "noinst_LIBRARIES" + end + + inreplace "src/common/Makefile.in" do |s| + s.gsub! "libcommon_a_LIBADD = ../../lib/libstrl.a", "" + s.gsub! "libcommon_a_DEPENDENCIES = ../../lib/libstrl.a", "" + end + system "./configure", "--disable-dependency-tracking", "--disable-debug", "--prefix=#{prefix}", "--enable-dynamic-link" |
