Date: Sun, 18 Jul 2004 01:36:40 +0800 (CST) From: Xin LI <delphij@frontfree.net> To: FreeBSD-gnats-submit@FreeBSD.org Cc: kris@FreeBSD.org Subject: ports/69204: [PATCH] security/cryptopp: UPDATE+UNBREAK gcc 3.4.x Message-ID: <20040717173640.3C2331174D@beastie.frontfree.net> Resent-Message-ID: <200407171740.i6HHeJmH070932@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 69204 >Category: ports >Synopsis: [PATCH] security/cryptopp: UPDATE+UNBREAK gcc 3.4.x >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Sat Jul 17 17:40:19 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Xin LI >Release: FreeBSD 5.2-delphij i386 >Organization: The FreeBSD Simplified Chinese Project >Environment: System: FreeBSD beastie.frontfree.net 5.2-delphij FreeBSD 5.2-delphij #80: Thu Jun 24 17:30:33 CST 2004 delphij@beastie.frontfree.net:/usr/obj/usr/src/sys/BEASTIE i386 >Description: crypto++ 5.1 was broken with gcc 3.4. The attached patch: - Update to crypto++ 5.1 - Unbreak gcc 3.4.1 build (gcc built with kan@'s patch aginst HEAD) - Use find instead of listing all files in order to ease future updates as well as pet portlint - Add a patch to make crypto++'s integer.c buildable under FreeBSD. FreeBSD's malloc(3) has already do an excellent job on alignment so there is no need to use memalign(). - Get maintainership. >How-To-Repeat: N/A >Fix: Apply the following patch --- patch-cryptopp begins here --- ? work Index: Makefile =================================================================== RCS file: /home/ncvs/ports/security/cryptopp/Makefile,v retrieving revision 1.8 diff -u -r1.8 Makefile --- Makefile 7 Mar 2004 12:42:58 -0000 1.8 +++ Makefile 17 Jul 2004 17:30:45 -0000 @@ -6,8 +6,7 @@ # PORTNAME= cryptopp -PORTVERSION= 5.1 -PORTREVISION= 2 +PORTVERSION= 5.2 CATEGORIES= security MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} \ http://www.eskimo.com/~weidai/ \ @@ -17,7 +16,7 @@ DISTNAME= crypto${PORTVERSION:S/.//g} EXTRACT_SUFX= .zip -MAINTAINER= ports@FreeBSD.org +MAINTAINER= delphij@FreeBSD.org.cn COMMENT= A free C++ class library of Cryptographic Primitives NO_WRKSUBDIR= yes @@ -26,27 +25,6 @@ USE_GMAKE= yes MAKEFILE= GNUmakefile -HEADERFILES= 3way.h adler32.h aes.h algebra.h algparam.h arc4.h \ - argnames.h asn.h base64.h basecode.h bench.h \ - blowfish.h blumshub.h cast.h cbcmac.h channels.h \ - config.h crc.h cryptlib.h default.h des.h dh.h dh2.h \ - diamond.h dmac.h dsa.h ec2n.h eccrypto.h ecp.h \ - elgamal.h eprecomp.h esign.h factory.h files.h \ - filters.h fips140.h fltrimpl.h gf256.h gf2_32.h gf2n.h \ - gfpcrypt.h gost.h gzip.h haval.h hex.h hmac.h \ - hrtimer.h ida.h idea.h integer.h iterhash.h lubyrack.h \ - luc.h mars.h md2.h md4.h md5.h md5mac.h mdc.h misc.h \ - modarith.h modes.h modexppc.h mqueue.h mqv.h \ - nbtheory.h network.h nr.h oaep.h oids.h osrng.h \ - panama.h pch.h pkcspad.h polynomi.h pssr.h pubkey.h \ - pwdbased.h queue.h rabin.h randpool.h rc2.h rc5.h \ - rc6.h rijndael.h ripemd.h rng.h rsa.h rw.h safer.h \ - seal.h secblock.h seckey.h serpent.h sha.h shark.h \ - simple.h skipjack.h smartptr.h socketft.h square.h \ - strciphr.h tea.h tiger.h trdlocal.h trunhash.h \ - twofish.h validate.h wait.h wake.h winpipes.h words.h \ - xormac.h xtr.h xtrcrypt.h zdeflate.h zinflate.h zlib.h - .include <bsd.port.pre.mk> .if ${ARCH} != "i386" && ${ARCH} != "alpha" @@ -59,9 +37,11 @@ ${INSTALL_PROGRAM} ${WRKSRC}/cryptest ${PREFIX}/bin ${INSTALL_DATA} ${WRKSRC}/libcryptopp.a ${PREFIX}/lib ${MKDIR} ${PREFIX}/include/cryptopp -.for H in ${HEADERFILES} - ${INSTALL_DATA} ${WRKSRC}/$H ${PREFIX}/include/cryptopp -.endfor + (for i in `${FIND} ${WRKSRC}/ -name '*.h' \ + -and -not -name 'dll.h' \ + -and -not -name 'resource.h'`; do \ + ${INSTALL_DATA} $$i ${PREFIX}/include/cryptopp; \ + done) .if !defined(NOPORTDOCS) ${MKDIR} ${PREFIX}/share/doc/cryptopp ${CP} ${WRKSRC}/Readme.txt ${PREFIX}/share/doc/cryptopp/README Index: distinfo =================================================================== RCS file: /home/ncvs/ports/security/cryptopp/distinfo,v retrieving revision 1.3 diff -u -r1.3 distinfo --- distinfo 29 Jan 2004 16:11:27 -0000 1.3 +++ distinfo 17 Jul 2004 17:30:45 -0000 @@ -1,2 +1,2 @@ -MD5 (crypto51.zip) = f4bfd4ac39dc1b7f0764d61a1ec4df16 -SIZE (crypto51.zip) = 829560 +MD5 (crypto52.zip) = 5c09d632ef36e889f1727fb50cb21c4d +SIZE (crypto52.zip) = 1045252 Index: pkg-plist =================================================================== RCS file: /home/ncvs/ports/security/cryptopp/pkg-plist,v retrieving revision 1.2 diff -u -r1.2 pkg-plist --- pkg-plist 12 Apr 2003 03:23:03 -0000 1.2 +++ pkg-plist 17 Jul 2004 17:30:45 -0000 @@ -1,5 +1,4 @@ bin/cryptest -lib/libcryptopp.a include/cryptopp/3way.h include/cryptopp/adler32.h include/cryptopp/aes.h @@ -8,11 +7,13 @@ include/cryptopp/arc4.h include/cryptopp/argnames.h include/cryptopp/asn.h +include/cryptopp/base32.h include/cryptopp/base64.h include/cryptopp/basecode.h include/cryptopp/bench.h include/cryptopp/blowfish.h include/cryptopp/blumshub.h +include/cryptopp/camellia.h include/cryptopp/cast.h include/cryptopp/cbcmac.h include/cryptopp/channels.h @@ -23,7 +24,6 @@ include/cryptopp/des.h include/cryptopp/dh.h include/cryptopp/dh2.h -include/cryptopp/diamond.h include/cryptopp/dmac.h include/cryptopp/dsa.h include/cryptopp/ec2n.h @@ -95,21 +95,25 @@ include/cryptopp/seckey.h include/cryptopp/serpent.h include/cryptopp/sha.h +include/cryptopp/shacal2.h include/cryptopp/shark.h include/cryptopp/simple.h include/cryptopp/skipjack.h include/cryptopp/smartptr.h include/cryptopp/socketft.h include/cryptopp/square.h +include/cryptopp/stdcpp.h include/cryptopp/strciphr.h include/cryptopp/tea.h include/cryptopp/tiger.h include/cryptopp/trdlocal.h include/cryptopp/trunhash.h +include/cryptopp/ttmac.h include/cryptopp/twofish.h include/cryptopp/validate.h include/cryptopp/wait.h include/cryptopp/wake.h +include/cryptopp/whrlpool.h include/cryptopp/winpipes.h include/cryptopp/words.h include/cryptopp/xormac.h @@ -118,6 +122,7 @@ include/cryptopp/zdeflate.h include/cryptopp/zinflate.h include/cryptopp/zlib.h +lib/libcryptopp.a @dirrm include/cryptopp %%PORTDOCS%%share/doc/cryptopp/README %%PORTDOCS%%share/doc/cryptopp/License Index: files/patch-ab =================================================================== RCS file: files/patch-ab diff -N files/patch-ab --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/patch-ab 17 Jul 2004 17:30:45 -0000 @@ -0,0 +1,20 @@ +--- integer.cpp.orig Sun Jul 18 00:46:23 2004 ++++ integer.cpp Sun Jul 18 00:46:46 2004 +@@ -20,7 +20,7 @@ + #ifdef SSE2_INTRINSICS_AVAILABLE + #ifdef __GNUC__ + #include <xmmintrin.h> +- #include <malloc.h> ++ #include <stdlib.h> + #include <signal.h> + #include <setjmp.h> + #else +@@ -56,7 +56,7 @@ + { + void *p; + #ifdef __GNUC__ +- while (!(p = memalign(16, sizeof(T)*n))) ++ while (!(p = malloc(sizeof(T)*n))) + #else + while (!(p = _mm_malloc(sizeof(T)*n, 16))) + #endif --- patch-cryptopp ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040717173640.3C2331174D>