1 |
commit: 89f261de268b9b381b8e7593e270287ff281728c |
2 |
Author: Doug Goldstein <cardoe <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Nov 26 15:22:13 2016 +0000 |
4 |
Commit: Doug Goldstein <cardoe <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Nov 30 17:17:51 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=89f261de |
7 |
|
8 |
dev-util/cargo: preserve older build method |
9 |
|
10 |
Cargo bootstraps itself with a 0.10.0 version of Cargo that does not |
11 |
support the newer features we're rolling into the eclass. As a result |
12 |
this lifts out bits from the eclass and moves it into the Cargo ebuilds |
13 |
so that the eclass can be updated. |
14 |
|
15 |
Signed-off-by: Doug Goldstein <cardoe <AT> gentoo.org> |
16 |
|
17 |
dev-util/cargo/cargo-0.12.0.ebuild | 46 +++++++++++++++++++++++++++++++++++ |
18 |
dev-util/cargo/cargo-0.13.0-r1.ebuild | 46 +++++++++++++++++++++++++++++++++++ |
19 |
dev-util/cargo/cargo-0.13.0.ebuild | 46 +++++++++++++++++++++++++++++++++++ |
20 |
dev-util/cargo/cargo-0.14.0.ebuild | 46 +++++++++++++++++++++++++++++++++++ |
21 |
4 files changed, 184 insertions(+) |
22 |
|
23 |
diff --git a/dev-util/cargo/cargo-0.12.0.ebuild b/dev-util/cargo/cargo-0.12.0.ebuild |
24 |
index 68140cd..3ab9f11 100644 |
25 |
--- a/dev-util/cargo/cargo-0.12.0.ebuild |
26 |
+++ b/dev-util/cargo/cargo-0.12.0.ebuild |
27 |
@@ -103,6 +103,52 @@ DEPEND="${COMMON_DEPEND} |
28 |
sys-apps/findutils |
29 |
sys-apps/sed" |
30 |
|
31 |
+# Until cargo bootstraps itself with a version based on 0.13.0, this needs |
32 |
+# to stay (these variables and src_unpack) |
33 |
+ECARGO_HOME="${WORKDIR}/cargo_home" |
34 |
+ECARGO_REPO="github.com-88ac128001ac3a9a" |
35 |
+ECARGO_INDEX="${ECARGO_HOME}/registry/index/${ECARGO_REPO}" |
36 |
+ECARGO_SRC="${ECARGO_HOME}/registry/src/${ECARGO_REPO}" |
37 |
+ECARGO_CACHE="${ECARGO_HOME}/registry/cache/${ECARGO_REPO}" |
38 |
+ |
39 |
+src_unpack() { |
40 |
+ mkdir -p "${ECARGO_INDEX}" || die |
41 |
+ mkdir -p "${ECARGO_CACHE}" || die |
42 |
+ mkdir -p "${ECARGO_SRC}" || die |
43 |
+ mkdir -p "${S}" || die |
44 |
+ |
45 |
+ local archive |
46 |
+ for archive in ${A}; do |
47 |
+ case "${archive}" in |
48 |
+ *.crate) |
49 |
+ ebegin "Unpacking ${archive}" |
50 |
+ cp "${DISTDIR}"/${archive} "${ECARGO_CACHE}/" || die |
51 |
+ tar -xf "${DISTDIR}"/${archive} -C "${ECARGO_SRC}/" || die |
52 |
+ eend $? |
53 |
+ ;; |
54 |
+ cargo-snapshot*) |
55 |
+ ebegin "Unpacking ${archive}" |
56 |
+ mkdir -p "${S}"/target/snapshot |
57 |
+ tar -xzf "${DISTDIR}"/${archive} -C "${S}"/target/snapshot --strip-components 2 || die |
58 |
+ # cargo's makefile needs this otherwise it will try to |
59 |
+ # download it |
60 |
+ touch "${S}"/target/snapshot/bin/cargo || die |
61 |
+ eend $? |
62 |
+ ;; |
63 |
+ cargo-registry*) |
64 |
+ ebegin "Unpacking ${archive}" |
65 |
+ tar -xzf "${DISTDIR}"/${archive} -C "${ECARGO_INDEX}" --strip-components 1 || die |
66 |
+ # prevent cargo from attempting to download this again |
67 |
+ touch "${ECARGO_INDEX}"/.cargo-index-lock || die |
68 |
+ eend $? |
69 |
+ ;; |
70 |
+ *) |
71 |
+ unpack ${archive} |
72 |
+ ;; |
73 |
+ esac |
74 |
+ done |
75 |
+} |
76 |
+ |
77 |
src_configure() { |
78 |
# Cargo only supports these GNU triples: |
79 |
# - Linux: <arch>-unknown-linux-gnu |
80 |
|
81 |
diff --git a/dev-util/cargo/cargo-0.13.0-r1.ebuild b/dev-util/cargo/cargo-0.13.0-r1.ebuild |
82 |
index c6a5f05..12d1dd2 100644 |
83 |
--- a/dev-util/cargo/cargo-0.13.0-r1.ebuild |
84 |
+++ b/dev-util/cargo/cargo-0.13.0-r1.ebuild |
85 |
@@ -115,6 +115,52 @@ DEPEND="${COMMON_DEPEND} |
86 |
sys-apps/findutils |
87 |
sys-apps/sed" |
88 |
|
89 |
+# Until cargo bootstraps itself with a version based on 0.13.0, this needs |
90 |
+# to stay (these variables and src_unpack) |
91 |
+ECARGO_HOME="${WORKDIR}/cargo_home" |
92 |
+ECARGO_REPO="github.com-88ac128001ac3a9a" |
93 |
+ECARGO_INDEX="${ECARGO_HOME}/registry/index/${ECARGO_REPO}" |
94 |
+ECARGO_SRC="${ECARGO_HOME}/registry/src/${ECARGO_REPO}" |
95 |
+ECARGO_CACHE="${ECARGO_HOME}/registry/cache/${ECARGO_REPO}" |
96 |
+ |
97 |
+src_unpack() { |
98 |
+ mkdir -p "${ECARGO_INDEX}" || die |
99 |
+ mkdir -p "${ECARGO_CACHE}" || die |
100 |
+ mkdir -p "${ECARGO_SRC}" || die |
101 |
+ mkdir -p "${S}" || die |
102 |
+ |
103 |
+ local archive |
104 |
+ for archive in ${A}; do |
105 |
+ case "${archive}" in |
106 |
+ *.crate) |
107 |
+ ebegin "Unpacking ${archive}" |
108 |
+ cp "${DISTDIR}"/${archive} "${ECARGO_CACHE}/" || die |
109 |
+ tar -xf "${DISTDIR}"/${archive} -C "${ECARGO_SRC}/" || die |
110 |
+ eend $? |
111 |
+ ;; |
112 |
+ cargo-snapshot*) |
113 |
+ ebegin "Unpacking ${archive}" |
114 |
+ mkdir -p "${S}"/target/snapshot |
115 |
+ tar -xzf "${DISTDIR}"/${archive} -C "${S}"/target/snapshot --strip-components 2 || die |
116 |
+ # cargo's makefile needs this otherwise it will try to |
117 |
+ # download it |
118 |
+ touch "${S}"/target/snapshot/bin/cargo || die |
119 |
+ eend $? |
120 |
+ ;; |
121 |
+ cargo-registry*) |
122 |
+ ebegin "Unpacking ${archive}" |
123 |
+ tar -xzf "${DISTDIR}"/${archive} -C "${ECARGO_INDEX}" --strip-components 1 || die |
124 |
+ # prevent cargo from attempting to download this again |
125 |
+ touch "${ECARGO_INDEX}"/.cargo-index-lock || die |
126 |
+ eend $? |
127 |
+ ;; |
128 |
+ *) |
129 |
+ unpack ${archive} |
130 |
+ ;; |
131 |
+ esac |
132 |
+ done |
133 |
+} |
134 |
+ |
135 |
src_configure() { |
136 |
# Cargo only supports these GNU triples: |
137 |
# - Linux: <arch>-unknown-linux-gnu |
138 |
|
139 |
diff --git a/dev-util/cargo/cargo-0.13.0.ebuild b/dev-util/cargo/cargo-0.13.0.ebuild |
140 |
index 3f74ad6..56c7772 100644 |
141 |
--- a/dev-util/cargo/cargo-0.13.0.ebuild |
142 |
+++ b/dev-util/cargo/cargo-0.13.0.ebuild |
143 |
@@ -114,6 +114,52 @@ DEPEND="${COMMON_DEPEND} |
144 |
sys-apps/findutils |
145 |
sys-apps/sed" |
146 |
|
147 |
+# Until cargo bootstraps itself with a version based on 0.13.0, this needs |
148 |
+# to stay (these variables and src_unpack) |
149 |
+ECARGO_HOME="${WORKDIR}/cargo_home" |
150 |
+ECARGO_REPO="github.com-88ac128001ac3a9a" |
151 |
+ECARGO_INDEX="${ECARGO_HOME}/registry/index/${ECARGO_REPO}" |
152 |
+ECARGO_SRC="${ECARGO_HOME}/registry/src/${ECARGO_REPO}" |
153 |
+ECARGO_CACHE="${ECARGO_HOME}/registry/cache/${ECARGO_REPO}" |
154 |
+ |
155 |
+src_unpack() { |
156 |
+ mkdir -p "${ECARGO_INDEX}" || die |
157 |
+ mkdir -p "${ECARGO_CACHE}" || die |
158 |
+ mkdir -p "${ECARGO_SRC}" || die |
159 |
+ mkdir -p "${S}" || die |
160 |
+ |
161 |
+ local archive |
162 |
+ for archive in ${A}; do |
163 |
+ case "${archive}" in |
164 |
+ *.crate) |
165 |
+ ebegin "Unpacking ${archive}" |
166 |
+ cp "${DISTDIR}"/${archive} "${ECARGO_CACHE}/" || die |
167 |
+ tar -xf "${DISTDIR}"/${archive} -C "${ECARGO_SRC}/" || die |
168 |
+ eend $? |
169 |
+ ;; |
170 |
+ cargo-snapshot*) |
171 |
+ ebegin "Unpacking ${archive}" |
172 |
+ mkdir -p "${S}"/target/snapshot |
173 |
+ tar -xzf "${DISTDIR}"/${archive} -C "${S}"/target/snapshot --strip-components 2 || die |
174 |
+ # cargo's makefile needs this otherwise it will try to |
175 |
+ # download it |
176 |
+ touch "${S}"/target/snapshot/bin/cargo || die |
177 |
+ eend $? |
178 |
+ ;; |
179 |
+ cargo-registry*) |
180 |
+ ebegin "Unpacking ${archive}" |
181 |
+ tar -xzf "${DISTDIR}"/${archive} -C "${ECARGO_INDEX}" --strip-components 1 || die |
182 |
+ # prevent cargo from attempting to download this again |
183 |
+ touch "${ECARGO_INDEX}"/.cargo-index-lock || die |
184 |
+ eend $? |
185 |
+ ;; |
186 |
+ *) |
187 |
+ unpack ${archive} |
188 |
+ ;; |
189 |
+ esac |
190 |
+ done |
191 |
+} |
192 |
+ |
193 |
src_configure() { |
194 |
# Cargo only supports these GNU triples: |
195 |
# - Linux: <arch>-unknown-linux-gnu |
196 |
|
197 |
diff --git a/dev-util/cargo/cargo-0.14.0.ebuild b/dev-util/cargo/cargo-0.14.0.ebuild |
198 |
index b78e205..1b8d661 100644 |
199 |
--- a/dev-util/cargo/cargo-0.14.0.ebuild |
200 |
+++ b/dev-util/cargo/cargo-0.14.0.ebuild |
201 |
@@ -116,6 +116,52 @@ DEPEND="${COMMON_DEPEND} |
202 |
sys-apps/findutils |
203 |
sys-apps/sed" |
204 |
|
205 |
+# Until cargo bootstraps itself with a version based on 0.13.0, this needs |
206 |
+# to stay (these variables and src_unpack) |
207 |
+ECARGO_HOME="${WORKDIR}/cargo_home" |
208 |
+ECARGO_REPO="github.com-88ac128001ac3a9a" |
209 |
+ECARGO_INDEX="${ECARGO_HOME}/registry/index/${ECARGO_REPO}" |
210 |
+ECARGO_SRC="${ECARGO_HOME}/registry/src/${ECARGO_REPO}" |
211 |
+ECARGO_CACHE="${ECARGO_HOME}/registry/cache/${ECARGO_REPO}" |
212 |
+ |
213 |
+src_unpack() { |
214 |
+ mkdir -p "${ECARGO_INDEX}" || die |
215 |
+ mkdir -p "${ECARGO_CACHE}" || die |
216 |
+ mkdir -p "${ECARGO_SRC}" || die |
217 |
+ mkdir -p "${S}" || die |
218 |
+ |
219 |
+ local archive |
220 |
+ for archive in ${A}; do |
221 |
+ case "${archive}" in |
222 |
+ *.crate) |
223 |
+ ebegin "Unpacking ${archive}" |
224 |
+ cp "${DISTDIR}"/${archive} "${ECARGO_CACHE}/" || die |
225 |
+ tar -xf "${DISTDIR}"/${archive} -C "${ECARGO_SRC}/" || die |
226 |
+ eend $? |
227 |
+ ;; |
228 |
+ cargo-snapshot*) |
229 |
+ ebegin "Unpacking ${archive}" |
230 |
+ mkdir -p "${S}"/target/snapshot |
231 |
+ tar -xzf "${DISTDIR}"/${archive} -C "${S}"/target/snapshot --strip-components 2 || die |
232 |
+ # cargo's makefile needs this otherwise it will try to |
233 |
+ # download it |
234 |
+ touch "${S}"/target/snapshot/bin/cargo || die |
235 |
+ eend $? |
236 |
+ ;; |
237 |
+ cargo-registry*) |
238 |
+ ebegin "Unpacking ${archive}" |
239 |
+ tar -xzf "${DISTDIR}"/${archive} -C "${ECARGO_INDEX}" --strip-components 1 || die |
240 |
+ # prevent cargo from attempting to download this again |
241 |
+ touch "${ECARGO_INDEX}"/.cargo-index-lock || die |
242 |
+ eend $? |
243 |
+ ;; |
244 |
+ *) |
245 |
+ unpack ${archive} |
246 |
+ ;; |
247 |
+ esac |
248 |
+ done |
249 |
+} |
250 |
+ |
251 |
src_configure() { |
252 |
# Cargo only supports these GNU triples: |
253 |
# - Linux: <arch>-unknown-linux-gnu |