summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--security/Makefile1
-rw-r--r--security/ruby-cast_256/Makefile53
-rw-r--r--security/ruby-cast_256/distinfo1
-rw-r--r--security/ruby-cast_256/files/patch-rcast_256.cc18
-rw-r--r--security/ruby-cast_256/pkg-comment1
-rw-r--r--security/ruby-cast_256/pkg-descr5
-rw-r--r--security/ruby-cast_256/pkg-plist6
7 files changed, 85 insertions, 0 deletions
diff --git a/security/Makefile b/security/Makefile
index 748379b91b3d..e504a83b9535 100644
--- a/security/Makefile
+++ b/security/Makefile
@@ -239,6 +239,7 @@
SUBDIR += ruby-acl
SUBDIR += ruby-aes
SUBDIR += ruby-blowfish
+ SUBDIR += ruby-cast_256
SUBDIR += ruby-hmac
SUBDIR += ruby-mcrypt
SUBDIR += ruby-openssl
diff --git a/security/ruby-cast_256/Makefile b/security/ruby-cast_256/Makefile
new file mode 100644
index 000000000000..6d81c47210e9
--- /dev/null
+++ b/security/ruby-cast_256/Makefile
@@ -0,0 +1,53 @@
+# New ports collection makefile for: Ruby/CAST-256
+# Date created: 8 October 2002
+# Whom: Akinori MUSHA aka knu <knu@idaemons.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= cast_256
+PORTVERSION= 1.0
+CATEGORIES= security ruby
+MASTER_SITES= http://www.s-direktnet.de/homepages/neumann/Data/Michael/Kryptologie/Cast/
+PKGNAMEPREFIX= ${RUBY_PKGNAMEPREFIX}
+DISTNAME= ruby_${PORTNAME}
+DIST_SUBDIR= ruby
+
+MAINTAINER= knu@FreeBSD.org
+
+RESTRICTED= "Crypto; export-controlled"
+
+USE_ZIP= yes
+
+USE_RUBY= yes
+USE_RUBY_EXTCONF= yes
+
+WRKSRC= ${WRKDIR}/${PORTNAME}/gcc
+INSTALL_TARGET= site-install
+
+DOCS= ../readme.txt
+EXAMPLES= ../test.rb
+
+post-extract:
+ ${ECHO_CMD} >> ${WRKSRC}/cast_256.hpp
+ ( \
+ ${ECHO_CMD} 'require "mkmf"'; \
+ ${ECHO_CMD} 'have_library("stdc++")'; \
+ ${ECHO_CMD} 'create_makefile("rcast_256")'; \
+ ) > ${WRKSRC}/${RUBY_EXTCONF}
+ ${MKDIR} ${WRKSRC}/lib
+ ${MV} ${WRKSRC}/../cast_256.rb ${WRKSRC}/lib/
+
+post-install:
+.if !defined(NOPORTDOCS)
+ ${MKDIR} ${RUBY_MODEXAMPLESDIR}
+.for f in ${EXAMPLES}
+ ${INSTALL_DATA} ${WRKSRC}/${f} ${RUBY_MODEXAMPLESDIR}/
+.endfor
+ ${MKDIR} ${RUBY_MODDOCDIR}
+.for f in ${DOCS}
+ ${INSTALL_DATA} ${WRKSRC}/${f} ${RUBY_MODDOCDIR}/
+.endfor
+.endif
+
+.include <bsd.port.mk>
diff --git a/security/ruby-cast_256/distinfo b/security/ruby-cast_256/distinfo
new file mode 100644
index 000000000000..ec4db9065ce9
--- /dev/null
+++ b/security/ruby-cast_256/distinfo
@@ -0,0 +1 @@
+MD5 (ruby/ruby_cast_256.zip) = 02771bfdd77409b0c231c7199a969004
diff --git a/security/ruby-cast_256/files/patch-rcast_256.cc b/security/ruby-cast_256/files/patch-rcast_256.cc
new file mode 100644
index 000000000000..b50d62eec7db
--- /dev/null
+++ b/security/ruby-cast_256/files/patch-rcast_256.cc
@@ -0,0 +1,18 @@
+--- rcast_256.cc.orig Sun May 23 15:26:24 1999
++++ rcast_256.cc Tue Oct 8 18:46:29 2002
+@@ -107,12 +107,12 @@
+ }
+
+
+-extern "C" EXTERN void Init_rcast_256(void){
++extern "C" void Init_rcast_256(void){
+ VALUE mCAST_256 = rb_define_module("RCAST_256");
+
+ rb_define_const(mCAST_256, "ENCRYPT", INT2FIX(ENCRYPT) );
+ rb_define_const(mCAST_256, "DECRYPT", INT2FIX(DECRYPT) );
+
+- rb_define_module_function(mCAST_256, "set_key",(unsigned long (__cdecl *)(void)) set_key ,1);
+- rb_define_module_function(mCAST_256, "crypt_block",(unsigned long (__cdecl *)(void)) crypt_block ,3);
++ rb_define_module_function(mCAST_256, "set_key",(unsigned long (__cdecl *)(...)) set_key ,1);
++ rb_define_module_function(mCAST_256, "crypt_block",(unsigned long (__cdecl *)(...)) crypt_block ,3);
+ }
diff --git a/security/ruby-cast_256/pkg-comment b/security/ruby-cast_256/pkg-comment
new file mode 100644
index 000000000000..191b25c3d927
--- /dev/null
+++ b/security/ruby-cast_256/pkg-comment
@@ -0,0 +1 @@
+A Ruby extension library which implements CAST-256 encryption
diff --git a/security/ruby-cast_256/pkg-descr b/security/ruby-cast_256/pkg-descr
new file mode 100644
index 000000000000..304d99e28e7f
--- /dev/null
+++ b/security/ruby-cast_256/pkg-descr
@@ -0,0 +1,5 @@
+This is an implementation of the CAST-256 encryption algorithm for
+Ruby.
+
+Author: Michael Neumann <neumann@s-direktnet.de>
+WWW: http://www.s-direktnet.de/homepages/neumann/crypt/en/
diff --git a/security/ruby-cast_256/pkg-plist b/security/ruby-cast_256/pkg-plist
new file mode 100644
index 000000000000..357d35abd46a
--- /dev/null
+++ b/security/ruby-cast_256/pkg-plist
@@ -0,0 +1,6 @@
+%%RUBY_SITEARCHLIBDIR%%/rcast_256.so
+%%RUBY_SITELIBDIR%%/cast_256.rb
+%%PORTDOCS%%%%RUBY_MODEXAMPLESDIR%%/test.rb
+%%PORTDOCS%%@dirrm %%RUBY_MODEXAMPLESDIR%%
+%%PORTDOCS%%%%RUBY_MODDOCDIR%%/readme.txt
+%%PORTDOCS%%@dirrm %%RUBY_MODDOCDIR%%