From 60225aa34051a0c7f603068a71163718f295a4c9 Mon Sep 17 00:00:00 2001 From: Gregor Jasny Date: Sun, 22 Dec 2013 12:11:03 +0100 Subject: [PATCH] wireshark: add option to install library headers These library headers are needed for 3rd party plug-ins like dissectors. Closes Homebrew/homebrew#25400. Signed-off-by: Mike McQuaid --- Formula/wireshark.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Formula/wireshark.rb b/Formula/wireshark.rb index 113562889f..dfdfb05257 100644 --- a/Formula/wireshark.rb +++ b/Formula/wireshark.rb @@ -21,6 +21,7 @@ class Wireshark < Formula option 'with-x', 'Include X11 support' option 'with-qt', 'Use QT for GUI instead of GTK+' + option 'with-headers', 'Install Wireshark library headers for plug-in developemnt' depends_on 'pkg-config' => :build @@ -66,6 +67,18 @@ class Wireshark < Formula system "make" ENV.deparallelize # parallel install fails system "make install" + + if build.with? 'headers' + (include/"wireshark").install Dir["*.h"] + (include/"wireshark/epan").install Dir["epan/*.h"] + (include/"wireshark/epan/crypt").install Dir["epan/crypt/*.h"] + (include/"wireshark/epan/dfilter").install Dir["epan/dfilter/*.h"] + (include/"wireshark/epan/dissectors").install Dir["epan/dissectors/*.h"] + (include/"wireshark/epan/ftypes").install Dir["epan/ftypes/*.h"] + (include/"wireshark/epan/wmem").install Dir["epan/wmem/*.h"] + (include/"wireshark/wiretap").install Dir["wiretap/*.h"] + (include/"wireshark/wsutil").install Dir["wsutil/*.h"] + end end def caveats; <<-EOS.undent