Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/java-ebuilder:master commit in: scripts/
Date: Wed, 30 Oct 2019 17:35:23
Message-Id: 1475718674.df9639000ca69afc2be4f03a3bb41f5f1ea73f92.mgorny@gentoo
1 commit: df9639000ca69afc2be4f03a3bb41f5f1ea73f92
2 Author: Benda Xu <heroxbd <AT> gentoo <DOT> org>
3 AuthorDate: Thu Oct 6 01:51:14 2016 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Thu Oct 6 01:51:14 2016 +0000
6 URL: https://gitweb.gentoo.org/proj/java-ebuilder.git/commit/?id=df963900
7
8 meta.sh: add more jmock, hamcrest, tec.
9
10 tree.sh: restructure to reuse code.
11
12 scripts/meta.sh | 15 ++++++++++++---
13 scripts/tree.sh | 37 ++++++++++++++++++++++++++-----------
14 2 files changed, 38 insertions(+), 14 deletions(-)
15
16 diff --git a/scripts/meta.sh b/scripts/meta.sh
17 index 0a142c8..4917098 100755
18 --- a/scripts/meta.sh
19 +++ b/scripts/meta.sh
20 @@ -14,8 +14,12 @@ case ${spkg} in
21 echo $1:com.google.guava:${spkg}:${sver%%-*}
22 exit 0
23 ;;
24 - json)
25 - echo $1:org.json:${spkg}:${sver%%-*}
26 + json|jmock)
27 + echo $1:org.${spkg}:${spkg}:${sver%%-*}
28 + exit 0
29 + ;;
30 + hamcrest-*)
31 + echo $1:org.${spkg%%-*}:${spkg}:${sver%%-*}
32 exit 0
33 ;;
34 xerces)
35 @@ -24,7 +28,12 @@ case ${spkg} in
36 echo $1:xerces:xmlParserAPIs:${sver%%-*}
37 exit 0
38 ;;
39 - commons-*|classworlds|jdom)
40 + commons-*|classworlds|jdom|xalan*)
41 + echo $1:${spkg}:${spkg}:${sver%%-*}
42 + exit 0
43 + ;;
44 + javax-inject)
45 + spkg=${spkg/-/.}
46 echo $1:${spkg}:${spkg}:${sver%%-*}
47 exit 0
48 ;;
49
50 diff --git a/scripts/tree.sh b/scripts/tree.sh
51 index 5482a0b..acabb0a 100755
52 --- a/scripts/tree.sh
53 +++ b/scripts/tree.sh
54 @@ -30,20 +30,20 @@ gebd() {
55 PV=${PV/-beta-/_beta}
56 # aopalliance-repackaged 2.5.0-b16
57 PV=${PV/-b/_beta}
58 + # cdi-api 1.0-SP4
59 + PV=${PV/-SP/_p}
60 # javax.xml.stream:stax-api:1.0-2
61 PV=${PV//-/.}
62
63 - local M=${MA}-${MV}
64 - local SRC_URI="http://central.maven.org/maven2/${WORKDIR}/${MV}/${M}-sources.jar"
65 -
66 # spark-launcher_2.11 for scala 2.11
67 eval $(sed -nr 's,([^_]*)(_(.*))?,PA=\1 SLOT=\3,p' <<< ${MA})
68 [[ -z "${SLOT}" ]] && eval $(sed -nr 's,(.*)-(([0-9]+\.)?[0-9]+),PA=\1 SLOT=\2,p' <<< ${MA})
69 [[ -z "${SLOT}" ]] && PA=${MA}
70 PA=${PA//./-}
71 PA=${PA//_/-}
72 - local P=${PA}-${PV}
73 - local ebd=app-maven/${PA}/${P}.ebuild
74 +
75 + local M=${MA}-${MV}
76 + local SRC_URI="http://central.maven.org/maven2/${WORKDIR}/${MV}/${M}-sources.jar"
77
78 if [[ ! -f ../poms/${M}.pom ]]; then
79 pushd ../poms
80 @@ -61,7 +61,12 @@ gebd() {
81 popd
82 fi
83
84 - wget -q --spider ${SRC_URI} || SRC_URI=${SRC_URI/-sources.jar/.jar}
85 + if ! wget -q --spider ${SRC_URI}; then
86 + SRC_URI=${SRC_URI/-sources.jar/.jar}
87 + PA=${PA}-bin
88 + fi
89 + local P=${PA}-${PV}
90 + local ebd=app-maven/${PA}/${P}.ebuild
91
92 if [[ ! -f app-maven/${PA}/${P}.ebuild ]]; then
93 mkdir -p app-maven/${PA}
94 @@ -70,7 +75,9 @@ gebd() {
95
96 # empty parent artifacts
97 # FIXME, this should be removed in poms
98 - sed -i '/app-maven\/jsch-agentproxy-[0-9]/d' ${ebd}
99 + sed -e '/app-maven\/jsch-agentproxy-bin/d' \
100 + -e '/JAVA_GENTOO_CLASSPATH/s|jsch-agentproxy-bin,||' \
101 + -i ${ebd}
102 fi
103
104 line=app-maven:${PA}:${PV}:${SLOT:-0}::${MID}
105 @@ -81,9 +88,15 @@ gebd() {
106 popd > /dev/null
107 fi
108
109 - if [[ -z "${MAVEN_NODEP}" ]] && mfill app-maven/${PA}/${P}.ebuild; then
110 + if [[ -z "${MAVEN_NODEP}" ]] && mfill ${ebd}; then
111 java-ebuilder -p ../poms/${M}.pom -e ${ebd} -g --workdir . \
112 -u ${SRC_URI} --slot ${SLOT:-0} --keywords ~amd64
113 +
114 + # empty parent artifacts
115 + # FIXME, this should be removed in poms
116 + sed -e '/app-maven\/jsch-agentproxy-bin-[0-9]/d' \
117 + -e '/JAVA_GENTOO_CLASSPATH/s|jsch-agentproxy-bin,||' \
118 + -i ${ebd}
119 fi
120
121 [[ ${SRC_URI} = *-sources.jar ]] || sed -i "/inherit/s/java-pkg-simple/java-pkg-binjar/" ${ebd}
122 @@ -104,8 +117,10 @@ mfill() {
123 }
124
125 if [[ $1 == *.ebuild ]]; then
126 - mfill $1
127 + eval $(grep MAVEN_ID $1)
128 + rm -f $1
129 else
130 - eval $(awk -F":" '{print "PG="$1, "MA="$2, "MV="$3}' <<< $1)
131 - gebd
132 + MAVEN_ID=$1
133 fi
134 +eval $(awk -F":" '{print "PG="$1, "MA="$2, "MV="$3}' <<< ${MAVEN_ID})
135 +gebd