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

Diff of /eclass/gnome2.eclass

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

Revision 1.94 Revision 1.102
1# Copyright 1999-2011 Gentoo Foundation 1# Copyright 1999-2011 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.94 2011/04/21 21:06:15 eva Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/gnome2.eclass,v 1.102 2011/09/25 15:15:21 pacho Exp $
4 4
5# @ECLASS: gnome2.eclass 5# @ECLASS: gnome2.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# gnome@gentoo.org 7# gnome@gentoo.org
8# @BLURB: 8# @BLURB:
26# @DEFAULT-UNSET 26# @DEFAULT-UNSET
27# @DESCRIPTION: 27# @DESCRIPTION:
28# Extra configure opts passed to econf 28# Extra configure opts passed to econf
29G2CONF=${G2CONF:-""} 29G2CONF=${G2CONF:-""}
30 30
31# @ECLASS-VARIABLE: GNOME2_LA_PUNT
32# @DESCRIPTION:
33# Should we delete all the .la files?
34# NOT to be used without due consideration.
35GNOME2_LA_PUNT=${GNOME2_LA_PUNT:-"no"}
36
31# @ECLASS-VARIABLE: ELTCONF 37# @ECLASS-VARIABLE: ELTCONF
32# @DEFAULT-UNSET 38# @DEFAULT-UNSET
33# @DESCRIPTION: 39# @DESCRIPTION:
34# Extra options passed to elibtoolize 40# Extra options passed to elibtoolize
35ELTCONF=${ELTCONF:-""} 41ELTCONF=${ELTCONF:-""}
77 has ${EAPI:-0} 0 1 && gnome2_src_prepare 83 has ${EAPI:-0} 0 1 && gnome2_src_prepare
78} 84}
79 85
80# @FUNCTION: gnome2_src_prepare 86# @FUNCTION: gnome2_src_prepare
81# @DESCRIPTION: 87# @DESCRIPTION:
82# Fix build of scrollkeeper documentation and run elibtoolize. 88# Prepare environment for build, fix build of scrollkeeper documentation,
89# run elibtoolize.
83gnome2_src_prepare() { 90gnome2_src_prepare() {
91 # GST_REGISTRY is to work around gst utilities trying to read/write /root
92 export GST_REGISTRY="${T}/registry.xml"
93
84 # Prevent scrollkeeper access violations 94 # Prevent scrollkeeper access violations
85 gnome2_omf_fix 95 gnome2_omf_fix
86 96
87 # Run libtoolize 97 # Run libtoolize
88 if has ${EAPI:-0} 0 1 2 3; then 98 if has ${EAPI:-0} 0 1 2 3; then
104 G2CONF="${G2CONF} --enable-debug=yes" 114 G2CONF="${G2CONF} --enable-debug=yes"
105 fi 115 fi
106 fi 116 fi
107 117
108 # Prevent a QA warning 118 # Prevent a QA warning
109 if hasq doc ${IUSE} ; then 119 if has doc ${IUSE} ; then
110 G2CONF="${G2CONF} $(use_enable doc gtk-doc)" 120 G2CONF="${G2CONF} $(use_enable doc gtk-doc)"
111 fi 121 fi
112 122
113 # Avoid sandbox violations caused by misbehaving packages (bug #128289) 123 # Pass --disable-maintainer-mode when needed
114 addwrite "/root/.gnome2" 124 if grep -q "^[[:space:]]*AM_MAINTAINER_MODE(\[enable\])" configure.*; then
125 G2CONF="${G2CONF} --disable-maintainer-mode"
126 fi
115 127
116 # GST_REGISTRY is to work around gst-inspect trying to read/write /root 128 # Avoid sandbox violations caused by gnome-vfs (bug #128289 and #345659)
117 GST_REGISTRY="${S}/registry.xml" econf "$@" ${G2CONF} 129 addwrite "$(unset HOME; echo ~)/.gnome2"
130
131 econf "$@" ${G2CONF}
118} 132}
119 133
120# @FUNCTION: gnome2_src_compile 134# @FUNCTION: gnome2_src_compile
121# @DESCRIPTION: 135# @DESCRIPTION:
122# Stub function for old EAPI. 136# Stub function for old EAPI.
126} 140}
127 141
128# @FUNCTION: gnome2_src_install 142# @FUNCTION: gnome2_src_install
129# @DESCRIPTION: 143# @DESCRIPTION:
130# Gnome specific install. Handles typical GConf and scrollkeeper setup 144# Gnome specific install. Handles typical GConf and scrollkeeper setup
131# in packages. 145# in packages and removal of .la files if requested
132gnome2_src_install() { 146gnome2_src_install() {
133 has ${EAPI:-0} 0 1 2 && ! use prefix && ED="${D}" 147 has ${EAPI:-0} 0 1 2 && ! use prefix && ED="${D}"
134 # if this is not present, scrollkeeper-update may segfault and 148 # if this is not present, scrollkeeper-update may segfault and
135 # create bogus directories in /var/lib/ 149 # create bogus directories in /var/lib/
136 local sk_tmp_dir="/var/lib/scrollkeeper" 150 local sk_tmp_dir="/var/lib/scrollkeeper"
163 fi 177 fi
164 rm -rf "${ED}${sk_tmp_dir}" 178 rm -rf "${ED}${sk_tmp_dir}"
165 179
166 # Make sure this one doesn't get in the portage db 180 # Make sure this one doesn't get in the portage db
167 rm -fr "${ED}/usr/share/applications/mimeinfo.cache" 181 rm -fr "${ED}/usr/share/applications/mimeinfo.cache"
182
183 # Delete all .la files
184 if [[ "${GNOME2_LA_PUNT}" != "no" ]]; then
185 ebegin "Removing .la files"
186 if ! { has static-libs ${IUSE//+} && use static-libs; }; then
187 find "${D}" -name '*.la' -exec rm -f {} + || die "la file removal failed"
188 fi
189 eend
190 fi
168} 191}
169 192
170# @FUNCTION: gnome2_pkg_preinst 193# @FUNCTION: gnome2_pkg_preinst
171# @DESCRIPTION: 194# @DESCRIPTION:
172# Finds Icons, GConf and GSettings schemas for later handling in pkg_postinst 195# Finds Icons, GConf and GSettings schemas for later handling in pkg_postinst

Legend:
Removed from v.1.94  
changed lines
  Added in v.1.102

  ViewVC Help
Powered by ViewVC 1.1.20