From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 323BB139695 for ; Thu, 23 Feb 2017 18:58:27 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3903521C12C; Thu, 23 Feb 2017 18:58:26 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 0A0F421C12C for ; Thu, 23 Feb 2017 18:58:26 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id EBA58340EF6 for ; Thu, 23 Feb 2017 18:58:24 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 8A7B4521A for ; Thu, 23 Feb 2017 18:58:23 +0000 (UTC) From: "Kent Fredric" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Kent Fredric" Message-ID: <1487876220.eeaef8de0d0444f77a5c3023721e7e5a4da39703.kentnl@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-admin/rex/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-admin/rex/rex-9999.ebuild X-VCS-Directories: app-admin/rex/ X-VCS-Committer: kentnl X-VCS-Committer-Name: Kent Fredric X-VCS-Revision: eeaef8de0d0444f77a5c3023721e7e5a4da39703 X-VCS-Branch: master Date: Thu, 23 Feb 2017 18:58:23 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 24a41526-1fe2-4139-8ee0-e6957cbd2660 X-Archives-Hash: a4ff20521dc2d9884e8968a17a12a6aa commit: eeaef8de0d0444f77a5c3023721e7e5a4da39703 Author: Kent Fredric gentoo org> AuthorDate: Tue Feb 21 20:10:58 2017 +0000 Commit: Kent Fredric gentoo org> CommitDate: Thu Feb 23 18:57:00 2017 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eeaef8de app-admin/rex: Add -9999 ebuild Package-Manager: Portage-2.3.3, Repoman-2.3.1 app-admin/rex/rex-9999.ebuild | 144 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 144 insertions(+) diff --git a/app-admin/rex/rex-9999.ebuild b/app-admin/rex/rex-9999.ebuild new file mode 100644 index 0000000000..6cde2ea0fe --- /dev/null +++ b/app-admin/rex/rex-9999.ebuild @@ -0,0 +1,144 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 + +if [[ ${PV} == 9999 ]]; then + GITHUB_USER=RexOps + GITHUB_REPO=Rex + EGIT_REPO_URI="https://github.com/${GITHUB_USER}/${GITHUB_REPO}.git" + EGIT_BRANCH="development-1.x" + EGIT_CHECKOUT_DIR="${WORKDIR}/${PN}-git" + VCS_ECLASS="git-r3" +else + # This is intentional to stop perl-module.eclass doing magic things when it + # shouldn't. Like making ${S} contain "Rex" when the git clone has "rex" + # Also prevents perl-module.eclass provisioning SRC_URI + DIST_AUTHOR=JFRIED + DIST_NAME=Rex +fi + +inherit perl-module ${VCS_ECLASS} + +DESCRIPTION="(R)?ex is a small script to ease the execution of remote commands" + +SLOT="0" +KEYWORDS="" +IUSE="test" + +DZIL_DEPENDS=" + dev-perl/Dist-Zilla + dev-perl/Dist-Zilla-Plugin-MakeMaker-Awesome + dev-perl/Dist-Zilla-Plugin-MetaProvides-Package + dev-perl/Dist-Zilla-Plugin-OSPrereqs + dev-perl/Dist-Zilla-Plugin-OurPkgVersion + dev-perl/Dist-Zilla-Plugin-Test-MinimumVersion + dev-perl/Dist-Zilla-Plugin-Test-Perl-Critic +" + +RDEPEND=" + dev-perl/DBI + dev-perl/Devel-Caller + dev-perl/Digest-HMAC + dev-perl/Digest-SHA1 + dev-perl/Expect + dev-perl/Hash-Merge + dev-perl/IO-String + dev-perl/IO-Tty + dev-perl/IPC-Shareable + dev-perl/JSON-XS + dev-perl/List-MoreUtils + dev-perl/Net-OpenSSH + dev-perl/Net-SFTP-Foreign + dev-perl/Parallel-ForkManager + dev-perl/Sort-Naturally + dev-perl/String-Escape + dev-perl/TermReadKey + dev-perl/Test-Deep + dev-perl/Text-Glob + dev-perl/URI + dev-perl/XML-LibXML + dev-perl/XML-Simple + dev-perl/libwww-perl + dev-perl/YAML + virtual/perl-Carp + virtual/perl-Data-Dumper + virtual/perl-Digest-MD5 + virtual/perl-Exporter + virtual/perl-File-Spec + virtual/perl-MIME-Base64 + virtual/perl-Scalar-List-Utils + virtual/perl-Storable + virtual/perl-Time-HiRes +" + +DEPEND=" + ${RDEPEND} + test? ( + dev-perl/Test-UseAllModules + virtual/perl-File-Temp + ) +" + +[[ ${PV} == 9999 ]] && DEPEND+=" ${DZIL_DEPENDS}" + +src_unpack() { + if [[ $PV == 9999 ]]; then + "${VCS_ECLASS}"_src_unpack + mkdir -p "${S}" || die "Can't make ${S}" + else + default + fi +} + +dzil_to_distdir() { + local dzil_root dest has_missing modname dzil_version + dzil_root="$1" + dest="$2" + + cd "${dzil_root}" || die "Can't enter git workdir '${dzil_root}'"; + + dzil_version="$(dzil version)" || die "Error invoking 'dzil version'" + einfo "Generating CPAN dist with ${dzil_version}" + + has_missing="" + + einfo "Checking dzil authordeps" + while IFS= read -d $'\n' -r modname; do + if [[ -z "${has_missing}" ]]; then + has_missing=1 + eerror "'dzil authordeps' indicates missing build dependencies" + eerror "These will prevent building, please report a bug" + eerror "Missing:" + fi + eerror " ${modname}" + done < <( dzil authordeps --missing --versions ) + + [[ -z "${has_missing}" ]] || die "Satisfy all missing authordeps first" + + einfo "Checking dzil build deps" + while IFS= read -d $'\n' -r modname; do + if [[ -z "${has_missing}" ]]; then + has_missing=1 + ewarn "'dzil listdeps' indicates missing build dependencies" + ewarn "These may prevent building, please report a bug if they do" + ewarn "Missing:" + fi + ewarn " ${modname}" + done < <( dzil listdeps --missing --versions --author ) + + einfo "Generating release" + dzil build --notgz --in "${dest}" || die "Unable to build CPAN dist in '${dest}'" +} + +src_prepare() { + if [[ ${PV} == 9999 ]]; then + # Uses git sources in WORKDIR/rex-git + # to generate a CPAN-style tree in ${S} + # before letting perl-module.eclass do the rest + dzil_to_distdir "${EGIT_CHECKOUT_DIR}" "${S}" + fi + cd "${S}" || die "Can't enter build dir" + perl-module_src_prepare +}