Gentoo Archives: gentoo-commits

From: "Anthony G. Basile" <blueness@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] dev/blueness:master commit in: dev-libs/axTLS/files/, dev-libs/axTLS/
Date: Fri, 06 Apr 2012 03:05:18
Message-Id: 1333681497.b36f1bfa7adbb3bf648029587b4fab2cfed51dc8.blueness@gentoo
1 commit: b36f1bfa7adbb3bf648029587b4fab2cfed51dc8
2 Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
3 AuthorDate: Fri Apr 6 03:04:57 2012 +0000
4 Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
5 CommitDate: Fri Apr 6 03:04:57 2012 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=dev/blueness.git;a=commit;h=b36f1bfa
7
8 dev-libs/axTLS: add static and cgi lua/php options
9
10 ---
11 dev-libs/axTLS/Manifest | 6 +-
12 dev-libs/axTLS/axTLS-1.4.5.ebuild | 75 ++++++++++++++++++++++++++++++++++--
13 dev-libs/axTLS/files/config | 22 +++++-----
14 dev-libs/axTLS/metadata.xml | 3 +
15 4 files changed, 87 insertions(+), 19 deletions(-)
16
17 diff --git a/dev-libs/axTLS/Manifest b/dev-libs/axTLS/Manifest
18 index 7b0e41e..8349ad4 100644
19 --- a/dev-libs/axTLS/Manifest
20 +++ b/dev-libs/axTLS/Manifest
21 @@ -1,4 +1,4 @@
22 -AUX config 3082 RMD160 9cfff762eaa48cbf0df11f35e73ba56e06e383f7 SHA1 275c80296b114207cbdd1be3381206ab710d2f0c SHA256 04580d9e440a4034d5a58b0c027d30d15a075f3eb271f989f03182ffa271f839
23 +AUX config 3079 RMD160 17a8bb8279a62460b68a88a2c176b5de5b25a87d SHA1 50f5807e8fba78423dcd152ec12c64d991f9dc4d SHA256 c4f4537c3e61eaae9bc3b17805b0c5c18a777f2992f75a7a1ffc098d1085b289
24 DIST axTLS-1.4.5.tar.gz 1299325 RMD160 fb8f78578a998ed0a88cfef18127e4d24ff35bfc SHA1 33b8c4b7babd433d78889218bc5fa6932bfd0a24 SHA256 04e9c235d59cff98c393c920d4d7975b7ba32979c1d9675cee73996d22d232f1
25 -EBUILD axTLS-1.4.5.ebuild 672 RMD160 7c7a341a9759876335e316f241c780b02c313cba SHA1 92ee6f2f87664ebc5c693e6bac0e73f194f56ea4 SHA256 a0e6654f81490ae7494808e1a7ae5f81d8fa70c38c64a4e97024cdcd3373d36b
26 -MISC metadata.xml 328 RMD160 abed8943288a3272e4cc398976c6b4d63bcf47f1 SHA1 3c3e2a6be9bfe57f9f88f1ba3e986644e3a23654 SHA256 f699368493777fa91a5c1b5291dac1e5640b5ac99c2d0c5a6a2bf9d990ac9518
27 +EBUILD axTLS-1.4.5.ebuild 1993 RMD160 c7758f2af414ca08979cd9530a680b8d4c55f8d0 SHA1 c30cc1f43f26d017587f33fb673e2e2a91311e42 SHA256 2c696b605f274b8ef05f4c4ce060fe007e334a554d8f1bf067dd5f1d7ea05ba2
28 +MISC metadata.xml 539 RMD160 66d2200563130d8af1e6b9ea42aac0098cca0ece SHA1 977793dc0d626b3c9144cdac6e85ec137efd3e72 SHA256 678ce846bdfbf9df350ed0ba25520abe1588a12c229cbc54642269cf2fbe0966
29
30 diff --git a/dev-libs/axTLS/axTLS-1.4.5.ebuild b/dev-libs/axTLS/axTLS-1.4.5.ebuild
31 index 79e1f42..25c17da 100644
32 --- a/dev-libs/axTLS/axTLS-1.4.5.ebuild
33 +++ b/dev-libs/axTLS/axTLS-1.4.5.ebuild
34 @@ -4,6 +4,8 @@
35
36 EAPI="4"
37
38 +inherit user toolchain-funcs
39 +
40 DESCRIPTION="Embedded client/server TLSv1 SSL library and small HTTP(S) server"
41 HOMEPAGE="http://axtls.sourceforge.net/"
42 SRC_URI="mirror://sourceforge/axtls/${PN}-1.4.5.tar.gz"
43 @@ -11,21 +13,84 @@ SRC_URI="mirror://sourceforge/axtls/${PN}-1.4.5.tar.gz"
44 LICENSE="BSD"
45 SLOT="0"
46 KEYWORDS="~amd64 ~x86"
47 -IUSE="httpd"
48 +IUSE="httpd cgi-lua cgi-php static"
49
50 DEPEND=""
51 RDEPEND="${DEPEND}
52 - httpd? ( dev-lang/php )"
53 + httpd? (
54 + cgi-lua? ( dev-lang/lua )
55 + cgi-php? ( dev-lang/php[cgi] )
56 + )"
57 +
58 +REQUIRED_USE="
59 + static? ( httpd )
60 + cgi-lua? ( httpd )
61 + cgi-php? ( httpd )"
62
63 S="${WORKDIR}/${PN}"
64
65 +AXTLS_GROUP="axtls"
66 +AXTLS_USER="axtls"
67 +
68 +pkg_setup() {
69 + use httpd && {
70 + ebegin "Creating axtls user and group"
71 + enewgroup ${AXTLS_GROUP}
72 + enewuser ${AXTLS_USER} -1 -1 -1 ${AXTLS_GROUP}
73 + }
74 +}
75 +
76 +src_prepare() {
77 + tc-export CC
78 + sed -i -e "s:^HOSTCC.*:HOSTCC=${CC}:" \
79 + "${S}"/config/Rules.mak
80 +}
81 +
82 src_configure() {
83 + tc-export CC
84 +
85 cp "${FILESDIR}"/config "${S}"/config/.config
86 - ! use httpd && 's/^CONFIG_AXHTTPD/#CONFIG_AXHTTPD/'
87 - emake oldconfig
88 +
89 + sed -i -e "s:^CONFIG_EXTRA_CFLAGS_OPTIONS.*$:CONFIG_EXTRA_CFLAGS_OPTIONS=\"${CFLAGS}\":" \
90 + "${S}"/config/.config
91 +
92 + sed -i -e "s:^CONFIG_EXTRA_LDFLAGS_OPTIONS.*$:CONFIG_EXTRA_LDFLAGS_OPTIONS=\"${LDLAGS}\":" \
93 + "${S}"/config/.config
94 +
95 + if use httpd; then
96 +
97 + if ! use static; then
98 + sed -i -e 's:^CONFIG_HTTP_STATIC_BUILD:# CONFIG_HTTP_STATIC_BUILD:' \
99 + "${S}"/config/.config
100 + fi
101 +
102 + if ! use cgi-php && ! use cgi-lua; then
103 + sed -i -e 's:^CONFIG_HTTP_HAS_CGI:# CONFIG_HTTP_HAS_CGI:' \
104 + "${S}"/config/.config
105 + fi
106 +
107 + if ! use cgi-php; then
108 + sed -i -e 's:,.php::' "${S}"/config/.config
109 + fi
110 +
111 + if ! use cgi-lua; then
112 + sed -i -e 's:\.lua,::' \
113 + -e 's:lua:php:' \
114 + -e 's:^CONFIG_HTTP_ENABLE_LUA:# CONFIG_HTTP_ENABLE_LUA:' \
115 + "${S}"/config/.config
116 + fi
117 +
118 + else
119 +
120 + sed -i -e 's:^CONFIG_AXHTTPD:# CONFIG_AXHTTPD:' \
121 + "${S}"/config/.config
122 +
123 + fi
124 +
125 + yes "n" | emake -j1 oldconfig
126 }
127
128 src_install() {
129 emake PREFIX="${ED}/usr" install
130 - mv "${ED}"/usr/bin/{,ax_}htpasswd
131 + use httpd && mv "${ED}"/usr/bin/{,ax}htpasswd
132 }
133
134 diff --git a/dev-libs/axTLS/files/config b/dev-libs/axTLS/files/config
135 index 826c461..afed5f6 100644
136 --- a/dev-libs/axTLS/files/config
137 +++ b/dev-libs/axTLS/files/config
138 @@ -58,9 +58,9 @@ CONFIG_AXHTTPD=y
139 #
140 # Axhttpd Configuration
141 #
142 -# CONFIG_HTTP_STATIC_BUILD is not set
143 -CONFIG_HTTP_PORT=80
144 -CONFIG_HTTP_HTTPS_PORT=443
145 +CONFIG_HTTP_STATIC_BUILD=y
146 +CONFIG_HTTP_PORT=8080
147 +CONFIG_HTTP_HTTPS_PORT=4343
148 CONFIG_HTTP_SESSION_CACHE_SIZE=5
149 CONFIG_HTTP_WEBROOT="/var/www/localhost"
150 CONFIG_HTTP_TIMEOUT=300
151 @@ -69,16 +69,16 @@ CONFIG_HTTP_TIMEOUT=300
152 # CGI
153 #
154 CONFIG_HTTP_HAS_CGI=y
155 -CONFIG_HTTP_CGI_EXTENSIONS=".lua,.lp,.php"
156 -# CONFIG_HTTP_ENABLE_LUA is not set
157 -CONFIG_HTTP_LUA_PREFIX=""
158 +CONFIG_HTTP_CGI_EXTENSIONS=".lua,.php"
159 +CONFIG_HTTP_ENABLE_LUA=y
160 +CONFIG_HTTP_LUA_PREFIX="/usr"
161 # CONFIG_HTTP_BUILD_LUA is not set
162 -CONFIG_HTTP_CGI_LAUNCHER="/usr/bin/php"
163 +CONFIG_HTTP_CGI_LAUNCHER="/usr/bin/lua"
164 CONFIG_HTTP_DIRECTORIES=y
165 CONFIG_HTTP_HAS_AUTHORIZATION=y
166 # CONFIG_HTTP_HAS_IPV6 is not set
167 -# CONFIG_HTTP_ENABLE_DIFFERENT_USER is not set
168 -CONFIG_HTTP_USER=""
169 +CONFIG_HTTP_ENABLE_DIFFERENT_USER=y
170 +CONFIG_HTTP_USER="axtls"
171 CONFIG_HTTP_VERBOSE=y
172 CONFIG_HTTP_IS_DAEMON=y
173
174 @@ -100,8 +100,8 @@ CONFIG_LUA_CORE=""
175 #
176 # Samples
177 #
178 -CONFIG_SAMPLES=y
179 -CONFIG_C_SAMPLES=y
180 +# CONFIG_SAMPLES is not set
181 +# CONFIG_C_SAMPLES is not set
182 # CONFIG_CSHARP_SAMPLES is not set
183 # CONFIG_VBNET_SAMPLES is not set
184 # CONFIG_JAVA_SAMPLES is not set
185
186 diff --git a/dev-libs/axTLS/metadata.xml b/dev-libs/axTLS/metadata.xml
187 index 02ff70b..dd75ddb 100644
188 --- a/dev-libs/axTLS/metadata.xml
189 +++ b/dev-libs/axTLS/metadata.xml
190 @@ -7,5 +7,8 @@
191 </maintainer>
192 <use>
193 <flag name="httpd">Enables axhttpd web server component</flag>
194 + <flag name="static">Statically build axhttpd server</flag>
195 + <flag name="cgi-lua">Enables lua backed cgi for axhttpd server</flag>
196 + <flag name="cgi-php">Enables php backed cgi for axhttpd server</flag>
197 </use>
198 </pkgmetadata>