summaryrefslogtreecommitdiff
path: root/dev-cpp/commoncpp2
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /dev-cpp/commoncpp2
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-cpp/commoncpp2')
-rw-r--r--dev-cpp/commoncpp2/Manifest12
-rw-r--r--dev-cpp/commoncpp2/commoncpp2-1.8.1-r2.ebuild69
-rw-r--r--dev-cpp/commoncpp2/commoncpp2-1.8.1-r3.ebuild72
-rw-r--r--dev-cpp/commoncpp2/files/1.8.0-glibc212.patch12
-rw-r--r--dev-cpp/commoncpp2/files/1.8.1-autoconf-update.patch61
-rw-r--r--dev-cpp/commoncpp2/files/1.8.1-configure_detect_netfilter.patch14
-rw-r--r--dev-cpp/commoncpp2/files/1.8.1-fix-buffer-overflow.patch13
-rw-r--r--dev-cpp/commoncpp2/files/1.8.1-fix-c++14.patch52
-rw-r--r--dev-cpp/commoncpp2/files/1.8.1-gnutls-3.4.patch36
-rw-r--r--dev-cpp/commoncpp2/files/1.8.1-libgcrypt.patch48
-rw-r--r--dev-cpp/commoncpp2/files/1.8.1-parallel-build.patch11
-rw-r--r--dev-cpp/commoncpp2/metadata.xml8
12 files changed, 408 insertions, 0 deletions
diff --git a/dev-cpp/commoncpp2/Manifest b/dev-cpp/commoncpp2/Manifest
new file mode 100644
index 000000000000..a200ef2ae7a9
--- /dev/null
+++ b/dev-cpp/commoncpp2/Manifest
@@ -0,0 +1,12 @@
+AUX 1.8.0-glibc212.patch 323 BLAKE2B b5b25950d742041b2f1568043d99a3b7b5e6e44f23b894280b7cb40246bb0f08f91929bcac173de7b206b797ca87943a4230de84b3cf27c0babbc91e938a7f2b SHA512 c7807f0cb867343fb167f8428a143e125a36c5c764f6ff0a0c8edab892c12b636bc7a47e87574e30209ee0cf5500642369e4135799aee3d3f4292423496fdd07
+AUX 1.8.1-autoconf-update.patch 1735 BLAKE2B 8c33d1fb88b3a186e59581f19d97aa2315aaaa901d2d484d4824a4a679ed05a22b402da62bce743b74bc6c06f6f15ac401da960ed5206a2267639844c9d03047 SHA512 5c48300d3476913a96f1ea45853ad6092527490f1e36cab669be74766486f7c13ab86c740603cfe7f5381148a69e60bfb0e968c03c1c579f7aa8d9efb36281b6
+AUX 1.8.1-configure_detect_netfilter.patch 641 BLAKE2B edc5958760633efef678aa0d64cb4d054bb3968f56590ea3e9a0674fa2e01bddc3f6b78622c940072f2ca7843e47d0b6594aced3afc235cef9bca7c940d7205d SHA512 d4c3af631ab0ef37cb5943cd17ba6481e229af3537e73769f13ed6fe45e2671a9e9ee8f14f2243e95fd8b17d4a8dbb2c7945a5de9e4ce3f29e842779c55d0ea0
+AUX 1.8.1-fix-buffer-overflow.patch 442 BLAKE2B bfc345bc3d2df77a48e9b35b6462221fab11cd7ba2589f076b83284a5a24a60f6978f8338c287058bdb747bd58ff08cb6dc825250a005ead327c74f58f39d3b4 SHA512 4c3cece95f4a32ee2b37b37f84462aeda43c2d25c2eb5cfaf4bfbbe2bdc2d7db7c2ead2f6150bb108ea124fc29c277371d1d0f415a6b26df98f515d910cb3e8b
+AUX 1.8.1-fix-c++14.patch 1220 BLAKE2B 10df79cc01b26b5df35ede979743cc2d18598fb47d2d83a30b5b0d11264495965d3af7f84ba6e28e4219cae0742b5293ec2f8c60870cf9a7585e7b999fab2e11 SHA512 222c21e7b0b4e035ec3a36edb5b9e68d345550781f21a8c075835bf6f27ee46f62469a17f4cec3c1c1bb69741661dbcc7071c51c964006201ed8c3ff48a60c80
+AUX 1.8.1-gnutls-3.4.patch 1229 BLAKE2B a4936cce4fff5a7935c2bd077add555fa8d9b229afaaec545e78c1f6a7d34f35f7168c2381183ceaf4fd56bd1318a9505305ae59e77c87d9813f485e1aa6936d SHA512 92db4deba0ae612fda5873224641d35d5637a48d553d0afee7749c5477ca19a62640656d4781d101db5b545ddd962ce7c11a6edf33d128b031cafebf3cf6db77
+AUX 1.8.1-libgcrypt.patch 1054 BLAKE2B fc96efbbc132972035ca9622cd21427e8d662a3ee3aa3972690305ca14da04d7665b17d33f4b9d16e5128575ee4d378e031b57cc579d777845fc65c3cbab4abe SHA512 76f444739b370681d1b619b78cc77867da197f149c19d036d9d8b430a7a59d697c7ab30529582c308f77bc584a003dc0701d8c06003329589ade652babe5edd2
+AUX 1.8.1-parallel-build.patch 261 BLAKE2B 71e639f976d1c1893f7e3285cecda841f4c90b1c2a153edda527c47804df8821a14a3c340544a9e0860fb4047af2772f036c0e10380b4025b4538e40082046b2 SHA512 e06ca32ffd811897859ef7bf06f3b7998eaa56c7fcbb01f971ec32b6e75c4242e3a2ed5a1bdaa28c02bae08bfbb386d65ebed3e50e2de759d056f085f1f49c1f
+DIST commoncpp2-1.8.1.tar.gz 908678 BLAKE2B 93868286230b4b0507127627f0a1c24b4f340e4af50d7592774b57bfc7a8f1e31bacc0cee5d17b4237aac85be0265cf3aabd65708e988159daaac85b4145c398 SHA512 949823461d20429c2b0acfa22554a5a9dacc977e3ee097f34416f65d322df84fbdb27c644435c6c6caaed800347dfbe789cee7f19b39b306165c97b4f4012bfe
+EBUILD commoncpp2-1.8.1-r2.ebuild 1570 BLAKE2B 63315cb648b80bba3516b3bb0d2338284afb7581f395d868d75e3fb554eb41e1c39839baaf63e42b9c4d58e18caf5d760f857ad2323a675b10d9ae63f517ddac SHA512 3dfdeed9b2b04151fe4ae5fab0454c8c161a047f99f8945325a4a88291463cfb85cc23adb6305efe76dc6b99b60893f78a0ecb721dd381ffe04be1e4b3376412
+EBUILD commoncpp2-1.8.1-r3.ebuild 1515 BLAKE2B c32f470f07dc666105e851d1cdf6cd4c39c04ae055c91d0894cd01936a1c5d311a4bab100725029cd0c272aeb3172e1a62e78e9e6c2bf6630383b1e1efb148a8 SHA512 ce6af72543aca69603849311c2a15ae8f4df829c5e027660468b8a8e38f8c343581475890105849e78df329dc66911effaded94f6984779f706d6e2824b3108b
+MISC metadata.xml 245 BLAKE2B 61823ae735b381c891f5cae47974d3b1ea6136d6f5f5d449a26dfcdf26472282d760b4ee8a605b8a7b75b9c97443cbc0db309ada118ce186030f276ed7c88963 SHA512 b098db4fb4d9ea116f6246bc6caf0f49e80e236d2fad78d287b638dbd5add7bfaf7feb1ca081ca557b23dde9227ce42fa808f3f6fd8eaba6a7e9cae93342f9c6
diff --git a/dev-cpp/commoncpp2/commoncpp2-1.8.1-r2.ebuild b/dev-cpp/commoncpp2/commoncpp2-1.8.1-r2.ebuild
new file mode 100644
index 000000000000..dee8c708de05
--- /dev/null
+++ b/dev-cpp/commoncpp2/commoncpp2-1.8.1-r2.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools
+
+DESCRIPTION="C++ library offering portable support for system-related services"
+SRC_URI="mirror://gnu/commoncpp/${P}.tar.gz"
+HOMEPAGE="https://www.gnu.org/software/commoncpp/"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc ppc64 x86"
+IUSE="debug doc examples ipv6 gnutls ssl static-libs"
+
+RDEPEND="
+ sys-libs/zlib
+ ssl? (
+ gnutls? (
+ dev-libs/libgcrypt:0=
+ net-libs/gnutls:=
+ )
+ !gnutls? ( dev-libs/openssl:0= )
+ )"
+DEPEND="${RDEPEND}
+ doc? ( >=app-doc/doxygen-1.3.6 )"
+
+PATCHES=(
+ "${FILESDIR}/1.8.1-configure_detect_netfilter.patch"
+ "${FILESDIR}/1.8.0-glibc212.patch"
+ "${FILESDIR}/1.8.1-autoconf-update.patch"
+ "${FILESDIR}/1.8.1-fix-buffer-overflow.patch"
+ "${FILESDIR}/1.8.1-parallel-build.patch"
+ "${FILESDIR}/1.8.1-libgcrypt.patch"
+ "${FILESDIR}/1.8.1-fix-c++14.patch"
+)
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ use ssl && local myconf=( $(usex gnutls '--with-gnutls' '--with-openssl') )
+
+ econf \
+ $(use_enable debug) \
+ $(use_with ipv6) \
+ $(use_enable static-libs static) \
+ $(use_with doc doxygen) \
+ "${myconf[@]}"
+}
+
+src_install () {
+ # Only install html docs
+ # man and latex available, but seems a little wasteful
+ use doc && HTML_DOCS=( doc/html/. )
+ default
+ dodoc COPYING.addendum
+
+ if use examples; then
+ docinto examples
+ dodoc demo/{*.cpp,*.h,*.xml,README}
+ docompress -x /usr/share/doc/${PF}/examples
+ fi
+
+ # package provides .pc files
+ find "${D}" -name '*.la' -delete || die
+}
diff --git a/dev-cpp/commoncpp2/commoncpp2-1.8.1-r3.ebuild b/dev-cpp/commoncpp2/commoncpp2-1.8.1-r3.ebuild
new file mode 100644
index 000000000000..f75eac737a8e
--- /dev/null
+++ b/dev-cpp/commoncpp2/commoncpp2-1.8.1-r3.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools eutils
+
+DESCRIPTION="C++ library offering portable support for system-related services"
+SRC_URI="mirror://gnu/commoncpp/${P}.tar.gz"
+HOMEPAGE="https://www.gnu.org/software/commoncpp/"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc ppc64 x86"
+IUSE="debug doc examples ipv6 gnutls ssl static-libs"
+
+RDEPEND="
+ sys-libs/zlib
+ ssl? (
+ gnutls? (
+ dev-libs/libgcrypt:0=
+ net-libs/gnutls:=
+ )
+ !gnutls? ( dev-libs/openssl:0= )
+ )"
+DEPEND="${RDEPEND}
+ doc? ( >=app-doc/doxygen-1.3.6 )"
+
+HTML_DOCS=()
+
+PATCHES=(
+ "${FILESDIR}/1.8.1-configure_detect_netfilter.patch"
+ "${FILESDIR}/1.8.0-glibc212.patch"
+ "${FILESDIR}/1.8.1-autoconf-update.patch"
+ "${FILESDIR}/1.8.1-fix-buffer-overflow.patch"
+ "${FILESDIR}/1.8.1-parallel-build.patch"
+ "${FILESDIR}/1.8.1-libgcrypt.patch"
+ "${FILESDIR}/1.8.1-fix-c++14.patch"
+ "${FILESDIR}/1.8.1-gnutls-3.4.patch"
+)
+
+pkg_setup() {
+ use doc && HTML_DOCS+=( doc/html/. )
+}
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ use ssl && local myconf=( $(usex gnutls '--with-gnutls' '--with-openssl') )
+
+ econf \
+ $(use_enable debug) \
+ $(use_with ipv6) \
+ $(use_enable static-libs static) \
+ $(use_with doc doxygen) \
+ "${myconf[@]}"
+}
+
+src_install () {
+ default
+ prune_libtool_files
+
+ dodoc COPYING.addendum
+
+ if use examples; then
+ docinto examples
+ dodoc demo/{*.cpp,*.h,*.xml,README}
+ docompress -x /usr/share/doc/${PF}/examples
+ fi
+}
diff --git a/dev-cpp/commoncpp2/files/1.8.0-glibc212.patch b/dev-cpp/commoncpp2/files/1.8.0-glibc212.patch
new file mode 100644
index 000000000000..5132554aea1c
--- /dev/null
+++ b/dev-cpp/commoncpp2/files/1.8.0-glibc212.patch
@@ -0,0 +1,12 @@
+http://bugs.gentoo.org/334135
+
+--- a/src/applog.cpp
++++ b/src/applog.cpp
+@@ -44,6 +44,7 @@
+ #include <cstdio>
+ #include <stdarg.h>
+ #include <errno.h>
++#include <sys/stat.h>
+
+ // TODO sc: test if has to move up now that it is into commoncpp
+ // NOTE: the order of inclusion is important do not move following include line
diff --git a/dev-cpp/commoncpp2/files/1.8.1-autoconf-update.patch b/dev-cpp/commoncpp2/files/1.8.1-autoconf-update.patch
new file mode 100644
index 000000000000..c64ba2f65fa9
--- /dev/null
+++ b/dev-cpp/commoncpp2/files/1.8.1-autoconf-update.patch
@@ -0,0 +1,61 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -9,7 +9,8 @@
+ # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
+ # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+-AC_INIT(src/thread.cpp)
++AC_INIT
++AC_CONFIG_SRCDIR([src/thread.cpp])
+ AC_CONFIG_MACRO_DIR([m4])
+ m4_pattern_allow(LT_VERSION)
+
+@@ -81,17 +82,17 @@
+ AC_SUBST(ccincludedir)
+
+ AC_CONFIG_AUX_DIR(autoconf)
+-AC_CANONICAL_SYSTEM
++AC_CANONICAL_TARGET
+ AC_PROG_CPP
+ AC_PROG_CC
+ AC_PROG_CXXCPP
+ AC_PROG_CXX
+ OST_PROG_CC_POSIX
+ NP_PROG_MSC
+-AC_LIBTOOL_WIN32_DLL
+-AM_PROG_LIBTOOL
++
++LT_INIT([win32-dll,disable-static])
+ AM_INIT_AUTOMAKE(commoncpp2, [$VERSION])
+-AM_CONFIG_HEADER(config.h)
++AC_CONFIG_HEADERS([config.h])
+
+ AC_C_RESTRICT
+ AC_C_VOLATILE
+@@ -395,10 +396,11 @@
+ #endif
+
+ ])
+-
++AC_ARG_WITH([doxygen],
++ AS_HELP_STRING([--without-doxygen], [Do not build documentation]))
+ AC_PATH_PROG(DOXYGEN, doxygen, no)
+ AC_SUBST(DOXYGEN)
+-AM_CONDITIONAL(DOXY, test "$DOXYGEN" != "no")
++AM_CONDITIONAL([DOXY], [test "x$with_doxygen" != "xno"])
+
+ AM_CONDITIONAL(GETOPT_LONG, [test ! -z "$LIBGETOPTOBJS"])
+
+@@ -408,10 +410,11 @@
+ AC_SUBST(LIB_VERSION)
+ AC_SUBST(LIB_MAJOR)
+
+-AC_OUTPUT([src/ccgnu2-config src/libccext2.pc src/libccgnu2.pc
++AC_CONFIG_FILES([src/ccgnu2-config src/libccext2.pc src/libccgnu2.pc
+ src/Makefile w32/Makefile w32/vs2008/Makefile w32/vs2008/ccext2.vcproj w32/vs2008/ccgnu2.vcproj w32/vs2008/common.sln m4/Makefile doc/Doxyfile
+ doc/Makefile demo/Makefile inc/Makefile inc/cc++/Makefile Makefile
+ commoncpp2.spec tests/Makefile commoncpp2.list w32/ccgnu2.dsp w32/ccext2.dsp w32/ccgnu2.vcproj w32/ccext2.vcproj])
++AC_OUTPUT
+
+ # if test ! -f inc/cc++/thread.h ; then
+ # cp ${srcdir}/inc/cc++/*.h inc/cc++ ; fi
diff --git a/dev-cpp/commoncpp2/files/1.8.1-configure_detect_netfilter.patch b/dev-cpp/commoncpp2/files/1.8.1-configure_detect_netfilter.patch
new file mode 100644
index 000000000000..b6ebf0e0f4a4
--- /dev/null
+++ b/dev-cpp/commoncpp2/files/1.8.1-configure_detect_netfilter.patch
@@ -0,0 +1,14 @@
+diff --git a/m4/ost_socket.m4 b/m4/ost_socket.m4
+index bd9db7c..122c938 100644
+--- a/m4/ost_socket.m4
++++ b/m4/ost_socket.m4
+@@ -93,6 +93,9 @@ AC_DEFUN([OST_SYS_SOCKET],[
+ AC_CHECK_HEADERS([linux/netfilter_ipv4.h linux/netfilter_ipv6.h],,,
+ [#ifdef HAVE_LIMITS_H
+ #include <limits.h>
++ #endif
++ #ifdef HAVE_NETINET_IN_H
++ #include <netinet/in.h>
+ #endif])
+ if test "$ac_cv_header_linux_netfilter_ipv4_h" = "yes" &&
+ [ test "$ac_cv_header_linux_netfilter_ipv6_h" = "yes" &&
diff --git a/dev-cpp/commoncpp2/files/1.8.1-fix-buffer-overflow.patch b/dev-cpp/commoncpp2/files/1.8.1-fix-buffer-overflow.patch
new file mode 100644
index 000000000000..e68b00576cdb
--- /dev/null
+++ b/dev-cpp/commoncpp2/files/1.8.1-fix-buffer-overflow.patch
@@ -0,0 +1,13 @@
+diff --git a/src/inaddr.cpp b/src/inaddr.cpp
+index 5a4b9c4..50127f3 100644
+--- a/src/inaddr.cpp
++++ b/src/inaddr.cpp
+@@ -333,7 +333,7 @@ void IPV4Address::setAddress(const char *host)
+ if(ipaddr)
+ delete[] ipaddr;
+ ipaddr = new struct in_addr[1];
+- memset((void *)&ipaddr[0], 0, sizeof(ipaddr));
++ memset((void *)&ipaddr[0], 0, sizeof(*ipaddr));
+ return;
+ }
+
diff --git a/dev-cpp/commoncpp2/files/1.8.1-fix-c++14.patch b/dev-cpp/commoncpp2/files/1.8.1-fix-c++14.patch
new file mode 100644
index 000000000000..cc921060b303
--- /dev/null
+++ b/dev-cpp/commoncpp2/files/1.8.1-fix-c++14.patch
@@ -0,0 +1,52 @@
+Fix building with C++14, which errors out due changed noexcept()
+semantics for dtors caught by -Werror=terminate.
+
+See also: https://bugs.gentoo.org/show_bug.cgi?id=595422
+
+--- a/src/nat.cpp
++++ b/src/nat.cpp
+@@ -145,11 +145,11 @@
+ "nat lookup successful",
+ "nat address not in table",
+ "nat not supported/implemented",
+- "unable to open device "NAT_DEVICE,
++ "unable to open device " NAT_DEVICE,
+ "unable to get socket name",
+ "unable to get peer name",
+ "unable to get socket type",
+- "unable to lookup, nat "NAT_SYSCALL" failed",
++ "unable to lookup, nat " NAT_SYSCALL " failed",
+ "unkown nat error code"
+ };
+
+--- a/src/socket.cpp
++++ b/src/socket.cpp
+@@ -2971,12 +2971,7 @@
+
+ TCPStream::~TCPStream()
+ {
+-#ifdef CCXX_EXCEPTIONS
+- try { endStream(); }
+- catch( ... ) { if ( ! std::uncaught_exception()) throw;};
+-#else
+- endStream();
+-#endif
++ endStream();
+ }
+
+ #ifdef HAVE_GETADDRINFO
+--- a/src/ssl.cpp
++++ b/src/ssl.cpp
+@@ -441,12 +441,7 @@
+
+ SSLStream::~SSLStream()
+ {
+-#ifdef CCXX_EXCEPTIONS
+- try { endStream(); }
+- catch( ...) { if ( ! std::uncaught_exception()) throw;};
+-#else
+ endStream();
+-#endif
+ }
+
+ #ifdef CCXX_NAMESPACES
diff --git a/dev-cpp/commoncpp2/files/1.8.1-gnutls-3.4.patch b/dev-cpp/commoncpp2/files/1.8.1-gnutls-3.4.patch
new file mode 100644
index 000000000000..b7365b822065
--- /dev/null
+++ b/dev-cpp/commoncpp2/files/1.8.1-gnutls-3.4.patch
@@ -0,0 +1,36 @@
+From ba702b6034444c2e30b0990d06e28bb2dea8ecb7 Mon Sep 17 00:00:00 2001
+From: Alon Bar-Lev <alon.barlev@gmail.com>
+Date: Sat, 4 Mar 2017 01:36:23 +0200
+Subject: [PATCH] ssl: support gnutls-3.4
+
+Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
+---
+ src/ssl.cpp | 5 +----
+ 1 file changed, 1 insertion(+), 4 deletions(-)
+
+diff --git a/src/ssl.cpp b/src/ssl.cpp
+index 5bf526d..38ef0a7 100644
+--- a/src/ssl.cpp
++++ b/src/ssl.cpp
+@@ -344,9 +344,6 @@ ssize_t SSLStream::readData(void *target, size_t size, char separator, timeout_t
+ #ifdef CCXX_GNUTLS
+ bool SSLStream::getSession(void)
+ {
+- const int cert_priority[3] =
+- {GNUTLS_CRT_X509, GNUTLS_CRT_OPENPGP, 0};
+-
+ if(ssl)
+ return true;
+
+@@ -362,7 +359,7 @@ bool SSLStream::getSession(void)
+
+ gnutls_set_default_priority(ssl->session);
+ gnutls_certificate_allocate_credentials(&ssl->xcred);
+- gnutls_certificate_type_set_priority(ssl->session, cert_priority);
++ gnutls_priority_set_direct(ssl->session, "NORMAL:+CTYPE-OPENPGP", NULL);
+ gnutls_credentials_set(ssl->session, GNUTLS_CRD_CERTIFICATE, ssl->xcred);
+ gnutls_transport_set_ptr(ssl->session, (gnutls_transport_ptr)so);
+ if(gnutls_handshake(ssl->session)) {
+--
+2.10.2
+
diff --git a/dev-cpp/commoncpp2/files/1.8.1-libgcrypt.patch b/dev-cpp/commoncpp2/files/1.8.1-libgcrypt.patch
new file mode 100644
index 000000000000..08e24e1a06a9
--- /dev/null
+++ b/dev-cpp/commoncpp2/files/1.8.1-libgcrypt.patch
@@ -0,0 +1,48 @@
+--- a/src/ssl.cpp
++++ b/src/ssl.cpp
+@@ -99,35 +99,7 @@
+ return 0;
+ }
+
+-extern "C" {
+- static int _wrap_mutex_init(void **priv)
+- {
+- return _gcry_mutex_init((Mutex **)(priv));
+- }
+-
+- static int _wrap_mutex_destroy(void **priv)
+- {
+- return _gcry_mutex_destroy((Mutex **)(priv));
+- }
+-
+- static int _wrap_mutex_lock(void **priv)
+- {
+- return _gcry_mutex_lock((Mutex **)(priv));
+- }
+-
+- static int _wrap_mutex_unlock(void **priv)
+- {
+- return _gcry_mutex_unlock((Mutex **)(priv));
+- }
+-
+- static struct gcry_thread_cbs _gcry_threads =
+- {
+- GCRY_THREAD_OPTION_PTHREAD, NULL,
+- _wrap_mutex_init, _wrap_mutex_destroy,
+- _wrap_mutex_lock, _wrap_mutex_unlock
+- };
+-
+-};
++GCRY_THREAD_OPTION_PTHREAD_IMPL;
+
+ #endif
+
+@@ -135,7 +107,7 @@
+ public:
+ _ssl_global() {
+ #ifndef WIN32
+- gcry_control(GCRYCTL_SET_THREAD_CBS, &_gcry_threads);
++ gcry_control(GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread);
+ #endif
+ gnutls_global_init();
+ }
diff --git a/dev-cpp/commoncpp2/files/1.8.1-parallel-build.patch b/dev-cpp/commoncpp2/files/1.8.1-parallel-build.patch
new file mode 100644
index 000000000000..149677ca89b4
--- /dev/null
+++ b/dev-cpp/commoncpp2/files/1.8.1-parallel-build.patch
@@ -0,0 +1,11 @@
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -47,6 +47,7 @@
+
+ if EXTRAS
+ libccext2_la_LIBADD = @THREAD_LIBS@ @BASE_LIB@ @SSL_LIBS@ @ZSTREAM_LIBS@
++libccext2_la_DEPENDENCIES = libccgnu2.la
+ libccext2_la_LDFLAGS = $(RELEASE) $(SHARED_FLAGS)
+
+ if GETOPT_LONG
+
diff --git a/dev-cpp/commoncpp2/metadata.xml b/dev-cpp/commoncpp2/metadata.xml
new file mode 100644
index 000000000000..41cd682e0ecf
--- /dev/null
+++ b/dev-cpp/commoncpp2/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>cpp@gentoo.org</email>
+ <name>Gentoo C++ Project</name>
+</maintainer>
+</pkgmetadata>