diff options
| author | Jack Nagel | 2013-12-31 14:31:45 -0600 |
|---|---|---|
| committer | Jack Nagel | 2013-12-31 14:31:45 -0600 |
| commit | aab25c1ec6d0b1ea3cc222f284abc60d817c0930 (patch) | |
| tree | 300429c1c3c476f20df4046d30eea0c9248e46fe /Library/Formula | |
| parent | 1dc8ca62fd8d441cd03e5a5f8bc57473a4c38a74 (diff) | |
| download | homebrew-aab25c1ec6d0b1ea3cc222f284abc60d817c0930.tar.bz2 | |
tcpreplay: backport strlcpy fixes
Fixes #24572.
Closes #25404.
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" |
