commit:     dd52419b82ae922b54c7a79e1ff02bba20fa0a7d
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 29 13:12:51 2020 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sat Aug 29 13:12:51 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dd52419b

dev-libs/tntnet: [QA] Many fixes

* Do not build static archives
* Add missing `|| die`
* Add missing sub-slot operators
* Clean examples properly
* Rebase patch
* Use `default` correctly
* Remove `eutils.eclass`
* Use bash-arrays for `econf` arguments

Closes: https://bugs.gentoo.org/737184
Package-Manager: Portage-3.0.4, Repoman-3.0.1
Signed-off-by: David Seifert <soap <AT> gentoo.org>

 .../tntnet/files/tntnet-2.0-zlib-minizip.patch     | 12 ++---
 dev-libs/tntnet/tntnet-2.2.1-r3.ebuild             | 62 ++++++++++------------
 2 files changed, 34 insertions(+), 40 deletions(-)

diff --git a/dev-libs/tntnet/files/tntnet-2.0-zlib-minizip.patch 
b/dev-libs/tntnet/files/tntnet-2.0-zlib-minizip.patch
index 07b4836319d..5e046506089 100644
--- a/dev-libs/tntnet/files/tntnet-2.0-zlib-minizip.patch
+++ b/dev-libs/tntnet/files/tntnet-2.0-zlib-minizip.patch
@@ -8,9 +8,9 @@
  
  AC_LANG(C++)
  ACX_PTHREAD
-@@ -25,6 +26,12 @@
- AC_CHECK_HEADER([zlib.h], , AC_MSG_ERROR([zlib not found]))
- AC_CHECK_HEADER([cxxtools/net/tcpsocket.h], , AC_MSG_ERROR([cxxtools headers 
not found]))
+@@ -40,6 +41,12 @@
+ AC_CHECK_FUNCS([fopen64], ,[AM_CFLAGS=-DUSE_FILE32API])
+ AC_SUBST(AM_CFLAGS)
  
 +PKG_CHECK_MODULES([MINIZIP], [minizip],
 +  [HAVE_MINIZIP=true], [HAVE_MINIZIP=false])
@@ -23,7 +23,7 @@
    [epoll_option=$withval],
 --- a/framework/common/Makefile.am
 +++ b/framework/common/Makefile.am
-@@ -23,7 +23,6 @@ libtntnet_la_SOURCES = \
+@@ -23,7 +23,6 @@
        httpparser.cpp \
        httprequest.cpp \
        httpreply.cpp \
@@ -31,7 +31,7 @@
        job.cpp \
        langlib.cpp \
        listener.cpp \
-@@ -41,16 +40,13 @@ libtntnet_la_SOURCES = \
+@@ -40,16 +39,13 @@
        stringlessignorecase.cpp \
        tntconfig.cpp \
        tntnet.cpp \
@@ -49,7 +49,7 @@
  
  nobase_include_HEADERS = \
        tnt/applicationunlocker.h \
-@@ -145,3 +141,13 @@ noinst_HEADERS += \
+@@ -144,3 +140,13 @@
        tnt/stressjob.h
  endif
  

diff --git a/dev-libs/tntnet/tntnet-2.2.1-r3.ebuild 
b/dev-libs/tntnet/tntnet-2.2.1-r3.ebuild
index 8f1ea542f98..6012e52da3e 100644
--- a/dev-libs/tntnet/tntnet-2.2.1-r3.ebuild
+++ b/dev-libs/tntnet/tntnet-2.2.1-r3.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=7
 
-inherit autotools eutils
+inherit autotools
 
 DESCRIPTION="Modular, multithreaded web application server extensible with C++"
 HOMEPAGE="http://www.tntnet.org/";
@@ -12,13 +12,14 @@ SRC_URI="http://www.tntnet.org/download/${P}.tar.gz";
 LICENSE="LGPL-2.1"
 SLOT="0"
 KEYWORDS="~amd64 ~sparc ~x86"
-IUSE="gnutls libressl server ssl examples static-libs"
+IUSE="gnutls libressl server ssl examples"
 
-RDEPEND=">=dev-libs/cxxtools-2.2.1
+RDEPEND="
+       >=dev-libs/cxxtools-2.2.1
        sys-libs/zlib[minizip]
        ssl? (
                gnutls? (
-                       >=net-libs/gnutls-1.2.0
+                       net-libs/gnutls:0=
                        dev-libs/libgcrypt:0
                )
                !gnutls? (
@@ -27,18 +28,19 @@ RDEPEND=">=dev-libs/cxxtools-2.2.1
                )
        )"
 DEPEND="${RDEPEND}"
-BDEPEND="virtual/pkgconfig
-       app-arch/zip"
+BDEPEND="
+       app-arch/zip
+       virtual/pkgconfig"
+
+PATCHES=( "${FILESDIR}"/${PN}-2.0-zlib-minizip.patch )
 
 src_prepare() {
        # Both fixed in the next release
-       eapply "${FILESDIR}"/${PN}-2.0-zlib-minizip.patch
+       default
        rm framework/common/{ioapi,unzip}.[ch] || die
 
        # bug 426262
-       if has_version ">sys-devel/autoconf-2.13"; then
-               mv configure.in configure.ac
-       fi
+       mv configure.{in,ac} || die
 
        # bug 423697
        sed -e "s:unzip.h:minizip/unzip.h:" -i framework/defcomp/unzipcomp.cpp 
|| die
@@ -46,54 +48,46 @@ src_prepare() {
        eautoreconf
 
        sed -i -e 's:@localstatedir@:/var:' etc/tntnet/tntnet.xml.in || die
-
-       default
 }
 
 src_configure() {
-       local myconf=""
+       # default enabled, will not compile without sdk
+       local myconf=( --with-sdk )
 
-       # Prefer gnutls above SSL
+       # Prefer gnutls over SSL
        if use gnutls; then
                einfo "Using gnutls for ssl support."
-               myconf="${myconf} --with-ssl=gnutls"
+               myconf+=( --with-ssl=gnutls )
        elif use ssl; then
                einfo "Using openssl for ssl support."
-               myconf="${myconf} --with-ssl=openssl"
+               myconf+=( --with-ssl=openssl )
        else
-               myconf="${myconf} --with-ssl=no"
+               myconf+=( --with-ssl=no )
        fi
 
-       # default enabled, will not compile without sdk
-       myconf="${myconf} --with-sdk"
-
        econf \
+               --disable-static \
                $(use_with server) \
-               ${myconf}
+               "${myconf[@]}"
 }
 
 src_install() {
-       emake DESTDIR="${D}" install
-
-       dodoc AUTHORS ChangeLog README TODO doc/tntnet.pdf
+       default
+       dodoc doc/tntnet.pdf
 
        if use examples; then
-               cd "${S}/sdk/demos"
-               emake clean
-               rm -rf .deps */.deps .libs */.libs
-               cd "${S}"
+               emake -C sdk/demos maintainer-clean
+               rm -r sdk/demos/{Makefile*,*/Makefile*,*/*.{la,lo},*/.libs} || 
die
 
                docinto examples
-               dodoc -r sdk/demos/*
+               dodoc -r sdk/demos/.
        fi
 
        if use server; then
-               rm -f "${D}/etc/init.d/tntnet"
-               newinitd "${FILESDIR}/tntnet.initd" tntnet
+               rm -f "${ED}"/etc/init.d/tntnet || die
+               newinitd "${FILESDIR}"/tntnet.initd tntnet
        fi
 
        # bug 737184
-       if ! use static-libs; then
-               find "${ED}" \( -name "*.a" -o -name "*.la" \) -delete || die
-       fi
+       find "${ED}" -name '*.la' -delete || die
 }

Reply via email to