2012-01-29 22:43:00 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Wput < Formula
|
|
|
|
homepage 'http://wput.sourceforge.net/'
|
|
|
|
url 'http://downloads.sourceforge.net/project/wput/wput/0.6.2/wput-0.6.2.tgz'
|
2012-09-03 18:33:56 +00:00
|
|
|
sha1 'c058f76395672d1fbbb839c958d6537e82fc88b7'
|
2012-01-29 22:43:00 +00:00
|
|
|
|
|
|
|
# The patch is to skip inclusion of malloc.h only on OSX. Upstream:
|
|
|
|
# https://sourceforge.net/tracker/?func=detail&aid=3481469&group_id=141519&atid=749615
|
|
|
|
def patches
|
|
|
|
DATA
|
|
|
|
end
|
|
|
|
|
|
|
|
def install
|
|
|
|
system "./configure", "--disable-debug", "--disable-dependency-tracking",
|
|
|
|
"--prefix=#{prefix}"
|
|
|
|
system "make"
|
|
|
|
ENV.deparallelize
|
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
|
|
|
|
def test
|
2012-05-15 21:36:45 +00:00
|
|
|
system "#{bin}/wput", "--version"
|
2012-01-29 22:43:00 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
__END__
|
|
|
|
diff --git a/src/memdbg.c b/src/memdbg.c
|
|
|
|
index 560bd7c..9e69eef 100644
|
|
|
|
--- a/src/memdbg.c
|
|
|
|
+++ b/src/memdbg.c
|
|
|
|
@@ -1,5 +1,7 @@
|
|
|
|
#include <stdio.h>
|
|
|
|
+#ifndef __APPLE__
|
|
|
|
#include <malloc.h>
|
|
|
|
+#endif
|
|
|
|
#include <fcntl.h>
|
|
|
|
#ifndef WIN32
|
|
|
|
#include <sys/socket.h>
|
|
|
|
diff --git a/src/socketlib.c b/src/socketlib.c
|
|
|
|
index ab77d2b..c728ed9 100644
|
|
|
|
--- a/src/socketlib.c
|
|
|
|
+++ b/src/socketlib.c
|
|
|
|
@@ -20,7 +20,9 @@
|
|
|
|
* It is meant to provide some library functions. The only required external depency
|
|
|
|
* the printip function that is provided in utils.c */
|
|
|
|
|
|
|
|
+#ifndef __APPLE__
|
|
|
|
#include <malloc.h>
|
|
|
|
+#endif
|
|
|
|
#include <string.h>
|
|
|
|
#include <fcntl.h>
|
|
|
|
#include <errno.h>
|