[143218] trunk/dports/devel/libcryptopp

cal at macports.org cal at macports.org
Sat Dec 12 09:03:23 PST 2015


Revision: 143218
          https://trac.macports.org/changeset/143218
Author:   cal at macports.org
Date:     2015-12-07 16:42:13 -0800 (Mon, 07 Dec 2015)
Log Message:
-----------
libcryptopp: update to 5.6.3, openmaintainer

Modified Paths:
--------------
    trunk/dports/devel/libcryptopp/Portfile

Added Paths:
-----------
    trunk/dports/devel/libcryptopp/files/patch-config.h.diff

Removed Paths:
-------------
    trunk/dports/devel/libcryptopp/files/cve-2015-2141.patch
    trunk/dports/devel/libcryptopp/files/patch-GNUmakefile.diff

Modified: trunk/dports/devel/libcryptopp/Portfile
===================================================================
--- trunk/dports/devel/libcryptopp/Portfile	2015-12-07 23:57:14 UTC (rev 143217)
+++ trunk/dports/devel/libcryptopp/Portfile	2015-12-08 00:42:13 UTC (rev 143218)
@@ -4,8 +4,7 @@
 PortSystem 1.0
 
 name                libcryptopp
-version             5.6.2
-revision            3
+version             5.6.3
 categories          devel security
 platforms           darwin
 maintainers         raphael openmaintainer
@@ -20,25 +19,28 @@
                     ${homepage}
 distname            cryptopp[strsed ${version} {g/\.//}]
 
-checksums           rmd160  b41af768b3a5ba927dac44ec554dc2095e21b1bb \
-                    sha256  5cbfd2fcb4a6b3aab35902e2e0f3b59d9171fee12b3fc2b363e1801dfec53574
+checksums           rmd160  764c453eba44a95d52135966280216530ab0e35d \
+                    sha256  9390670a14170dd0f48a6b6b06f74269ef4b056d4718a1a329f6f6069dc957c9
 
 use_zip             yes
 extract.mkdir       yes
 
-patchfiles          patch-GNUmakefile.diff \
-                    cve-2015-2141.patch
-post-patch {
-    reinplace "s|@@PREFIX@@|${prefix}|" ${worksrcpath}/GNUmakefile
-}
+patchfiles          patch-config.h.diff
 
 use_configure       no
 
 variant universal {}
 
+proc _get_cryptopp_init_priority_flag {compiler} {
+    if {[string match "macports-gcc*" $compiler]} {
+        return " -DMACPORTS_GCC_COMPILER"
+    }
+    return ""
+}
+
 build.type          gnu
 build.target        dynamic static cryptest.exe
-build.env-append    CXXFLAGS="[get_canonical_archflags cxx]"
+build.env-append    CXXFLAGS="[get_canonical_archflags cxx] -DNDEBUG [_get_cryptopp_init_priority_flag ${configure.compiler}]"
 build.args-append   CXX=${configure.cxx}
 
 test.run            yes

Deleted: trunk/dports/devel/libcryptopp/files/cve-2015-2141.patch
===================================================================
--- trunk/dports/devel/libcryptopp/files/cve-2015-2141.patch	2015-12-07 23:57:14 UTC (rev 143217)
+++ trunk/dports/devel/libcryptopp/files/cve-2015-2141.patch	2015-12-08 00:42:13 UTC (rev 143218)
@@ -1,36 +0,0 @@
-Upstream-Status: Backport
-Upstream-URL: https://github.com/weidai11/cryptopp/commit/9425e16437439e68c7d96abef922167d68fafaff
-Fixes: CVE-2015-2141
-
-From 9425e16437439e68c7d96abef922167d68fafaff Mon Sep 17 00:00:00 2001
-From: Jeffrey Walton <noloader at gmail.com>
-Date: Sat, 27 Jun 2015 17:56:01 -0400
-Subject: [PATCH] Fix for CVE-2015-2141. Thanks to Evgeny Sidorov for
- reporting. Squaring to satisfy Jacobi requirements suggested by JPM.
-
----
- rw.cpp | 8 +++++++-
- 1 file changed, 7 insertions(+), 1 deletion(-)
-
-diff --git a/rw.cpp b/rw.cpp
-index cdd9f2d..0b9318b 100644
---- ./rw.cpp
-+++ ./rw.cpp
-@@ -126,10 +126,16 @@ Integer InvertibleRWFunction::CalculateInverse(RandomNumberGenerator &rng, const
- 	DoQuickSanityCheck();
- 	ModularArithmetic modn(m_n);
- 	Integer r, rInv;
--	do {	// do this in a loop for people using small numbers for testing
-+
-+	// do this in a loop for people using small numbers for testing
-+	do {
- 		r.Randomize(rng, Integer::One(), m_n - Integer::One());
-+		// Fix for CVE-2015-2141. Thanks to Evgeny Sidorov for reporting.
-+		// Squaring to satisfy Jacobi requirements suggested by JPM.
-+		r = modn.Square(r);
- 		rInv = modn.MultiplicativeInverse(r);
- 	} while (rInv.IsZero());
-+
- 	Integer re = modn.Square(r);
- 	re = modn.Multiply(re, x);			// blind
- 

Deleted: trunk/dports/devel/libcryptopp/files/patch-GNUmakefile.diff
===================================================================
--- trunk/dports/devel/libcryptopp/files/patch-GNUmakefile.diff	2015-12-07 23:57:14 UTC (rev 143217)
+++ trunk/dports/devel/libcryptopp/files/patch-GNUmakefile.diff	2015-12-08 00:42:13 UTC (rev 143218)
@@ -1,63 +0,0 @@
---- GNUmakefile.orig	2015-07-02 15:54:47.000000000 +0200
-+++ GNUmakefile	2015-07-02 16:06:53.000000000 +0200
-@@ -1,7 +1,7 @@
--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
-+CXXFLAGS += -fPIC
- # the following options reduce code size, but breaks link or makes link very slow on some systems
- # CXXFLAGS += -ffunction-sections -fdata-sections
- # LDFLAGS += -Wl,--gc-sections
-@@ -36,9 +36,7 @@
- GAS219_OR_LATER = $(shell $(CXX) -xc -c /dev/null -Wa,-v -o/dev/null 2>&1 | $(EGREP) -c "GNU assembler version (2\.19|2\.[2-9]|[3-9])")
- 
- ifneq ($(GCC42_OR_LATER),0)
--ifeq ($(UNAME),Darwin)
--CXXFLAGS += -arch x86_64 -arch i386
--else
-+ifneq ($(UNAME),Darwin)
- CXXFLAGS += -march=native
- endif
- endif
-@@ -139,33 +137,33 @@
- 
- all: cryptest.exe
- static: libcryptopp.a
--dynamic: libcryptopp.so
-+dynamic: libcryptopp.dylib
- 
- test: cryptest.exe
- 	./cryptest.exe v
- 
- clean:
--	-$(RM) cryptest.exe libcryptopp.a libcryptopp.so $(LIBOBJS) $(TESTOBJS) cryptopp.dll libcryptopp.dll.a libcryptopp.import.a cryptest.import.exe dlltest.exe $(DLLOBJS) $(LIBIMPORTOBJS) $(TESTI MPORTOBJS) $(DLLTESTOBJS)
-+	-$(RM) cryptest.exe libcryptopp.a libcryptopp.dylib $(LIBOBJS) $(TESTOBJS) cryptopp.dll libcryptopp.dll.a libcryptopp.import.a cryptest.import.exe dlltest.exe $(DLLOBJS) $(LIBIMPORTOBJS) $(TESTI MPORTOBJS) $(DLLTESTOBJS)
- 
- install:
- 	$(MKDIR) -p $(PREFIX)/include/cryptopp $(PREFIX)/lib $(PREFIX)/bin
- 	-$(CP) *.h $(PREFIX)/include/cryptopp
- 	-$(CP) *.a $(PREFIX)/lib
--	-$(CP) *.so $(PREFIX)/lib
-+	-$(CP) *.dylib $(PREFIX)/lib
- 	-$(CP) *.exe $(PREFIX)/bin
- 
- remove:
- 	-$(RM) -rf $(PREFIX)/include/cryptopp
- 	-$(RM) $(PREFIX)/lib/libcryptopp.a
--	-$(RM) $(PREFIX)/lib/libcryptopp.so
-+	-$(RM) $(PREFIX)/lib/libcryptopp.dylib
- 	-$(RM) $(PREFIX)/bin/cryptest.exe
- 
- libcryptopp.a: $(LIBOBJS)
- 	$(AR) $(ARFLAGS) $@ $(LIBOBJS)
- 	$(RANLIB) $@
- 
--libcryptopp.so: $(LIBOBJS)
--	$(CXX) -shared -o $@ $(LIBOBJS)
-+libcryptopp.dylib: $(LIBOBJS)
-+	$(CXX) -dynamiclib -install_name @@PREFIX@@/lib/$@ -o $@ $(LIBOBJS)
- 
- cryptest.exe: libcryptopp.a $(TESTOBJS)
- 	$(CXX) -o $@ $(CXXFLAGS) $(TESTOBJS) ./libcryptopp.a $(LDFLAGS) $(LDLIBS)

Added: trunk/dports/devel/libcryptopp/files/patch-config.h.diff
===================================================================
--- trunk/dports/devel/libcryptopp/files/patch-config.h.diff	                        (rev 0)
+++ trunk/dports/devel/libcryptopp/files/patch-config.h.diff	2015-12-08 00:42:13 UTC (rev 143218)
@@ -0,0 +1,20 @@
+--- config.h.orig	2015-12-08 01:27:33.000000000 +0100
++++ config.h	2015-12-08 01:30:14.000000000 +0100
+@@ -40,7 +40,7 @@
+ // Define this to ensure C/C++ standard compliance and respect for GCC aliasing rules and other alignment fodder. If you
+ // experience a break with GCC at -O3, you should try this first. Guard it in case its set on the command line (and it differs).
+ #ifndef CRYPTOPP_NO_UNALIGNED_DATA_ACCESS
+-// # define CRYPTOPP_NO_UNALIGNED_DATA_ACCESS
++# define CRYPTOPP_NO_UNALIGNED_DATA_ACCESS
+ #endif
+ 
+ // ***************** Less Important Settings ***************
+@@ -95,7 +95,7 @@
+ // Under GCC, the library uses init_priority attribute in the range
+ // [CRYPTOPP_INIT_PRIORITY, CRYPTOPP_INIT_PRIORITY+100]. Under Windows,
+ // CRYPTOPP_INIT_PRIORITY enlists "#pragma init_seg(lib)".
+-// #define CRYPTOPP_INIT_PRIORITY 250
++#define CRYPTOPP_INIT_PRIORITY 250
+ 
+ // CRYPTOPP_USER_PRIORITY is for other libraries and user code that is using Crypto++
+ // and managing C++ static object creation. It is guaranteed not to conflict with
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20151212/af5ac69f/attachment.html>


More information about the macports-changes mailing list