summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Väth <martin@mvath.de>2017-07-15 09:49:15 +0200
committerMartin Väth <martin@mvath.de>2017-07-15 09:49:15 +0200
commit0e27e5ec4e6a8a2f85f8f7807dce992decaed65d (patch)
tree0404d079d9be399258f9df59eecfc95928addaa5 /net-libs
parentapp-text/mbtpdfasm: Add with fixes to save from removal (diff)
downloadmv-0e27e5ec4e6a8a2f85f8f7807dce992decaed65d.tar.gz
mv-0e27e5ec4e6a8a2f85f8f7807dce992decaed65d.tar.bz2
mv-0e27e5ec4e6a8a2f85f8f7807dce992decaed65d.zip
net-libs/wvstreams: Add and fix to save from removal
Diffstat (limited to 'net-libs')
-rw-r--r--net-libs/wvstreams/Manifest1
-rw-r--r--net-libs/wvstreams/files/wvstreams-4.6.1-fix-c++14.patch36
-rw-r--r--net-libs/wvstreams/files/wvstreams-4.6.1-gcc47.patch50
-rw-r--r--net-libs/wvstreams/files/wvstreams-4.6.1-glibc212.patch23
-rw-r--r--net-libs/wvstreams/files/wvstreams-4.6.1-openssl-1.0.0.patch16
-rw-r--r--net-libs/wvstreams/files/wvstreams-4.6.1-openssl-1.1.0.patch25
-rw-r--r--net-libs/wvstreams/files/wvstreams-4.6.1-parallel-make.patch56
-rw-r--r--net-libs/wvstreams/metadata.xml16
-rw-r--r--net-libs/wvstreams/wvstreams-4.6.1-r3.ebuild105
9 files changed, 328 insertions, 0 deletions
diff --git a/net-libs/wvstreams/Manifest b/net-libs/wvstreams/Manifest
new file mode 100644
index 00000000..c49a26b9
--- /dev/null
+++ b/net-libs/wvstreams/Manifest
@@ -0,0 +1 @@
+DIST wvstreams-4.6.1.tar.gz 1118456 SHA256 8403f5fbf83aa9ac0c6ce15d97fd85607488152aa84e007b7d0621b8ebc07633
diff --git a/net-libs/wvstreams/files/wvstreams-4.6.1-fix-c++14.patch b/net-libs/wvstreams/files/wvstreams-4.6.1-fix-c++14.patch
new file mode 100644
index 00000000..b2c2efd5
--- /dev/null
+++ b/net-libs/wvstreams/files/wvstreams-4.6.1-fix-c++14.patch
@@ -0,0 +1,36 @@
+Fix building with C++14, which errors out due to explicit operator bool() conversion
+See also: https://bugs.gentoo.org/show_bug.cgi?id=594058
+
+--- a/streams/wvstream.cc
++++ b/streams/wvstream.cc
+@@ -907,9 +907,9 @@
+
+ if (forceable)
+ {
+- si.wants.readable = readcb;
+- si.wants.writable = writecb;
+- si.wants.isexception = exceptcb;
++ si.wants.readable = static_cast<bool>(readcb);
++ si.wants.writable = static_cast<bool>(writecb);
++ si.wants.isexception = static_cast<bool>(exceptcb);
+ }
+ else
+ {
+@@ -1019,7 +1019,7 @@
+
+ IWvStream::SelectRequest WvStream::get_select_request()
+ {
+- return IWvStream::SelectRequest(readcb, writecb, exceptcb);
++ return IWvStream::SelectRequest(static_cast<bool>(readcb), static_cast<bool>(writecb), static_cast<bool>(exceptcb));
+ }
+
+
+@@ -1107,7 +1107,7 @@
+ // inefficient, because if the alarm was expired then pre_select()
+ // returned true anyway and short-circuited the previous select().
+ TRACE("hello-%p\n", this);
+- return !alarm_was_ticking || select(0, readcb, writecb, exceptcb);
++ return !alarm_was_ticking || select(0, static_cast<bool>(readcb), static_cast<bool>(writecb), static_cast<bool>(exceptcb));
+ }
+
+
diff --git a/net-libs/wvstreams/files/wvstreams-4.6.1-gcc47.patch b/net-libs/wvstreams/files/wvstreams-4.6.1-gcc47.patch
new file mode 100644
index 00000000..b284da8f
--- /dev/null
+++ b/net-libs/wvstreams/files/wvstreams-4.6.1-gcc47.patch
@@ -0,0 +1,50 @@
+http://bugs.gentoo.org/419563
+http://bugs.gentoo.org/419971
+
+See -gcc47-patch and -magic.patch in Fedora git:
+
+http://pkgs.fedoraproject.org/gitweb/?p=libwvstreams.git;a=tree
+
+--- include/wvtask.h
++++ include/wvtask.h
+@@ -45,7 +45,8 @@
+ typedef void TaskFunc(void *userdata);
+
+ static int taskcount, numtasks, numrunning;
+- int magic_number, *stack_magic;
++ int volatile magic_number;
++ int *stack_magic;
+ WvString name;
+ int tid;
+
+@@ -84,7 +85,7 @@
+ static WvTaskMan *singleton;
+ static int links;
+
+- static int magic_number;
++ static int volatile magic_number;
+ static WvTaskList all_tasks, free_tasks;
+
+ static void get_stack(WvTask &task, size_t size);
+--- include/wvuid.h
++++ include/wvuid.h
+@@ -7,6 +7,7 @@
+ #ifndef __WVUID_H
+ #define __WVUID_H
+
++#include <unistd.h>
+ #include "wvstring.h"
+
+ #if WIN32
+--- utils/wvtask.cc
++++ utils/wvtask.cc
+@@ -58,7 +58,8 @@
+ int WvTask::taskcount, WvTask::numtasks, WvTask::numrunning;
+
+ WvTaskMan *WvTaskMan::singleton;
+-int WvTaskMan::links, WvTaskMan::magic_number;
++int WvTaskMan::links;
++int volatile WvTaskMan::magic_number;
+ WvTaskList WvTaskMan::all_tasks, WvTaskMan::free_tasks;
+ ucontext_t WvTaskMan::stackmaster_task, WvTaskMan::get_stack_return,
+ WvTaskMan::toplevel;
diff --git a/net-libs/wvstreams/files/wvstreams-4.6.1-glibc212.patch b/net-libs/wvstreams/files/wvstreams-4.6.1-glibc212.patch
new file mode 100644
index 00000000..473d3e83
--- /dev/null
+++ b/net-libs/wvstreams/files/wvstreams-4.6.1-glibc212.patch
@@ -0,0 +1,23 @@
+http://bugs.gentoo.org/333301
+
+--- ipstreams/wvunixdgsocket.cc
++++ ipstreams/wvunixdgsocket.cc
+@@ -1,5 +1,5 @@
+ #include "wvunixdgsocket.h"
+-#ifdef MACOS
++#if defined(MACOS) || defined(__GNUC__)
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #endif
+--- streams/wvatomicfile.cc
++++ streams/wvatomicfile.cc
+@@ -11,7 +11,8 @@
+ #include "wvfileutils.h"
+ #include "wvstrutils.h"
+
+-#ifdef MACOS
++#if defined(MACOS) || defined(__GNUC__)
++#include <sys/types.h>
+ #include <sys/stat.h>
+ #endif
+
diff --git a/net-libs/wvstreams/files/wvstreams-4.6.1-openssl-1.0.0.patch b/net-libs/wvstreams/files/wvstreams-4.6.1-openssl-1.0.0.patch
new file mode 100644
index 00000000..c27e7233
--- /dev/null
+++ b/net-libs/wvstreams/files/wvstreams-4.6.1-openssl-1.0.0.patch
@@ -0,0 +1,16 @@
+http://bugs.gentoo.org/304283
+
+--- crypto/wvx509.cc
++++ crypto/wvx509.cc
+@@ -1157,7 +1157,11 @@
+
+ if (ext)
+ {
++#if OPENSSL_VERSION_NUMBER >= 0x10000000L
++ const X509V3_EXT_METHOD *method = X509V3_EXT_get(ext);
++#else
+ X509V3_EXT_METHOD *method = X509V3_EXT_get(ext);
++#endif
+ if (!method)
+ {
+ WvDynBuf buf;
diff --git a/net-libs/wvstreams/files/wvstreams-4.6.1-openssl-1.1.0.patch b/net-libs/wvstreams/files/wvstreams-4.6.1-openssl-1.1.0.patch
new file mode 100644
index 00000000..6a06731e
--- /dev/null
+++ b/net-libs/wvstreams/files/wvstreams-4.6.1-openssl-1.1.0.patch
@@ -0,0 +1,25 @@
+# https://bugs.gentoo.org/show_bug.cgi?id=614810
+# https://build.opensuse.org/package/view_file/openSUSE:Factory:ARM/wvstreams/wvstreams-openssl.patch
+--- 1/crypto/wvblowfish.cc
++++ 1/crypto/wvblowfish.cc
+@@ -77,7 +77,8 @@
+ // if flushing on encryption, add some randomized padding
+ size_t padlen = 8 - remainder;
+ unsigned char *pad = in.alloc(padlen);
+- RAND_pseudo_bytes(pad, padlen);
++ if (RAND_bytes(pad, padlen) != 1)
++ return false;
+ len += 8;
+ }
+ else // nothing we can do here, flushing does not make sense!
+--- 1/crypto/wvtripledes.cc
++++ 1/crypto/wvtripledes.cc
+@@ -78,6 +78,8 @@
+ size_t padlen = 8 - remainder;
+ unsigned char *pad = in.alloc(padlen);
+ RAND_pseudo_bytes(pad, padlen);
++ if(RAND_bytes(pad, padlen) != 1)
++ return false;
+ len += 8;
+ }
+ else // nothing we can do here, flushing does not make sense!
diff --git a/net-libs/wvstreams/files/wvstreams-4.6.1-parallel-make.patch b/net-libs/wvstreams/files/wvstreams-4.6.1-parallel-make.patch
new file mode 100644
index 00000000..d6f7d6e7
--- /dev/null
+++ b/net-libs/wvstreams/files/wvstreams-4.6.1-parallel-make.patch
@@ -0,0 +1,56 @@
+--- Makefile
++++ Makefile
+@@ -131,12 +131,19 @@
+ # libwvstreams: stream/event handling library
+ #
+ TARGETS += libwvstreams.so
+-TARGETS += crypto/tests/ssltest ipstreams/tests/unixtest
++TARGETS += crypto/tests/ssltest
++crypto/tests/ssltest: $(LIBWVSTREAMS)
++
++TARGETS += ipstreams/tests/unixtest
++ipstreams/tests/unixtest: $(LIBWVSTREAMS)
++
+ TARGETS += crypto/tests/printcert
++crypto/tests/printcert: $(LIBWVSTREAMS)
+
+ ifndef _MACOS
+ ifneq ("$(with_readline)", "no")
+ TARGETS += ipstreams/tests/wsd
++ ipstreams/tests/wsd: $(LIBWVSTREAMS)
+ ipstreams/tests/wsd-LIBS += -lreadline
+ else
+ TEST_SKIP_OBJS += ipstreams/tests/wsd
+@@ -179,7 +186,11 @@
+ #
+ ifneq ("$(with_dbus)", "no")
+ TARGETS += libwvdbus.so
+- TARGETS += dbus/tests/wvdbus dbus/tests/wvdbusd
++ TARGETS += dbus/tests/wvdbus
++ dbus/tests/wvdbus: $(LIBWVDBUS)
++
++ TARGETS += dbus/tests/wvdbusd
++ dbus/tests/wvdbusd: $(LIBWVDBUS)
+ TESTS += $(call tests_cc,dbus/tests)
+ libwvdbus_OBJS += $(call objects,dbus)
+ libwvdbus.so: $(libwvdbus_OBJS) $(LIBWVSTREAMS)
+--- wvrules-posix.mk
++++ wvrules-posix.mk
+@@ -85,12 +85,15 @@
+ $(AR) s $1
+ endef
+
+-CC: FORCE
++CC:
+ @CC="$(CC)" CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" \
+ $(WVSTREAMS)/gen-cc CC c
+
+-CXX: FORCE
++CXX:
+ @CC="$(CXX)" CFLAGS="$(CXXFLAGS)" CPPFLAGS="$(CPPFLAGS)" \
+ $(WVSTREAMS)/gen-cc CXX cc
+
++#All files must depend on the above two rules. This is a godawful hack.
++$(shell find -type f '(' -name '*.c' -o -name '*.cc' ')' ): CC CXX
++
+ wvlink=$(LINK_MSG)$(WVLINK_CC) $(LDFLAGS) $($1-LDFLAGS) -o $1 $(filter %.o %.a %.so, $2) $($1-LIBS) $(XX_LIBS) $(LDLIBS) $(PRELIBS) $(LIBS)
diff --git a/net-libs/wvstreams/metadata.xml b/net-libs/wvstreams/metadata.xml
new file mode 100644
index 00000000..048f0f83
--- /dev/null
+++ b/net-libs/wvstreams/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <!-- maintainer-needed -->
+ <upstream>
+ <remote-id type="google-code">wvstreams</remote-id>
+ </upstream>
+ <use>
+ <flag name="boost">
+ Use <pkg>dev-libs/boost</pkg> to provide TR1-compatible
+ functional interface. This USE flag is only needed with GCC
+ earlier than version 4.1, or with other compilares not providing
+ said interface.
+ </flag>
+ </use>
+</pkgmetadata>
diff --git a/net-libs/wvstreams/wvstreams-4.6.1-r3.ebuild b/net-libs/wvstreams/wvstreams-4.6.1-r3.ebuild
new file mode 100644
index 00000000..428f633c
--- /dev/null
+++ b/net-libs/wvstreams/wvstreams-4.6.1-r3.ebuild
@@ -0,0 +1,105 @@
+# Copyright 2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+RESTRICT="mirror"
+inherit autotools flag-o-matic toolchain-funcs versionator
+
+# Unfixed: https://bugs.gentoo.org/show_bug.cgi?id=614810
+
+DESCRIPTION="A network programming library in C++"
+HOMEPAGE="http://alumnit.ca/wiki/?WvStreams"
+SRC_URI="https://wvstreams.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 hppa ppc sparc x86"
+IUSE="pam doc +ssl +dbus debug boost"
+
+#Tests fail if openssl is not compiled with -DPURIFY. Gentoo's isn't. FAIL!
+RESTRICT="test"
+
+#QA Fail: xplc is compiled as a part of wvstreams.
+#It'll take a larger patching effort to get it extracted, since upstream integrated it
+#more tightly this time. Probably for the better since upstream xplc seems dead.
+
+RDEPEND="sys-libs/readline:0=
+ sys-libs/zlib
+ dbus? ( >=sys-apps/dbus-1.4.20 )
+ dev-libs/openssl:0=
+ pam? ( virtual/pam )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen )
+ boost? ( >=dev-libs/boost-1.34.1:= )"
+
+DOCS="ChangeLog README*"
+
+pkg_pretend() {
+ [[ ${MERGE_TYPE} == "binary" ]] && return
+
+ if ! use boost && ! version_is_at_least 4.1 "$(gcc-fullversion)"; then
+ eerror "This package requires the active gcc to be at least version 4.1"
+ eerror "or USE=boost must be installed."
+ die "Please activate >=sys-devel/gcc-4.1 with gcc-config."
+ fi
+}
+
+src_prepare() {
+ eapply -p0 "${FILESDIR}"/${P}-parallel-make.patch \
+ "${FILESDIR}"/${P}-openssl-1.0.0.patch \
+ "${FILESDIR}"/${P}-glibc212.patch \
+ "${FILESDIR}"/${P}-gcc47.patch
+ eapply "${FILESDIR}"/${P}-fix-c++14.patch
+
+ sed -i \
+ -e 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:' \
+ -e 's:AM_PROG_CC_STDC:AC_PROG_CC:' \
+ configure.ac argp/configure.ac || die
+
+ default
+ eautoreconf
+}
+
+src_configure() {
+ append-flags -fno-strict-aliasing
+ append-flags -fno-tree-dce -fno-optimize-sibling-calls #421375
+
+ tc-export AR CXX
+
+ use boost && export ac_cv_header_tr1_functional=no
+
+ econf \
+ --localstatedir=/var \
+ $(use_enable debug) \
+ --disable-optimization \
+ $(use_with dbus) \
+ --with-openssl \
+ $(use_with pam) \
+ --without-tcl \
+ --without-qt \
+ --with-zlib \
+ --without-valgrind
+}
+
+src_compile() {
+ default
+
+ if use doc; then
+ doxygen || die
+ fi
+}
+
+src_test() {
+ emake test
+}
+
+src_install() {
+ default
+
+ if use doc; then
+ #the list of files is too big for dohtml -r Docs/doxy-html/*
+ cd Docs/doxy-html
+ dodoc -r *
+ fi
+}