summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net-libs/axtls/Manifest1
-rw-r--r--net-libs/axtls/axtls-2.1.4.ebuild178
2 files changed, 179 insertions, 0 deletions
diff --git a/net-libs/axtls/Manifest b/net-libs/axtls/Manifest
index 8db6feb48873..9f706c1f4327 100644
--- a/net-libs/axtls/Manifest
+++ b/net-libs/axtls/Manifest
@@ -2,3 +2,4 @@ DIST axTLS-1.5.3.tar.gz 1309853 SHA256 367ce7918b9e7738d853d5eaaa9d4fbdb362c5b32
DIST axTLS-2.1.1.tar.gz 1305982 SHA256 6ea445bb7f3ce072242df7f687f531c9d18079681990f93cd4f65f43ef2057a1 SHA512 55619d5e02ce466bab223ebc1036ef39c6491d11126ed70f2712a427de2c7e396086a97d3607c9cb69685ade0763e2e55f2c94f9ba746d8ce7b34b0d1996f51a WHIRLPOOL 0e05ec073735f0ed334cb6d84c901c162f413a26485a79ec166ee5bbf9ed02708056093d31d5a00bd4374727a6eb08146f538ede04450145101d5eeb03409986
DIST axTLS-2.1.2.tar.gz 1317506 SHA256 38deea2ba07104c7d0e719e06f8bdc35990ac55e5926a26628f7ac240677fd2e SHA512 29e915c0b8549cf93f0664525c84281dd64159dcb3703badec382d203d0209b4f97d7cb875c710610da8e50a7e28d2b94ac161d1fd5fb625d492b15869333ada WHIRLPOOL b6164acd82bb48a8020ab695642aa85b4a7782f2488cf25ec1c21618c4ec5e1ac16496057ebe21f158b29c2bd1133c40a089c1c5740e8a9f8817be585186b83b
DIST axTLS-2.1.3.tar.gz 1316776 SHA256 555ce7adf743c97ca7562e4e5644f8d678c9d88139aeeadb758282f1d37db8a9 SHA512 aa116b671bf0fa059cb77f9e5c0307c48ab476b7ce7017f1d4b2e6362d9d527e534908cb30ec3667eec8c49566f950de3ae4ec0adf5b603fb4efb571eaffc596 WHIRLPOOL 366c8e1109ffe1082ca8a89758ec38b7b01ec9b24c5885171b1a36a4323b5915c81f78f50b4ce2999e14dc907cee624ad52256ffeccccaf5771e4545186b242c
+DIST axTLS-2.1.4.tar.gz 1316768 SHA256 e53dd20e2b619349bc48b631176a38742ea600333fd0349df83c6366b7be05bb SHA512 ce301719a12f5b836e3c67a169119d2836382b7b97d39f4010b8b8a644a6751b9f948a6c91f8dc6c39d19f5723311af7aca8958f9052e72cb38a9907247af3e6 WHIRLPOOL 6304f783df3006393ed01c82b011d3acf93d4ece675974f41e261a6ea20371378eaee8f6ca396b66694950583c59554a5b1c784d26c5fa02714483805ab3fb46
diff --git a/net-libs/axtls/axtls-2.1.4.ebuild b/net-libs/axtls/axtls-2.1.4.ebuild
new file mode 100644
index 000000000000..e1336b9174a0
--- /dev/null
+++ b/net-libs/axtls/axtls-2.1.4.ebuild
@@ -0,0 +1,178 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit multilib multilib-minimal savedconfig toolchain-funcs user
+
+################################################################################
+# axtls CONFIG MINI-HOWTO
+#
+# Note: axtls is highly configurable and uses mconf, like the linux kernel.
+# You can configure it in a couple of ways:
+#
+# 1) USE="-savedconfig" and set/unset the remaining flags to obtain the features
+# you want, and possibly a lot more.
+#
+# 2) You can create your own configuration file by doing
+#
+# FEATURES="keepwork" USE="savedconfig -*" emerge axtls
+# cd /var/tmp/portage/net-libs/axtls*/work/axTLS
+# make menuconfig
+#
+# Now configure axtls as you want. Finally save your config file:
+#
+# cp config/.config /etc/portage/savedconfig/net-libs/axtls-${PV}
+#
+# where ${PV} is the current version. You can then run emerge again with
+# your configuration by doing
+#
+# USE="savedconfig" emerge axtls
+#
+################################################################################
+
+MY_PN=${PN/tls/TLS}
+
+DESCRIPTION="Embedded client/server TLSv1 SSL library and small HTTP(S) server"
+HOMEPAGE="http://axtls.sourceforge.net/"
+SRC_URI="mirror://sourceforge/axtls/${MY_PN}-${PV}.tar.gz"
+S="${WORKDIR}/${PN}-code"
+
+LICENSE="BSD GPL-2"
+SLOT="0/1"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~s390 ~x86"
+
+IUSE="httpd cgi-lua cgi-php static static-libs doc"
+
+# TODO: add ipv6, and c#, java, lua, perl bindings
+# Currently these all have some issue
+DEPEND="doc? ( app-doc/doxygen )"
+RDEPEND="
+ httpd? (
+ cgi-lua? ( dev-lang/lua )
+ cgi-php? ( dev-lang/php[cgi] )
+ )"
+
+#Note1: static, cgi-* makes no sense if httpd is not given
+REQUIRED_USE="
+ static? ( httpd )
+ cgi-lua? ( httpd )
+ cgi-php? ( httpd )"
+
+AXTLS_GROUP="axtls"
+AXTLS_USER="axtls"
+
+pkg_setup() {
+ use httpd && {
+ ebegin "Creating axtls user and group"
+ enewgroup ${AXTLS_GROUP}
+ enewuser ${AXTLS_USER} -1 -1 -1 ${AXTLS_GROUP}
+ }
+}
+
+src_prepare() {
+ tc-export AR CC
+
+ eapply "${FILESDIR}/explicit-libdir-r1.patch"
+
+ #We want CONFIG_DEBUG to avoid stripping
+ #but not for debugging info
+ sed -i -e 's: -g::' config/Rules.mak || die
+ sed -i -e 's: -g::' config/makefile.conf || die
+
+ eapply_user
+
+ multilib_copy_sources
+}
+
+use_flag_config() {
+ cp "${FILESDIR}"/config config/.config || die
+
+ #Respect CFLAGS/LDFLAGS
+ sed -i -e "s:^CONFIG_EXTRA_CFLAGS_OPTIONS.*$:CONFIG_EXTRA_CFLAGS_OPTIONS=\"${CFLAGS}\":" \
+ config/.config || die
+ sed -i -e "s:^CONFIG_EXTRA_LDFLAGS_OPTIONS.*$:CONFIG_EXTRA_LDFLAGS_OPTIONS=\"${LDLAGS}\":" \
+ config/.config || die
+
+ #The logic is that the default config file enables everything and we disable
+ #here with sed unless a USE flags says to keep it
+ if use httpd; then
+ if ! use static; then
+ sed -i -e 's:^CONFIG_HTTP_STATIC_BUILD:# CONFIG_HTTP_STATIC_BUILD:' \
+ config/.config || die
+ fi
+ if ! use cgi-php && ! use cgi-lua; then
+ sed -i -e 's:^CONFIG_HTTP_HAS_CGI:# CONFIG_HTTP_HAS_CGI:' \
+ config/.config || die
+ fi
+ if ! use cgi-php; then
+ sed -i -e 's:,.php::' config/.config || die
+ fi
+ if ! use cgi-lua; then
+ sed -i -e 's:\.lua,::' \
+ -e 's:lua:php:' \
+ -e 's:^CONFIG_HTTP_ENABLE_LUA:# CONFIG_HTTP_ENABLE_LUA:' \
+ config/.config || die
+ fi
+ else
+ sed -i -e 's:^CONFIG_AXHTTPD:# CONFIG_AXHTTPD:' \
+ config/.config || die
+ fi
+
+ yes "n" | emake -j1 oldconfig > /dev/null || die
+}
+
+multilib_src_configure() {
+ #Per-ABI substitutions.
+ sed -i -e 's:^LIBDIR.*/lib:LIBDIR = $(PREFIX)/'"$(get_libdir):" \
+ Makefile || die
+
+ #Use CC as the host compiler for mconf
+ sed -i -e "s:^HOSTCC.*:HOSTCC=${CC}:" \
+ config/Rules.mak || die
+
+ if use savedconfig; then
+ restore_config config/.config
+ if [[ -f config/.config ]]; then
+ ewarn "Using saved config, all other USE flags ignored"
+ else
+ ewarn "No saved config, seeding with the default"
+ cp "${FILESDIR}"/config config/.config || die
+ fi
+ yes "" | emake -j1 oldconfig > /dev/null || die
+ else
+ use_flag_config
+ fi
+}
+
+multilib_src_install() {
+ if multilib_is_native_abi && use savedconfig; then
+ save_config config/.config
+ fi
+
+ emake PREFIX="${ED}/usr" install
+
+ if ! use static-libs; then
+ rm -f "${ED}"/usr/$(get_libdir)/libaxtls.a || die
+ fi
+
+ # The build system needs to install before it builds docs
+ if multilib_is_native_abi && use doc; then
+ emake docs
+ dodoc -r docsrc/html
+ fi
+}
+
+multilib_src_install_all() {
+ if [[ -f "${ED}"/usr/bin/htpasswd ]]; then
+ mv "${ED}"/usr/bin/{,ax}htpasswd || die
+ fi
+
+ if use httpd; then
+ newinitd "${FILESDIR}"/axhttpd.initd axhttpd
+ newconfd "${FILESDIR}"/axhttpd.confd axhttpd
+ fi
+
+ docompress -x /usr/share/doc/${PF}/README
+ dodoc README
+}