From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1Sb6pt-0001YI-GO for garchives@archives.gentoo.org; Sun, 03 Jun 2012 09:10:57 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 77E22E0812; Sun, 3 Jun 2012 09:08:44 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 4711BE080A for ; Sun, 3 Jun 2012 09:08:44 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id A57F21B402A for ; Sun, 3 Jun 2012 09:08:43 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id B3729E5449 for ; Sun, 3 Jun 2012 09:08:41 +0000 (UTC) From: "Petteri Räty" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Petteri Räty" Message-ID: <1338028848.af86bf52b566c9e5c83b53f5a4f1a9689c827a9f.betelgeuse@gentoo> Subject: [gentoo-commits] proj/libbash:master commit in: utils/ X-VCS-Repository: proj/libbash X-VCS-Files: utils/metadata.cpp X-VCS-Directories: utils/ X-VCS-Committer: betelgeuse X-VCS-Committer-Name: Petteri Räty X-VCS-Revision: af86bf52b566c9e5c83b53f5a4f1a9689c827a9f X-VCS-Branch: master Date: Sun, 3 Jun 2012 09:08:41 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: c9449ba1-f971-4fd6-bac7-4e2df8717ed8 X-Archives-Hash: 2a3435b47ed3bc81e66ef137219323ee commit: af86bf52b566c9e5c83b53f5a4f1a9689c827a9f Author: Mu Qiao gentoo org> AuthorDate: Mon Mar 26 14:44:55 2012 +0000 Commit: Petteri R=C3=A4ty gentoo org> CommitDate: Sat May 26 10:40:48 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/libbash.git;a= =3Dcommit;h=3Daf86bf52 Utils: handle RDEPEND for metadata generation --- utils/metadata.cpp | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/utils/metadata.cpp b/utils/metadata.cpp index ed07092..e0232ae 100644 --- a/utils/metadata.cpp +++ b/utils/metadata.cpp @@ -28,6 +28,7 @@ #include #include #include +#include =20 static const std::vector metadata_names =3D {"DEPEND", "RDE= PEND", "SLOT", "SRC_URI", "RESTRICT", "HO= MEPAGE", "LICENSE", "DESCRIPTION", @@ -56,6 +57,11 @@ void write_metadata(std::ostream& output, std::unordered_map>& variables, std::vector& functions) { + int EAPI =3D 0; + if(variables.find("EAPI") !=3D variables.end()) + EAPI =3D boost::lexical_cast(variables["EAPI"][0]); + if(EAPI < 4 && variables.find("RDEPEND") =3D=3D variables.end() && var= iables.find("DEPEND") !=3D variables.end()) + variables["RDEPEND"] =3D variables["DEPEND"]; for(auto iter_name =3D metadata_names.begin(); iter_name !=3D metadata= _names.end(); ++iter_name) { auto iter_value =3D variables.find(*iter_name);