| 1 | # Copyright 2008 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/gpe.eclass,v 1.2 2009/06/05 22:53:46 miknix Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/gpe.eclass,v 1.3 2011/08/22 04:46:32 vapier Exp $ |
| 4 | # |
4 | |
| 5 | # @ECLASS: gpe.eclass |
5 | # @ECLASS: gpe.eclass |
| 6 | # @MAINTAINER: <gpe@gentoo.org> |
6 | # @MAINTAINER: |
| 7 | # |
7 | # gpe@gentoo.org |
|
|
8 | # @AUTHOR: |
| 8 | # Original Authors: |
9 | # Original Authors: |
| 9 | # Rene Wagner <rw@handhelds.org> |
10 | # Rene Wagner <rw@handhelds.org> |
| 10 | # Ned Ludd <solar@gentoo.org> |
11 | # Ned Ludd <solar@gentoo.org> |
| 11 | # Angelo Arrifano <miknix@gentoo.org> |
12 | # Angelo Arrifano <miknix@gentoo.org> |
| 12 | # |
13 | # EAPI->EAPI2 patch: loki_val |
|
|
14 | # multiple suggestions: Betelgeuse |
|
|
15 | # Based on gnome2.eclass and gpe.bbclass (the latter from OpenEmbedded) |
| 13 | # @BLURB: Provides common functionality for the G Palmtop Environment. |
16 | # @BLURB: Provides common functionality for the G Palmtop Environment. |
| 14 | # @DESCRIPTION: Provides common functionality for the G Palmtop Environment. |
|
|
| 15 | # |
|
|
| 16 | # Thanks to: |
|
|
| 17 | # loki_val for EAPI->EAPI2 patch |
|
|
| 18 | # Betelgeuse for multiple suggestions. |
|
|
| 19 | # |
|
|
| 20 | # Based on: |
|
|
| 21 | # gnome2.eclass and gpe.bbclass (the latter from OpenEmbedded) |
|
|
| 22 | |
17 | |
| 23 | inherit libtool toolchain-funcs |
18 | inherit libtool toolchain-funcs |
| 24 | |
19 | |
| 25 | case "${EAPI:-0}" in |
20 | case "${EAPI:-0}" in |
| 26 | 0|1) |
21 | 0|1) |
| … | |
… | |
| 54 | DEPEND=" |
49 | DEPEND=" |
| 55 | >=dev-util/intltool-0.29 |
50 | >=dev-util/intltool-0.29 |
| 56 | >=dev-util/pkgconfig-0.12.0" |
51 | >=dev-util/pkgconfig-0.12.0" |
| 57 | |
52 | |
| 58 | # @FUNCTION: gpe_src_unpack |
53 | # @FUNCTION: gpe_src_unpack |
|
|
54 | # @DESCRIPTION: |
| 59 | # @DESCRIPTION: Unpacks and applies some required patches for GPE. |
55 | # Unpacks and applies some required patches for GPE. |
| 60 | gpe_src_unpack() { |
56 | gpe_src_unpack() { |
| 61 | unpack ${A} |
57 | unpack ${A} |
| 62 | cd "${S}" |
58 | cd "${S}" |
| 63 | has "${EAPI:-0}" 0 1 && gpe_src_prepare "$@" |
59 | has "${EAPI:-0}" 0 1 && gpe_src_prepare "$@" |
| 64 | } |
60 | } |
| … | |
… | |
| 77 | done |
73 | done |
| 78 | [[ -f configure ]] && elibtoolize |
74 | [[ -f configure ]] && elibtoolize |
| 79 | } |
75 | } |
| 80 | |
76 | |
| 81 | # @FUNCTION: gpe_src_configure |
77 | # @FUNCTION: gpe_src_configure |
|
|
78 | # @DESCRIPTION: |
| 82 | # @DESCRIPTION: Configures a GPE package in a cross-compile aware environment. |
79 | # Configures a GPE package in a cross-compile aware environment. |
| 83 | gpe_src_configure() { |
80 | gpe_src_configure() { |
| 84 | tc-export CC |
81 | tc-export CC |
| 85 | [[ -f configure ]] && econf "$@" ${GPECONF} |
82 | [[ -f configure ]] && econf "$@" ${GPECONF} |
| 86 | } |
83 | } |
| 87 | |
84 | |
| 88 | # @FUNCTION: gpe_src_compile |
85 | # @FUNCTION: gpe_src_compile |
|
|
86 | # @DESCRIPTION: |
| 89 | # @DESCRIPTION: (Cross-)Compiles a GPE package. |
87 | # (Cross-)Compiles a GPE package. |
| 90 | gpe_src_compile() { |
88 | gpe_src_compile() { |
| 91 | tc-export CC |
89 | tc-export CC |
| 92 | has "${EAPI:-0}" 0 1 && gpe_src_configure "$@" |
90 | has "${EAPI:-0}" 0 1 && gpe_src_configure "$@" |
| 93 | emake PREFIX=/usr || die "emake failed" |
91 | emake PREFIX=/usr || die "emake failed" |
| 94 | } |
92 | } |
| 95 | |
93 | |
| 96 | # @FUNCTION: gpe_src_install |
94 | # @FUNCTION: gpe_src_install |
|
|
95 | # @DESCRIPTION: |
| 97 | # @DESCRIPTION: Installs a GPE package in the correct way. |
96 | # Installs a GPE package in the correct way. |
| 98 | gpe_src_install() { |
97 | gpe_src_install() { |
| 99 | local use_nls=yes |
98 | local use_nls=yes |
| 100 | |
99 | |
| 101 | use nls || use_nls=no |
100 | use nls || use_nls=no |
| 102 | |
101 | |