Gentoo Archives: gentoo-commits

From: David Seifert <soap@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/tntnet/files/, dev-libs/tntnet/
Date: Sat, 29 Aug 2020 13:13:09
Message-Id: 1598706771.dd52419b82ae922b54c7a79e1ff02bba20fa0a7d.soap@gentoo
1 commit: dd52419b82ae922b54c7a79e1ff02bba20fa0a7d
2 Author: David Seifert <soap <AT> gentoo <DOT> org>
3 AuthorDate: Sat Aug 29 13:12:51 2020 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Sat Aug 29 13:12:51 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dd52419b
7
8 dev-libs/tntnet: [QA] Many fixes
9
10 * Do not build static archives
11 * Add missing `|| die`
12 * Add missing sub-slot operators
13 * Clean examples properly
14 * Rebase patch
15 * Use `default` correctly
16 * Remove `eutils.eclass`
17 * Use bash-arrays for `econf` arguments
18
19 Closes: https://bugs.gentoo.org/737184
20 Package-Manager: Portage-3.0.4, Repoman-3.0.1
21 Signed-off-by: David Seifert <soap <AT> gentoo.org>
22
23 .../tntnet/files/tntnet-2.0-zlib-minizip.patch | 12 ++---
24 dev-libs/tntnet/tntnet-2.2.1-r3.ebuild | 62 ++++++++++------------
25 2 files changed, 34 insertions(+), 40 deletions(-)
26
27 diff --git a/dev-libs/tntnet/files/tntnet-2.0-zlib-minizip.patch b/dev-libs/tntnet/files/tntnet-2.0-zlib-minizip.patch
28 index 07b4836319d..5e046506089 100644
29 --- a/dev-libs/tntnet/files/tntnet-2.0-zlib-minizip.patch
30 +++ b/dev-libs/tntnet/files/tntnet-2.0-zlib-minizip.patch
31 @@ -8,9 +8,9 @@
32
33 AC_LANG(C++)
34 ACX_PTHREAD
35 -@@ -25,6 +26,12 @@
36 - AC_CHECK_HEADER([zlib.h], , AC_MSG_ERROR([zlib not found]))
37 - AC_CHECK_HEADER([cxxtools/net/tcpsocket.h], , AC_MSG_ERROR([cxxtools headers not found]))
38 +@@ -40,6 +41,12 @@
39 + AC_CHECK_FUNCS([fopen64], ,[AM_CFLAGS=-DUSE_FILE32API])
40 + AC_SUBST(AM_CFLAGS)
41
42 +PKG_CHECK_MODULES([MINIZIP], [minizip],
43 + [HAVE_MINIZIP=true], [HAVE_MINIZIP=false])
44 @@ -23,7 +23,7 @@
45 [epoll_option=$withval],
46 --- a/framework/common/Makefile.am
47 +++ b/framework/common/Makefile.am
48 -@@ -23,7 +23,6 @@ libtntnet_la_SOURCES = \
49 +@@ -23,7 +23,6 @@
50 httpparser.cpp \
51 httprequest.cpp \
52 httpreply.cpp \
53 @@ -31,7 +31,7 @@
54 job.cpp \
55 langlib.cpp \
56 listener.cpp \
57 -@@ -41,16 +40,13 @@ libtntnet_la_SOURCES = \
58 +@@ -40,16 +39,13 @@
59 stringlessignorecase.cpp \
60 tntconfig.cpp \
61 tntnet.cpp \
62 @@ -49,7 +49,7 @@
63
64 nobase_include_HEADERS = \
65 tnt/applicationunlocker.h \
66 -@@ -145,3 +141,13 @@ noinst_HEADERS += \
67 +@@ -144,3 +140,13 @@
68 tnt/stressjob.h
69 endif
70
71
72 diff --git a/dev-libs/tntnet/tntnet-2.2.1-r3.ebuild b/dev-libs/tntnet/tntnet-2.2.1-r3.ebuild
73 index 8f1ea542f98..6012e52da3e 100644
74 --- a/dev-libs/tntnet/tntnet-2.2.1-r3.ebuild
75 +++ b/dev-libs/tntnet/tntnet-2.2.1-r3.ebuild
76 @@ -3,7 +3,7 @@
77
78 EAPI=7
79
80 -inherit autotools eutils
81 +inherit autotools
82
83 DESCRIPTION="Modular, multithreaded web application server extensible with C++"
84 HOMEPAGE="http://www.tntnet.org/"
85 @@ -12,13 +12,14 @@ SRC_URI="http://www.tntnet.org/download/${P}.tar.gz"
86 LICENSE="LGPL-2.1"
87 SLOT="0"
88 KEYWORDS="~amd64 ~sparc ~x86"
89 -IUSE="gnutls libressl server ssl examples static-libs"
90 +IUSE="gnutls libressl server ssl examples"
91
92 -RDEPEND=">=dev-libs/cxxtools-2.2.1
93 +RDEPEND="
94 + >=dev-libs/cxxtools-2.2.1
95 sys-libs/zlib[minizip]
96 ssl? (
97 gnutls? (
98 - >=net-libs/gnutls-1.2.0
99 + net-libs/gnutls:0=
100 dev-libs/libgcrypt:0
101 )
102 !gnutls? (
103 @@ -27,18 +28,19 @@ RDEPEND=">=dev-libs/cxxtools-2.2.1
104 )
105 )"
106 DEPEND="${RDEPEND}"
107 -BDEPEND="virtual/pkgconfig
108 - app-arch/zip"
109 +BDEPEND="
110 + app-arch/zip
111 + virtual/pkgconfig"
112 +
113 +PATCHES=( "${FILESDIR}"/${PN}-2.0-zlib-minizip.patch )
114
115 src_prepare() {
116 # Both fixed in the next release
117 - eapply "${FILESDIR}"/${PN}-2.0-zlib-minizip.patch
118 + default
119 rm framework/common/{ioapi,unzip}.[ch] || die
120
121 # bug 426262
122 - if has_version ">sys-devel/autoconf-2.13"; then
123 - mv configure.in configure.ac
124 - fi
125 + mv configure.{in,ac} || die
126
127 # bug 423697
128 sed -e "s:unzip.h:minizip/unzip.h:" -i framework/defcomp/unzipcomp.cpp || die
129 @@ -46,54 +48,46 @@ src_prepare() {
130 eautoreconf
131
132 sed -i -e 's:@localstatedir@:/var:' etc/tntnet/tntnet.xml.in || die
133 -
134 - default
135 }
136
137 src_configure() {
138 - local myconf=""
139 + # default enabled, will not compile without sdk
140 + local myconf=( --with-sdk )
141
142 - # Prefer gnutls above SSL
143 + # Prefer gnutls over SSL
144 if use gnutls; then
145 einfo "Using gnutls for ssl support."
146 - myconf="${myconf} --with-ssl=gnutls"
147 + myconf+=( --with-ssl=gnutls )
148 elif use ssl; then
149 einfo "Using openssl for ssl support."
150 - myconf="${myconf} --with-ssl=openssl"
151 + myconf+=( --with-ssl=openssl )
152 else
153 - myconf="${myconf} --with-ssl=no"
154 + myconf+=( --with-ssl=no )
155 fi
156
157 - # default enabled, will not compile without sdk
158 - myconf="${myconf} --with-sdk"
159 -
160 econf \
161 + --disable-static \
162 $(use_with server) \
163 - ${myconf}
164 + "${myconf[@]}"
165 }
166
167 src_install() {
168 - emake DESTDIR="${D}" install
169 -
170 - dodoc AUTHORS ChangeLog README TODO doc/tntnet.pdf
171 + default
172 + dodoc doc/tntnet.pdf
173
174 if use examples; then
175 - cd "${S}/sdk/demos"
176 - emake clean
177 - rm -rf .deps */.deps .libs */.libs
178 - cd "${S}"
179 + emake -C sdk/demos maintainer-clean
180 + rm -r sdk/demos/{Makefile*,*/Makefile*,*/*.{la,lo},*/.libs} || die
181
182 docinto examples
183 - dodoc -r sdk/demos/*
184 + dodoc -r sdk/demos/.
185 fi
186
187 if use server; then
188 - rm -f "${D}/etc/init.d/tntnet"
189 - newinitd "${FILESDIR}/tntnet.initd" tntnet
190 + rm -f "${ED}"/etc/init.d/tntnet || die
191 + newinitd "${FILESDIR}"/tntnet.initd tntnet
192 fi
193
194 # bug 737184
195 - if ! use static-libs; then
196 - find "${ED}" \( -name "*.a" -o -name "*.la" \) -delete || die
197 - fi
198 + find "${ED}" -name '*.la' -delete || die
199 }