[Midnightbsd-cvs] mports [23579] trunk/security: add cryptoapp

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Sun Jun 10 14:37:17 EDT 2018


Revision: 23579
          http://svnweb.midnightbsd.org/mports/?rev=23579
Author:   laffer1
Date:     2018-06-10 14:37:16 -0400 (Sun, 10 Jun 2018)
Log Message:
-----------
add cryptoapp

Modified Paths:
--------------
    trunk/security/Makefile

Added Paths:
-----------
    trunk/security/cryptopp/
    trunk/security/cryptopp/Makefile
    trunk/security/cryptopp/distinfo
    trunk/security/cryptopp/files/
    trunk/security/cryptopp/files/patch-GNUmakefile
    trunk/security/cryptopp/files/patch-config.h
    trunk/security/cryptopp/files/patch-misc.h
    trunk/security/cryptopp/pkg-descr
    trunk/security/cryptopp/pkg-plist

Modified: trunk/security/Makefile
===================================================================
--- trunk/security/Makefile	2018-06-10 18:33:58 UTC (rev 23578)
+++ trunk/security/Makefile	2018-06-10 18:37:16 UTC (rev 23579)
@@ -16,6 +16,7 @@
 SUBDIR += courierpassd
 SUBDIR += courieruserinfo
 SUBDIR += cracklib
+SUBDIR += cryptopp
 SUBDIR += cyrus-sasl2
 SUBDIR += cyrus-sasl2-ldapdb
 SUBDIR += cyrus-sasl2-saslauthd

Added: trunk/security/cryptopp/Makefile
===================================================================
--- trunk/security/cryptopp/Makefile	                        (rev 0)
+++ trunk/security/cryptopp/Makefile	2018-06-10 18:37:16 UTC (rev 23579)
@@ -0,0 +1,110 @@
+# Created by: George Reid <greid at ukug.uk.freebsd.org>
+# $FreeBSD: head/security/cryptopp/Makefile 449591 2017-09-10 20:55:38Z gerald $
+# $MidnightBSD$
+
+# Minor version bumps may not be ABI compatible and deskutils/cdcat
+# links to the static library, so bump PORTREVISION of dependent
+# ports when appropriate.
+
+PORTNAME=		cryptopp
+PORTVERSION=		5.6.5
+PORTREVISION=	3
+CATEGORIES=		security
+MASTER_SITES=		http://www.cryptopp.com/
+DISTNAME=		cryptopp${PORTVERSION:S/.//g}
+
+MAINTAINER=		ports at MidnightBSD.org
+COMMENT=		Free C++ class library of Cryptographic Primitives
+
+LICENSE=		unknown
+LICENSE_FILE=		${WRKSRC}/License.txt
+
+USES=			cpe gmake zip:infozip
+USE_LDCONFIG=		yes
+
+CPE_PRODUCT=		crypto++
+CPE_VENDOR=		cryptopp
+
+BROKEN_powerpc=		does not compile; unrecognized C++ options
+
+EXTRACT_BEFORE_ARGS=	-aq
+NO_WRKSUBDIR=		yes
+
+CXXFLAGS+=		-Wno-deprecated-declarations -fPIC
+MAKEFILE=		GNUmakefile
+ALL_TARGET=		static shared
+TEST_TARGET=		test
+
+LIBVERSION=		${PORTVERSION:R:R}
+PLIST_SUB+=		LIBVERSION=${LIBVERSION} \
+			PORTVERSION=${PORTVERSION}
+
+OPTIONS_DEFINE=		DEBUG DOCS FULL_DEBUG THREADS
+OPTIONS_DEFINE_amd64=	SIMD
+OPTIONS_DEFINE_i386=	SIMD
+OPTIONS_DEFAULT=	THREADS
+OPTIONS_SUB=		yes
+
+# Always compile with -DNDEBUG for release. Otherwise, sensitive
+# information could be accessed if an assert triggers.
+# See ${WRKSRC}/Readme.txt for more details.
+FULL_DEBUG_DESC=	Build with full debugging support (SECURITY RISK!!!)
+FULL_DEBUG_CXXFLAGS=	-DCRYPTOPP_DEBUG
+FULL_DEBUG_CXXFLAGS_OFF=-DNDEBUG
+FULL_DEBUG_IMPLIES=	DEBUG
+
+THREADS_LDFLAGS=	-lpthread
+
+.include <bsd.mport.options.mk>
+
+.if ${PORT_OPTIONS:MSIMD}
+.  if ${MACHINE_CPU:Msse2}
+USES+=		compiler:c++14-lang
+CXXFLAGS+=	-msse2
+.  else
+CXXFLAGS+=	-DCRYPTOPP_DISABLE_ASM -DCRYPTOPP_DISABLE_SSE2
+.  endif
+.  if ${MACHINE_CPU:Msse3} && ${MACHINE_CPU:Mssse3}
+CXXFLAGS+=	-msse3 -mssse3
+.  else
+CXXFLAGS+=	-DCRYPTOPP_DISABLE_SSE3
+.  endif
+.  if ${MACHINE_CPU:Msse41} && ${MACHINE_CPU:Msse42}
+CXXFLAGS+=	-msse4.1 -msse4.2
+.  else
+CXXFLAGS+=	-DCRYPTOPP_DISABLE_SSE4
+.  endif
+.else
+CXXFLAGS+=	-DCRYPTOPP_DISABLE_ASM
+.endif
+
+.include <bsd.port.pre.mk>
+
+.if ${PORT_OPTIONS:MSIMD} && ${MACHINE_CPU:Msse2} && ${CHOSEN_COMPILER_TYPE} == gcc
+USE_GCC=	yes
+.endif
+
+pre-configure-FULL_DEBUG-on:
+	@${ECHO_CMD}
+	@${ECHO_CMD} "----------------------------- WARNING!!! ----------------------------"
+	@${ECHO_CMD} "You have chosen to compile with full debugging support. If an assert"
+	@${ECHO_CMD} "triggers, sensitive information could possibly be egressed to the"
+	@${ECHO_CMD} "filesystem via a core dump. If this is not your intention, hit CTRL-C"
+	@${ECHO_CMD} "now and run 'make config clean' and disable the FULL_DEBUG option."
+	@${ECHO_CMD} "---------------------------------------------------------------------"
+	@${ECHO_CMD}
+	@sleep 10
+
+do-install:
+	${INSTALL_DATA} ${WRKSRC}/libcryptopp.a ${STAGEDIR}${PREFIX}/lib
+	${INSTALL_LIB} ${WRKSRC}/libcryptopp.so ${STAGEDIR}${PREFIX}/lib/libcryptopp.so.${PORTVERSION}
+	${LN} -fs libcryptopp.so.${PORTVERSION} ${STAGEDIR}${PREFIX}/lib/libcryptopp.so.${LIBVERSION}
+	${LN} -fs libcryptopp.so.${PORTVERSION} ${STAGEDIR}${PREFIX}/lib/libcryptopp.so
+	@${MKDIR} ${STAGEDIR}${PREFIX}/include/cryptopp
+	(for i in `${FIND} ${WRKSRC}/ -name '*.h' \
+			-and -not -name 'dll.h' \
+			-and -not -name 'resource.h'`; do \
+		${INSTALL_DATA} $$i ${STAGEDIR}${PREFIX}/include/cryptopp; \
+	done)
+
+.include <bsd.port.post.mk>


Property changes on: trunk/security/cryptopp/Makefile
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/security/cryptopp/distinfo
===================================================================
--- trunk/security/cryptopp/distinfo	                        (rev 0)
+++ trunk/security/cryptopp/distinfo	2018-06-10 18:37:16 UTC (rev 23579)
@@ -0,0 +1,3 @@
+TIMESTAMP = 1480818667
+SHA256 (cryptopp565.zip) = a75ef486fe3128008bbb201efee3dcdcffbe791120952910883b26337ec32c34
+SIZE (cryptopp565.zip) = 4220843


Property changes on: trunk/security/cryptopp/distinfo
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/security/cryptopp/files/patch-GNUmakefile
===================================================================
--- trunk/security/cryptopp/files/patch-GNUmakefile	                        (rev 0)
+++ trunk/security/cryptopp/files/patch-GNUmakefile	2018-06-10 18:37:16 UTC (rev 23579)
@@ -0,0 +1,40 @@
+--- GNUmakefile.orig	2016-10-10 23:49:54 UTC
++++ GNUmakefile
+@@ -41,7 +41,7 @@ SUNCC_511_OR_LATER := $(shell $(CXX) -V 
+ SUNCC_512_OR_LATER := $(shell $(CXX) -V 2>&1 | $(EGREP) -c "CC: (Sun|Studio) .* (5\.1[2-9]|5\.[2-9]|6\.)")
+ SUNCC_513_OR_LATER := $(shell $(CXX) -V 2>&1 | $(EGREP) -c "CC: (Sun|Studio) .* (5\.1[3-9]|5\.[2-9]|6\.)")
+ 
+-HAS_SOLIB_VERSION := $(IS_LINUX)
++HAS_SOLIB_VERSION := 1
+ 
+ # Fixup SunOS
+ ifeq ($(IS_SUN),1)
+@@ -126,11 +126,6 @@ ifeq ($(IS_X86)$(IS_X32)$(IS_CYGWIN)$(IS
+ endif
+ 
+ # Guard use of -march=native
+-ifeq ($(GCC42_OR_LATER)$(IS_NETBSD),10)
+-   CXXFLAGS += -march=native
+-else ifneq ($(CLANG_COMPILER)$(INTEL_COMPILER),00)
+-   CXXFLAGS += -march=native
+-else
+   # GCC 3.3 and "unknown option -march="
+   # Ubuntu GCC 4.1 compiler crash with -march=native
+   # NetBSD GCC 4.8 compiler and "bad value (native) for -march= switch"
+@@ -140,7 +135,6 @@ else
+   else ifeq ($(SUN_COMPILER)$(IS_X86),01)
+     CXXFLAGS += -m32
+   endif # X86/X32/X64
+-endif
+ 
+ # Aligned access required for -O3 and above due to vectorization
+ UNALIGNED_ACCESS := $(shell $(EGREP) -c "^[[:space:]]*//[[:space:]]*\#[[:space:]]*define[[:space:]]*CRYPTOPP_NO_UNALIGNED_DATA_ACCESS" config.h)
+@@ -404,7 +398,7 @@ ifeq ($(HAS_SOLIB_VERSION),1)
+ # Full version suffix for shared library
+ SOLIB_VERSION_SUFFIX=.$(LIB_MAJOR).$(LIB_MINOR).$(LIB_PATCH)
+ # Different patchlevels are compatible, minor versions are not
+-SOLIB_COMPAT_SUFFIX=.$(LIB_MAJOR).$(LIB_MINOR)
++SOLIB_COMPAT_SUFFIX=.$(LIB_MAJOR)
+ SOLIB_FLAGS=-Wl,-soname,libcryptopp.so$(SOLIB_COMPAT_SUFFIX)
+ endif # HAS_SOLIB_VERSION
+ 


Property changes on: trunk/security/cryptopp/files/patch-GNUmakefile
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/security/cryptopp/files/patch-config.h
===================================================================
--- trunk/security/cryptopp/files/patch-config.h	                        (rev 0)
+++ trunk/security/cryptopp/files/patch-config.h	2018-06-10 18:37:16 UTC (rev 23579)
@@ -0,0 +1,33 @@
+The definition of CRYPTOPP_BOOL_ALIGN16_ENABLED was incorrect for i386.
+For NetBSD, this resulted in the inability to build cryptopp on i386.
+On FreeBSD, it built, but deskutils/cdcat choked on it while building on
+FreeBSD 10/i386 and FreeBSD 11/i386. (PR: 192199)
+
+--- config.h.orig	2016-10-10 23:49:54 UTC
++++ config.h
+@@ -534,12 +534,6 @@ NAMESPACE_END
+ # endif
+ #endif
+ 
+-#if CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE || CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE || CRYPTOPP_BOOL_NEON_INTRINSICS_AVAILABLE || defined(CRYPTOPP_X64_MASM_AVAILABLE)
+-	#define CRYPTOPP_BOOL_ALIGN16 1
+-#else
+-	#define CRYPTOPP_BOOL_ALIGN16 0
+-#endif
+-
+ // how to allocate 16-byte aligned memory (for SSE2)
+ #if defined(CRYPTOPP_MSVC6PP_OR_LATER)
+ 	#define CRYPTOPP_MM_MALLOC_AVAILABLE
+@@ -553,6 +547,12 @@ NAMESPACE_END
+ 	#define CRYPTOPP_NO_ALIGNED_ALLOC
+ #endif
+ 
++#if CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE || CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE || CRYPTOPP_BOOL_NEON_INTRINSICS_AVAILABLE || defined(CRYPTOPP_X64_MASM_AVAILABLE) || !defined(CPRYPTO_NO_ALIGNED_ALLOC)
++	#define CRYPTOPP_BOOL_ALIGN16 1
++#else
++	#define CRYPTOPP_BOOL_ALIGN16 0
++#endif
++
+ // Apple always provides 16-byte aligned, and tells us to use calloc
+ // http://developer.apple.com/library/mac/documentation/Performance/Conceptual/ManagingMemory/Articles/MemoryAlloc.html
+ 


Property changes on: trunk/security/cryptopp/files/patch-config.h
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/security/cryptopp/files/patch-misc.h
===================================================================
--- trunk/security/cryptopp/files/patch-misc.h	                        (rev 0)
+++ trunk/security/cryptopp/files/patch-misc.h	2018-06-10 18:37:16 UTC (rev 23579)
@@ -0,0 +1,62 @@
+This fixes a warning triggered by testing an unsigned parameter
+against 0.  The patch solves this by creating a different template
+for signed case. (PR: 178827)
+
+--- misc.h.orig	2016-10-10 23:49:54 UTC
++++ misc.h
+@@ -529,8 +529,10 @@ inline bool SafeConvert(T1 from, T2 &to)
+ //! \param value the value to convert
+ //! \param base the base to use during the conversion
+ //! \returns the string representation of value in base.
++template<bool> struct IsUnsigned {};
++
+ template <class T>
+-std::string IntToString(T value, unsigned int base = 10)
++std::string IntToStringImpl(T value, unsigned int base, IsUnsigned<true>)
+ {
+ 	// Hack... set the high bit for uppercase.
+ 	static const unsigned int HIGH_BIT = (1U << 31);
+@@ -541,12 +543,6 @@ std::string IntToString(T value, unsigne
+ 	if (value == 0)
+ 		return "0";
+ 
+-	bool negate = false;
+-	if (value < 0)
+-	{
+-		negate = true;
+-		value = 0-value;	// VC .NET does not like -a
+-	}
+ 	std::string result;
+ 	while (value > 0)
+ 	{
+@@ -554,11 +550,30 @@ std::string IntToString(T value, unsigne
+ 		result = char((digit < 10 ? '0' : (CH - 10)) + digit) + result;
+ 		value /= base;
+ 	}
++	return result;
++}
++
++template <class T>
++std::string IntToStringImpl(T value, unsigned int base, IsUnsigned<false>)
++{
++	bool negate = false;
++	if (value < 0)
++	{
++		negate = true;
++		value = 0-value;	// VC .NET does not like -a
++	}
++	std::string result = IntToStringImpl(value, base, IsUnsigned<true>());
+ 	if (negate)
+ 		result = "-" + result;
+ 	return result;
+ }
+ 
++template <class T>
++std::string IntToString(T value, unsigned int base = 10)
++{
++	return IntToStringImpl(value, base, IsUnsigned<(static_cast<T>(-1) > 0)>());
++}
++
+ //! \brief Converts an unsigned value to a string
+ //! \param value the value to convert
+ //! \param base the base to use during the conversion


Property changes on: trunk/security/cryptopp/files/patch-misc.h
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/security/cryptopp/pkg-descr
===================================================================
--- trunk/security/cryptopp/pkg-descr	                        (rev 0)
+++ trunk/security/cryptopp/pkg-descr	2018-06-10 18:37:16 UTC (rev 23579)
@@ -0,0 +1,7 @@
+Crypto++ Library is a free C++ class library of cryptographic schemes.
+One purpose of Crypto++ is to act as a repository of public domain (not
+copyrighted) source code. Although the library is copyrighted as a
+compilation, the individual files in it (except for a few exceptions listed
+in the license) are in the public domain.
+
+WWW: http://www.cryptopp.com/


Property changes on: trunk/security/cryptopp/pkg-descr
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Added: trunk/security/cryptopp/pkg-plist
===================================================================
--- trunk/security/cryptopp/pkg-plist	                        (rev 0)
+++ trunk/security/cryptopp/pkg-plist	2018-06-10 18:37:16 UTC (rev 23579)
@@ -0,0 +1,147 @@
+include/cryptopp/3way.h
+include/cryptopp/adler32.h
+include/cryptopp/aes.h
+include/cryptopp/algebra.h
+include/cryptopp/algparam.h
+include/cryptopp/arc4.h
+include/cryptopp/argnames.h
+include/cryptopp/asn.h
+include/cryptopp/authenc.h
+include/cryptopp/base32.h
+include/cryptopp/base64.h
+include/cryptopp/basecode.h
+include/cryptopp/bench.h
+include/cryptopp/blake2.h
+include/cryptopp/blowfish.h
+include/cryptopp/blumshub.h
+include/cryptopp/camellia.h
+include/cryptopp/cast.h
+include/cryptopp/cbcmac.h
+include/cryptopp/ccm.h
+include/cryptopp/chacha.h
+include/cryptopp/channels.h
+include/cryptopp/cmac.h
+include/cryptopp/config.h
+include/cryptopp/cpu.h
+include/cryptopp/crc.h
+include/cryptopp/cryptlib.h
+include/cryptopp/default.h
+include/cryptopp/des.h
+include/cryptopp/dh.h
+include/cryptopp/dh2.h
+include/cryptopp/dmac.h
+include/cryptopp/dsa.h
+include/cryptopp/eax.h
+include/cryptopp/ec2n.h
+include/cryptopp/eccrypto.h
+include/cryptopp/ecp.h
+include/cryptopp/elgamal.h
+include/cryptopp/emsa2.h
+include/cryptopp/eprecomp.h
+include/cryptopp/esign.h
+include/cryptopp/factory.h
+include/cryptopp/fhmqv.h
+include/cryptopp/files.h
+include/cryptopp/filters.h
+include/cryptopp/fips140.h
+include/cryptopp/fltrimpl.h
+include/cryptopp/gcm.h
+include/cryptopp/gf256.h
+include/cryptopp/gf2_32.h
+include/cryptopp/gf2n.h
+include/cryptopp/gfpcrypt.h
+include/cryptopp/gost.h
+include/cryptopp/gzip.h
+include/cryptopp/hex.h
+include/cryptopp/hkdf.h
+include/cryptopp/hmac.h
+include/cryptopp/hmqv.h
+include/cryptopp/hrtimer.h
+include/cryptopp/ida.h
+include/cryptopp/idea.h
+include/cryptopp/integer.h
+include/cryptopp/iterhash.h
+include/cryptopp/keccak.h
+include/cryptopp/lubyrack.h
+include/cryptopp/luc.h
+include/cryptopp/mars.h
+include/cryptopp/md2.h
+include/cryptopp/md4.h
+include/cryptopp/md5.h
+include/cryptopp/mdc.h
+include/cryptopp/mersenne.h
+include/cryptopp/misc.h
+include/cryptopp/modarith.h
+include/cryptopp/modes.h
+include/cryptopp/modexppc.h
+include/cryptopp/mqueue.h
+include/cryptopp/mqv.h
+include/cryptopp/nbtheory.h
+include/cryptopp/network.h
+include/cryptopp/nr.h
+include/cryptopp/oaep.h
+include/cryptopp/oids.h
+include/cryptopp/osrng.h
+include/cryptopp/ossig.h
+include/cryptopp/panama.h
+include/cryptopp/pch.h
+include/cryptopp/pkcspad.h
+include/cryptopp/polynomi.h
+include/cryptopp/pssr.h
+include/cryptopp/pubkey.h
+include/cryptopp/pwdbased.h
+include/cryptopp/queue.h
+include/cryptopp/rabin.h
+include/cryptopp/randpool.h
+include/cryptopp/rc2.h
+include/cryptopp/rc5.h
+include/cryptopp/rc6.h
+include/cryptopp/rdrand.h
+include/cryptopp/rijndael.h
+include/cryptopp/ripemd.h
+include/cryptopp/rng.h
+include/cryptopp/rsa.h
+include/cryptopp/rw.h
+include/cryptopp/safer.h
+include/cryptopp/salsa.h
+include/cryptopp/seal.h
+include/cryptopp/secblock.h
+include/cryptopp/seckey.h
+include/cryptopp/seed.h
+include/cryptopp/serpent.h
+include/cryptopp/serpentp.h
+include/cryptopp/sha.h
+include/cryptopp/sha3.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/sosemanuk.h
+include/cryptopp/square.h
+include/cryptopp/stdcpp.h
+include/cryptopp/strciphr.h
+include/cryptopp/tea.h
+include/cryptopp/tiger.h
+include/cryptopp/trap.h
+include/cryptopp/trdlocal.h
+include/cryptopp/trunhash.h
+include/cryptopp/ttmac.h
+include/cryptopp/twofish.h
+include/cryptopp/validate.h
+include/cryptopp/vmac.h
+include/cryptopp/wait.h
+include/cryptopp/wake.h
+include/cryptopp/whrlpool.h
+include/cryptopp/winpipes.h
+include/cryptopp/words.h
+include/cryptopp/xtr.h
+include/cryptopp/xtrcrypt.h
+include/cryptopp/zdeflate.h
+include/cryptopp/zinflate.h
+include/cryptopp/zlib.h
+lib/libcryptopp.a
+lib/libcryptopp.so
+lib/libcryptopp.so.%%LIBVERSION%%
+lib/libcryptopp.so.%%PORTVERSION%%


Property changes on: trunk/security/cryptopp/pkg-plist
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property


More information about the Midnightbsd-cvs mailing list