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