aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2014-09-11 21:30:12 -0500
committerJack Nagel2014-09-11 21:30:12 -0500
commitcd48b75c59fb3afa190b82b56c15ac632bca9837 (patch)
tree78a663fd5a2cf873447721e61ad6ff867d761b88 /Library
parent17b650bded8e9fa4e55770922ddac441a9025941 (diff)
downloadhomebrew-cd48b75c59fb3afa190b82b56c15ac632bca9837.tar.bz2
pktanon: use inreplace
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/pktanon.rb21
1 files changed, 4 insertions, 17 deletions
diff --git a/Library/Formula/pktanon.rb b/Library/Formula/pktanon.rb
index 1f0cc55e9..3cdd314cc 100644
--- a/Library/Formula/pktanon.rb
+++ b/Library/Formula/pktanon.rb
@@ -8,24 +8,11 @@ class Pktanon < Formula
depends_on "xerces-c"
depends_on "boost"
- # fix compile failure caused by undefined function 'sleep'.
- patch <<-EOS.undent
- diff --git a/src/Timer.cpp b/src/Timer.cpp
- index f97be1d..6fb7d53 100644
- --- a/src/Timer.cpp
- +++ b/src/Timer.cpp
- @@ -17,6 +17,7 @@
- //\r
- \r
- #include "Timer.h"\r
- +#include <unistd.h> // for ::sleep(unsigned int)\r
- \r
- Timer::Timer ()\r
- : userdata (NULL),\r
-
- EOS
-
def install
+ # fix compile failure caused by undefined function 'sleep'.
+ inreplace "src/Timer.cpp", %{#include "Timer.h"\r\n},
+ %{#include "Timer.h"\r\n#include "unistd.h"\r\n}
+
# include the boost system library to resolve compilation errors
ENV["LIBS"] = "-lboost_system-mt"