| 1 | # Copyright 1999-2009 Gentoo Foundation |
1 | # Copyright 1999-2009 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/xfconf.eclass,v 1.21 2011/01/27 17:32:49 ssuominen Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/xfconf.eclass,v 1.22 2011/02/04 17:23:35 ssuominen Exp $ |
| 4 | |
4 | |
| 5 | # @ECLASS: xfconf.eclass |
5 | # @ECLASS: xfconf.eclass |
| 6 | # @MAINTAINER: |
6 | # @MAINTAINER: |
| 7 | # XFCE maintainers <xfce@gentoo.org> |
7 | # XFCE maintainers <xfce@gentoo.org> |
| 8 | # @BLURB: Default XFCE ebuild layout |
8 | # @BLURB: Default XFCE ebuild layout |
| … | |
… | |
| 98 | xfconf_src_prepare() { |
98 | xfconf_src_prepare() { |
| 99 | debug-print-function ${FUNCNAME} "$@" |
99 | debug-print-function ${FUNCNAME} "$@" |
| 100 | base_src_prepare |
100 | base_src_prepare |
| 101 | |
101 | |
| 102 | if [[ "${EINTLTOOLIZE}" == "yes" ]]; then |
102 | if [[ "${EINTLTOOLIZE}" == "yes" ]]; then |
| 103 | intltoolize --force --copy --automake || die "intltoolize failed" |
103 | intltoolize --force --copy --automake || die |
| 104 | fi |
104 | fi |
| 105 | |
105 | |
| 106 | if [[ "${EAUTORECONF}" == "yes" ]]; then |
106 | if [[ "${EAUTORECONF}" == "yes" ]]; then |
| 107 | has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX= |
107 | has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX= |
| 108 | AT_M4DIR="${EPREFIX}/usr/share/xfce4/dev-tools/m4macros" eautoreconf |
108 | AT_M4DIR="${EPREFIX}/usr/share/xfce4/dev-tools/m4macros" eautoreconf |
| … | |
… | |
| 119 | |
119 | |
| 120 | # Convert XFCONF to an array, see base.eclass for original code |
120 | # Convert XFCONF to an array, see base.eclass for original code |
| 121 | if [[ "$(declare -p XFCONF 2>/dev/null 2>&1)" != "declare -a"* ]]; then |
121 | if [[ "$(declare -p XFCONF 2>/dev/null 2>&1)" != "declare -a"* ]]; then |
| 122 | XFCONF=( ${XFCONF} ) |
122 | XFCONF=( ${XFCONF} ) |
| 123 | fi |
123 | fi |
| 124 | |
124 | |
| 125 | econf ${XFCONF[@]} |
125 | econf ${XFCONF[@]} |
| 126 | } |
126 | } |
| 127 | |
127 | |
| 128 | # @FUNCTION: xfconf_src_compile |
128 | # @FUNCTION: xfconf_src_compile |
| 129 | # @DESCRIPTION: |
129 | # @DESCRIPTION: |
| 130 | # Run econf with opts in XFCONF variable |
130 | # Run econf with opts in XFCONF variable |
| 131 | xfconf_src_compile() { |
131 | xfconf_src_compile() { |
| 132 | debug-print-function ${FUNCNAME} "$@" |
132 | debug-print-function ${FUNCNAME} "$@" |
| 133 | has src_configure ${XFCONF_EXPF} || xfconf_src_configure |
133 | has src_configure ${XFCONF_EXPF} || xfconf_src_configure |
| 134 | emake || die "emake failed" |
134 | emake || die |
| 135 | } |
135 | } |
| 136 | |
136 | |
| 137 | # @FUNCTION: xfconf_src_install |
137 | # @FUNCTION: xfconf_src_install |
| 138 | # @DESCRIPTION: |
138 | # @DESCRIPTION: |
| 139 | # Run emake install and install documentation in DOCS variable |
139 | # Run emake install and install documentation in DOCS variable |
| 140 | xfconf_src_install() { |
140 | xfconf_src_install() { |
| 141 | debug-print-function ${FUNCNAME} "$@" |
141 | debug-print-function ${FUNCNAME} "$@" |
| 142 | emake DESTDIR="${D}" "$@" install || die "emake install failed" |
142 | emake DESTDIR="${D}" "$@" install || die |
| 143 | |
143 | |
| 144 | if [[ -n ${DOCS} ]]; then |
144 | if [[ -n ${DOCS} ]]; then |
| 145 | dodoc ${DOCS} || die "dodoc failed" |
145 | dodoc ${DOCS} || die |
| 146 | fi |
146 | fi |
| 147 | |
147 | |
| 148 | has "${EAPI:-0}" 0 1 2 && ! use prefix && ED="${D}" |
148 | has "${EAPI:-0}" 0 1 2 && ! use prefix && ED="${D}" |
| 149 | find "${ED}" -name '*.la' -exec rm -f {} + |
149 | find "${ED}" -name '*.la' -exec rm -f {} + |
| 150 | |
150 | |