1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-02-03 11:12:13 +00:00

Update to 3.2.3 release:

- OPTIONSify (respect CFLAGS / OPTIMIZED_CFLAGS)
- Add support for PKCS#11 tokens
- Grap maintainership
This commit is contained in:
Alex Dupre 2006-07-14 07:06:17 +00:00
parent cc3ebf0328
commit 51d271f40f
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=167763
9 changed files with 83 additions and 26 deletions

View File

@ -6,15 +6,17 @@
#
PORTNAME= cryptlib
PORTVERSION= 3.2.2
PORTVERSION= 3.2.3
CATEGORIES= security
MASTER_SITES= ftp://ftp.franken.de/pub/crypt/cryptlib/
DISTNAME= cl${PORTVERSION:S/.//g}
EXTRACT_SUFX= .zip
MAINTAINER= ports@FreeBSD.org
MAINTAINER= ale@FreeBSD.org
COMMENT= A powerful security programming toolkit
OPTIONS= OPTIMIZED_CFLAGS "Build with optimized CFLAGS" off
ONLY_FOR_ARCHS= i386
USE_ZIP= yes
@ -23,27 +25,32 @@ NO_WRKSUBDIR= yes
USE_GMAKE= yes
MAKEFILE= makefile
ALL_TARGET= default FreeBSD shared
USE_LDCONFIG= yes
INSTALLS_SHLIB= yes
PORTDOCS= README
.include <bsd.port.pre.mk>
post-patch:
${REINPLACE_CMD} -e 's/-lc_r/${PTHREAD_LIBS}/' ${WRKSRC}/makefile
.if defined(WITH_OPTIMIZED_CFLAGS)
${REINPLACE_CMD} -e 's/%%CFLAGS%%/${CFLAGS:N-O*:N-f*} -fomit-frame-pointer -O3/' ${WRKSRC}/makefile
.else
${REINPLACE_CMD} -e 's/%%CFLAGS%%/${CFLAGS}/' ${WRKSRC}/makefile
.endif
${REINPLACE_CMD} -e 's/%%PTHREAD_CFLAGS%%/${PTHREAD_CFLAGS}/;s/%%PTHREAD_LIBS%%/${PTHREAD_LIBS}/' \
${WRKSRC}/makefile
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/endian ${PREFIX}/bin
${INSTALL_DATA} ${WRKSRC}/libcl.a ${WRKSRC}/libcl.so.${PORTVERSION} \
${PREFIX}/lib
${LN} -sf ${PREFIX}/lib/libcl.so.${PORTVERSION} ${PREFIX}/lib/libcl.so
${LN} -sf ${PREFIX}/lib/libcl.so.${PORTVERSION} ${PREFIX}/lib/libcl.so.3
${LN} -sf ${PREFIX}/lib/libcl.so.3 ${PREFIX}/lib/libcl.so
${INSTALL_DATA} ${WRKSRC}/cryptlib.h ${PREFIX}/include
.if !defined(NOPORTDOCS)
post-install:
. if !defined(NOPORTDOCS)
${MKDIR} ${PREFIX}/share/doc/cryptlib
${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/doc/cryptlib
. endif
${STRIP_CMD} ${PREFIX}/bin/endian
${CAT} ${PKGMESSAGE}
${MKDIR} ${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
.endif
.include <bsd.port.post.mk>

View File

@ -1,3 +1,3 @@
MD5 (cl322.zip) = 0944963faae4566f54aeb45c6e803142
SHA256 (cl322.zip) = 6b0b71f11f2584c2270394f350e653b9a689ea7e4b9aa1c082902d43b1f01087
SIZE (cl322.zip) = 3072208
MD5 (cl323.zip) = db26fcb1060afe2840fef9cb4bae7b1e
SHA256 (cl323.zip) = 208acb1351c6a1f93a5f07ba9a5ffcffc4eec3dceba9b823a1b0018a2a58c7fd
SIZE (cl323.zip) = 3730765

View File

@ -0,0 +1,11 @@
--- makefile.orig Fri Jul 14 08:16:12 2006
+++ makefile Fri Jul 14 08:17:26 2006
@@ -1349,7 +1349,7 @@
FreeBSD:
@./tools/buildasm.sh $(AS) $(OBJPATH)
make $(DEFINES) EXTRAOBJS="$(ASMOBJS)" CFLAGS="$(CFLAGS) -DUSE_ASM \
- -fomit-frame-pointer -O3 -pthread"
+ %%CFLAGS%% %%PTHREAD_CFLAGS%% %%PTHREAD_LIBS%%"
NetBSD:
@./tools/buildasm.sh $(AS) $(OBJPATH)
make $(DEFINES) EXTRAOBJS="$(ASMOBJS)" CFLAGS="$(CFLAGS) -DUSE_ASM \

View File

@ -0,0 +1,10 @@
--- misc/config.h.orig Fri Jul 14 08:18:03 2006
+++ misc/config.h Fri Jul 14 08:19:19 2006
@@ -168,6 +168,7 @@
/* General device usage */
+#define USE_PKCS11
#if defined( USE_PKCS11 ) || defined( USE_FORTEZZA ) || defined( USE_CRYPTOAPI )
#define USE_DEVICES
#endif /* Device types */

View File

@ -0,0 +1,11 @@
--- misc/os_spec.c.orig Fri Jul 14 08:46:10 2006
+++ misc/os_spec.c Fri Jul 14 08:46:38 2006
@@ -1275,7 +1275,7 @@
return( sysCaps );
}
-#elif defined( __GNUC__ ) && defined( __i386__ )
+#elif defined( __GNUC__ ) && defined( __i386__ ) && !defined(__FreeBSD__)
#if SYSCAP_FLAG_RDTSC != 0x01
#error Need to sync SYSCAP_FLAG_RDTSC with equivalent asm definition

View File

@ -0,0 +1,11 @@
--- misc/os_spec.h.orig Fri Jul 14 08:31:41 2006
+++ misc/os_spec.h Fri Jul 14 08:31:18 2006
@@ -481,7 +481,7 @@
#if defined( __WINDOWS__ ) || \
( defined( __UNIX__ ) && \
- ( ( defined( sun ) && OSVERSION > 4 ) || defined( __linux__ ) || \
+ ( ( defined( sun ) && OSVERSION > 4 ) || defined( __linux__ ) || defined(__FreeBSD__) || \
defined( _AIX ) || ( defined( __APPLE__ ) && !defined( __MAC__ ) ) ) )
#define DYNAMIC_LOAD

View File

@ -0,0 +1,16 @@
--- tools/ccopts.sh.orig Fri Jul 14 08:37:59 2006
+++ tools/ccopts.sh Fri Jul 14 08:38:19 2006
@@ -129,13 +129,6 @@
# "version gcc" (we can't use just "gcc" by itself since this appears
# elsewhere in the gcc -v output).
-if [ `uname -m | grep "i[3,4,5,6]86"` > /dev/null ] ; then
- if [ `gcc --version 2>&1 | head -n 1 | tr -d '[A-Za-z]. ()' | cut -c 1` -gt 2 ] ; then
- CCARGS="$CCARGS -march=pentium" ;
- else
- CCARGS="$CCARGS -mcpu=pentium" ;
- fi
-fi
# Check for gcc 4.x with its stupid default setting of -Wpointer-sign,
# which leads to endless warnings about signed vs.unsigned char problems -

View File

@ -1,7 +0,0 @@
===================================================================
For more information, please refer to the original web site:
http://www.cs.auckland.ac.nz/~pgut001/cryptlib/
Also, source codes from the distfiles are well explained. UTSL!
===================================================================

View File

@ -1,7 +1,5 @@
bin/endian
include/cryptlib.h
lib/libcl.a
lib/libcl.so
lib/libcl.so.3.2.2
%%PORTDOCS%%share/doc/cryptlib/README
%%PORTDOCS%%@dirrm share/doc/cryptlib
lib/libcl.so.3
lib/libcl.so.3.2.3