summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /net-libs/axtls
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'net-libs/axtls')
-rw-r--r--net-libs/axtls/Manifest4
-rw-r--r--net-libs/axtls/axtls-1.5.0.ebuild177
-rw-r--r--net-libs/axtls/axtls-1.5.1.ebuild177
-rw-r--r--net-libs/axtls/axtls-1.5.2.ebuild177
-rw-r--r--net-libs/axtls/axtls-1.5.3.ebuild177
-rw-r--r--net-libs/axtls/files/axhttpd.confd7
-rw-r--r--net-libs/axtls/files/axhttpd.initd26
-rw-r--r--net-libs/axtls/files/config126
-rw-r--r--net-libs/axtls/files/explicit-libdir-r1.patch59
-rw-r--r--net-libs/axtls/metadata.xml17
10 files changed, 947 insertions, 0 deletions
diff --git a/net-libs/axtls/Manifest b/net-libs/axtls/Manifest
new file mode 100644
index 000000000000..74b94912a489
--- /dev/null
+++ b/net-libs/axtls/Manifest
@@ -0,0 +1,4 @@
+DIST axTLS-1.5.0.tar.gz 1302393 SHA256 7ff27d1eb1ad1630e1a3431278d72857c1124edd9a15a07a79709bc77d8bb710 SHA512 526e3c408c960e7e48dd791c6cf94a3dbc62a36c0453e4705529490160cacd5ca1c663fab153a899618e78516714e3afb7a93dae075d2717eb9a91e63f3e9c04 WHIRLPOOL 5fc0e9f4d3f8994dc2909f85261aac538b9563b3dee787d8d6a0942f087041893217a0b9237d5c0824c3a64bb8272bb30d2c4fcdbd11a879107f20892c8f180f
+DIST axTLS-1.5.1.tar.gz 1305575 SHA256 860a2754c497109854889e78eb2efdf00661f3b5dbb5e130bd5d8441a2f6ea50 SHA512 4b35e151d222496f5e4ab9c849ca9b14a245590a07f07132eab2fa633dac4cf7abfe29344f643fa182c9c443a139d3230d4b3554d3ff0932410ab36ae3666d92 WHIRLPOOL c1072aa94a7916db38d26902bac175d17e4f8fe1a431956d0b366f9cd913c89c145d119c823d9c1bfa51d54aa191ca43386b4312bea3a16f61d9df4ff2eb6b68
+DIST axTLS-1.5.2.tar.gz 1309632 SHA256 c4568cdf3e326c6fee2d7d16b4e13e05a29cecf49c1774c7858fe83cde01f8bb SHA512 138c1134c949fb85335454907c8fa74f18860d16371aba7d4d46faa4fb0e9cbf41d259cf72389f439d8d6436dc200951001a53e996793ba59254f5ddefe99999 WHIRLPOOL 36b889c4aa5e3c2c0da20a189ec7342db86b757acbb5c9c8a12262d95ceabb490ac97fa608efd66757e74e6347e0f5ff5bd5c76ac453d9dbdc115c45b8e35ad4
+DIST axTLS-1.5.3.tar.gz 1309853 SHA256 367ce7918b9e7738d853d5eaaa9d4fbdb362c5b323d4c0622a72d891f6b8d8e6 SHA512 d37fb1341259b079ed234512a96656d67e005c50d9f8e0c856fb140c9da35267624e065134e0cc8310f70e5cf5d196c7dd34f01e2a7a5cc29e77e7ca46c25281 WHIRLPOOL 92de1a06da740adf0238550d36a75216bace6c7fb867e82d38f2ca2362dcf0e41810191933aa788ffda080367b6beb312f1a9a240ab687a6c4f324988d36a81c
diff --git a/net-libs/axtls/axtls-1.5.0.ebuild b/net-libs/axtls/axtls-1.5.0.ebuild
new file mode 100644
index 000000000000..b0149d23dbd5
--- /dev/null
+++ b/net-libs/axtls/axtls-1.5.0.ebuild
@@ -0,0 +1,177 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils 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"
+KEYWORDS="amd64 arm 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
+
+ epatch "${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
+
+ 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
+}
diff --git a/net-libs/axtls/axtls-1.5.1.ebuild b/net-libs/axtls/axtls-1.5.1.ebuild
new file mode 100644
index 000000000000..b0149d23dbd5
--- /dev/null
+++ b/net-libs/axtls/axtls-1.5.1.ebuild
@@ -0,0 +1,177 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils 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"
+KEYWORDS="amd64 arm 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
+
+ epatch "${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
+
+ 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
+}
diff --git a/net-libs/axtls/axtls-1.5.2.ebuild b/net-libs/axtls/axtls-1.5.2.ebuild
new file mode 100644
index 000000000000..ea6a5d6e8211
--- /dev/null
+++ b/net-libs/axtls/axtls-1.5.2.ebuild
@@ -0,0 +1,177 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils 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"
+KEYWORDS="~amd64 ~arm ~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
+
+ epatch "${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
+
+ 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
+}
diff --git a/net-libs/axtls/axtls-1.5.3.ebuild b/net-libs/axtls/axtls-1.5.3.ebuild
new file mode 100644
index 000000000000..ea6a5d6e8211
--- /dev/null
+++ b/net-libs/axtls/axtls-1.5.3.ebuild
@@ -0,0 +1,177 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils 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"
+KEYWORDS="~amd64 ~arm ~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
+
+ epatch "${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
+
+ 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
+}
diff --git a/net-libs/axtls/files/axhttpd.confd b/net-libs/axtls/files/axhttpd.confd
new file mode 100644
index 000000000000..02f129203f88
--- /dev/null
+++ b/net-libs/axtls/files/axhttpd.confd
@@ -0,0 +1,7 @@
+#Zero or more of the following may be given:
+#
+# -p [address:]httpport
+# -s [address:]httpsport
+# -w webroot
+#
+#AXHTTPD_OPTS="-w /var/www/localhost/htdocs -p 8080 -s 4343"
diff --git a/net-libs/axtls/files/axhttpd.initd b/net-libs/axtls/files/axhttpd.initd
new file mode 100644
index 000000000000..1fcba2fc1289
--- /dev/null
+++ b/net-libs/axtls/files/axhttpd.initd
@@ -0,0 +1,26 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Id$
+
+AXHTTPD_USER="axtls"
+AXHTTPD_GROUP="axtls"
+AXHTTPD_DAEMON="/usr/bin/axhttpd"
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting axhttpd"
+ start-stop-daemon --quiet --start "${AXHTTPD_DAEMON}" \
+ --user "${AXHTTPD_USER}":"${AXHTTPD_GROUP}" \
+ -- ${AXHTTPD_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping axhttpd"
+ start-stop-daemon --quiet --stop "${AXHTTPD_DAEMON}"
+ eend $?
+}
diff --git a/net-libs/axtls/files/config b/net-libs/axtls/files/config
new file mode 100644
index 000000000000..6eb608defc82
--- /dev/null
+++ b/net-libs/axtls/files/config
@@ -0,0 +1,126 @@
+#
+# Automatically generated make config: don't edit
+#
+HAVE_DOT_CONFIG=y
+CONFIG_PLATFORM_LINUX=y
+# CONFIG_PLATFORM_CYGWIN is not set
+# CONFIG_PLATFORM_WIN32 is not set
+
+#
+# General Configuration
+#
+PREFIX="/usr"
+CONFIG_DEBUG=y
+# CONFIG_STRIP_UNWANTED_SECTIONS is not set
+# CONFIG_VISUAL_STUDIO_7_0 is not set
+# CONFIG_VISUAL_STUDIO_8_0 is not set
+# CONFIG_VISUAL_STUDIO_10_0 is not set
+CONFIG_VISUAL_STUDIO_7_0_BASE=""
+CONFIG_VISUAL_STUDIO_8_0_BASE=""
+CONFIG_VISUAL_STUDIO_10_0_BASE=""
+CONFIG_EXTRA_CFLAGS_OPTIONS=""
+CONFIG_EXTRA_LDFLAGS_OPTIONS=""
+
+#
+# SSL Library
+#
+# CONFIG_SSL_SERVER_ONLY is not set
+# CONFIG_SSL_CERT_VERIFICATION is not set
+# CONFIG_SSL_ENABLE_CLIENT is not set
+CONFIG_SSL_FULL_MODE=y
+# CONFIG_SSL_SKELETON_MODE is not set
+# CONFIG_SSL_PROT_LOW is not set
+# CONFIG_SSL_PROT_MEDIUM is not set
+CONFIG_SSL_PROT_HIGH=y
+CONFIG_SSL_USE_DEFAULT_KEY=y
+CONFIG_SSL_PRIVATE_KEY_LOCATION=""
+CONFIG_SSL_PRIVATE_KEY_PASSWORD=""
+CONFIG_SSL_X509_CERT_LOCATION=""
+# CONFIG_SSL_GENERATE_X509_CERT is not set
+CONFIG_SSL_X509_COMMON_NAME=""
+CONFIG_SSL_X509_ORGANIZATION_NAME=""
+CONFIG_SSL_X509_ORGANIZATION_UNIT_NAME=""
+CONFIG_SSL_ENABLE_V23_HANDSHAKE=y
+CONFIG_SSL_HAS_PEM=y
+CONFIG_SSL_USE_PKCS12=y
+CONFIG_SSL_EXPIRY_TIME=24
+CONFIG_X509_MAX_CA_CERTS=300
+CONFIG_SSL_MAX_CERTS=6
+# CONFIG_SSL_CTX_MUTEXING is not set
+CONFIG_USE_DEV_URANDOM=y
+# CONFIG_WIN32_USE_CRYPTO_LIB is not set
+CONFIG_OPENSSL_COMPATIBLE=y
+# CONFIG_PERFORMANCE_TESTING is not set
+CONFIG_SSL_TEST=y
+CONFIG_AXTLSWRAP=y
+CONFIG_AXHTTPD=y
+
+#
+# Axhttpd Configuration
+#
+CONFIG_HTTP_STATIC_BUILD=y
+CONFIG_HTTP_PORT=8080
+CONFIG_HTTP_HTTPS_PORT=4343
+CONFIG_HTTP_SESSION_CACHE_SIZE=5
+CONFIG_HTTP_WEBROOT="/var/www/localhost/htdocs"
+CONFIG_HTTP_TIMEOUT=300
+
+#
+# CGI
+#
+CONFIG_HTTP_HAS_CGI=y
+CONFIG_HTTP_CGI_EXTENSIONS=".lua,.php"
+CONFIG_HTTP_ENABLE_LUA=y
+CONFIG_HTTP_LUA_PREFIX="/usr"
+# CONFIG_HTTP_BUILD_LUA is not set
+CONFIG_HTTP_CGI_LAUNCHER="/usr/bin/lua"
+CONFIG_HTTP_DIRECTORIES=y
+CONFIG_HTTP_HAS_AUTHORIZATION=y
+# CONFIG_HTTP_HAS_IPV6 is not set
+CONFIG_HTTP_ENABLE_DIFFERENT_USER=y
+CONFIG_HTTP_USER="axtls"
+CONFIG_HTTP_VERBOSE=y
+CONFIG_HTTP_IS_DAEMON=y
+
+#
+# Language Bindings
+#
+# CONFIG_BINDINGS is not set
+# CONFIG_CSHARP_BINDINGS is not set
+# CONFIG_VBNET_BINDINGS is not set
+CONFIG_DOT_NET_FRAMEWORK_BASE=""
+# CONFIG_JAVA_BINDINGS is not set
+CONFIG_JAVA_HOME=""
+# CONFIG_PERL_BINDINGS is not set
+CONFIG_PERL_CORE=""
+CONFIG_PERL_LIB=""
+# CONFIG_LUA_BINDINGS is not set
+CONFIG_LUA_CORE=""
+
+#
+# Samples
+#
+CONFIG_SAMPLES=y
+CONFIG_C_SAMPLES=y
+# CONFIG_CSHARP_SAMPLES is not set
+# CONFIG_VBNET_SAMPLES is not set
+# CONFIG_JAVA_SAMPLES is not set
+# CONFIG_PERL_SAMPLES is not set
+# CONFIG_LUA_SAMPLES is not set
+
+#
+# BigInt Options
+#
+# CONFIG_BIGINT_CLASSICAL is not set
+# CONFIG_BIGINT_MONTGOMERY is not set
+CONFIG_BIGINT_BARRETT=y
+CONFIG_BIGINT_CRT=y
+CONFIG_BIGINT_KARATSUBA=y
+MUL_KARATSUBA_THRESH=20
+SQU_KARATSUBA_THRESH=40
+CONFIG_BIGINT_SLIDING_WINDOW=y
+CONFIG_BIGINT_SQUARE=y
+# CONFIG_BIGINT_CHECK_ON is not set
+CONFIG_INTEGER_32BIT=y
+# CONFIG_INTEGER_16BIT is not set
+# CONFIG_INTEGER_8BIT is not set
diff --git a/net-libs/axtls/files/explicit-libdir-r1.patch b/net-libs/axtls/files/explicit-libdir-r1.patch
new file mode 100644
index 000000000000..288b053e0f75
--- /dev/null
+++ b/net-libs/axtls/files/explicit-libdir-r1.patch
@@ -0,0 +1,59 @@
+From 51c1e48d3f55da25adff306b891ad258eca35a8d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Sat, 14 Jun 2014 23:35:42 +0200
+Subject: [PATCH] Respect libdir.
+
+---
+ Makefile | 14 +++++++++-----
+ 1 file changed, 9 insertions(+), 5 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 036a29e..10a1649 100644
+--- a/Makefile
++++ b/Makefile
+@@ -60,6 +60,8 @@ ifdef CONFIG_SAMPLES
+ $(MAKE) -C samples
+ endif
+
++LIBDIR = $(PREFIX)/lib
++
+ $(STAGE) : ssl/version.h
+ @mkdir -p $(STAGE)
+
+@@ -67,8 +69,10 @@ $(STAGE) : ssl/version.h
+ ssl/version.h:
+ @echo "#define AXTLS_VERSION \"(no version)\"" > ssl/version.h
+
++$(LIBDIR) : $(PREFIX)
++ @mkdir -p $(LIBDIR)
++
+ $(PREFIX) :
+- @mkdir -p $(PREFIX)/lib
+ @mkdir -p $(PREFIX)/bin
+
+ release:
+@@ -88,9 +92,9 @@ win32_demo:
+ @echo "#define AXTLS_VERSION \"$(VERSION)\"" > ssl/version.h
+ $(MAKE) win32releaseconf
+
+-install: $(PREFIX) all
+- cp --no-dereference $(STAGE)/libax* $(PREFIX)/lib
+- chmod 755 $(PREFIX)/lib/libax*
++install: $(LIBDIR) $(PREFIX) all
++ cp --no-dereference $(STAGE)/libax* $(LIBDIR)
++ chmod 755 $(LIBDIR)/libax*
+ ifdef CONFIG_SAMPLES
+ install -m 755 $(STAGE)/ax* $(PREFIX)/bin
+ endif
+@@ -112,7 +116,7 @@ endif
+ install -m 644 config/config.h $(PREFIX)/include/axTLS
+
+ installclean:
+- -@rm $(PREFIX)/lib/libax* > /dev/null 2>&1
++ -@rm $(LIBDIR)/libax* > /dev/null 2>&1
+ -@rm $(PREFIX)/bin/ax* > /dev/null 2>&1
+ -@rm $(PREFIX)/bin/axhttpd* > /dev/null 2>&1
+ -@rm `perl -e 'use Config; print $$Config{installarchlib};'`/axtlsp.pm > /dev/null 2>&1
+--
+2.0.0
+
diff --git a/net-libs/axtls/metadata.xml b/net-libs/axtls/metadata.xml
new file mode 100644
index 000000000000..29910d9bd8a2
--- /dev/null
+++ b/net-libs/axtls/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>blueness@gentoo.org</email>
+ <name>Anthony G. Basile</name>
+ </maintainer>
+ <use>
+ <flag name="httpd">Enables axhttpd web server component</flag>
+ <flag name="static">Statically build axhttpd server</flag>
+ <flag name="cgi-lua">Enables lua backed cgi for axhttpd server</flag>
+ <flag name="cgi-php">Enables php backed cgi for axhttpd server</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">axtls</remote-id>
+ </upstream>
+</pkgmetadata>