summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2014-06-14 21:45:52 +0000
committerMichał Górny <mgorny@gentoo.org>2014-06-14 21:45:52 +0000
commit76d284c25e3ad37a31c6963378bb71d5c4cf25a8 (patch)
tree1d5e3e551792b8275f38bb66de6ec36ea878ae54 /net-libs
parentVersion bump, bug 510884 (diff)
downloadgentoo-2-76d284c25e3ad37a31c6963378bb71d5c4cf25a8.tar.gz
gentoo-2-76d284c25e3ad37a31c6963378bb71d5c4cf25a8.tar.bz2
gentoo-2-76d284c25e3ad37a31c6963378bb71d5c4cf25a8.zip
Enable multilib support, needed for net-misc/curl.
(Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key EFB4464E!)
Diffstat (limited to 'net-libs')
-rw-r--r--net-libs/axtls/ChangeLog10
-rw-r--r--net-libs/axtls/axtls-1.4.9-r1.ebuild180
-rw-r--r--net-libs/axtls/files/explicit-libdir-r1.patch59
3 files changed, 247 insertions, 2 deletions
diff --git a/net-libs/axtls/ChangeLog b/net-libs/axtls/ChangeLog
index da24dc8b4b4f..77fbda0eae49 100644
--- a/net-libs/axtls/ChangeLog
+++ b/net-libs/axtls/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for net-libs/axtls
-# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-libs/axtls/ChangeLog,v 1.26 2013/03/03 09:29:54 vapier Exp $
+# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-libs/axtls/ChangeLog,v 1.27 2014/06/14 21:45:52 mgorny Exp $
+
+*axtls-1.4.9-r1 (14 Jun 2014)
+
+ 14 Jun 2014; Michał Górny <mgorny@gentoo.org> +axtls-1.4.9-r1.ebuild,
+ +files/explicit-libdir-r1.patch:
+ Enable multilib support, needed for net-misc/curl.
03 Mar 2013; Mike Frysinger <vapier@gentoo.org> axtls-1.4.9.ebuild:
Add s390 lovin.
diff --git a/net-libs/axtls/axtls-1.4.9-r1.ebuild b/net-libs/axtls/axtls-1.4.9-r1.ebuild
new file mode 100644
index 000000000000..a99a245adce3
--- /dev/null
+++ b/net-libs/axtls/axtls-1.4.9-r1.ebuild
@@ -0,0 +1,180 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-libs/axtls/axtls-1.4.9-r1.ebuild,v 1.1 2014/06/14 21:45:52 mgorny Exp $
+
+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}/${MY_PN}"
+
+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() {
+ 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() {
+ tc-export AR CC
+
+ #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_compile() {
+ default
+ multilib_is_native_abi && use doc && emake docs
+}
+
+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
+
+ if use doc; then
+ 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/explicit-libdir-r1.patch b/net-libs/axtls/files/explicit-libdir-r1.patch
new file mode 100644
index 000000000000..5d1855ac062e
--- /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) :
++ @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
+