Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Dec 2016 09:51:27 +0000 (UTC)
From:      "Jason E. Hale" <jhale@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-branches@freebsd.org
Subject:   svn commit: r428043 - in branches/2016Q4: audio/clementine-player deskutils/cdcat multimedia/kvazaar net-p2p/amule net-p2p/amule-devel security/cryptopp security/cryptopp/files
Message-ID:  <201612070951.uB79pR5h088562@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhale
Date: Wed Dec  7 09:51:26 2016
New Revision: 428043
URL: https://svnweb.freebsd.org/changeset/ports/428043

Log:
  MFH: r425256 r427282 r427478 r428022
  
  Now builds on sparc64.
  
  Approved by:	portmgr (tier-2 blanket)
  
  Release this back to pool.
  
  Set library SONAME, this makes pkg correctly detect provided package
  functionality and fixes pkg check -d.
  
  PR:		214857
  Submitted by:	myself
  Approved by:	delphij no longer maintainer
  
  - Update security/cryptopp to 5.6.5
  - Add LICENSE (BSL)
  - Add CPE data
  - Remove STATIC option and always install the shared library;
    no reason not to.
  - Remove GCC option and use USES=compiler framework
  - Add FULL_DEBUG option to address CVE-2016-7420 and add a warning if trying
    to use it. It will allow the asserts to be enabled which could be a
    security risk. The standard DEBUG option is now safe to use.
  - Add SIMD option for i386 and amd64 - requires a recent clang or gcc
  - Don't install the cryptest binary; it is really only used for regression
    testing, so only build it for the TEST_TARGET. It is useless without the
    data files anyways.
  - Take maintainership
  - Bump PORTREVISON on dependent ports due to shared library bump
  
  PR:		215015
  Reported by:	<fcsk.aim@gmail.com>
  Security:	eab68cff-bc0c-11e6-b2ca-001b3856973b
  
  Approved by:	ports-secteam (junovitch)

Deleted:
  branches/2016Q4/security/cryptopp/files/patch-nbtheory.cpp
  branches/2016Q4/security/cryptopp/files/patch-wake.cpp
Modified:
  branches/2016Q4/audio/clementine-player/Makefile
  branches/2016Q4/deskutils/cdcat/Makefile
  branches/2016Q4/multimedia/kvazaar/Makefile
  branches/2016Q4/net-p2p/amule-devel/Makefile
  branches/2016Q4/net-p2p/amule/Makefile
  branches/2016Q4/security/cryptopp/Makefile
  branches/2016Q4/security/cryptopp/distinfo
  branches/2016Q4/security/cryptopp/files/patch-GNUmakefile
  branches/2016Q4/security/cryptopp/files/patch-config.h
  branches/2016Q4/security/cryptopp/files/patch-misc.h
  branches/2016Q4/security/cryptopp/pkg-plist
Directory Properties:
  branches/2016Q4/   (props changed)

Modified: branches/2016Q4/audio/clementine-player/Makefile
==============================================================================
--- branches/2016Q4/audio/clementine-player/Makefile	Wed Dec  7 09:48:39 2016	(r428042)
+++ branches/2016Q4/audio/clementine-player/Makefile	Wed Dec  7 09:51:26 2016	(r428043)
@@ -3,6 +3,7 @@
 
 PORTNAME=	clementine
 PORTVERSION=	1.3.1
+PORTREVISION=	1
 CATEGORIES=	audio
 PKGNAMESUFFIX=	-player
 

Modified: branches/2016Q4/deskutils/cdcat/Makefile
==============================================================================
--- branches/2016Q4/deskutils/cdcat/Makefile	Wed Dec  7 09:48:39 2016	(r428042)
+++ branches/2016Q4/deskutils/cdcat/Makefile	Wed Dec  7 09:51:26 2016	(r428043)
@@ -3,7 +3,7 @@
 
 PORTNAME=	cdcat
 PORTVERSION=	2.3.1
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	deskutils
 MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}
 

Modified: branches/2016Q4/multimedia/kvazaar/Makefile
==============================================================================
--- branches/2016Q4/multimedia/kvazaar/Makefile	Wed Dec  7 09:48:39 2016	(r428042)
+++ branches/2016Q4/multimedia/kvazaar/Makefile	Wed Dec  7 09:51:26 2016	(r428043)
@@ -3,7 +3,7 @@
 PORTNAME=	kvazaar
 DISTVERSIONPREFIX=	v
 DISTVERSION?=	1.0.0
-PORTREVISION?=	0
+PORTREVISION?=	1
 CATEGORIES=	multimedia
 
 MAINTAINER=	jbeich@FreeBSD.org

Modified: branches/2016Q4/net-p2p/amule-devel/Makefile
==============================================================================
--- branches/2016Q4/net-p2p/amule-devel/Makefile	Wed Dec  7 09:48:39 2016	(r428042)
+++ branches/2016Q4/net-p2p/amule-devel/Makefile	Wed Dec  7 09:51:26 2016	(r428043)
@@ -3,7 +3,7 @@
 
 PORTNAME=	amule
 PORTVERSION=	10964
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	net-p2p
 MASTER_SITES=	http://amule.sourceforge.net/tarballs/
 PKGNAMESUFFIX=	-devel

Modified: branches/2016Q4/net-p2p/amule/Makefile
==============================================================================
--- branches/2016Q4/net-p2p/amule/Makefile	Wed Dec  7 09:48:39 2016	(r428042)
+++ branches/2016Q4/net-p2p/amule/Makefile	Wed Dec  7 09:51:26 2016	(r428043)
@@ -3,6 +3,7 @@
 
 PORTNAME=	amule
 PORTVERSION=	2.3.2
+PORTREVISION=	1
 CATEGORIES=	net-p2p
 MASTER_SITES=	SF/${PORTNAME}/aMule/${PORTVERSION}
 DISTNAME=	aMule-${PORTVERSION}

Modified: branches/2016Q4/security/cryptopp/Makefile
==============================================================================
--- branches/2016Q4/security/cryptopp/Makefile	Wed Dec  7 09:48:39 2016	(r428042)
+++ branches/2016Q4/security/cryptopp/Makefile	Wed Dec  7 09:51:26 2016	(r428043)
@@ -1,73 +1,112 @@
 # Created by: George Reid <greid@ukug.uk.freebsd.org>
 # $FreeBSD$
 
+# 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.2
-PORTREVISION=		2
+PORTVERSION=		5.6.5
 CATEGORIES=		security
-MASTER_SITES=		SF \
-			http://www.cryptopp.com/
+MASTER_SITES=		http://www.cryptopp.com/
 DISTNAME=		cryptopp${PORTVERSION:S/.//g}
 
-MAINTAINER=		delphij@FreeBSD.org
+MAINTAINER=		jhale@FreeBSD.org
 COMMENT=		Free C++ class library of Cryptographic Primitives
 
-OPTIONS_DEFINE=		DEBUG DOCS GCC STATIC THREADS
-OPTIONS_DEFAULT=	THREADS
-STATIC_DESC=		Build static version only (no shared libs)
+LICENSE=		BSL
+LICENSE_FILE=		${WRKSRC}/License.txt
 
-.include <bsd.port.options.mk>
+USES=			cpe gmake zip:infozip
+USE_LDCONFIG=		yes
+
+CPE_PRODUCT=		crypto++
+CPE_VENDOR=		cryptopp
+
+BROKEN_powerpc=		does not compile; unrecognized C++ options
 
-NO_WRKSUBDIR=		yes
 EXTRACT_BEFORE_ARGS=	-aq
-USES=			gmake zip:infozip
+NO_WRKSUBDIR=		yes
+
+CXXFLAGS+=		-Wno-deprecated-declarations -fPIC
 MAKEFILE=		GNUmakefile
+ALL_TARGET=		static shared
+TEST_TARGET=		test
 
-LIBVERSION=		0
-PLIST_SUB+=		LIBVERSION=${LIBVERSION}
-PLIST_SUB+=		PORTVERSION=${PORTVERSION}
+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
 
-.if !${PORT_OPTIONS:MDEBUG}
-CXXFLAGS+=		-DNDEBUG
-.endif
+# 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
 
-.if ${PORT_OPTIONS:MGCC}
-USE_GCC=		yes
-.endif
+THREADS_LDFLAGS=	-lpthread
 
-.if ${PORT_OPTIONS:MSTATIC}
-PLIST_SUB+=		DYNAMIC_ENABLED="@comment "
+.include <bsd.port.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
-PLIST_SUB+=		DYNAMIC_ENABLED=""
-MAKE_ARGS=		all libcryptopp.so
-CXXFLAGS+=		-fPIC
-USE_LDCONFIG=		yes
+CXXFLAGS+=	-DCRYPTOPP_DISABLE_ASM
 .endif
 
-.if ${PORT_OPTIONS:MTHREADS}
-LDFLAGS+=		-lpthread
+.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_PROGRAM} ${WRKSRC}/cryptest.exe ${STAGEDIR}${PREFIX}/bin/cryptest
 	${INSTALL_DATA} ${WRKSRC}/libcryptopp.a ${STAGEDIR}${PREFIX}/lib
-	${MKDIR} ${STAGEDIR}${PREFIX}/include/cryptopp
+	${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)
-.if !${PORT_OPTIONS:MSTATIC}
-	${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.${LIBVERSION} ${STAGEDIR}${PREFIX}/lib/libcryptopp.so
-.endif
-	${MKDIR} ${STAGEDIR}${PREFIX}/share/doc/cryptopp
-	${CP} ${WRKSRC}/Readme.txt ${STAGEDIR}${PREFIX}/share/doc/cryptopp/README
-	${CP} ${WRKSRC}/License.txt ${STAGEDIR}${PREFIX}/share/doc/cryptopp/License
 
-.if ${ARCH} == "ia64" || ${ARCH} == "powerpc" || ${ARCH} == "sparc64"
-BROKEN=		Does not compile on sparc64: unrecognized C++ options
-.endif
+do-install-DOCS-on:
+	@${MKDIR} ${STAGEDIR}${DOCSDIR}
+	${INSTALL_DATA} ${WRKSRC}/Readme.txt ${STAGEDIR}${DOCSDIR}/README
 
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>

Modified: branches/2016Q4/security/cryptopp/distinfo
==============================================================================
--- branches/2016Q4/security/cryptopp/distinfo	Wed Dec  7 09:48:39 2016	(r428042)
+++ branches/2016Q4/security/cryptopp/distinfo	Wed Dec  7 09:51:26 2016	(r428043)
@@ -1,2 +1,3 @@
-SHA256 (cryptopp562.zip) = 5cbfd2fcb4a6b3aab35902e2e0f3b59d9171fee12b3fc2b363e1801dfec53574
-SIZE (cryptopp562.zip) = 1137964
+TIMESTAMP = 1480818667
+SHA256 (cryptopp565.zip) = a75ef486fe3128008bbb201efee3dcdcffbe791120952910883b26337ec32c34
+SIZE (cryptopp565.zip) = 4220843

Modified: branches/2016Q4/security/cryptopp/files/patch-GNUmakefile
==============================================================================
--- branches/2016Q4/security/cryptopp/files/patch-GNUmakefile	Wed Dec  7 09:48:39 2016	(r428042)
+++ branches/2016Q4/security/cryptopp/files/patch-GNUmakefile	Wed Dec  7 09:51:26 2016	(r428043)
@@ -1,26 +1,40 @@
---- ./GNUmakefile.orig	2013-02-20 15:30:52.000000000 -0500
-+++ ./GNUmakefile	2014-02-05 14:26:22.994957010 -0500
-@@ -1,4 +1,4 @@
--CXXFLAGS = -DNDEBUG -g -O2
-+#CXXFLAGS = -DNDEBUG -g -O2
- # -O3 fails to link on Cygwin GCC version 4.5.3
- # -fPIC is supported. Please report any breakage of -fPIC as a bug.
- # CXXFLAGS += -fPIC
-@@ -38,8 +38,6 @@
- ifneq ($(GCC42_OR_LATER),0)
- ifeq ($(UNAME),Darwin)
- CXXFLAGS += -arch x86_64 -arch i386
--else
--CXXFLAGS += -march=native
- endif
+--- 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
  
-@@ -165,7 +163,7 @@
- 	$(RANLIB) $@
+ # 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
  
- libcryptopp.so: $(LIBOBJS)
--	$(CXX) -shared -o $@ $(LIBOBJS)
-+	$(CXX) -shared -o $@ $(CXXFLAGS) $(LDFLAGS) $(LIBOBJS)
+ # 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
  
- cryptest.exe: libcryptopp.a $(TESTOBJS)
- 	$(CXX) -o $@ $(CXXFLAGS) $(TESTOBJS) ./libcryptopp.a $(LDFLAGS) $(LDLIBS)

Modified: branches/2016Q4/security/cryptopp/files/patch-config.h
==============================================================================
--- branches/2016Q4/security/cryptopp/files/patch-config.h	Wed Dec  7 09:48:39 2016	(r428042)
+++ branches/2016Q4/security/cryptopp/files/patch-config.h	Wed Dec  7 09:51:26 2016	(r428043)
@@ -1,29 +1,33 @@
---- config.h.orig	2013-02-20 14:30:54.000000000 +0000
+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
-@@ -290,12 +290,6 @@ NAMESPACE_END
- 	#define CRYPTOPP_BOOL_AESNI_INTRINSICS_AVAILABLE 0
+@@ -534,12 +534,6 @@ NAMESPACE_END
+ # endif
  #endif
  
--#if CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE || CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE || defined(CRYPTOPP_X64_MASM_AVAILABLE)
--	#define CRYPTOPP_BOOL_ALIGN16_ENABLED 1
+-#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_ENABLED 0
+-	#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
-@@ -307,6 +301,13 @@ NAMESPACE_END
+@@ -553,6 +547,12 @@ NAMESPACE_END
  	#define CRYPTOPP_NO_ALIGNED_ALLOC
  #endif
  
-+#if CRYPTOPP_BOOL_SSE2_INTRINSICS_AVAILABLE || CRYPTOPP_BOOL_SSE2_ASM_AVAILABLE || defined(CRYPTOPP_X64_MASM_AVAILABLE) || !defined(CPRYPTO_NO_ALIGNED_ALLOC)
-+	#define CRYPTOPP_BOOL_ALIGN16_ENABLED 1
++#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_ENABLED 0
++	#define CRYPTOPP_BOOL_ALIGN16 0
 +#endif
 +
-+
- // how to disable inlining
- #if defined(_MSC_VER) && _MSC_VER >= 1300
- #	define CRYPTOPP_NOINLINE_DOTDOTDOT
+ // 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
+ 

Modified: branches/2016Q4/security/cryptopp/files/patch-misc.h
==============================================================================
--- branches/2016Q4/security/cryptopp/files/patch-misc.h	Wed Dec  7 09:48:39 2016	(r428042)
+++ branches/2016Q4/security/cryptopp/files/patch-misc.h	Wed Dec  7 09:51:26 2016	(r428043)
@@ -1,54 +1,62 @@
---- misc.h.orig	2010-08-06 18:46:18.000000000 +0000
-+++ misc.h	2013-05-22 08:43:01.949194748 +0000
-@@ -405,17 +405,13 @@
- 	return order == GetNativeByteOrder();
- }
- 
+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 a, unsigned int base = 10)
-+std::string IntToStringImpl(T a, unsigned int base, IsUnsigned<true>)
+-std::string IntToString(T value, unsigned int base = 10)
++std::string IntToStringImpl(T value, unsigned int base, IsUnsigned<true>)
  {
- 	if (a == 0)
+ 	// 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 (a < 0)
+-	if (value < 0)
 -	{
 -		negate = true;
--		a = 0-a;	// VC .NET does not like -a
+-		value = 0-value;	// VC .NET does not like -a
 -	}
  	std::string result;
- 	while (a > 0)
+ 	while (value > 0)
  	{
-@@ -423,11 +419,30 @@
- 		result = char((digit < 10 ? '0' : ('a' - 10)) + digit) + result;
- 		a /= base;
+@@ -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 a, unsigned int base, IsUnsigned<false>)
++std::string IntToStringImpl(T value, unsigned int base, IsUnsigned<false>)
 +{
 +	bool negate = false;
-+	if (a < 0)
++	if (value < 0)
 +	{
 +		negate = true;
-+		a = 0-a;	// VC .NET does not like -a
++		value = 0-value;	// VC .NET does not like -a
 +	}
-+	std::string result = IntToStringImpl(a, base, IsUnsigned<true>());
++	std::string result = IntToStringImpl(value, base, IsUnsigned<true>());
  	if (negate)
  		result = "-" + result;
  	return result;
  }
  
 +template <class T>
-+std::string IntToString(T a, unsigned int base = 10)
++std::string IntToString(T value, unsigned int base = 10)
 +{
-+	return IntToStringImpl(a, base, IsUnsigned<(static_cast<T>(-1) > 0)>());
++	return IntToStringImpl(value, base, IsUnsigned<(static_cast<T>(-1) > 0)>());
 +}
 +
- template <class T1, class T2>
- inline T1 SaturatingSubtract(const T1 &a, const T2 &b)
- {
+ //! \brief Converts an unsigned value to a string
+ //! \param value the value to convert
+ //! \param base the base to use during the conversion

Modified: branches/2016Q4/security/cryptopp/pkg-plist
==============================================================================
--- branches/2016Q4/security/cryptopp/pkg-plist	Wed Dec  7 09:48:39 2016	(r428042)
+++ branches/2016Q4/security/cryptopp/pkg-plist	Wed Dec  7 09:51:26 2016	(r428043)
@@ -1,4 +1,3 @@
-bin/cryptest
 include/cryptopp/3way.h
 include/cryptopp/adler32.h
 include/cryptopp/aes.h
@@ -12,12 +11,14 @@ 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
@@ -39,6 +40,7 @@ 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
@@ -51,12 +53,15 @@ 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
@@ -64,6 +69,7 @@ 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
@@ -76,6 +82,7 @@ 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
@@ -89,6 +96,7 @@ 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
@@ -116,6 +124,7 @@ 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
@@ -133,8 +142,7 @@ include/cryptopp/zdeflate.h
 include/cryptopp/zinflate.h
 include/cryptopp/zlib.h
 lib/libcryptopp.a
-%%DYNAMIC_ENABLED%%lib/libcryptopp.so
-%%DYNAMIC_ENABLED%%lib/libcryptopp.so.%%LIBVERSION%%
-%%DYNAMIC_ENABLED%%lib/libcryptopp.so.%%PORTVERSION%%
+lib/libcryptopp.so
+lib/libcryptopp.so.%%LIBVERSION%%
+lib/libcryptopp.so.%%PORTVERSION%%
 %%PORTDOCS%%%%DOCSDIR%%/README
-%%PORTDOCS%%%%DOCSDIR%%/License



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201612070951.uB79pR5h088562>