Lines 16-40
Link Here
|
16 |
4|5) |
16 |
4|5) |
17 |
EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_install pkg_preinst pkg_postinst pkg_postrm |
17 |
EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_install pkg_preinst pkg_postinst pkg_postrm |
18 |
;; |
18 |
;; |
|
|
19 |
6) |
20 |
EXPORT_FUNCTIONS src_prepare src_configure src_install pkg_preinst pkg_postinst pkg_postrm |
21 |
;; |
19 |
*) die "EAPI=${EAPI} is not supported" ;; |
22 |
*) die "EAPI=${EAPI} is not supported" ;; |
20 |
esac |
23 |
esac |
21 |
|
24 |
|
22 |
# @ECLASS-VARIABLE: G2CONF |
25 |
# @ECLASS-VARIABLE: DOCS |
23 |
# @DEFAULT_UNSET |
26 |
# @DEFAULT_UNSET |
24 |
# @DESCRIPTION: |
27 |
# @DESCRIPTION: |
25 |
# Extra configure opts passed to econf. |
28 |
# String containing documents passed to dodoc command for eapi4. |
26 |
# Deprecated, pass extra arguments to gnome2_src_configure. |
29 |
# In eapi5 we rely on einstalldocs (from eutils.eclass) and for newer EAPIs we |
27 |
G2CONF=${G2CONF:-""} |
30 |
# follow PMS spec. |
28 |
|
|
|
29 |
# @ECLASS-VARIABLE: GNOME2_LA_PUNT |
30 |
# @DESCRIPTION: |
31 |
# Should we delete ALL the .la files? |
32 |
# NOT to be used without due consideration. |
33 |
if has ${EAPI:-0} 4; then |
34 |
GNOME2_LA_PUNT=${GNOME2_LA_PUNT:-"no"} |
35 |
else |
36 |
GNOME2_LA_PUNT=${GNOME2_LA_PUNT:-""} |
37 |
fi |
38 |
|
31 |
|
39 |
# @ECLASS-VARIABLE: ELTCONF |
32 |
# @ECLASS-VARIABLE: ELTCONF |
40 |
# @DEFAULT_UNSET |
33 |
# @DEFAULT_UNSET |
Lines 42-77
Link Here
|
42 |
# Extra options passed to elibtoolize |
35 |
# Extra options passed to elibtoolize |
43 |
ELTCONF=${ELTCONF:-""} |
36 |
ELTCONF=${ELTCONF:-""} |
44 |
|
37 |
|
45 |
# @ECLASS-VARIABLE: DOCS |
38 |
# @ECLASS-VARIABLE: G2CONF |
46 |
# @DEFAULT_UNSET |
39 |
# @DEFAULT_UNSET |
47 |
# @DESCRIPTION: |
40 |
# @DESCRIPTION: |
48 |
# String containing documents passed to dodoc command. |
41 |
# Extra configure opts passed to econf. |
|
|
42 |
# Deprecated, pass extra arguments to gnome2_src_configure. |
43 |
# Banned in eapi6 and newer. |
44 |
if has ${EAPI:-0} 4 5; then |
45 |
G2CONF=${G2CONF:-""} |
46 |
fi |
49 |
|
47 |
|
50 |
# @ECLASS-VARIABLE: GCONF_DEBUG |
48 |
# @ECLASS-VARIABLE: GCONF_DEBUG |
51 |
# @DEFAULT_UNSET |
49 |
# @DEFAULT_UNSET |
52 |
# @DESCRIPTION: |
50 |
# @DESCRIPTION: |
53 |
# Whether to handle debug or not. |
51 |
# Whether to handle debug or not. |
54 |
# Some gnome applications support various levels of debugging (yes, no, minimum, |
52 |
# Some gnome applications support various levels of debugging (yes, no, minimum, |
55 |
# etc), but using --disable-debug also removes g_assert which makes debugging |
53 |
# etc), but using --disable-debug also removes g_assert which makes debugging |
56 |
# harder. This variable should be set to yes for such packages for the eclass |
54 |
# harder. This variable should be set to yes for such packages for the eclass |
57 |
# to handle it properly. It will enable minimal debug with USE=-debug. |
55 |
# to handle it properly. It will enable minimal debug with USE=-debug. |
58 |
# Note that this is most commonly found in configure.ac as GNOME_DEBUG_CHECK. |
56 |
# Note that this is most commonly found in configure.ac as GNOME_DEBUG_CHECK. |
59 |
|
57 |
# |
|
|
58 |
# Banned since eapi6 as upstream is moving away from this obsolete macro in favor |
59 |
# of autoconf-archive macros, that do not expose this issue (bug #270919) |
60 |
if has ${EAPI:-0} 4 5; then |
61 |
if [[ ${GCONF_DEBUG} != "no" ]]; then |
62 |
IUSE="debug" |
63 |
fi |
64 |
fi |
65 |
|
60 |
# @ECLASS-VARIABLE: GNOME2_ECLASS_GIO_MODULES |
66 |
# @ECLASS-VARIABLE: GNOME2_ECLASS_GIO_MODULES |
61 |
# @INTERNAL |
67 |
# @INTERNAL |
62 |
# @DESCRIPTION: |
68 |
# @DESCRIPTION: |
63 |
# Array containing glib GIO modules |
69 |
# Array containing glib GIO modules |
64 |
|
70 |
|
65 |
if [[ ${GCONF_DEBUG} != "no" ]]; then |
71 |
# @ECLASS-VARIABLE: GNOME2_LA_PUNT |
66 |
IUSE="debug" |
72 |
# @DESCRIPTION: |
|
|
73 |
# For eapi4 it sets if we should delete ALL or none of the .la files |
74 |
# For eapi5 and newer it relies on prune_libtool_files (from eutils.eclass) |
75 |
# for this. Available values for GNOME2_LA_PUNT: |
76 |
# - "no": will not clean any .la files |
77 |
# - "yes": will run prune_libtool_files --modules |
78 |
# - If it is not set, it will run prune_libtool_files |
79 |
if has ${EAPI:-0} 4; then |
80 |
GNOME2_LA_PUNT=${GNOME2_LA_PUNT:-"no"} |
81 |
else |
82 |
GNOME2_LA_PUNT=${GNOME2_LA_PUNT:-""} |
67 |
fi |
83 |
fi |
68 |
|
84 |
|
69 |
# @FUNCTION: gnome2_src_unpack |
85 |
# @FUNCTION: gnome2_src_unpack |
70 |
# @DESCRIPTION: |
86 |
# @DESCRIPTION: |
71 |
# Stub function for old EAPI. |
87 |
# Stub function for old EAPI. |
72 |
gnome2_src_unpack() { |
88 |
gnome2_src_unpack() { |
73 |
unpack ${A} |
89 |
if has ${EAPI:-0} 4 5; then |
74 |
cd "${S}" |
90 |
unpack ${A} |
|
|
91 |
cd "${S}" |
92 |
else |
93 |
die "gnome2_src_unpack is banned from eapi6" |
94 |
fi |
75 |
} |
95 |
} |
76 |
|
96 |
|
77 |
# @FUNCTION: gnome2_src_prepare |
97 |
# @FUNCTION: gnome2_src_prepare |
Lines 85-91
Link Here
|
85 |
gnome2_environment_reset |
105 |
gnome2_environment_reset |
86 |
|
106 |
|
87 |
# Prevent scrollkeeper access violations |
107 |
# Prevent scrollkeeper access violations |
88 |
gnome2_omf_fix |
108 |
# We stop to run it from eapi6 as scrollkeeper helpers from |
|
|
109 |
# rarian are not running anything and, then, access violations |
110 |
# shouldn't occur. |
111 |
has ${EAPI:-0} 4 5 && gnome2_omf_fix |
89 |
|
112 |
|
90 |
# Disable all deprecation warnings |
113 |
# Disable all deprecation warnings |
91 |
gnome2_disable_deprecation_warning |
114 |
gnome2_disable_deprecation_warning |
Lines 99-115
Link Here
|
99 |
# @DESCRIPTION: |
122 |
# @DESCRIPTION: |
100 |
# Gnome specific configure handling |
123 |
# Gnome specific configure handling |
101 |
gnome2_src_configure() { |
124 |
gnome2_src_configure() { |
102 |
# Deprecated for a long time now, see Gnome team policies |
125 |
# Deprecated for a long time now and banned since eapi6, see Gnome team policies |
103 |
if [[ -n ${G2CONF} ]] ; then |
126 |
if [[ -n ${G2CONF} ]] ; then |
104 |
eqawarn "G2CONF set, please review documentation at https://wiki.gentoo.org/wiki/Project:GNOME/Gnome_Team_Ebuild_Policies#G2CONF_and_src_configure" |
127 |
if has ${EAPI:-0} 4 5; then |
|
|
128 |
eqawarn "G2CONF set, please review documentation at https://wiki.gentoo.org/wiki/Project:GNOME/Gnome_Team_Ebuild_Policies#G2CONF_and_src_configure" |
129 |
else |
130 |
die "G2CONF set, please review documentation at https://wiki.gentoo.org/wiki/Project:GNOME/Gnome_Team_Ebuild_Policies#G2CONF_and_src_configure" |
131 |
fi |
105 |
fi |
132 |
fi |
106 |
|
133 |
|
107 |
local g2conf=() |
134 |
local g2conf=() |
108 |
|
135 |
|
109 |
# Update the GNOME configuration options |
136 |
if has ${EAPI:-0} 4 5; then |
110 |
if [[ ${GCONF_DEBUG} != 'no' ]] ; then |
137 |
if [[ ${GCONF_DEBUG} != 'no' ]] ; then |
111 |
if use debug ; then |
138 |
if use debug ; then |
112 |
g2conf+=( --enable-debug=yes ) |
139 |
g2conf+=( --enable-debug=yes ) |
|
|
140 |
fi |
141 |
fi |
142 |
else |
143 |
if [[ -n ${GCONF_DEBUG} ]] ; then |
144 |
die "GCONF_DEBUG is banned since eapi6 in favor of each ebuild taking care of the proper handling of debug configure option" |
113 |
fi |
145 |
fi |
114 |
fi |
146 |
fi |
115 |
|
147 |
|
Lines 139-145
Link Here
|
139 |
g2conf+=( --disable-scrollkeeper ) |
171 |
g2conf+=( --disable-scrollkeeper ) |
140 |
fi |
172 |
fi |
141 |
|
173 |
|
142 |
# Pass --disable-silent-rules when possible (not needed for eapi5), bug #429308 |
174 |
# Pass --disable-silent-rules when possible (not needed since eapi5), bug #429308 |
143 |
if has ${EAPI:-0} 4; then |
175 |
if has ${EAPI:-0} 4; then |
144 |
if grep -q "disable-silent-rules" "${ECONF_SOURCE:-.}"/configure; then |
176 |
if grep -q "disable-silent-rules" "${ECONF_SOURCE:-.}"/configure; then |
145 |
g2conf+=( --disable-silent-rules ) |
177 |
g2conf+=( --disable-silent-rules ) |
Lines 166-187
Link Here
|
166 |
g2conf+=( --enable-compile-warnings=minimum ) |
198 |
g2conf+=( --enable-compile-warnings=minimum ) |
167 |
fi |
199 |
fi |
168 |
|
200 |
|
169 |
# Pass --docdir with proper directory, bug #482646 |
201 |
# Pass --docdir with proper directory, bug #482646 (not needed since eapi6) |
170 |
if grep -q "^ *--docdir=" "${ECONF_SOURCE:-.}"/configure; then |
202 |
if has ${EAPI:-0} 4 5; then |
171 |
g2conf+=( --docdir="${EPREFIX}"/usr/share/doc/${PF} ) |
203 |
if grep -q "^ *--docdir=" "${ECONF_SOURCE:-.}"/configure; then |
|
|
204 |
g2conf+=( --docdir="${EPREFIX}"/usr/share/doc/${PF} ) |
205 |
fi |
172 |
fi |
206 |
fi |
173 |
|
207 |
|
174 |
# Avoid sandbox violations caused by gnome-vfs (bug #128289 and #345659) |
208 |
# Avoid sandbox violations caused by gnome-vfs (bug #128289 and #345659) |
175 |
addwrite "$(unset HOME; echo ~)/.gnome2" |
209 |
if has ${EAPI:-0} 4 5; then |
|
|
210 |
addwrite "$(unset HOME; echo ~)/.gnome2" |
211 |
else |
212 |
addpredict "$(unset HOME; echo ~)/.gnome2" |
213 |
fi |
176 |
|
214 |
|
177 |
econf ${g2conf[@]} ${G2CONF} "$@" |
215 |
if has ${EAPI:-0} 4 5; then |
|
|
216 |
econf ${g2conf[@]} ${G2CONF} "$@" |
217 |
else |
218 |
econf ${g2conf[@]} "$@" |
219 |
fi |
178 |
} |
220 |
} |
179 |
|
221 |
|
180 |
# @FUNCTION: gnome2_src_compile |
222 |
# @FUNCTION: gnome2_src_compile |
181 |
# @DESCRIPTION: |
223 |
# @DESCRIPTION: |
182 |
# Only default src_compile for now |
224 |
# Only default src_compile for now |
183 |
gnome2_src_compile() { |
225 |
gnome2_src_compile() { |
184 |
emake |
226 |
if has ${EAPI:-0} 4 5; then |
|
|
227 |
emake |
228 |
else |
229 |
default |
230 |
fi |
185 |
} |
231 |
} |
186 |
|
232 |
|
187 |
# @FUNCTION: gnome2_src_install |
233 |
# @FUNCTION: gnome2_src_install |
Lines 189-215
Link Here
|
189 |
# Gnome specific install. Handles typical GConf and scrollkeeper setup |
235 |
# Gnome specific install. Handles typical GConf and scrollkeeper setup |
190 |
# in packages and removal of .la files if requested |
236 |
# in packages and removal of .la files if requested |
191 |
gnome2_src_install() { |
237 |
gnome2_src_install() { |
192 |
# if this is not present, scrollkeeper-update may segfault and |
|
|
193 |
# create bogus directories in /var/lib/ |
194 |
local sk_tmp_dir="/var/lib/scrollkeeper" |
195 |
dodir "${sk_tmp_dir}" || die "dodir failed" |
196 |
|
197 |
# we must delay gconf schema installation due to sandbox |
238 |
# we must delay gconf schema installation due to sandbox |
198 |
export GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL="1" |
239 |
export GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL="1" |
199 |
|
240 |
|
200 |
debug-print "Installing with 'make install'" |
241 |
local sk_tmp_dir="/var/lib/scrollkeeper" |
201 |
emake DESTDIR="${D}" "scrollkeeper_localstate_dir=${ED}${sk_tmp_dir} " "$@" install || die "install failed" |
242 |
# scrollkeeper-update from rarian doesn't do anything. Then, since eapi6 |
|
|
243 |
# we stop taking care of it |
244 |
# |
245 |
# if this is not present, scrollkeeper-update may segfault and |
246 |
# create bogus directories in /var/lib/ |
247 |
if has ${EAPI:-0} 4 5; then |
248 |
dodir "${sk_tmp_dir}" || die "dodir failed" |
249 |
emake DESTDIR="${D}" "scrollkeeper_localstate_dir=${ED}${sk_tmp_dir} " "$@" install || die "install failed" |
250 |
else |
251 |
default |
252 |
fi |
202 |
|
253 |
|
203 |
unset GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL |
254 |
unset GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL |
204 |
|
255 |
|
205 |
# Handle documentation as 'default' for eapi5 and newer, bug #373131 |
256 |
# Handle documentation as 'default' for eapi5, bug #373131 |
|
|
257 |
# Since eapi6 this is handled by default on its own plus MAINTAINERS and HACKING |
258 |
# files that are really common in gnome packages (bug #573390) |
206 |
if has ${EAPI:-0} 4; then |
259 |
if has ${EAPI:-0} 4; then |
207 |
# Manual document installation |
260 |
# Manual document installation |
208 |
if [[ -n "${DOCS}" ]]; then |
261 |
if [[ -n "${DOCS}" ]]; then |
209 |
dodoc ${DOCS} || die "dodoc failed" |
262 |
dodoc ${DOCS} || die "dodoc failed" |
210 |
fi |
263 |
fi |
211 |
else |
264 |
elif has ${EAPI:-0} 5; then |
212 |
einstalldocs |
265 |
einstalldocs |
|
|
266 |
else |
267 |
local d |
268 |
for d in HACKING MAINTAINERS; do |
269 |
[[ -s "${d}" ]] && dodoc "${d}" |
270 |
done |
213 |
fi |
271 |
fi |
214 |
|
272 |
|
215 |
# Do not keep /var/lib/scrollkeeper because: |
273 |
# Do not keep /var/lib/scrollkeeper because: |