Gentoo Archives: gentoo-commits

From: "Anthony G. Basile" <blueness@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-libs/axtls/
Date: Thu, 07 Jul 2016 00:04:04
Message-Id: 1467849907.668bd642ef7a8f91145101aca8c96e523f7783e9.blueness@gentoo
1 commit: 668bd642ef7a8f91145101aca8c96e523f7783e9
2 Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jul 7 00:05:07 2016 +0000
4 Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
5 CommitDate: Thu Jul 7 00:05:07 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=668bd642
7
8 net-libs/axtls: version bump to 1.5.4
9
10 Package-Manager: portage-2.2.28
11
12 net-libs/axtls/Manifest | 1 +
13 net-libs/axtls/axtls-1.5.4.ebuild | 177 ++++++++++++++++++++++++++++++++++++++
14 2 files changed, 178 insertions(+)
15
16 diff --git a/net-libs/axtls/Manifest b/net-libs/axtls/Manifest
17 index 74b9491..6a5f8dc 100644
18 --- a/net-libs/axtls/Manifest
19 +++ b/net-libs/axtls/Manifest
20 @@ -2,3 +2,4 @@ DIST axTLS-1.5.0.tar.gz 1302393 SHA256 7ff27d1eb1ad1630e1a3431278d72857c1124edd9
21 DIST axTLS-1.5.1.tar.gz 1305575 SHA256 860a2754c497109854889e78eb2efdf00661f3b5dbb5e130bd5d8441a2f6ea50 SHA512 4b35e151d222496f5e4ab9c849ca9b14a245590a07f07132eab2fa633dac4cf7abfe29344f643fa182c9c443a139d3230d4b3554d3ff0932410ab36ae3666d92 WHIRLPOOL c1072aa94a7916db38d26902bac175d17e4f8fe1a431956d0b366f9cd913c89c145d119c823d9c1bfa51d54aa191ca43386b4312bea3a16f61d9df4ff2eb6b68
22 DIST axTLS-1.5.2.tar.gz 1309632 SHA256 c4568cdf3e326c6fee2d7d16b4e13e05a29cecf49c1774c7858fe83cde01f8bb SHA512 138c1134c949fb85335454907c8fa74f18860d16371aba7d4d46faa4fb0e9cbf41d259cf72389f439d8d6436dc200951001a53e996793ba59254f5ddefe99999 WHIRLPOOL 36b889c4aa5e3c2c0da20a189ec7342db86b757acbb5c9c8a12262d95ceabb490ac97fa608efd66757e74e6347e0f5ff5bd5c76ac453d9dbdc115c45b8e35ad4
23 DIST axTLS-1.5.3.tar.gz 1309853 SHA256 367ce7918b9e7738d853d5eaaa9d4fbdb362c5b323d4c0622a72d891f6b8d8e6 SHA512 d37fb1341259b079ed234512a96656d67e005c50d9f8e0c856fb140c9da35267624e065134e0cc8310f70e5cf5d196c7dd34f01e2a7a5cc29e77e7ca46c25281 WHIRLPOOL 92de1a06da740adf0238550d36a75216bace6c7fb867e82d38f2ca2362dcf0e41810191933aa788ffda080367b6beb312f1a9a240ab687a6c4f324988d36a81c
24 +DIST axTLS-1.5.4.tar.gz 1296351 SHA256 24d50cc4f5908d06cfacb2a3916d91ed75c5b1441809e47bc45e1053d6ba5d91 SHA512 0e52ca22199b3c7eb45641c7fdbe607f79fcea25f12d1ee0535a6a7c7579ee42777d27ce6474866eca19287bd11a1de76f5c39f715eb06e9e4cf3324b31bbbb2 WHIRLPOOL 29d2b5e72165c28c0e9084677f44b52116ec5da5efabc2fed79479800cbfe43c5dd4bf7390951b5168a63af0acd1cb5635fecac7d4ef42d570a1ef6d5e7edb6f
25
26 diff --git a/net-libs/axtls/axtls-1.5.4.ebuild b/net-libs/axtls/axtls-1.5.4.ebuild
27 new file mode 100644
28 index 0000000..ba142a9
29 --- /dev/null
30 +++ b/net-libs/axtls/axtls-1.5.4.ebuild
31 @@ -0,0 +1,177 @@
32 +# Copyright 1999-2016 Gentoo Foundation
33 +# Distributed under the terms of the GNU General Public License v2
34 +# $Id$
35 +
36 +EAPI="5"
37 +
38 +inherit eutils multilib multilib-minimal savedconfig toolchain-funcs user
39 +
40 +################################################################################
41 +# axtls CONFIG MINI-HOWTO
42 +#
43 +# Note: axtls is highly configurable and uses mconf, like the linux kernel.
44 +# You can configure it in a couple of ways:
45 +#
46 +# 1) USE="-savedconfig" and set/unset the remaining flags to obtain the features
47 +# you want, and possibly a lot more.
48 +#
49 +# 2) You can create your own configuration file by doing
50 +#
51 +# FEATURES="keepwork" USE="savedconfig -*" emerge axtls
52 +# cd /var/tmp/portage/net-libs/axtls*/work/axTLS
53 +# make menuconfig
54 +#
55 +# Now configure axtls as you want. Finally save your config file:
56 +#
57 +# cp config/.config /etc/portage/savedconfig/net-libs/axtls-${PV}
58 +#
59 +# where ${PV} is the current version. You can then run emerge again with
60 +# your configuration by doing
61 +#
62 +# USE="savedconfig" emerge axtls
63 +#
64 +################################################################################
65 +
66 +MY_PN=${PN/tls/TLS}
67 +
68 +DESCRIPTION="Embedded client/server TLSv1 SSL library and small HTTP(S) server"
69 +HOMEPAGE="http://axtls.sourceforge.net/"
70 +SRC_URI="mirror://sourceforge/axtls/${MY_PN}-${PV}.tar.gz"
71 +S="${WORKDIR}/${PN}-code"
72 +
73 +LICENSE="BSD GPL-2"
74 +SLOT="0"
75 +KEYWORDS="~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~s390 ~x86"
76 +
77 +IUSE="httpd cgi-lua cgi-php static static-libs doc"
78 +
79 +# TODO: add ipv6, and c#, java, lua, perl bindings
80 +# Currently these all have some issue
81 +DEPEND="doc? ( app-doc/doxygen )"
82 +RDEPEND="
83 + httpd? (
84 + cgi-lua? ( dev-lang/lua )
85 + cgi-php? ( dev-lang/php[cgi] )
86 + )"
87 +
88 +#Note1: static, cgi-* makes no sense if httpd is not given
89 +REQUIRED_USE="
90 + static? ( httpd )
91 + cgi-lua? ( httpd )
92 + cgi-php? ( httpd )"
93 +
94 +AXTLS_GROUP="axtls"
95 +AXTLS_USER="axtls"
96 +
97 +pkg_setup() {
98 + use httpd && {
99 + ebegin "Creating axtls user and group"
100 + enewgroup ${AXTLS_GROUP}
101 + enewuser ${AXTLS_USER} -1 -1 -1 ${AXTLS_GROUP}
102 + }
103 +}
104 +
105 +src_prepare() {
106 + tc-export AR CC
107 +
108 + epatch "${FILESDIR}/explicit-libdir-r1.patch"
109 +
110 + #We want CONFIG_DEBUG to avoid stripping
111 + #but not for debugging info
112 + sed -i -e 's: -g::' config/Rules.mak || die
113 + sed -i -e 's: -g::' config/makefile.conf || die
114 +
115 + multilib_copy_sources
116 +}
117 +
118 +use_flag_config() {
119 + cp "${FILESDIR}"/config config/.config || die
120 +
121 + #Respect CFLAGS/LDFLAGS
122 + sed -i -e "s:^CONFIG_EXTRA_CFLAGS_OPTIONS.*$:CONFIG_EXTRA_CFLAGS_OPTIONS=\"${CFLAGS}\":" \
123 + config/.config || die
124 + sed -i -e "s:^CONFIG_EXTRA_LDFLAGS_OPTIONS.*$:CONFIG_EXTRA_LDFLAGS_OPTIONS=\"${LDLAGS}\":" \
125 + config/.config || die
126 +
127 + #The logic is that the default config file enables everything and we disable
128 + #here with sed unless a USE flags says to keep it
129 + if use httpd; then
130 + if ! use static; then
131 + sed -i -e 's:^CONFIG_HTTP_STATIC_BUILD:# CONFIG_HTTP_STATIC_BUILD:' \
132 + config/.config || die
133 + fi
134 + if ! use cgi-php && ! use cgi-lua; then
135 + sed -i -e 's:^CONFIG_HTTP_HAS_CGI:# CONFIG_HTTP_HAS_CGI:' \
136 + config/.config || die
137 + fi
138 + if ! use cgi-php; then
139 + sed -i -e 's:,.php::' config/.config || die
140 + fi
141 + if ! use cgi-lua; then
142 + sed -i -e 's:\.lua,::' \
143 + -e 's:lua:php:' \
144 + -e 's:^CONFIG_HTTP_ENABLE_LUA:# CONFIG_HTTP_ENABLE_LUA:' \
145 + config/.config || die
146 + fi
147 + else
148 + sed -i -e 's:^CONFIG_AXHTTPD:# CONFIG_AXHTTPD:' \
149 + config/.config || die
150 + fi
151 +
152 + yes "n" | emake -j1 oldconfig > /dev/null || die
153 +}
154 +
155 +multilib_src_configure() {
156 + #Per-ABI substitutions.
157 + sed -i -e 's:^LIBDIR.*/lib:LIBDIR = $(PREFIX)/'"$(get_libdir):" \
158 + Makefile || die
159 +
160 + #Use CC as the host compiler for mconf
161 + sed -i -e "s:^HOSTCC.*:HOSTCC=${CC}:" \
162 + config/Rules.mak || die
163 +
164 + if use savedconfig; then
165 + restore_config config/.config
166 + if [[ -f config/.config ]]; then
167 + ewarn "Using saved config, all other USE flags ignored"
168 + else
169 + ewarn "No saved config, seeding with the default"
170 + cp "${FILESDIR}"/config config/.config || die
171 + fi
172 + yes "" | emake -j1 oldconfig > /dev/null || die
173 + else
174 + use_flag_config
175 + fi
176 +}
177 +
178 +multilib_src_install() {
179 + if multilib_is_native_abi && use savedconfig; then
180 + save_config config/.config
181 + fi
182 +
183 + emake PREFIX="${ED}/usr" install
184 +
185 + if ! use static-libs; then
186 + rm -f "${ED}"/usr/$(get_libdir)/libaxtls.a || die
187 + fi
188 +
189 + # The build system needs to install before it builds docs
190 + if multilib_is_native_abi && use doc; then
191 + emake docs
192 + dodoc -r docsrc/html
193 + fi
194 +}
195 +
196 +multilib_src_install_all() {
197 + if [[ -f "${ED}"/usr/bin/htpasswd ]]; then
198 + mv "${ED}"/usr/bin/{,ax}htpasswd || die
199 + fi
200 +
201 + if use httpd; then
202 + newinitd "${FILESDIR}"/axhttpd.initd axhttpd
203 + newconfd "${FILESDIR}"/axhttpd.confd axhttpd
204 + fi
205 +
206 + docompress -x /usr/share/doc/${PF}/README
207 + dodoc README
208 +}