| 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.1 2009/08/01 20:08:30 ssuominen Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/xfconf.eclass,v 1.7 2010/01/23 17:36:34 angelos 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 |
| … | |
… | |
| 29 | # @DESCRIPTION: |
29 | # @DESCRIPTION: |
| 30 | # Define options for econf |
30 | # Define options for econf |
| 31 | |
31 | |
| 32 | inherit autotools base fdo-mime gnome2-utils libtool |
32 | inherit autotools base fdo-mime gnome2-utils libtool |
| 33 | |
33 | |
|
|
34 | if ! [[ ${MY_P} ]]; then |
| 34 | MY_P=${P} |
35 | MY_P=${P} |
|
|
36 | else |
|
|
37 | S=${WORKDIR}/${MY_P} |
|
|
38 | fi |
|
|
39 | |
| 35 | SRC_URI="mirror://xfce/xfce-${PV}/src/${MY_P}.tar.bz2" |
40 | SRC_URI="mirror://xfce/xfce/${PV}/src/${MY_P}.tar.bz2" |
| 36 | |
41 | |
| 37 | if [[ "${EINTLTOOLIZE}" == "yes" ]]; then |
42 | if [[ "${EINTLTOOLIZE}" == "yes" ]]; then |
| 38 | _xfce4_intltool="dev-util/intltool" |
43 | _xfce4_intltool="dev-util/intltool" |
| 39 | fi |
44 | fi |
| 40 | |
45 | |
| … | |
… | |
| 47 | ${_xfce4_m4}" |
52 | ${_xfce4_m4}" |
| 48 | |
53 | |
| 49 | unset _xfce4_intltool |
54 | unset _xfce4_intltool |
| 50 | unset _xfce4_m4 |
55 | unset _xfce4_m4 |
| 51 | |
56 | |
| 52 | EXPF="src_unpack src_compile src_install pkg_preinst pkg_postinst pkg_postrm" |
57 | XFCONF_EXPF="src_unpack src_compile src_install pkg_preinst pkg_postinst pkg_postrm" |
| 53 | case ${EAPI:-0} in |
58 | case ${EAPI:-0} in |
| 54 | 2) EXPF="${EXPF} src_prepare src_configure" ;; |
59 | 3|2) XFCONF_EXPF="${XFCONF_EXPF} src_prepare src_configure" ;; |
| 55 | 1|0) ;; |
60 | 1|0) ;; |
| 56 | *) die "Unknown EAPI." ;; |
61 | *) die "Unknown EAPI." ;; |
| 57 | esac |
62 | esac |
| 58 | EXPORT_FUNCTIONS ${EXPF} |
63 | EXPORT_FUNCTIONS ${XFCONF_EXPF} |
| 59 | |
64 | |
| 60 | # @FUNCTION: xfconf_src_unpack |
65 | # @FUNCTION: xfconf_src_unpack |
| 61 | # @DESCRIPTION: |
66 | # @DESCRIPTION: |
| 62 | # Run base_src_util autopatch and eautoreconf or elibtoolize |
67 | # Run base_src_util autopatch and eautoreconf or elibtoolize |
| 63 | xfconf_src_unpack() { |
68 | xfconf_src_unpack() { |
| 64 | unpack ${A} |
69 | unpack ${A} |
| 65 | cd "${S}" |
70 | cd "${S}" |
| 66 | has src_prepare ${EXPF} || xfconf_src_prepare |
71 | has src_prepare ${XFCONF_EXPF} || xfconf_src_prepare |
| 67 | } |
72 | } |
| 68 | |
73 | |
| 69 | # @FUNCTION: xfconf_src_prepare |
74 | # @FUNCTION: xfconf_src_prepare |
| 70 | # @DESCRIPTION: |
75 | # @DESCRIPTION: |
| 71 | # Run base_src_util autopatch and eautoreconf or elibtoolize |
76 | # Run base_src_util autopatch and eautoreconf or elibtoolize |
| 72 | xfconf_src_prepare() { |
77 | xfconf_src_prepare() { |
| 73 | base_src_util autopatch |
78 | base_src_prepare |
| 74 | |
79 | |
| 75 | if [[ "${EINTLTOOLIZE}" == "yes" ]]; then |
80 | if [[ "${EINTLTOOLIZE}" == "yes" ]]; then |
| 76 | intltoolize --force --copy --automake || die "intltoolize failed" |
81 | intltoolize --force --copy --automake || die "intltoolize failed" |
| 77 | fi |
82 | fi |
| 78 | |
83 | |
| … | |
… | |
| 92 | |
97 | |
| 93 | # @FUNCTION: xfconf_src_compile |
98 | # @FUNCTION: xfconf_src_compile |
| 94 | # @DESCRIPTION: |
99 | # @DESCRIPTION: |
| 95 | # Run econf with opts in XFCONF variable |
100 | # Run econf with opts in XFCONF variable |
| 96 | xfconf_src_compile() { |
101 | xfconf_src_compile() { |
| 97 | has src_configure ${EXPF} || xfconf_src_configure |
102 | has src_configure ${XFCONF_EXPF} || xfconf_src_configure |
| 98 | emake || die "emake failed" |
103 | emake || die "emake failed" |
| 99 | } |
104 | } |
| 100 | |
105 | |
| 101 | # @FUNCTION: xfconf_src_install |
106 | # @FUNCTION: xfconf_src_install |
| 102 | # @DESCRIPTION: |
107 | # @DESCRIPTION: |