commit:     944606cce697022863886a3048135fcc02174088
Author:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Sat Nov  3 13:48:17 2018 +0000
Commit:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Sat Nov  3 14:04:26 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=944606cc

net-libs/wvstreams: Add live ebuild

Package-Manager: Portage-2.3.51, Repoman-2.3.11
Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org>

 .../files/wvstreams-99999-openssl-ldflags.patch    | 10 +++
 .../wvstreams/files/wvstreams-99999-soname.patch   | 11 +++
 net-libs/wvstreams/wvstreams-99999.ebuild          | 92 ++++++++++++++++++++++
 3 files changed, 113 insertions(+)

diff --git a/net-libs/wvstreams/files/wvstreams-99999-openssl-ldflags.patch 
b/net-libs/wvstreams/files/wvstreams-99999-openssl-ldflags.patch
new file mode 100644
index 00000000000..0bf2bc4a7b0
--- /dev/null
+++ b/net-libs/wvstreams/files/wvstreams-99999-openssl-ldflags.patch
@@ -0,0 +1,10 @@
+--- a/config.ac
++++ b/config.ac
+@@ -444,7 +444,6 @@
+ if test "$with_openssl" != "no"; then
+     if test "$with_openssl" != ""; then
+         WV_APPEND(CPPFLAGS, [-I$with_openssl/include])
+-        WV_APPEND(LDFLAGS, [-L$with_openssl])
+     fi
+     AC_CHECK_HEADERS(openssl/ssl.h,, [with_openssl=no],
+                      [#define OPENSSL_NO_KRB5])

diff --git a/net-libs/wvstreams/files/wvstreams-99999-soname.patch 
b/net-libs/wvstreams/files/wvstreams-99999-soname.patch
new file mode 100644
index 00000000000..9dd0d8ab826
--- /dev/null
+++ b/net-libs/wvstreams/files/wvstreams-99999-soname.patch
@@ -0,0 +1,11 @@
+--- a/default.so.do
++++ b/default.so.do
+@@ -47,7 +47,7 @@
+     redo-ifchange "$OUT/$2.a"
+     ln -s $2.a "$sofile"
+ else
+-    $CXX -o "$sofile" -shared \
++    $CXX -o "$sofile" -shared -Wl,-soname,$sofile \
+         $zdefs \
+         $LDFLAGS \
+         $obj $libdep $libs

diff --git a/net-libs/wvstreams/wvstreams-99999.ebuild 
b/net-libs/wvstreams/wvstreams-99999.ebuild
new file mode 100644
index 00000000000..8665f2087f9
--- /dev/null
+++ b/net-libs/wvstreams/wvstreams-99999.ebuild
@@ -0,0 +1,92 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+AT_NOELIBTOOLIZE=yes
+inherit autotools flag-o-matic git-r3 multiprocessing toolchain-funcs 
out-of-source
+
+DESCRIPTION="A network programming library in C++"
+HOMEPAGE="https://github.com/apenwarr/wvstreams";
+EGIT_REPO_URI="${HOMEPAGE}"
+
+LICENSE="GPL-2"
+SLOT="0/5.0"
+KEYWORDS=""
+IUSE="+dbus debug doc pam static-libs +zlib"
+
+RDEPEND="
+       <dev-libs/openssl-1.1:0=
+       sys-libs/readline:0=
+       sys-libs/zlib
+       dbus? ( >=sys-apps/dbus-1.4.20 )
+       pam? ( virtual/pam )
+"
+DEPEND="
+       ${RDEPEND}
+       dev-util/redo
+       virtual/pkgconfig
+       doc? ( app-doc/doxygen )
+"
+PATCHES=(
+       "${FILESDIR}"/${PN}-99999-openssl-ldflags.patch
+       "${FILESDIR}"/${PN}-99999-soname.patch
+)
+
+src_prepare() {
+       sed -i -e 's|-pre||g' config.ac || die
+
+       default
+
+       ln -s config.ac configure.ac || die
+       eautoreconf
+}
+
+my_src_configure() {
+       append-flags -fno-strict-aliasing
+       append-flags -fno-tree-dce -fno-optimize-sibling-calls #421375
+
+       tc-export AR CC CXX
+
+       econf \
+               $(use_enable debug) \
+               $(use_with dbus) \
+               $(use_with pam) \
+               $(use_with zlib) \
+               --cache-file="${BUILD_DIR}"/config.cache \
+               --disable-optimization \
+               --localstatedir=/var \
+               --without-qt \
+               --without-valgrind
+}
+
+my_src_compile() {
+       redo -j$(makeopts_jobs) || die
+
+       if use doc; then
+               doxygen "${S}"/Doxyfile || die
+       fi
+}
+
+my_src_test() {
+       redo -j$(makeopts_jobs) test || die
+}
+
+my_src_install() {
+       DESTDIR="${D}" redo -j$(makeopts_jobs) install || die
+
+       local lib
+       for lib in $(find "${BUILD_DIR}" -name '*.so' -type l | grep -v 
libwvstatic); do
+               insinto /usr/$(get_libdir)/pkgconfig
+               doins "${BUILD_DIR}"/pkgconfig/$(basename ${lib/.so}).pc
+       done
+
+       if use doc; then
+               #the list of files is too big for dohtml -r Docs/doxy-html/*
+               docinto html
+               dodoc -r Docs/doxy-html/*
+       fi
+
+       if ! use static-libs; then
+               find "${D}/usr/$(get_libdir)" -name '*.a' -delete || die
+       fi
+}

Reply via email to