2013-12-30 20:31:44 +00:00
|
|
|
require "formula"
|
2009-09-25 16:16:54 +00:00
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Mcrypt < Formula
|
2013-12-30 20:31:44 +00:00
|
|
|
homepage "http://mcrypt.sourceforge.net"
|
|
|
|
url "https://downloads.sourceforge.net/project/mcrypt/MCrypt/2.6.8/mcrypt-2.6.8.tar.gz"
|
|
|
|
sha1 "8ae0e866714fbbb96a0a6fa9f099089dc93f1d86"
|
|
|
|
|
2014-04-09 17:00:04 +00:00
|
|
|
bottle do
|
|
|
|
sha1 "9afdc1c3fdbf8f9801301fb959c0192b99072fc7" => :mavericks
|
|
|
|
sha1 "71c4c177e18d8ee3be7a1f5556c40ec5d2ba5a4d" => :mountain_lion
|
|
|
|
sha1 "ac147e3524ce21a9d57c0fa84e3c8e2db26321e1" => :lion
|
|
|
|
end
|
|
|
|
|
2013-12-30 20:31:44 +00:00
|
|
|
depends_on "mhash"
|
|
|
|
|
|
|
|
resource "libmcrypt" do
|
|
|
|
url "https://downloads.sourceforge.net/project/mcrypt/Libmcrypt/2.5.8/libmcrypt-2.5.8.tar.gz"
|
|
|
|
sha1 "9a426532e9087dd7737aabccff8b91abf9151a7a"
|
|
|
|
end
|
2010-06-17 14:00:18 +00:00
|
|
|
|
2012-08-12 17:57:18 +00:00
|
|
|
option :universal
|
2010-04-07 05:58:35 +00:00
|
|
|
|
2013-12-30 20:31:44 +00:00
|
|
|
# Patch to correct inclusion of malloc function on OSX.
|
|
|
|
# Upstream: https://sourceforge.net/p/mcrypt/patches/14/
|
2014-05-18 18:52:37 +00:00
|
|
|
patch :DATA
|
2013-12-30 20:31:44 +00:00
|
|
|
|
2009-09-25 16:16:54 +00:00
|
|
|
def install
|
2012-08-12 17:57:18 +00:00
|
|
|
ENV.universal_binary if build.universal?
|
2013-12-30 20:31:44 +00:00
|
|
|
|
|
|
|
resource("libmcrypt").stage do
|
|
|
|
system "./configure", "--prefix=#{prefix}",
|
|
|
|
"--mandir=#{man}"
|
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
|
|
|
|
system "./configure", "--prefix=#{prefix}",
|
|
|
|
"--with-libmcrypt-prefix=#{prefix}",
|
2013-01-29 05:39:03 +00:00
|
|
|
"--mandir=#{man}"
|
2009-09-25 16:16:54 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
end
|
2013-12-30 20:31:44 +00:00
|
|
|
|
|
|
|
__END__
|
|
|
|
diff --git a/src/rfc2440.c b/src/rfc2440.c
|
|
|
|
index 5a1f296..fe15198 100644
|
|
|
|
--- a/src/rfc2440.c
|
|
|
|
+++ b/src/rfc2440.c
|
|
|
|
@@ -23,7 +23,12 @@
|
|
|
|
#include <zlib.h>
|
|
|
|
#endif
|
|
|
|
#include <stdio.h>
|
|
|
|
+
|
|
|
|
+#ifdef __APPLE__
|
|
|
|
+#include <malloc/malloc.h>
|
|
|
|
+#else
|
|
|
|
#include <malloc.h>
|
|
|
|
+#endif
|
|
|
|
|
|
|
|
#include "xmalloc.h"
|
|
|
|
#include "keys.h"
|