| 1 | # Copyright 1999-2004 Gentoo Foundation |
1 | # Copyright 1999-2004 Gentoo Foundation |
| 2 | # Distributed under the terms of the GNU General Public License v2 |
2 | # Distributed under the terms of the GNU General Public License v2 |
| 3 | # $Header: /var/cvsroot/gentoo-x86/eclass/gnome2.eclass,v 1.64 2006/03/17 14:43:32 allanonjl Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/gnome2.eclass,v 1.67 2006/03/28 20:59:57 compnerd Exp $ |
| 4 | |
4 | |
| 5 | # GNOME 2 ECLASS |
5 | # GNOME 2 ECLASS |
| 6 | inherit libtool gnome.org debug fdo-mime eutils |
6 | inherit libtool gnome.org debug fdo-mime eutils |
| 7 | |
7 | |
| 8 | # Extra configure opts passed to econf |
8 | # Extra configure opts passed to econf |
| … | |
… | |
| 64 | # we must delay gconf schema installation due to sandbox |
64 | # we must delay gconf schema installation due to sandbox |
| 65 | export GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL="1" |
65 | export GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL="1" |
| 66 | |
66 | |
| 67 | debug-print "You are testing with DESTDIR by default - AllanonJL" |
67 | debug-print "You are testing with DESTDIR by default - AllanonJL" |
| 68 | if [[ -z "${USE_EINSTALL}" || "${USE_EINSTALL}" = "0" ]]; then |
68 | if [[ -z "${USE_EINSTALL}" || "${USE_EINSTALL}" = "0" ]]; then |
| 69 | make DESTDIR=${D} "$@" install || die "install failed" |
69 | make DESTDIR=${D} "scrollkeeper_localstate_dir=${D}${SCROLLKEEPER_DIR} " "$@" install || die "install failed" |
| 70 | else |
70 | else |
| 71 | einstall "scrollkeeper_localstate_dir=${D}${SCROLLKEEPER_DIR} " "$@" || die "einstall failed" |
71 | einstall "scrollkeeper_localstate_dir=${D}${SCROLLKEEPER_DIR} " "$@" || die "einstall failed" |
| 72 | fi |
72 | fi |
| 73 | |
73 | |
| 74 | unset GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL |
74 | unset GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL |
| … | |
… | |
| 175 | done |
175 | done |
| 176 | |
176 | |
| 177 | eend ${retval} |
177 | eend ${retval} |
| 178 | |
178 | |
| 179 | for (( i = 0 ; i < ${#fails[@]} ; i++ )) ; do |
179 | for (( i = 0 ; i < ${#fails[@]} ; i++ )) ; do |
|
|
180 | ### HACK!! This is needed until bash 3.1 is unmasked. |
|
|
181 | ## The current stable version of bash lists the sizeof fails to be 1 |
|
|
182 | ## when there are no elements in the list because it is declared local. |
|
|
183 | ## In order to prevent the declaration from being in global scope, we |
|
|
184 | ## this hack to prevent an empty error message being printed for stable |
|
|
185 | ## users. -- compnerd && allanonjl |
|
|
186 | if [[ "${fails[i]}" != "" ]] ; then |
| 180 | eerror "Failed to update cache with icon ${fails[i]}" |
187 | eerror "Failed to update cache with icon ${fails[i]}" |
|
|
188 | fi |
| 181 | done |
189 | done |
| 182 | } |
190 | } |
| 183 | |
191 | |
| 184 | gnome2_omf_fix() { |
192 | gnome2_omf_fix() { |
| 185 | # workaround/patch against omf.make or omf-install/Makefile.in |
193 | # workaround/patch against omf.make or omf-install/Makefile.in |
| … | |
… | |
| 204 | |
212 | |
| 205 | # testing fixing of all makefiles found |
213 | # testing fixing of all makefiles found |
| 206 | for filename in $(find ./ -name "Makefile.in" -o -name "Makefile.am") ; do |
214 | for filename in $(find ./ -name "Makefile.in" -o -name "Makefile.am") ; do |
| 207 | omf_makefiles="${omf_makefiles} ${filename}" |
215 | omf_makefiles="${omf_makefiles} ${filename}" |
| 208 | done |
216 | done |
| 209 | |
217 | |
| 210 | ebegin "Fixing OMF Makefiles" |
218 | ebegin "Fixing OMF Makefiles" |
| 211 | |
219 | |
| 212 | local retval=0 |
220 | local retval=0 |
| 213 | local fails=( ) |
221 | local fails=( ) |
| 214 | |
222 | |
| … | |
… | |
| 229 | done |
237 | done |
| 230 | |
238 | |
| 231 | eend $retval |
239 | eend $retval |
| 232 | |
240 | |
| 233 | for (( i = 0 ; i < ${#fails[@]} ; i++ )) ; do |
241 | for (( i = 0 ; i < ${#fails[@]} ; i++ )) ; do |
|
|
242 | ### HACK!! This is needed until bash 3.1 is unmasked. |
|
|
243 | ## The current stable version of bash lists the sizeof fails to be 1 |
|
|
244 | ## when there are no elements in the list because it is declared local. |
|
|
245 | ## In order to prevent the declaration from being in global scope, we |
|
|
246 | ## this hack to prevent an empty error message being printed for stable |
|
|
247 | ## users. -- compnerd && allanonjl |
|
|
248 | if [[ "${fails[i]}" != "" ]] ; then |
| 234 | eerror "Failed to update OMF Makefile ${fails[i]}" |
249 | eerror "Failed to update OMF Makefile ${fails[i]}" |
|
|
250 | fi |
| 235 | done |
251 | done |
| 236 | } |
252 | } |
| 237 | |
253 | |
| 238 | gnome2_scrollkeeper_update() { |
254 | gnome2_scrollkeeper_update() { |
| 239 | if [[ -x ${SCROLLKEEPER_UPDATE_BIN} && "${SCROLLKEEPER_UPDATE}" = "1" ]] |
255 | if [[ -x ${SCROLLKEEPER_UPDATE_BIN} && "${SCROLLKEEPER_UPDATE}" = "1" ]] |