diff options
| author | Jack Nagel | 2014-09-11 21:30:12 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-09-11 21:30:12 -0500 |
| commit | cd48b75c59fb3afa190b82b56c15ac632bca9837 (patch) | |
| tree | 78a663fd5a2cf873447721e61ad6ff867d761b88 /Library | |
| parent | 17b650bded8e9fa4e55770922ddac441a9025941 (diff) | |
| download | homebrew-cd48b75c59fb3afa190b82b56c15ac632bca9837.tar.bz2 | |
pktanon: use inreplace
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/pktanon.rb | 21 |
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" |
