/[gentoo-x86]/eclass/gnome2.eclass
Gentoo

Diff of /eclass/gnome2.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.64 Revision 1.76
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.76 2006/12/07 03:13:25 compnerd Exp $
4 4
5# GNOME 2 ECLASS 5# GNOME 2 ECLASS
6inherit libtool gnome.org debug fdo-mime eutils 6inherit libtool gnome.org debug fdo-mime eutils
7 7
8# Extra configure opts passed to econf 8# Extra configure opts passed to econf
24SCROLLKEEPER_UPDATE_BIN=${SCROLLKEEPER_UPDATE_BIN:="${ROOT}/usr/bin/scrollkeeper-update"} 24SCROLLKEEPER_UPDATE_BIN=${SCROLLKEEPER_UPDATE_BIN:="${ROOT}/usr/bin/scrollkeeper-update"}
25 25
26# Path to gconftool-2 26# Path to gconftool-2
27GCONFTOOL_BIN=${GCONFTOOL_BIN:="${ROOT}/usr/bin/gconftool-2"} 27GCONFTOOL_BIN=${GCONFTOOL_BIN:="${ROOT}/usr/bin/gconftool-2"}
28 28
29if [[ ${GCONF_DEBUG} != "no" ]]; then
29IUSE="debug" 30 IUSE="debug"
31fi
30 32
31DEPEND=">=sys-apps/sed-4 33DEPEND=">=sys-apps/sed-4"
32 sys-apps/findutils"
33 34
34gnome2_src_unpack() { 35gnome2_src_unpack() {
35 unpack ${A} 36 unpack ${A}
36 cd ${S} 37 cd ${S}
37 38
39 gnome2_omf_fix 40 gnome2_omf_fix
40} 41}
41 42
42gnome2_src_configure() { 43gnome2_src_configure() {
43 # Update the GNOME configuration options 44 # Update the GNOME configuration options
45 if [[ ${GCONF_DEBUG} != 'no' ]] ; then
46 if use debug ; then
44 use debug && G2CONF="${G2CONF} --enable-debug=yes" 47 G2CONF="${G2CONF} --enable-debug=yes"
48 fi
49 fi
50
51 # Prevent a QA warning
52 if hasq doc ${IUSE} ; then
45 G2CONF="${G2CONF} $(use_enable doc gtk-doc)" 53 G2CONF="${G2CONF} $(use_enable doc gtk-doc)"
54 fi
46 55
47 # Run libtoolize 56 # Run libtoolize
48 elibtoolize ${ELTCONF} 57 elibtoolize ${ELTCONF}
58
59 # Do not remove the addwrite. bug #128289
60 addwrite "${ROOT}/root/.gnome2"
49 61
50 # GST_REGISTRY is to work around gst-inspect trying to read/write /root 62 # GST_REGISTRY is to work around gst-inspect trying to read/write /root
51 GST_REGISTRY="${S}/registry.xml" econf "$@" ${G2CONF} || die "configure failed" 63 GST_REGISTRY="${S}/registry.xml" econf "$@" ${G2CONF} || die "configure failed"
52} 64}
53 65
64 # we must delay gconf schema installation due to sandbox 76 # we must delay gconf schema installation due to sandbox
65 export GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL="1" 77 export GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL="1"
66 78
67 debug-print "You are testing with DESTDIR by default - AllanonJL" 79 debug-print "You are testing with DESTDIR by default - AllanonJL"
68 if [[ -z "${USE_EINSTALL}" || "${USE_EINSTALL}" = "0" ]]; then 80 if [[ -z "${USE_EINSTALL}" || "${USE_EINSTALL}" = "0" ]]; then
69 make DESTDIR=${D} "$@" install || die "install failed" 81 make DESTDIR=${D} "scrollkeeper_localstate_dir=${D}${SCROLLKEEPER_DIR} " "$@" install || die "install failed"
70 else 82 else
71 einstall "scrollkeeper_localstate_dir=${D}${SCROLLKEEPER_DIR} " "$@" || die "einstall failed" 83 einstall "scrollkeeper_localstate_dir=${D}${SCROLLKEEPER_DIR} " "$@" || die "einstall failed"
72 fi 84 fi
73 85
74 unset GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL 86 unset GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL
92 rm -fr "${D}/usr/share/applications/mimeinfo.cache" 104 rm -fr "${D}/usr/share/applications/mimeinfo.cache"
93} 105}
94 106
95 107
96gnome2_gconf_install() { 108gnome2_gconf_install() {
109
97 if [[ -x ${GCONFTOOL_BIN} ]]; then 110 if [[ -x ${GCONFTOOL_BIN} ]]; then
98 # We are ready to install the GCONF Scheme now 111 # We are ready to install the GCONF Scheme now
99 unset GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL 112 unset GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL
100 export GCONF_CONFIG_SOURCE=$(${GCONFTOOL_BIN} --get-default-source) 113 export GCONF_CONFIG_SOURCE=$(${GCONFTOOL_BIN} --get-default-source)
101 114
102 einfo "Installing GNOME 2 GConf schemas" 115 einfo "Installing GNOME 2 GConf schemas"
103 116
104 local contents="${ROOT}/var/db/pkg/*/${PN}-${PVR}/CONTENTS" 117 local contents="${ROOT}/var/db/pkg/*/${PN}-${PVR}/CONTENTS"
105 118
106 for F in $(grep "obj /etc/gconf/schemas" ${contents} | sed 's:obj \([^ ]*\) .*:\1:' ); do 119 for F in $(grep "^obj /etc/gconf/schemas/.\+\.schemas\b" ${contents} | gawk '{print $2}' ); do
107 if [[ -e "${F}" ]]; then 120 if [[ -e "${F}" ]]; then
108 # echo "DEBUG::gconf install ${F}" 121 # echo "DEBUG::gconf install ${F}"
109 ${GCONFTOOL_BIN} --makefile-install-rule ${F} 1>/dev/null 122 ${GCONFTOOL_BIN} --makefile-install-rule ${F} 1>/dev/null
110 fi 123 fi
111 done 124 done
125
126 # have gconf reload the new schemas
127 ebegin "Reloading GConf schemas"
128 killall -HUP gconfd-2
129 eend $?
112 fi 130 fi
131
113} 132}
114 133
115gnome2_gconf_uninstall() { 134gnome2_gconf_uninstall() {
116 if [[ -x ${GCONFTOOL_BIN} ]]; then 135 if [[ -x ${GCONFTOOL_BIN} ]]; then
117 unset GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL 136 unset GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL
175 done 194 done
176 195
177 eend ${retval} 196 eend ${retval}
178 197
179 for (( i = 0 ; i < ${#fails[@]} ; i++ )) ; do 198 for (( i = 0 ; i < ${#fails[@]} ; i++ )) ; do
199 ### HACK!! This is needed until bash 3.1 is unmasked.
200 ## The current stable version of bash lists the sizeof fails to be 1
201 ## when there are no elements in the list because it is declared local.
202 ## In order to prevent the declaration from being in global scope, we
203 ## this hack to prevent an empty error message being printed for stable
204 ## users. -- compnerd && allanonjl
205 if [[ "${fails[i]}" != "" && "${fails[i]}" != "()" ]] ; then
180 eerror "Failed to update cache with icon ${fails[i]}" 206 eerror "Failed to update cache with icon ${fails[i]}"
207 fi
181 done 208 done
182} 209}
183 210
184gnome2_omf_fix() { 211gnome2_omf_fix() {
185 # workaround/patch against omf.make or omf-install/Makefile.in 212 # workaround/patch against omf.make or omf-install/Makefile.in
204 231
205 # testing fixing of all makefiles found 232 # testing fixing of all makefiles found
206 for filename in $(find ./ -name "Makefile.in" -o -name "Makefile.am") ; do 233 for filename in $(find ./ -name "Makefile.in" -o -name "Makefile.am") ; do
207 omf_makefiles="${omf_makefiles} ${filename}" 234 omf_makefiles="${omf_makefiles} ${filename}"
208 done 235 done
209 236
210 ebegin "Fixing OMF Makefiles" 237 ebegin "Fixing OMF Makefiles"
211 238
212 local retval=0 239 local retval=0
213 local fails=( ) 240 local fails=( )
214 241
229 done 256 done
230 257
231 eend $retval 258 eend $retval
232 259
233 for (( i = 0 ; i < ${#fails[@]} ; i++ )) ; do 260 for (( i = 0 ; i < ${#fails[@]} ; i++ )) ; do
261 ### HACK!! This is needed until bash 3.1 is unmasked.
262 ## The current stable version of bash lists the sizeof fails to be 1
263 ## when there are no elements in the list because it is declared local.
264 ## In order to prevent the declaration from being in global scope, we
265 ## this hack to prevent an empty error message being printed for stable
266 ## users. -- compnerd && allanonjl
267 if [[ "${fails[i]}" != "" && "${fails[i]}" != "()" ]] ; then
234 eerror "Failed to update OMF Makefile ${fails[i]}" 268 eerror "Failed to update OMF Makefile ${fails[i]}"
269 fi
235 done 270 done
236} 271}
237 272
238gnome2_scrollkeeper_update() { 273gnome2_scrollkeeper_update() {
239 if [[ -x ${SCROLLKEEPER_UPDATE_BIN} && "${SCROLLKEEPER_UPDATE}" = "1" ]] 274 if [[ -x ${SCROLLKEEPER_UPDATE_BIN} && "${SCROLLKEEPER_UPDATE}" = "1" ]]

Legend:
Removed from v.1.64  
changed lines
  Added in v.1.76

  ViewVC Help
Powered by ViewVC 1.1.20