summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@gentoo.org>2010-08-27 19:57:12 +0000
committerDiego Elio Pettenò <flameeyes@gentoo.org>2010-08-27 19:57:12 +0000
commitfced4834617e13feeef34e13cb3ed2c5265f1de4 (patch)
tree8e708f921de9f38219c0e779c196f9d8667d0f0e /net-libs
parentTypo: Had REPEND instead of RDEPEND... (diff)
downloadgentoo-2-fced4834617e13feeef34e13cb3ed2c5265f1de4.tar.gz
gentoo-2-fced4834617e13feeef34e13cb3ed2c5265f1de4.tar.bz2
gentoo-2-fced4834617e13feeef34e13cb3ed2c5265f1de4.zip
Import to main tree.
(Portage version: 2.2_rc69/cvs/Linux x86_64)
Diffstat (limited to 'net-libs')
-rw-r--r--net-libs/liboauth/ChangeLog19
-rw-r--r--net-libs/liboauth/files/liboauth-0.8.8-asneeded.patch38
-rw-r--r--net-libs/liboauth/files/liboauth-0.8.8-pkgconfig.patch40
-rw-r--r--net-libs/liboauth/files/liboauth-0.8.8-tests.patch10
-rw-r--r--net-libs/liboauth/liboauth-0.8.8.ebuild92
-rw-r--r--net-libs/liboauth/metadata.xml27
6 files changed, 226 insertions, 0 deletions
diff --git a/net-libs/liboauth/ChangeLog b/net-libs/liboauth/ChangeLog
new file mode 100644
index 000000000000..2a3b3f87f0e3
--- /dev/null
+++ b/net-libs/liboauth/ChangeLog
@@ -0,0 +1,19 @@
+# ChangeLog for net-libs/liboauth
+# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-libs/liboauth/ChangeLog,v 1.1 2010/08/27 19:57:12 flameeyes Exp $
+
+ 27 Aug 2010; Diego E. Pettenò <flameeyes@gentoo.org>
+ +liboauth-0.8.8.ebuild, +files/liboauth-0.8.8-asneeded.patch,
+ +files/liboauth-0.8.8-pkgconfig.patch, +files/liboauth-0.8.8-tests.patch,
+ +metadata.xml:
+ Import to main tree.
+
+*liboauth-0.8.8 (27 Aug 2010)
+
+ 27 Aug 2010; Diego E. Pettenò <flameeyes@gentoo.org>
+ +liboauth-0.8.8.ebuild, +files/liboauth-0.8.8-asneeded.patch,
+ +files/liboauth-0.8.8-pkgconfig.patch, +files/liboauth-0.8.8-tests.patch,
+ +metadata.xml:
+ Import liboauth 0.8.8, thanks to Ricardo Ichizo in bug #328209 for the
+ base ebuild.
+
diff --git a/net-libs/liboauth/files/liboauth-0.8.8-asneeded.patch b/net-libs/liboauth/files/liboauth-0.8.8-asneeded.patch
new file mode 100644
index 000000000000..eb930aa08412
--- /dev/null
+++ b/net-libs/liboauth/files/liboauth-0.8.8-asneeded.patch
@@ -0,0 +1,38 @@
+Index: liboauth-0.8.8/configure.ac
+===================================================================
+--- liboauth-0.8.8.orig/configure.ac
++++ liboauth-0.8.8/configure.ac
+@@ -113,8 +113,8 @@ AS_IF([test "${enable_nss}" == "yes"], [
+ HASH_CFLAGS=""
+ fi
+ report_hash="OpenSSL"
+- PC_LIB="$PC_LIB -lssl"
+- PC_REQ="$PC_REQ libssl"
++ PC_LIB="$PC_LIB -lcrypto"
++ PC_REQ="$PC_REQ libcrypto"
+ AC_MSG_NOTICE([
+
+ NOTE: OpenSSL is not compatible with GPL applications.
+Index: liboauth-0.8.8/src/Makefile.am
+===================================================================
+--- liboauth-0.8.8.orig/src/Makefile.am
++++ liboauth-0.8.8/src/Makefile.am
+@@ -4,4 +4,5 @@ include_HEADERS = oauth.h
+
+ liboauth_la_SOURCES=oauth.c config.h hash.c xmalloc.c xmalloc.h oauth_http.c
+ liboauth_la_LDFLAGS=@LIBOAUTH_LDFLAGS@ -version-info @VERSION_INFO@
++liboauth_la_LIBADD=@HASH_LIBS@ @CURL_LIBS@
+ liboauth_la_CFLAGS=@LIBOAUTH_CFLAGS@ @HASH_CFLAGS@ @CURL_CFLAGS@
+Index: liboauth-0.8.8/tests/Makefile.am
+===================================================================
+--- liboauth-0.8.8.orig/tests/Makefile.am
++++ liboauth-0.8.8/tests/Makefile.am
+@@ -4,7 +4,7 @@ ACLOCAL_AMFLAGS= -I m4
+ OAUTHDIR =../src
+ INCLUDES = -I$(srcdir)/$(OAUTHDIR)
+ MYCFLAGS = @LIBOAUTH_CFLAGS@ @HASH_CFLAGS@ @CURL_CFLAGS@
+-MYLDADD = $(OAUTHDIR)/liboauth.la @HASH_LIBS@ @CURL_LIBS@
++MYLDADD = $(OAUTHDIR)/liboauth.la
+
+ tcwiki_SOURCES = selftest_wiki.c commontest.c commontest.h
+ tcwiki_LDADD = $(MYLDADD)
diff --git a/net-libs/liboauth/files/liboauth-0.8.8-pkgconfig.patch b/net-libs/liboauth/files/liboauth-0.8.8-pkgconfig.patch
new file mode 100644
index 000000000000..b6cd072cbbb7
--- /dev/null
+++ b/net-libs/liboauth/files/liboauth-0.8.8-pkgconfig.patch
@@ -0,0 +1,40 @@
+Index: liboauth-0.8.8/configure.ac
+===================================================================
+--- liboauth-0.8.8.orig/configure.ac
++++ liboauth-0.8.8/configure.ac
+@@ -78,9 +78,9 @@ if test "${enable_curl}" != "no"; then
+ fi
+
+ dnl ** check for libcurl
+-if test "${enable_libcurl}" != "no"; then
++AS_IF([test "${enable_libcurl}" != "no"], [
+ PKG_CHECK_MODULES(CURL, libcurl, [ AC_DEFINE(HAVE_CURL, 1) HAVE_CURL=1 PC_REQ="$PC_REQ libcurl" PC_LIB="$PC_LIB -lcurl" report_curl="libcurl" ])
+-fi
++])
+
+ report_curltimeout="-"
+ if test -n "${with_curltimeout}"; then
+@@ -99,12 +99,12 @@ AC_SUBST(CURL_CFLAGS)
+ AC_SUBST(CURL_LIBS)
+
+ dnl ** crypto/hash lib (OpenSSL or NSS)
+-if test "${enable_nss}" == "yes"; then
++AS_IF([test "${enable_nss}" == "yes"], [
+ PKG_CHECK_MODULES(NSS, nss, [ AC_DEFINE(USE_NSS, 1) USE_NSS=1 PC_REQ="$PC_REQ nss" ])
+ HASH_LIBS=${NSS_LIBS}
+ HASH_CFLAGS=${NSS_CFLAGS}
+ report_hash="NSS"
+-else
++], [
+ AC_CHECK_HEADERS(openssl/hmac.h)
+ if test -z "${HASH_LIBS}"; then
+ HASH_LIBS="-lcrypto"
+@@ -129,7 +129,7 @@ else
+
+ see http://people.gnome.org/~markmc/openssl-and-the-gpl.html
+ ])
+-fi
++])
+
+ AC_SUBST(HASH_LIBS)
+ AC_SUBST(HASH_CFLAGS)
diff --git a/net-libs/liboauth/files/liboauth-0.8.8-tests.patch b/net-libs/liboauth/files/liboauth-0.8.8-tests.patch
new file mode 100644
index 000000000000..7fcd9b57c1cb
--- /dev/null
+++ b/net-libs/liboauth/files/liboauth-0.8.8-tests.patch
@@ -0,0 +1,10 @@
+Index: liboauth-0.8.8/tests/Makefile.am
+===================================================================
+--- liboauth-0.8.8.orig/tests/Makefile.am
++++ liboauth-0.8.8/tests/Makefile.am
+@@ -1,4 +1,4 @@
+-noinst_PROGRAMS = oauthexample oauthdatapost tcwiki tceran tcother oauthtest oauthtest2 oauthsign oauthbodyhash
++check_PROGRAMS = oauthexample oauthdatapost tcwiki tceran tcother oauthtest oauthtest2 oauthsign oauthbodyhash
+ ACLOCAL_AMFLAGS= -I m4
+
+ OAUTHDIR =../src
diff --git a/net-libs/liboauth/liboauth-0.8.8.ebuild b/net-libs/liboauth/liboauth-0.8.8.ebuild
new file mode 100644
index 000000000000..c987304fa68e
--- /dev/null
+++ b/net-libs/liboauth/liboauth-0.8.8.ebuild
@@ -0,0 +1,92 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-libs/liboauth/liboauth-0.8.8.ebuild,v 1.1 2010/08/27 19:57:12 flameeyes Exp $
+
+EAPI=2
+
+inherit eutils autotools
+
+DESCRIPTION="C library implementing the OAuth secure authentication protocol"
+HOMEPAGE="http://liboauth.sourceforge.net/"
+SRC_URI="http://liboauth.sourceforge.net/pool/${P}.tar.gz"
+
+LICENSE="|| ( GPL-2 MIT )"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="curl doc bindist +nss"
+
+CDEPEND="
+ nss? ( dev-libs/nss
+ curl? ( || ( net-misc/curl[ssl,nss,-gnutls] net-misc/curl[-ssl] ) )
+ )
+
+ bindist? ( dev-libs/nss
+ curl? ( || ( net-misc/curl[ssl,nss,-gnutls] net-misc/curl[-ssl] ) )
+ )
+
+ !bindist? (
+ !nss? ( dev-libs/openssl
+ curl? ( || ( net-misc/curl[ssl,-nss,-gnutls] net-misc/curl[-ssl] ) )
+ )
+ )
+
+ net-misc/curl
+"
+
+RDEPEND="${CDEPEND}"
+
+DEPEND="${CDEPEND}
+ doc? ( app-doc/doxygen )
+ dev-util/pkgconfig"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-pkgconfig.patch \
+ "${FILESDIR}"/${P}-asneeded.patch \
+ "${FILESDIR}"/${P}-tests.patch
+
+ eautoreconf
+}
+
+src_configure() {
+ local myconf=
+
+ if use nss || use bindist; then
+ myconf="${myconf} --enable-nss"
+ else
+ myconf="${myconf} --disable-nss"
+ fi
+
+ econf \
+ --disable-dependency-tracking \
+ --enable-fast-install \
+ --disable-static \
+ $(use_enable !curl curl) \
+ $(use_enable curl libcurl) \
+ ${myconf}
+}
+
+src_compile() {
+ emake || die "emake failed"
+
+ if use doc ; then
+ emake dox || die "emake dox failed"
+ fi
+}
+
+src_test() {
+ # explicitly allow parallel test build
+ emake check || die "emake check failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "install failed"
+
+ find "${D}" -name '*.la' -delete || die
+
+ dodoc AUTHORS ChangeLog LICENSE.OpenSSL NEWS README || die "dodoc failed"
+
+ if use doc; then
+ dohtml -r doc/html/* || die "dohtml failed"
+ fi
+}
diff --git a/net-libs/liboauth/metadata.xml b/net-libs/liboauth/metadata.xml
new file mode 100644
index 000000000000..773752b98d30
--- /dev/null
+++ b/net-libs/liboauth/metadata.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>no-herd</herd>
+ <maintainer>
+ <email>flameeyes@gentoo.org</email>
+ </maintainer>
+
+ <use>
+ <flag name="nss">
+ Use Mozilla NSS (<pkg>dev-libs/nss</pkg>) as hash library; if
+ this is disabled, <pkg>dev-libs/openssl</pkg> is used instead.
+ </flag>
+
+ <flag name="bindist">
+ Alias for the nss USE flag, since there are license compliancy
+ trouble when using OpenSSL.
+ </flag>
+
+ <flag name="curl">
+ If enabled, <pkg>net-misc/curl</pkg> is used thorugh the libcurl
+ library; if it's not, the curl command is used instead. Some
+ features are only available when using the library, but using it
+ as library requires matching SSL implementations.
+ </flag>
+ </use>
+</pkgmetadata>