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

Diff of /eclass/gnome2.eclass

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

Revision 1.130 Revision 1.131
1# Copyright 1999-2015 Gentoo Foundation 1# Copyright 1999-2015 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.130 2015/02/23 10:59:44 pacho Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/gnome2.eclass,v 1.131 2015/04/18 13:19:47 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: Provides phases for Gnome/Gtk+ based packages. 8# @BLURB: Provides phases for Gnome/Gtk+ based packages.
11# GNOME framework. For additional functions, see gnome2-utils.eclass. 11# GNOME framework. For additional functions, see gnome2-utils.eclass.
12 12
13inherit eutils fdo-mime libtool gnome.org gnome2-utils 13inherit eutils fdo-mime libtool gnome.org gnome2-utils
14 14
15case "${EAPI:-0}" in 15case "${EAPI:-0}" in
16 2|3)
17 eqawarn
18 eqawarn "${CATEGORY}/${PF}: EAPI 2/3 support is now deprecated."
19 eqawarn "If you are the package maintainer, please"
20 eqawarn "update this package to a newer EAPI."
21 eqawarn "Support for EAPIs 2 and 3 for gnome2.eclass will be dropped"
22 eqawarn "in a month (around 23rd March)."
23 eqawarn
24 EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_install pkg_preinst pkg_postinst pkg_postrm
25 ;;
26 4|5) 16 4|5)
27 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
28 ;; 18 ;;
29 *) die "EAPI=${EAPI} is not supported" ;; 19 *) die "EAPI=${EAPI} is not supported" ;;
30esac 20esac
37 27
38# @ECLASS-VARIABLE: GNOME2_LA_PUNT 28# @ECLASS-VARIABLE: GNOME2_LA_PUNT
39# @DESCRIPTION: 29# @DESCRIPTION:
40# Should we delete ALL the .la files? 30# Should we delete ALL the .la files?
41# NOT to be used without due consideration. 31# NOT to be used without due consideration.
42if has ${EAPI:-0} 2 3 4; then 32if has ${EAPI:-0} 4; then
43 GNOME2_LA_PUNT=${GNOME2_LA_PUNT:-"no"} 33 GNOME2_LA_PUNT=${GNOME2_LA_PUNT:-"no"}
44else 34else
45 GNOME2_LA_PUNT=${GNOME2_LA_PUNT:-""} 35 GNOME2_LA_PUNT=${GNOME2_LA_PUNT:-""}
46fi 36fi
47 37
92 82
93 # Disable all deprecation warnings 83 # Disable all deprecation warnings
94 gnome2_disable_deprecation_warning 84 gnome2_disable_deprecation_warning
95 85
96 # Run libtoolize 86 # Run libtoolize
97 if has ${EAPI:-0} 2 3; then
98 elibtoolize ${ELTCONF}
99 else
100 # Everything is fatal EAPI 4 onwards 87 # Everything is fatal EAPI 4 onwards
101 nonfatal elibtoolize ${ELTCONF} 88 nonfatal elibtoolize ${ELTCONF}
102 fi
103
104} 89}
105 90
106# @FUNCTION: gnome2_src_configure 91# @FUNCTION: gnome2_src_configure
107# @DESCRIPTION: 92# @DESCRIPTION:
108# Gnome specific configure handling 93# Gnome specific configure handling
120 # This decision also greatly helps with constantly broken doc generation. 105 # This decision also greatly helps with constantly broken doc generation.
121 # Remember to drop 'doc' USE flag from your package if it was only used to 106 # Remember to drop 'doc' USE flag from your package if it was only used to
122 # rebuild docs. 107 # rebuild docs.
123 # Preserve old behavior for older EAPI. 108 # Preserve old behavior for older EAPI.
124 if grep -q "enable-gtk-doc" "${ECONF_SOURCE:-.}"/configure ; then 109 if grep -q "enable-gtk-doc" "${ECONF_SOURCE:-.}"/configure ; then
125 if has ${EAPI:-0} 2 3 4 && in_iuse doc ; then 110 if has ${EAPI:-0} 4 && in_iuse doc ; then
126 G2CONF="$(use_enable doc gtk-doc) ${G2CONF}" 111 G2CONF="$(use_enable doc gtk-doc) ${G2CONF}"
127 else 112 else
128 G2CONF="--disable-gtk-doc ${G2CONF}" 113 G2CONF="--disable-gtk-doc ${G2CONF}"
129 fi 114 fi
130 fi 115 fi
139 if grep -q "disable-scrollkeeper" "${ECONF_SOURCE:-.}"/configure; then 124 if grep -q "disable-scrollkeeper" "${ECONF_SOURCE:-.}"/configure; then
140 G2CONF="--disable-scrollkeeper ${G2CONF}" 125 G2CONF="--disable-scrollkeeper ${G2CONF}"
141 fi 126 fi
142 127
143 # Pass --disable-silent-rules when possible (not needed for eapi5), bug #429308 128 # Pass --disable-silent-rules when possible (not needed for eapi5), bug #429308
144 if has ${EAPI:-0} 2 3 4; then 129 if has ${EAPI:-0} 4; then
145 if grep -q "disable-silent-rules" "${ECONF_SOURCE:-.}"/configure; then 130 if grep -q "disable-silent-rules" "${ECONF_SOURCE:-.}"/configure; then
146 G2CONF="--disable-silent-rules ${G2CONF}" 131 G2CONF="--disable-silent-rules ${G2CONF}"
147 fi 132 fi
148 fi 133 fi
149 134
175 160
176# @FUNCTION: gnome2_src_compile 161# @FUNCTION: gnome2_src_compile
177# @DESCRIPTION: 162# @DESCRIPTION:
178# Only default src_compile for now 163# Only default src_compile for now
179gnome2_src_compile() { 164gnome2_src_compile() {
180 emake || die "compile failure" 165 emake
181} 166}
182 167
183# @FUNCTION: gnome2_src_install 168# @FUNCTION: gnome2_src_install
184# @DESCRIPTION: 169# @DESCRIPTION:
185# Gnome specific install. Handles typical GConf and scrollkeeper setup 170# Gnome specific install. Handles typical GConf and scrollkeeper setup
186# in packages and removal of .la files if requested 171# in packages and removal of .la files if requested
187gnome2_src_install() { 172gnome2_src_install() {
188 has ${EAPI:-0} 2 && ! use prefix && ED="${D}"
189 # if this is not present, scrollkeeper-update may segfault and 173 # if this is not present, scrollkeeper-update may segfault and
190 # create bogus directories in /var/lib/ 174 # create bogus directories in /var/lib/
191 local sk_tmp_dir="/var/lib/scrollkeeper" 175 local sk_tmp_dir="/var/lib/scrollkeeper"
192 dodir "${sk_tmp_dir}" || die "dodir failed" 176 dodir "${sk_tmp_dir}" || die "dodir failed"
193 177
198 emake DESTDIR="${D}" "scrollkeeper_localstate_dir=${ED}${sk_tmp_dir} " "$@" install || die "install failed" 182 emake DESTDIR="${D}" "scrollkeeper_localstate_dir=${ED}${sk_tmp_dir} " "$@" install || die "install failed"
199 183
200 unset GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL 184 unset GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL
201 185
202 # Handle documentation as 'default' for eapi5 and newer, bug #373131 186 # Handle documentation as 'default' for eapi5 and newer, bug #373131
203 if has ${EAPI:-0} 2 3 4; then 187 if has ${EAPI:-0} 4; then
204 # Manual document installation 188 # Manual document installation
205 if [[ -n "${DOCS}" ]]; then 189 if [[ -n "${DOCS}" ]]; then
206 dodoc ${DOCS} || die "dodoc failed" 190 dodoc ${DOCS} || die "dodoc failed"
207 fi 191 fi
208 else 192 else
219 203
220 # Make sure this one doesn't get in the portage db 204 # Make sure this one doesn't get in the portage db
221 rm -fr "${ED}/usr/share/applications/mimeinfo.cache" 205 rm -fr "${ED}/usr/share/applications/mimeinfo.cache"
222 206
223 # Delete all .la files 207 # Delete all .la files
224 if has ${EAPI:-0} 2 3 4; then 208 if has ${EAPI:-0} 4; then
225 if [[ "${GNOME2_LA_PUNT}" != "no" ]]; then 209 if [[ "${GNOME2_LA_PUNT}" != "no" ]]; then
226 ebegin "Removing .la files" 210 ebegin "Removing .la files"
227 if ! use_if_iuse static-libs ; then 211 if ! use_if_iuse static-libs ; then
228 find "${D}" -name '*.la' -exec rm -f {} + || die "la file removal failed" 212 find "${D}" -name '*.la' -exec rm -f {} + || die "la file removal failed"
229 fi 213 fi

Legend:
Removed from v.1.130  
changed lines
  Added in v.1.131

  ViewVC Help
Powered by ViewVC 1.1.20