[gentoo-commits] repo/gentoo:master commit in: dev-libs/beecrypt/files/

2018-09-23 Thread Sergei Trofimovich
commit: 6917ced95348bce9dcdaed2a1061b6123d92e402
Author: Sergei Trofimovich  gentoo  org>
AuthorDate: Sun Sep 23 13:01:06 2018 +
Commit: Sergei Trofimovich  gentoo  org>
CommitDate: Sun Sep 23 13:20:02 2018 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6917ced9

dev-libs/beecrypt: drop executable bit from patch

Package-Manager: Portage-2.3.49, Repoman-2.3.11

 .../beecrypt/files/beecrypt-4.2.1-c++11-allow-throw-in-destructors.patch  | 0
 1 file changed, 0 insertions(+), 0 deletions(-)

diff --git 
a/dev-libs/beecrypt/files/beecrypt-4.2.1-c++11-allow-throw-in-destructors.patch 
b/dev-libs/beecrypt/files/beecrypt-4.2.1-c++11-allow-throw-in-destructors.patch
old mode 100755
new mode 100644



[gentoo-commits] repo/gentoo:master commit in: dev-libs/beecrypt/files/, dev-libs/beecrypt/

2017-12-01 Thread Ulrich Müller
commit: e91c58f05f9ebb9cf9d15a1132356051b928fe22
Author: Ulrich Müller  gentoo  org>
AuthorDate: Fri Dec  1 20:23:04 2017 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Fri Dec  1 20:23:04 2017 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e91c58f0

dev-libs/beecrypt: Fix compilation with >=dev-libs/icu-59.

Closes: https://bugs.gentoo.org/618676
Package-Manager: Portage-2.3.16, Repoman-2.3.6

 dev-libs/beecrypt/Manifest |   2 +-
 dev-libs/beecrypt/beecrypt-4.2.1-r4.ebuild |   1 +
 .../beecrypt/files/beecrypt-4.2.1-cast-uchar.patch | 214 +
 3 files changed, 216 insertions(+), 1 deletion(-)

diff --git a/dev-libs/beecrypt/Manifest b/dev-libs/beecrypt/Manifest
index de57828f34d..0fc625fdb93 100644
--- a/dev-libs/beecrypt/Manifest
+++ b/dev-libs/beecrypt/Manifest
@@ -1 +1 @@
-DIST beecrypt-4.2.1.tar.gz 882758 SHA256 
286f1f56080d1a6b1d024003a5fa2158f4ff82cae0c6829d3c476a4b5898c55d SHA512 
59995d53c024efe6344a21ac0d6d55fbe652488a4a22cc6719f9fc3851d56697fa8738937d48aa1e6f9ebe749de61ac3c79a5f0cea793872213c3bdf922e71bc
 WHIRLPOOL 
c4a0371d8e2cf37194800867c58e77d72bb59ab464fdff9c561230ece0f288dabdebfdd0ac13382c9ebe45b455ffbfdd81e6a15969dcb86d3d8c8e6635e294bb
+DIST beecrypt-4.2.1.tar.gz 882758 BLAKE2B 
7ca25613cf95df8657c762d932618979783ea2ddfbaecdf066701d61a5f9ac76bd474a51eb65e140c83ef01880477cb7104e3d67c2fc078ae7b710637d18bb53
 SHA512 
59995d53c024efe6344a21ac0d6d55fbe652488a4a22cc6719f9fc3851d56697fa8738937d48aa1e6f9ebe749de61ac3c79a5f0cea793872213c3bdf922e71bc

diff --git a/dev-libs/beecrypt/beecrypt-4.2.1-r4.ebuild 
b/dev-libs/beecrypt/beecrypt-4.2.1-r4.ebuild
index 4d835cb2cd9..69a3ccb8f34 100644
--- a/dev-libs/beecrypt/beecrypt-4.2.1-r4.ebuild
+++ b/dev-libs/beecrypt/beecrypt-4.2.1-r4.ebuild
@@ -38,6 +38,7 @@ PATCHES=(
 
# Fixes bug 596904
"${FILESDIR}"/${P}-c++11-allow-throw-in-destructors.patch
+   "${FILESDIR}"/${P}-cast-uchar.patch #618676
 )
 
 pkg_setup() {

diff --git a/dev-libs/beecrypt/files/beecrypt-4.2.1-cast-uchar.patch 
b/dev-libs/beecrypt/files/beecrypt-4.2.1-cast-uchar.patch
new file mode 100644
index 000..8efedc01e4a
--- /dev/null
+++ b/dev-libs/beecrypt/files/beecrypt-4.2.1-cast-uchar.patch
@@ -0,0 +1,214 @@
+beecrypt's c++ api uses jchar arrays for strings, while ICU 59 expects
+char16_t type
+
+In practice these both seem to be defined as short int on amd64 so it
+might be okay to just reinterpret_cast them? There's probably no easy
+way out on a platform where char16_t won't match jchar
+
+Patch by Valeriy Malov 
+https://bugs.gentoo.org/618676
+
+--- a/c++/io/DataInputStream.cxx
 b/c++/io/DataInputStream.cxx
+@@ -201,7 +201,7 @@ String DataInputStream::readUTF() throw (IOException)
+   jchar* buffer = new jchar[ulen+1];
+ 
+   status = U_ZERO_ERROR;
+-  ucnv_toUChars(_utf, buffer, ulen+1, (const char*) data, (jint) 
utflen, &status);
++  ucnv_toUChars(_utf, reinterpret_cast(buffer), ulen+1, 
(const char*) data, (jint) utflen, &status);
+ 
+   delete[] data;
+ 
+@@ -232,7 +232,7 @@ String DataInputStream::readLine() throw (IOException)
+ 
+   array target_buffer(80);
+   jint target_offset = 0;
+-UChar* target = target_buffer.data();
++UChar* target = 
reinterpret_cast(target_buffer.data());
+   const UChar* target_limit = target+1;
+ char  source_buffer[MAX_BYTES_PER_CHARACTER];
+   const char* source = source_buffer;
+--- a/c++/io/DataOutputStream.cxx
 b/c++/io/DataOutputStream.cxx
+@@ -187,7 +187,7 @@ void DataOutputStream::writeUTF(const String& str) throw 
(IOException)
+   const array& src = str.toCharArray();
+ 
+   // the expected status code here is U_BUFFER_OVERFLOW_ERROR
+-  jint need = ucnv_fromUChars(_utf, 0, 0, src.data(), src.size(), 
&status);
++  jint need = ucnv_fromUChars(_utf, 0, 0, reinterpret_cast(src.data()), src.size(), &status);
+   if (U_FAILURE(status))
+   if (status != U_BUFFER_OVERFLOW_ERROR)
+   throw IOException("ucnv_fromUChars failed");
+@@ -200,7 +200,7 @@ void DataOutputStream::writeUTF(const String& str) throw 
(IOException)
+   status = U_ZERO_ERROR;
+ 
+   // the expected status code here is U_STRING_NOT_TERMINATED_WARNING
+-  ucnv_fromUChars(_utf, (char*) buffer, need, src.data(), src.size(), 
&status);
++  ucnv_fromUChars(_utf, (char*) buffer, need, reinterpret_cast(src.data()), src.size(), &status);
+   if (status != U_STRING_NOT_TERMINATED_WARNING)
+   {
+   delete[] buffer;
+--- a/c++/io/PrintStream.cxx
 b/c++/io/PrintStream.cxx
+@@ -191,7 +191,7 @@ void PrintStream::print(jchar ch) throw ()
+   UErrorCode status = U_ZERO_ERROR;
+ 
+   // do conversion of one character
+-  size_t used = ucnv_fromUChars(_loc, buffer, 8, &ch, 1, 
&status);
++ 

[gentoo-commits] repo/gentoo:master commit in: dev-libs/beecrypt/files/, dev-libs/beecrypt/

2016-10-23 Thread David Seifert
commit: 34e8da00ccfbb0f6d50c78dfce6ada72a971c568
Author: Peter-Levine  gmail  com>
AuthorDate: Thu Oct 13 22:40:20 2016 +
Commit: David Seifert  gentoo  org>
CommitDate: Sun Oct 23 14:17:06 2016 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=34e8da00

dev-libs/beecrypt: Allow for compiling with GCC 6

Gentoo-bug: 596904
* EAPI=6
* Improve DOCS and HTML_DOCS handling
* Minor QA fixes

Closes: https://github.com/gentoo/gentoo/pull/2551

Signed-off-by: David Seifert  gentoo.org>

 dev-libs/beecrypt/beecrypt-4.2.1-r4.ebuild | 91 ++
 ...pt-4.2.1-c++11-allow-throw-in-destructors.patch | 26 +++
 .../beecrypt/files/beecrypt-4.2.1-gcc-4.7.patch|  4 +-
 3 files changed, 119 insertions(+), 2 deletions(-)

diff --git a/dev-libs/beecrypt/beecrypt-4.2.1-r4.ebuild 
b/dev-libs/beecrypt/beecrypt-4.2.1-r4.ebuild
new file mode 100644
index ..fe156b4
--- /dev/null
+++ b/dev-libs/beecrypt/beecrypt-4.2.1-r4.ebuild
@@ -0,0 +1,91 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit autotools java-pkg-opt-2 python-single-r1
+
+DESCRIPTION="General-purpose cryptography library"
+HOMEPAGE="https://sourceforge.net/projects/beecrypt/";
+SRC_URI="mirror://sourceforge/beecrypt/${P}.tar.gz"
+
+LICENSE="GPL-2 LGPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ~ia64 ppc ~ppc64 ~s390 ~sh ~sparc x86 ~x86-fbsd 
~amd64-linux ~arm-linux ~x86-linux ~ppc-macos"
+IUSE="+threads java cxx python static-libs doc"
+REQUIRED_USE="cxx? ( threads )
+   python? ( ${PYTHON_REQUIRED_USE} )"
+
+COMMON_DEPEND="!=dev-libs/icu-2.8:= )
+   python? ( ${PYTHON_DEPS} )"
+
+DEPEND="${COMMON_DEPEND}
+   java? ( >=virtual/jdk-1.4 )
+   doc? ( app-doc/doxygen
+   virtual/latex-base
+   dev-texlive/texlive-fontsextra
+   )"
+RDEPEND="${COMMONDEPEND}
+   java? ( >=virtual/jre-1.4 )"
+
+DOCS=( BUGS README BENCHMARKS NEWS )
+PATCHES=(
+   "${FILESDIR}"/${P}-build-system.patch
+   "${FILESDIR}"/${P}-gcc-4.7.patch
+
+   # Fixes bug 596904
+   "${FILESDIR}"/${P}-c++11-allow-throw-in-destructors.patch
+)
+
+pkg_setup() {
+   use python && python-single-r1_pkg_setup
+   use java && java-pkg-opt-2_pkg_setup
+}
+
+src_prepare() {
+   default
+   eautoreconf
+}
+
+src_configure() {
+   # cplusplus needs threads support
+   econf \
+   --disable-expert-mode \
+   $(use_enable static-libs static) \
+   $(use_enable threads) \
+   $(use_with python python "${PYTHON}") \
+   $(use_with cxx cplusplus) \
+   $(use_with java)
+}
+
+src_compile() {
+   default
+
+   if use doc; then
+   pushd include/beecrypt >/dev/null || die
+   doxygen || die "doxygen failed"
+   popd >/dev/null || die
+   HTML_DOCS=( docs/html/*.{css,html,js,png} )
+   fi
+}
+
+src_test() {
+   export BEECRYPT_CONF_FILE="${T}/beecrypt-test.conf"
+   echo "provider.1=${S}/c++/provider/.libs/base.so" > 
"${BEECRYPT_CONF_FILE}" || die
+   emake check bench
+}
+
+src_install() {
+   default
+
+   if python; then
+   rm -f "${D%/}$(python_get_sitedir)"/_bc.*a || die
+   fi
+   if ! use static-libs; then
+   find "${D}" -name '*.la' -delete || die
+   fi
+}

diff --git 
a/dev-libs/beecrypt/files/beecrypt-4.2.1-c++11-allow-throw-in-destructors.patch 
b/dev-libs/beecrypt/files/beecrypt-4.2.1-c++11-allow-throw-in-destructors.patch
new file mode 100755
index ..0cb291d
--- /dev/null
+++ 
b/dev-libs/beecrypt/files/beecrypt-4.2.1-c++11-allow-throw-in-destructors.patch
@@ -0,0 +1,26 @@
+--- beecrypt-4.2.1/include/beecrypt/c++/lang/Object.h.old  2016-10-12 
18:40:10.878868563 -0400
 beecrypt-4.2.1/include/beecrypt/c++/lang/Object.h  2016-10-12 
19:17:22.508857979 -0400
+@@ -145,7 +145,11 @@
+   waiter*   prev;
+ 
+   waiter(bc_threadid_t owner, unsigned 
int lock_count);
++#if __cplusplus < 201103L
+   ~waiter();
++#else
++  ~waiter() noexcept(false);
++#endif
+   };
+ 
+   waiter* _lock_head;
+--- beecrypt-4.2.1/c++/lang/Object.cxx.old 2016-10-12 18:40:39.024665316 
-0400
 beecrypt-4.2.1/c++/lang/Object.cxx 2016-10-12 19:14:41.630529720 -0400
+@@ -767,6 +767,9 @@
+ }
+ 
+ Object::FairMonitor::waiter::~waiter()
++#if __cplusplus >= 201103L
++noexcept(false)
++#endif
+ {
+   #if WIN32
+   if (!CloseHandle(event))

diff --git a/dev-libs/beecrypt/files/beecrypt-4.2.1-gcc-4.7.patch 
b/dev-libs/beecrypt/files/beecrypt-4.2.1-gcc-4.7.patch
index 64d513b..dff5d8c 100644
--- a/dev-libs/beecrypt/files/beecrypt-4.2.1-gcc-4.7.patch
+++ b/dev-li