summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Roovers <jer@gentoo.org>2018-11-03 14:48:17 +0100
committerJeroen Roovers <jer@gentoo.org>2018-11-03 15:04:26 +0100
commit944606cce697022863886a3048135fcc02174088 (patch)
tree85c36ed33f15cb241a2e25a292abc05080044166 /net-libs
parentdev-util/redo: Initial commit (diff)
downloadgentoo-944606cce697022863886a3048135fcc02174088.tar.gz
gentoo-944606cce697022863886a3048135fcc02174088.tar.bz2
gentoo-944606cce697022863886a3048135fcc02174088.zip
net-libs/wvstreams: Add live ebuild
Package-Manager: Portage-2.3.51, Repoman-2.3.11 Signed-off-by: Jeroen Roovers <jer@gentoo.org>
Diffstat (limited to 'net-libs')
-rw-r--r--net-libs/wvstreams/files/wvstreams-99999-openssl-ldflags.patch10
-rw-r--r--net-libs/wvstreams/files/wvstreams-99999-soname.patch11
-rw-r--r--net-libs/wvstreams/wvstreams-99999.ebuild92
3 files changed, 113 insertions, 0 deletions
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 000000000000..0bf2bc4a7b02
--- /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 000000000000..9dd0d8ab8260
--- /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 000000000000..8665f2087f92
--- /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
+}