diff -ruN --exclude=CVS ../cryptopp.orig/Makefile ./Makefile --- ../cryptopp.orig/Makefile 2013-05-22 02:18:44.000000000 +0200 +++ ./Makefile 2013-05-22 02:19:32.000000000 +0200 @@ -3,7 +3,7 @@ PORTNAME= cryptopp PORTVERSION= 5.6.1 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= security MASTER_SITES= SF \ http://www.cryptopp.com/ diff -ruN --exclude=CVS ../cryptopp.orig/files/patch-nbtheory.cpp ./files/patch-nbtheory.cpp --- ../cryptopp.orig/files/patch-nbtheory.cpp 1970-01-01 01:00:00.000000000 +0100 +++ ./files/patch-nbtheory.cpp 2013-05-22 02:18:29.000000000 +0200 @@ -0,0 +1,21 @@ +--- 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 @@ + + bool PrimeSieve::NextCandidate(Integer &c) + { ++#if defined(__clang__) && defined(_LIBCPP_VERSION) && _LIBCPP_VERSION < 1101 ++ // Workaround for a bug in libc++ in std::find on std::vector ++ std::vector::iterator pos = m_sieve.begin()+m_next; ++ for (std::vector::iterator end = m_sieve.end(); pos != end; ++pos) ++ { ++ if (*pos == false) ++ break; ++ } ++ bool safe = SafeConvert(pos - m_sieve.begin(), m_next); ++#else + bool safe = SafeConvert(std::find(m_sieve.begin()+m_next, m_sieve.end(), false) - m_sieve.begin(), m_next); ++#endif + assert(safe); + if (m_next == m_sieve.size()) + {