| 1 |
# Copyright 1999-2013 Gentoo Foundation |
| 2 |
# Distributed under the terms of the GNU General Public License v2 |
| 3 |
# $Header: /var/cvsroot/gentoo-x86/net-libs/liboauth/liboauth-0.9.7.ebuild,v 1.7 2013/02/01 12:08:41 ago Exp $ |
| 4 |
|
| 5 |
EAPI=4 |
| 6 |
|
| 7 |
DESCRIPTION="C library implementing the OAuth secure authentication protocol" |
| 8 |
HOMEPAGE="http://liboauth.sourceforge.net/" |
| 9 |
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz |
| 10 |
http://liboauth.sourceforge.net/pool/${P}.tar.gz" |
| 11 |
|
| 12 |
LICENSE="|| ( GPL-2 MIT )" |
| 13 |
SLOT="0" |
| 14 |
KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x64-macos" |
| 15 |
IUSE="curl doc bindist +nss" |
| 16 |
|
| 17 |
REQUIRED_USE="bindist? ( nss )" |
| 18 |
|
| 19 |
CDEPEND=" |
| 20 |
nss? ( dev-libs/nss |
| 21 |
curl? ( || ( net-misc/curl[ssl,curl_ssl_nss] net-misc/curl[-ssl] ) ) |
| 22 |
) |
| 23 |
|
| 24 |
!nss? ( dev-libs/openssl |
| 25 |
curl? ( || ( net-misc/curl[ssl,curl_ssl_openssl] net-misc/curl[-ssl] ) ) |
| 26 |
) |
| 27 |
|
| 28 |
net-misc/curl |
| 29 |
" |
| 30 |
|
| 31 |
RDEPEND="${CDEPEND}" |
| 32 |
|
| 33 |
DEPEND="${CDEPEND} |
| 34 |
doc? ( |
| 35 |
app-doc/doxygen |
| 36 |
media-gfx/graphviz |
| 37 |
media-fonts/freefont |
| 38 |
) |
| 39 |
virtual/pkgconfig" |
| 40 |
|
| 41 |
src_configure() { |
| 42 |
local myconf= |
| 43 |
|
| 44 |
if use nss || use bindist; then |
| 45 |
myconf="${myconf} --enable-nss" |
| 46 |
else |
| 47 |
myconf="${myconf} --disable-nss" |
| 48 |
fi |
| 49 |
|
| 50 |
econf \ |
| 51 |
--disable-dependency-tracking \ |
| 52 |
--enable-fast-install \ |
| 53 |
--disable-static \ |
| 54 |
$(use_enable !curl curl) \ |
| 55 |
$(use_enable curl libcurl) \ |
| 56 |
${myconf} |
| 57 |
} |
| 58 |
|
| 59 |
src_compile() { |
| 60 |
emake |
| 61 |
|
| 62 |
if use doc ; then |
| 63 |
# make sure fonts are found |
| 64 |
export DOTFONTPATH="${EPREFIX}"/usr/share/fonts/freefont-ttf |
| 65 |
emake dox |
| 66 |
fi |
| 67 |
} |
| 68 |
|
| 69 |
src_test() { |
| 70 |
# explicitly allow parallel test build |
| 71 |
emake check |
| 72 |
} |
| 73 |
|
| 74 |
DOCS=( AUTHORS ChangeLog LICENSE.OpenSSL NEWS README ) |
| 75 |
|
| 76 |
src_install() { |
| 77 |
default |
| 78 |
|
| 79 |
if use doc; then |
| 80 |
dohtml -r doc/html/* |
| 81 |
fi |
| 82 |
} |