1 |
No ebuild in the Gentoo repository uses the bzr_bootstrap |
2 |
functionality. Therefore drop the function along with bzr_src_prepare |
3 |
(which would not have worked in EAPI 6 anyway, due to missing call to |
4 |
eapply_user). After this change, inheriting eutils is not needed any |
5 |
more. |
6 |
|
7 |
Drop support for EAPIs 0 and 1 for further simplification. |
8 |
--- |
9 |
|
10 |
This is to be applied on top of the patch posted earlier today. |
11 |
|
12 |
We could go for bzr-r1.eclass instead. However, the functionality |
13 |
associated with EBZR_PATCHES and EBZR_BOOTSTRAP is not used in the |
14 |
tree, and overall the eclass is little used. Therefore I think that |
15 |
applying these changes in-place is acceptable here. |
16 |
|
17 |
eclass/bzr.eclass | 99 ++++++++----------------------------------------------- |
18 |
1 file changed, 13 insertions(+), 86 deletions(-) |
19 |
|
20 |
diff --git a/eclass/bzr.eclass b/eclass/bzr.eclass |
21 |
index 9b3e0b6cf4dc..710b64db28c0 100644 |
22 |
--- a/eclass/bzr.eclass |
23 |
+++ b/eclass/bzr.eclass |
24 |
@@ -18,21 +18,20 @@ |
25 |
# Note: Just set EBZR_REPO_URI to the URI of the branch and src_unpack() |
26 |
# of this eclass will export the branch to ${WORKDIR}/${P}. |
27 |
|
28 |
-inherit eutils |
29 |
- |
30 |
EBZR="bzr.eclass" |
31 |
|
32 |
-case "${EAPI:-0}" in |
33 |
- 0|1) EXPORT_FUNCTIONS src_unpack ;; |
34 |
- *) EXPORT_FUNCTIONS src_unpack src_prepare ;; |
35 |
+case ${EAPI:-0} in |
36 |
+ 2|3|4|5|6) ;; |
37 |
+ *) die "${EBZR}: EAPI ${EAPI:-0} is not supported" ;; |
38 |
esac |
39 |
|
40 |
-DEPEND=">=dev-vcs/bzr-2.6.0" |
41 |
-case "${EAPI:-0}" in |
42 |
- 0|1) ;; |
43 |
- *) [[ ${EBZR_REPO_URI%%:*} = sftp ]] \ |
44 |
- && DEPEND=">=dev-vcs/bzr-2.6.0[sftp]" ;; |
45 |
-esac |
46 |
+EXPORT_FUNCTIONS src_unpack |
47 |
+ |
48 |
+if [[ ${EBZR_REPO_URI%%:*} = sftp ]]; then |
49 |
+ DEPEND=">=dev-vcs/bzr-2.6.0[sftp]" |
50 |
+else |
51 |
+ DEPEND=">=dev-vcs/bzr-2.6.0" |
52 |
+fi |
53 |
|
54 |
# @ECLASS-VARIABLE: EBZR_STORE_DIR |
55 |
# @DESCRIPTION: |
56 |
@@ -85,9 +84,8 @@ esac |
57 |
# @DESCRIPTION: |
58 |
# The repository URI for the source package. |
59 |
# |
60 |
-# Note: If the ebuild uses an sftp:// URI, then in EAPI 0 or 1 it must |
61 |
-# make sure that dev-vcs/bzr was built with USE="sftp". In EAPI 2 or |
62 |
-# later, the eclass will depend on dev-vcs/bzr[sftp]. |
63 |
+# Note: If the ebuild uses an sftp:// URI, then the eclass will depend |
64 |
+# on dev-vcs/bzr[sftp]. |
65 |
|
66 |
# @ECLASS-VARIABLE: EBZR_INITIAL_URI |
67 |
# @DEFAULT_UNSET |
68 |
@@ -100,21 +98,6 @@ esac |
69 |
# |
70 |
# Normally, this variable needs not be set. |
71 |
|
72 |
-# @ECLASS-VARIABLE: EBZR_BOOTSTRAP |
73 |
-# @DEFAULT_UNSET |
74 |
-# @DESCRIPTION: |
75 |
-# Bootstrap script or command like autogen.sh or etc. |
76 |
- |
77 |
-# @ECLASS-VARIABLE: EBZR_PATCHES |
78 |
-# @DEFAULT_UNSET |
79 |
-# @DESCRIPTION: |
80 |
-# bzr.eclass can apply patches in bzr_bootstrap(). You can use regular |
81 |
-# expressions in this variable like *.diff or *.patch and the like. |
82 |
-# Note: These patches will be applied before EBZR_BOOTSTRAP is processed. |
83 |
-# |
84 |
-# Patches are searched both in ${PWD} and ${FILESDIR}. If not found in |
85 |
-# either location, the installation dies. |
86 |
- |
87 |
# @ECLASS-VARIABLE: EBZR_PROJECT |
88 |
# @DESCRIPTION: |
89 |
# The project name of your ebuild. Normally, the branch will be stored |
90 |
@@ -276,65 +259,9 @@ bzr_fetch() { |
91 |
popd > /dev/null |
92 |
} |
93 |
|
94 |
-# @FUNCTION: bzr_bootstrap |
95 |
-# @DESCRIPTION: |
96 |
-# Apply patches in ${EBZR_PATCHES} and run ${EBZR_BOOTSTRAP} if specified. |
97 |
-bzr_bootstrap() { |
98 |
- local patch lpatch |
99 |
- |
100 |
- pushd "${S}" > /dev/null || die "${EBZR}: can't chdir to ${S}" |
101 |
- |
102 |
- if [[ -n ${EBZR_PATCHES} ]] ; then |
103 |
- einfo "apply patches -->" |
104 |
- |
105 |
- for patch in ${EBZR_PATCHES} ; do |
106 |
- if [[ -f ${patch} ]] ; then |
107 |
- epatch "${patch}" |
108 |
- else |
109 |
- # This loop takes care of wildcarded patches given via |
110 |
- # EBZR_PATCHES in an ebuild |
111 |
- for lpatch in "${FILESDIR}"/${patch} ; do |
112 |
- if [[ -f ${lpatch} ]] ; then |
113 |
- epatch "${lpatch}" |
114 |
- else |
115 |
- die "${EBZR}: ${patch} is not found" |
116 |
- fi |
117 |
- done |
118 |
- fi |
119 |
- done |
120 |
- fi |
121 |
- |
122 |
- if [[ -n ${EBZR_BOOTSTRAP} ]] ; then |
123 |
- einfo "begin bootstrap -->" |
124 |
- |
125 |
- if [[ -f ${EBZR_BOOTSTRAP} ]] && [[ -x ${EBZR_BOOTSTRAP} ]] ; then |
126 |
- einfo " bootstrap with a file: ${EBZR_BOOTSTRAP}" |
127 |
- "./${EBZR_BOOTSTRAP}" \ |
128 |
- || die "${EBZR}: can't execute EBZR_BOOTSTRAP" |
129 |
- else |
130 |
- einfo " bootstrap with commands: ${EBZR_BOOTSTRAP}" |
131 |
- "${EBZR_BOOTSTRAP}" \ |
132 |
- || die "${EBZR}: can't eval EBZR_BOOTSTRAP" |
133 |
- fi |
134 |
- fi |
135 |
- |
136 |
- popd > /dev/null |
137 |
-} |
138 |
- |
139 |
# @FUNCTION: bzr_src_unpack |
140 |
# @DESCRIPTION: |
141 |
-# Default src_unpack(), calls bzr_fetch. For EAPIs 0 and 1, also calls |
142 |
-# bzr_src_prepare. |
143 |
+# Default src_unpack(), calls bzr_fetch. |
144 |
bzr_src_unpack() { |
145 |
bzr_fetch |
146 |
- case "${EAPI:-0}" in |
147 |
- 0|1) bzr_src_prepare ;; |
148 |
- esac |
149 |
-} |
150 |
- |
151 |
-# @FUNCTION: bzr_src_prepare |
152 |
-# @DESCRIPTION: |
153 |
-# Default src_prepare(), calls bzr_bootstrap. |
154 |
-bzr_src_prepare() { |
155 |
- bzr_bootstrap |
156 |
} |
157 |
-- |
158 |
2.16.1 |