From 7f5126275eb7178328b1ff4bea732e062222746b Mon Sep 17 00:00:00 2001 From: Yuan Liao Date: Wed, 23 Jun 2021 14:38:30 -0700 Subject: Add support for ebuild variables in MAVEN_PROVIDES MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Yuan Liao Closes: https://github.com/gentoo/java-ebuilder/pull/11 Signed-off-by: Miroslav Ć ulc --- src/main/java/org/gentoo/java/ebuilder/portage/PortageParser.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/org/gentoo/java/ebuilder/portage/PortageParser.java b/src/main/java/org/gentoo/java/ebuilder/portage/PortageParser.java index ff4acf3..8026542 100644 --- a/src/main/java/org/gentoo/java/ebuilder/portage/PortageParser.java +++ b/src/main/java/org/gentoo/java/ebuilder/portage/PortageParser.java @@ -394,6 +394,9 @@ public class PortageParser { groupId, artifactId, mavenVersion, eclasses)); for (String providedId: mavenProvide) { + // Allow declarations like MAVEN_PROVIDES="groupId:${PN}:${PV}" + providedId = providedId.replaceAll("\\$(\\{PN\\}|PN)", pkg). + replaceAll("\\$(\\{PV\\}|PV)", pv); final String[] parts = providedId.split(":"); cacheItems.add(new CacheItem(category, pkg, version, slot, useFlag, parts[0], parts[1], parts[2], eclasses)); -- cgit v1.2.3-65-gdbad