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

Diff of /eclass/gnome2.eclass

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

Revision 1.93 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.93 2011/04/21 20:59:59 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:
14 14
15case "${EAPI:-0}" in 15case "${EAPI:-0}" in
16 0|1) 16 0|1)
17 EXPORT_FUNCTIONS src_unpack src_compile src_install pkg_preinst pkg_postinst pkg_postrm 17 EXPORT_FUNCTIONS src_unpack src_compile src_install pkg_preinst pkg_postinst pkg_postrm
18 ;; 18 ;;
19 2|3) 19 2|3|4)
20 EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_install pkg_preinst pkg_postinst pkg_postrm 20 EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_install pkg_preinst pkg_postinst pkg_postrm
21 ;; 21 ;;
22 *) die "EAPI=${EAPI} is not supported" ;; 22 *) die "EAPI=${EAPI} is not supported" ;;
23esac 23esac
24 24
25# @ECLASS-VARIABLE: G2CONF 25# @ECLASS-VARIABLE: G2CONF
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
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"}
30 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
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
98 if has ${EAPI:-0} 0 1 2 3; then
88 elibtoolize ${ELTCONF} 99 elibtoolize ${ELTCONF}
100 else
101 # Everything is fatal EAPI 4 onwards
102 nonfatal elibtoolize ${ELTCONF}
103 fi
104
89} 105}
90 106
91# @FUNCTION: gnome2_src_configure 107# @FUNCTION: gnome2_src_configure
92# @DESCRIPTION: 108# @DESCRIPTION:
93# Gnome specific configure handling 109# Gnome specific configure handling
98 G2CONF="${G2CONF} --enable-debug=yes" 114 G2CONF="${G2CONF} --enable-debug=yes"
99 fi 115 fi
100 fi 116 fi
101 117
102 # Prevent a QA warning 118 # Prevent a QA warning
103 if hasq doc ${IUSE} ; then 119 if has doc ${IUSE} ; then
104 G2CONF="${G2CONF} $(use_enable doc gtk-doc)" 120 G2CONF="${G2CONF} $(use_enable doc gtk-doc)"
105 fi 121 fi
106 122
107 # Avoid sandbox violations caused by misbehaving packages (bug #128289) 123 # Pass --disable-maintainer-mode when needed
108 addwrite "/root/.gnome2" 124 if grep -q "^[[:space:]]*AM_MAINTAINER_MODE(\[enable\])" configure.*; then
125 G2CONF="${G2CONF} --disable-maintainer-mode"
126 fi
109 127
110 # 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)
111 GST_REGISTRY="${S}/registry.xml" econf "$@" ${G2CONF} 129 addwrite "$(unset HOME; echo ~)/.gnome2"
130
131 econf "$@" ${G2CONF}
112} 132}
113 133
114# @FUNCTION: gnome2_src_compile 134# @FUNCTION: gnome2_src_compile
115# @DESCRIPTION: 135# @DESCRIPTION:
116# Stub function for old EAPI. 136# Stub function for old EAPI.
120} 140}
121 141
122# @FUNCTION: gnome2_src_install 142# @FUNCTION: gnome2_src_install
123# @DESCRIPTION: 143# @DESCRIPTION:
124# Gnome specific install. Handles typical GConf and scrollkeeper setup 144# Gnome specific install. Handles typical GConf and scrollkeeper setup
125# in packages. 145# in packages and removal of .la files if requested
126gnome2_src_install() { 146gnome2_src_install() {
127 has ${EAPI:-0} 0 1 2 && ! use prefix && ED="${D}" 147 has ${EAPI:-0} 0 1 2 && ! use prefix && ED="${D}"
128 # if this is not present, scrollkeeper-update may segfault and 148 # if this is not present, scrollkeeper-update may segfault and
129 # create bogus directories in /var/lib/ 149 # create bogus directories in /var/lib/
130 local sk_tmp_dir="/var/lib/scrollkeeper" 150 local sk_tmp_dir="/var/lib/scrollkeeper"
157 fi 177 fi
158 rm -rf "${ED}${sk_tmp_dir}" 178 rm -rf "${ED}${sk_tmp_dir}"
159 179
160 # Make sure this one doesn't get in the portage db 180 # Make sure this one doesn't get in the portage db
161 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
162} 191}
163 192
164# @FUNCTION: gnome2_pkg_preinst 193# @FUNCTION: gnome2_pkg_preinst
165# @DESCRIPTION: 194# @DESCRIPTION:
166# 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.93  
changed lines
  Added in v.1.102

  ViewVC Help
Powered by ViewVC 1.1.20