FreeBSD Bugzilla – Attachment 177650 Details for
Bug 215015
security/cryptopp Upgrade to 5.6.5
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
security/cryptopp 5.6.5
cryptopp.diff (text/plain), 15.57 KB, created by
Jason E. Hale
on 2016-12-04 10:37:23 UTC
(
hide
)
Description:
security/cryptopp 5.6.5
Filename:
MIME Type:
Creator:
Jason E. Hale
Created:
2016-12-04 10:37:23 UTC
Size:
15.57 KB
patch
obsolete
>Index: Makefile >=================================================================== >--- Makefile (revision 427751) >+++ Makefile (working copy) >@@ -2,8 +2,7 @@ > # $FreeBSD$ > > PORTNAME= cryptopp >-PORTVERSION= 5.6.2 >-PORTREVISION= 4 >+PORTVERSION= 5.6.5 > CATEGORIES= security > MASTER_SITES= http://www.cryptopp.com/ > DISTNAME= cryptopp${PORTVERSION:S/.//g} >@@ -11,63 +10,79 @@ > MAINTAINER= ports@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> >- > NO_WRKSUBDIR= yes > EXTRACT_BEFORE_ARGS= -aq >-USES= gmake zip:infozip >+USES= compiler:c++14-lang cpe gmake zip:infozip > MAKEFILE= GNUmakefile >-LDFLAGS+= -Wl,-soname,libcryptopp.so.${LIBVERSION} >+TEST_TARGET= test > >-LIBVERSION= 0 >-PLIST_SUB+= LIBVERSION=${LIBVERSION} >-PLIST_SUB+= PORTVERSION=${PORTVERSION} >+BROKEN_powerpc= does not compile; unrecognized C++ options > >-.if !${PORT_OPTIONS:MDEBUG} >-CXXFLAGS+= -DNDEBUG >-.endif >+CPE_PRODUCT= crypto++ >+CPE_VENDOR= cryptopp > >-.if ${PORT_OPTIONS:MGCC} >-USE_GCC= yes >-.endif >+LIBVERSION= 5 >+PLIST_SUB+= LIBVERSION=${LIBVERSION} \ >+ PORTVERSION=${PORTVERSION} > >-.if ${PORT_OPTIONS:MSTATIC} >-PLIST_SUB+= DYNAMIC_ENABLED="@comment " >+OPTIONS_DEFINE= DEBUG DOCS GCC SHARED SIMD THREADS >+OPTIONS_DEFAULT= SHARED THREADS >+OPTIONS_SUB= yes >+ >+DEBUG_CXXFLAGS_OFF= -DNDEBUG >+ >+GCC_USE= GCC=yes >+ >+SHARED_DESC= Build shared libraries >+SHARED_USE= LDCONFIG=yes >+SHARED_ALL_TARGET= all shared >+SHARED_CXXFLAGS= -fPIC >+ >+THREADS_LDFLAGS= -lpthread >+ >+.include <bsd.port.options.mk> >+ >+.if ${PORT_OPTIONS:MSIMD} >+. if ${MACHINE_CPU:Msse2} >+CXXFLAGS+= -msse2 >+. else >+CXXFLAGS+= -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_SSE2 \ >+ -DCRYPTOPP_DISABLE_SSE3 \ >+ -DCRYPTOPP_DISABLE_SSE4 > .endif > >-.if ${PORT_OPTIONS:MTHREADS} >-LDFLAGS+= -lpthread >-.endif >- > do-install: >- ${INSTALL_PROGRAM} ${WRKSRC}/cryptest.exe ${STAGEDIR}${PREFIX}/bin/cryptest > ${INSTALL_DATA} ${WRKSRC}/libcryptopp.a ${STAGEDIR}${PREFIX}/lib >- ${MKDIR} ${STAGEDIR}${PREFIX}/include/cryptopp >+ @${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} >+ >+do-install-DOCS-on: >+ @${MKDIR} ${STAGEDIR}${PREFIX}/share/doc/cryptopp >+ ${INSTALL_DATA} ${WRKSRC}/Readme.txt ${STAGEDIR}${PREFIX}/share/doc/cryptopp/README >+ >+do-install-SHARED-on: > ${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} == "powerpc" >-BROKEN= Does not compile on ${ARCH}: unrecognized C++ options >-.endif >- > .include <bsd.port.mk> >Index: distinfo >=================================================================== >--- distinfo (revision 427751) >+++ distinfo (working copy) >@@ -1,2 +1,3 @@ >-SHA256 (cryptopp562.zip) = 5cbfd2fcb4a6b3aab35902e2e0f3b59d9171fee12b3fc2b363e1801dfec53574 >-SIZE (cryptopp562.zip) = 1137964 >+TIMESTAMP = 1480818667 >+SHA256 (cryptopp565.zip) = a75ef486fe3128008bbb201efee3dcdcffbe791120952910883b26337ec32c34 >+SIZE (cryptopp565.zip) = 4220843 >Index: files/patch-GNUmakefile >=================================================================== >--- files/patch-GNUmakefile (revision 427751) >+++ files/patch-GNUmakefile (working copy) >@@ -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 >+--- 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 >- 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) >Index: files/patch-config.h >=================================================================== >--- files/patch-config.h (revision 427751) >+++ files/patch-config.h (working copy) >@@ -1,29 +1,28 @@ >---- config.h.orig 2013-02-20 14:30:54.000000000 +0000 >+--- 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 >+ >Index: files/patch-misc.h >=================================================================== >--- files/patch-misc.h (revision 427751) >+++ files/patch-misc.h (working copy) >@@ -1,43 +1,47 @@ >---- 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(); >- } >- >+--- 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; >@@ -44,11 +48,11 @@ > } > > +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 >Index: files/patch-nbtheory.cpp >=================================================================== >--- files/patch-nbtheory.cpp (revision 427751) >+++ files/patch-nbtheory.cpp (working copy) >@@ -1,6 +1,6 @@ >---- nbtheory.cpp.orig 2013-05-22 00:16:26.761193859 +0000 >-+++ nbtheory.cpp 2013-05-22 00:15:29.401256454 +0000 >-@@ -307,7 +307,18 @@ >+--- nbtheory.cpp.orig 2016-10-10 23:49:54 UTC >++++ nbtheory.cpp >+@@ -309,7 +309,18 @@ PrimeSieve::PrimeSieve(const Integer &fi > > bool PrimeSieve::NextCandidate(Integer &c) > { >@@ -16,6 +16,6 @@ > +#else > bool safe = SafeConvert(std::find(m_sieve.begin()+m_next, m_sieve.end(), false) - m_sieve.begin(), m_next); > +#endif >- assert(safe); >+ CRYPTOPP_UNUSED(safe); CRYPTOPP_ASSERT(safe); > if (m_next == m_sieve.size()) > { >Index: files/patch-wake.cpp >=================================================================== >--- files/patch-wake.cpp (revision 427751) >+++ files/patch-wake.cpp (nonexistent) >@@ -1,20 +0,0 @@ >---- wake.cpp.orig >-+++ wake.cpp >-@@ -25,13 +25,13 @@ void WAKE_Base::GenKey(word32 k0, word32 k1, word32 k2, word32 k3) >- CRYPTOPP_COMPILE_ASSERT(sizeof(x) == 4); >- static int tt[10]= { >- 0x726a8f3b, // table >-- 0xe69a3b5c, >-- 0xd3c71fe5, >-- 0xab3c73d2, >-+ static_cast<int>(0xe69a3b5c), >-+ static_cast<int>(0xd3c71fe5), >-+ static_cast<int>(0xab3c73d2), >- 0x4d3a8eb3, >- 0x0396d6e8, >- 0x3d4c2f7a, >-- 0x9ee27cf3, } ; >-+ static_cast<int>(0x9ee27cf3), } ; >- t[0] = k0; >- t[1] = k1; >- t[2] = k2; > >Property changes on: files/patch-wake.cpp >___________________________________________________________________ >Deleted: fbsd:nokeywords >## -1 +0,0 ## >-yes >\ No newline at end of property >Deleted: svn:eol-style >## -1 +0,0 ## >-native >\ No newline at end of property >Deleted: svn:mime-type >## -1 +0,0 ## >-text/plain >\ No newline at end of property >Index: pkg-plist >=================================================================== >--- pkg-plist (revision 427751) >+++ pkg-plist (working copy) >@@ -1,4 +1,3 @@ >-bin/cryptest > include/cryptopp/3way.h > include/cryptopp/adler32.h > include/cryptopp/aes.h >@@ -12,6 +11,7 @@ > 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 >@@ -18,6 +18,7 @@ > 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/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/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/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/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/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/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/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%% >+%%SHARED%%lib/libcryptopp.so >+%%SHARED%%lib/libcryptopp.so.%%LIBVERSION%% >+%%SHARED%%lib/libcryptopp.so.%%PORTVERSION%% > %%PORTDOCS%%%%DOCSDIR%%/README >-%%PORTDOCS%%%%DOCSDIR%%/License
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 215015
: 177650