# Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/net-libs/curvezmq/curvezmq-9999.ebuild,v 0.1 2013/08/13 11:47:52 lalebarde Exp $ EAPI=5 AUTOTOOLS_AUTORECONF=true inherit autotools-utils DESCRIPTION="An encryption and authentication library for ZeroMQ" HOMEPAGE="https://github.com/zeromq/curvezmq" if [[ ${PV} == *9999* ]]; then EGIT_REPO_URI="git://github.com/zeromq/curvezmq.git" inherit git-2 else # for when a release will exist SRC_URI="" die "No release available for now, use live version 9999" fi LICENSE="GPL-3" SLOT="0" KEYWORDS="" IUSE="test libsodium" DOCS=( NEWS README COPYING AUTHORS ) if [[ ${PV} == *9999* ]]; then RDEPEND="=net-libs/zeromq-9999 =net-libs/czmq-9999" if use libsodium; then RDEPEND="$RDEPEND \ =net-libs/libsodium-9999" fi else RDEPEND=">=net-libs/zeromq-3 >=net-libs/czmq-1.3" if use libsodium; then RDEPEND="$RDEPEND \ =net-libs/libsodium" fi fi DEPEND="${RDEPEND}" src_configure() { econf \ $(use_enable test) \ $(use_enable libsodium) BUILD_DIR=$S if use libsodium; then echo "libsodium required by use flag" echo `pwd` CONFIGURE_=`find . -name configure` echo "CONFIGURE_=$CONFIGURE_" HAVE_LIBSODIUM_=`grep 'LIBS="-lsodium $LIBS"' $CONFIGURE_` echo "HAVE_LIBSODIUM_=$HAVE_LIBSODIUM_" if [[ -n HAVE_LIBSODIUM ]] ; then echo "libsodium found" else die "libsodium not found" fi fi } src_install() { # the following line is a temporary absolutly awful ack, but it works (sorry - I don't know how to do it the clean way cp ${S}/doc/CurveZMQ.7 ${S}/doc/curvezmq.7 if [[ -f Makefile || -f GNUmakefile || -f makefile ]] ; then emake DESTDIR="${D}" install fi if ! declare -p DOCS &>/dev/null ; then local d for d in README* ChangeLog AUTHORS NEWS TODO CHANGES \ THANKS BUGS FAQ CREDITS CHANGELOG ; do [[ -s "${d}" ]] && dodoc "${d}" done elif [[ $(declare -p DOCS) == "declare -a "* ]] ; then dodoc "${DOCS[@]}" else dodoc ${DOCS} fi }