aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuan Liao <liaoyuan@gmail.com>2021-06-23 14:38:30 -0700
committerMiroslav Šulc <fordfrog@gentoo.org>2023-04-15 10:13:53 +0200
commit7f5126275eb7178328b1ff4bea732e062222746b (patch)
tree7a57e798b3184f519329e13a5a6095d6c7975ee7 /src/main/java/org
parentAdd support for multi-line MAVEN_PROVIDES definition (diff)
downloadjava-ebuilder-master.tar.gz
java-ebuilder-master.tar.bz2
java-ebuilder-master.zip
Add support for ebuild variables in MAVEN_PROVIDESHEADmaster
Signed-off-by: Yuan Liao <liaoyuan@gmail.com> Closes: https://github.com/gentoo/java-ebuilder/pull/11 Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
Diffstat (limited to 'src/main/java/org')
-rw-r--r--src/main/java/org/gentoo/java/ebuilder/portage/PortageParser.java3
1 files changed, 3 insertions, 0 deletions
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));