diff options
author | Kent Fredric <kentnl@gentoo.org> | 2017-12-06 04:03:11 +1300 |
---|---|---|
committer | Kent Fredric <kentnl@gentoo.org> | 2017-12-06 04:04:34 +1300 |
commit | 0ae4edb1f51585b30d13f1f61243b98e83b9aa95 (patch) | |
tree | 89ed5218e9db4e4537b62344b2b1ff0830bd8ba1 /dev-perl | |
parent | dev-perl/Net-HTTP: Bump to version 6.170.0 (diff) | |
download | gentoo-0ae4edb1f51585b30d13f1f61243b98e83b9aa95.tar.gz gentoo-0ae4edb1f51585b30d13f1f61243b98e83b9aa95.tar.bz2 gentoo-0ae4edb1f51585b30d13f1f61243b98e83b9aa95.zip |
dev-perl/Net-LDAPapi: Bump to version 3.0.5
- Reinstate tests, adding basic compilation tests, and making it more
viable for consumers/testers to attempt test execution without needing
to patch ebuilds.
- Rework patches to be git-am-able.
- Use DIST_EXAMPLES feature
Upstream:
- Fix cookie handling with MMR configuration
- Fix ASN1 encoding of sync cookie
Package-Manager: Portage-2.3.14, Repoman-2.3.6
Diffstat (limited to 'dev-perl')
4 files changed, 147 insertions, 1 deletions
diff --git a/dev-perl/Net-LDAPapi/Manifest b/dev-perl/Net-LDAPapi/Manifest index f40f07d3ce9c..bb8fab1efeb8 100644 --- a/dev-perl/Net-LDAPapi/Manifest +++ b/dev-perl/Net-LDAPapi/Manifest @@ -1 +1,2 @@ -DIST Net-LDAPapi-3.0.4.tar.gz 66972 SHA256 99874f6fe1cd1540c267bb33cb28c2f93881d8644bcc09e6e0fc2c039dd774a3 SHA512 9e2153c9f50a8fba1c8e52493c147a9db7e88015fa48739d4762a4cbc1711c24472b031a6c077d46d38285146ff389f07d9f2908016b0e2c07b76aa75ef2d2ca WHIRLPOOL 7dcf54b8ca3dbcb6a6b66f3658e6e589b047bc3961261d0fdcd23488ae0131a7a84fcf4d500dd67088e9737eb1d13c1306c1bfcd2fcc8ca85d7ef106dc597c94 +DIST Net-LDAPapi-3.0.4.tar.gz 66972 BLAKE2B 58fc7f4a949dfbd5a795234c9a16a157232238ce27f3157761c704965f3d7521f8ef5671af4b5bbd15050eda4464230697917817270cf77dacbeb49598a6a551 SHA512 9e2153c9f50a8fba1c8e52493c147a9db7e88015fa48739d4762a4cbc1711c24472b031a6c077d46d38285146ff389f07d9f2908016b0e2c07b76aa75ef2d2ca +DIST Net-LDAPapi-3.0.5.tar.gz 67814 BLAKE2B 2f35000e23ba17016837cd4a0cbe86be5d25254d8a34dd39c8c82cbc5a1979bb56b5b8a37af81cf1e8f12326709e252181e441d051ca0b18314408348d1435be SHA512 f3a6f4bb2e182ca93de2aa6c7a80bf20d64152fec5c4bda54efb91ec2a9be52939922993b79a2cdd248be3b83e605fc9ca3e6020f2cfb49b85256361edb512bd diff --git a/dev-perl/Net-LDAPapi/Net-LDAPapi-3.0.5.ebuild b/dev-perl/Net-LDAPapi/Net-LDAPapi-3.0.5.ebuild new file mode 100644 index 000000000000..aa72e67283f7 --- /dev/null +++ b/dev-perl/Net-LDAPapi/Net-LDAPapi-3.0.5.ebuild @@ -0,0 +1,64 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +DIST_AUTHOR=MISHIKAL +DIST_EXAMPLES=( "examples/*" ) +inherit multilib perl-module + +DESCRIPTION="Perl5 Module Supporting LDAP API" +HOMEPAGE="https://sourceforge.net/projects/net-ldapapi/ + http://search.cpan.org/~mishikal/Net-LDAPapi/" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" +# LICENSE is given on the corresponding sourceforge project and matches the +# default cpan/perl license + +RDEPEND="net-nds/openldap[sasl] + dev-libs/cyrus-sasl + >=dev-perl/Convert-ASN1-0.190.0" +DEPEND="${RDEPEND} + virtual/perl-ExtUtils-MakeMaker" + +PATCHES=( + "${FILESDIR}/${P}-ldap_result-no_error.patch" + "${FILESDIR}/${P}-test-env.patch" +) + +src_configure() { + myconf="-sdk OpenLDAP -lib_path /usr/$(get_libdir) -include_path /usr/include" + perl-module_src_configure +} + +src_install() { + mydoc="Credits Todo" + perl-module_src_install +} + +src_test() { + local MODULES=( + "Net::LDAPapi ${DIST_VERSION}" + ) + local failed=() + for dep in "${MODULES[@]}"; do + ebegin "Compile testing ${dep}" + perl -Mblib="${S}" -M"${dep} ()" -e1 + eend $? || failed+=( "$dep" ) + done + if [[ ${failed[@]} ]]; then + echo + eerror "One or more modules failed compile:"; + for dep in "${failed[@]}"; do + eerror " ${dep}" + done + die "Failing due to module compilation errors"; + fi + if [[ -n "${LDAP_TEST_HOST}" ]]; then + perl-module_src_test + else + elog "Comprehensive testing disabled without LDAP_TEST_HOST set. For details, see:" + elog "https://wiki.gentoo.org/wiki/Project:Perl/maint-notes/${CATEGORY}/${PN}" + fi +} diff --git a/dev-perl/Net-LDAPapi/files/Net-LDAPapi-3.0.5-ldap_result-no_error.patch b/dev-perl/Net-LDAPapi/files/Net-LDAPapi-3.0.5-ldap_result-no_error.patch new file mode 100644 index 000000000000..e8f8d915db10 --- /dev/null +++ b/dev-perl/Net-LDAPapi/files/Net-LDAPapi-3.0.5-ldap_result-no_error.patch @@ -0,0 +1,28 @@ +From 56f9ac5e45e63789012ae61c752f7aa7a3141da3 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Tiziano=20M=C3=BCller?= <dev-zero@gentoo.org> +Date: Thu, 10 Jun 2010 01:06:23 +1200 +Subject: Stop treating results from ldap_results as normal ldap return values + +Don't to treat results from ldap_results as normal ldap return +values in 'sub error' ( as in 3.0.2 ) +--- + LDAPapi.pm | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/LDAPapi.pm b/LDAPapi.pm +index 8fa91ce..fda4b12 100644 +--- a/LDAPapi.pm ++++ b/LDAPapi.pm +@@ -1453,8 +1453,8 @@ sub result + $self->{"result"} = $result; + $self->{"status"} = $status; + +- $self->errorize($status); + if( $status == -1 || $status == 0 ) { ++ $self->errorize($status); + return undef; + } + +-- +2.14.3 + diff --git a/dev-perl/Net-LDAPapi/files/Net-LDAPapi-3.0.5-test-env.patch b/dev-perl/Net-LDAPapi/files/Net-LDAPapi-3.0.5-test-env.patch new file mode 100644 index 000000000000..946ec8ee74c0 --- /dev/null +++ b/dev-perl/Net-LDAPapi/files/Net-LDAPapi-3.0.5-test-env.patch @@ -0,0 +1,53 @@ +From 10ad8990c92f2b4c4f4d550e0b42fb083aa90f84 Mon Sep 17 00:00:00 2001 +From: Kent Fredric <kentnl@gentoo.org> +Date: Wed, 6 Dec 2017 03:43:22 +1300 +Subject: Use ENV settings for LDAP tests + +This absolves the need for users to patch sources just to configure +a test server. +--- + test.pl | 26 ++++++++++++++------------ + 1 file changed, 14 insertions(+), 12 deletions(-) + +diff --git a/test.pl b/test.pl +index 7deb1a6..1a0871b 100644 +--- a/test.pl ++++ b/test.pl +@@ -18,20 +18,22 @@ print "modinit - ok\n"; + ## Change these values for test to work... + ## + +-print "\nEnter LDAP Server: "; +-chomp($ldap_host = <>); +-print "Enter port: "; +-chomp($ldap_port = <>); +-print "Enter Search Filter (ex. uid=abc123): "; +-chomp($filter = <>); +-print "Enter LDAP Search Base (ex. o=Org, c=US): "; +-chomp($BASEDN = <>); +-print "\n"; +- +-if (!$ldap_host) ++if (!$ENV{LDAP_TEST_HOST}) + { +- die "Please edit \$BASEDN, \$filter and \$ldap_host in test.pl.\n"; ++ die "LDAP_TEST_HOST not set"; + } ++$ldap_host = $ENV{LDAP_TEST_HOST}; ++$ldap_port = $ENV{LDAP_TEST_PORT}; ++$filter = $ENV{LDAP_TEST_FILTER}; ++$BASEDN = $ENV{LDAP_TEST_BASEDN}; ++ ++printf "\nLDAP Server: %s", $ldap_host; ++printf "\nLDAP port: %s", $ldap_port; ++printf "\nSearch Filter (ex. uid=abc123): %s", $filter; ++printf "\nLDAP Search Base (ex. o=Org, c=US): %s", $BASEDN; ++print "\n"; ++ ++ + + ## + ## Initialize LDAP Connection +-- +2.14.3 + |