diff options
author | David Seifert <soap@gentoo.org> | 2020-08-29 15:12:51 +0200 |
---|---|---|
committer | David Seifert <soap@gentoo.org> | 2020-08-29 15:12:51 +0200 |
commit | dd52419b82ae922b54c7a79e1ff02bba20fa0a7d (patch) | |
tree | eb0950d352f461b14b0e27f77d32a069ce484394 /dev-libs/tntnet | |
parent | dev-python/cython: Stabilize 0.29.21 arm, #737740 (diff) | |
download | gentoo-dd52419b82ae922b54c7a79e1ff02bba20fa0a7d.tar.gz gentoo-dd52419b82ae922b54c7a79e1ff02bba20fa0a7d.tar.bz2 gentoo-dd52419b82ae922b54c7a79e1ff02bba20fa0a7d.zip |
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@gentoo.org>
Diffstat (limited to 'dev-libs/tntnet')
-rw-r--r-- | dev-libs/tntnet/files/tntnet-2.0-zlib-minizip.patch | 12 | ||||
-rw-r--r-- | 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 07b4836319d4..5e0465060898 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 8f1ea542f980..6012e52da3e1 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 } |