Gentoo Archives: gentoo-commits

From: Nirbheek Chauhan <nirbheek@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/gnome:master commit in: eclass/
Date: Tue, 27 Sep 2011 13:36:44
Message-Id: 0d8ef45b03e593a01d209ce44407b2a0fec40e36.nirbheek@gentoo
1 commit: 0d8ef45b03e593a01d209ce44407b2a0fec40e36
2 Author: Nirbheek Chauhan <nirbheek <AT> gentoo <DOT> org>
3 AuthorDate: Tue Sep 27 13:29:22 2011 +0000
4 Commit: Nirbheek Chauhan <nirbheek <AT> gentoo <DOT> org>
5 CommitDate: Tue Sep 27 13:35:25 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gnome.git;a=commit;h=0d8ef45b
7
8 gnome2-live.eclass: use GNOME_ORG_MODULE for git URI, port to use eclass doc
9
10 ---
11 eclass/gnome2-live.eclass | 55 +++++++++++++++++++++++++++++++++++---------
12 1 files changed, 43 insertions(+), 12 deletions(-)
13
14 diff --git a/eclass/gnome2-live.eclass b/eclass/gnome2-live.eclass
15 index 3a4dd6a..0d15887 100644
16 --- a/eclass/gnome2-live.eclass
17 +++ b/eclass/gnome2-live.eclass
18 @@ -3,14 +3,16 @@
19 # $Header: $
20
21 #
22 -# gnome2-live.eclass
23 -#
24 +# @ECLASS: gnome2-live.eclass
25 +# @MAINTAINER:
26 +# gnome@g.o
27 +# @AUTHOR:
28 +# Nirbheek Chauhan <nirbheek@g.o>
29 +# @BLURB: Live ebuild phases for GNOME packages
30 +# @DESCRIPTION:
31 # Exports additional functions used by live ebuilds written for GNOME packages
32 # Always to be imported *AFTER* gnome2.eclass
33 #
34 -# Author: Nirbheek Chauhan <nirbheek@g.o>
35 -#
36 -
37
38 inherit autotools gnome2 gnome2-utils libtool git-2
39
40 @@ -38,15 +40,28 @@ DEPEND="${DEPEND}
41 # Extra options passed to elibtoolize
42 ELTCONF=${ELTCONF:-}
43
44 -# Default git module name
45 -GNOME_LIVE_MODULE=${GNOME_LIVE_MODULE:-"${PN}"}
46 +# @ECLASS-VARIABLE: GNOME_LIVE_MODULE
47 +# @DESCRIPTION:
48 +# Default git module name is assumed to be the same as the gnome.org module name
49 +# used on ftp.gnome.org. We have GNOME_ORG_MODULE because we inherit gnome.org
50 +: ${GNOME_LIVE_MODULE:="${GNOME_ORG_MODULE}"}
51
52 -# GIT URI for the project
53 -EGIT_REPO_URI="${EGIT_REPO_URI:-"git://git.gnome.org/${GNOME_LIVE_MODULE}"}"
54 +# @ECLASS-VARIABLE: EGIT_REPO_URI
55 +# @DESCRIPTION:
56 +# git URI for the project, uses GNOME_LIVE_MODULE by default
57 +: "${EGIT_REPO_URI:="git://git.gnome.org/${GNOME_LIVE_MODULE}"}"
58 +
59 +# @ECLASS-VARIABLE: PATCHES
60 +# @DESCRIPTION:
61 +# Whitespace-separated list of patches to apply after cloning
62 +: ${PATCHES:=""}
63
64 # Unset SRC_URI auto-set by gnome2.eclass
65 SRC_URI=""
66
67 +# @FUNCTION: gnome2-live_get_var
68 +# @DESCRIPTION:
69 +# Get macro variable values from configure.ac, etc
70 gnome2-live_get_var() {
71 local var f
72 var="$1"
73 @@ -54,6 +69,10 @@ gnome2-live_get_var() {
74 echo $(sed -ne "s/${var}(\(.*\))/\1/p" "${f}" | tr -d '[]')
75 }
76
77 +# @FUNCTION: gnome2-live_get_var
78 +# @DESCRIPTION:
79 +# Calls git-2_src_unpack, and unpacks ${A} if required.
80 +# Also calls gnome2-live_src_prepare for older EAPI.
81 gnome2-live_src_unpack() {
82 if test -n "${A}"; then
83 unpack ${A}
84 @@ -62,9 +81,15 @@ gnome2-live_src_unpack() {
85 has src_prepare ${EXPORTED_FUNCTIONS} || gnome2-live_src_prepare
86 }
87
88 +# @FUNCTION: gnome2-live_src_prepare
89 +# @DESCRIPTION:
90 +# Lots of magic to workaround autogen.sh quirks in various packages
91 +# Creates blank ChangeLog and necessary macro dirs. Runs various autotools
92 +# programs if required, and finally runs eautoreconf.
93 gnome2-live_src_prepare() {
94 # Blame git.eclass
95 cd "${S}"
96 +
97 for i in ${PATCHES}; do
98 epatch "${i}"
99 done
100 @@ -141,17 +166,23 @@ gnome2-live_src_prepare() {
101 elibtoolize ${ELTCONF}
102 }
103
104 -# So that it replaces gnome2_src_unpack in ebuilds that call it
105 +# @FUNCTION: gnome2_src_unpack
106 +# @DESCRIPTION:
107 +# Defined so that it replaces gnome2_src_unpack in ebuilds that call it
108 gnome2_src_unpack() {
109 gnome2-live_src_unpack
110 }
111
112 -# So that it replaces gnome2_src_prepare in ebuilds that call it
113 +# @FUNCTION: gnome2_src_prepare
114 +# @DESCRIPTION:
115 +# Defined so that it replaces gnome2_src_prepare in ebuilds that call it
116 gnome2_src_prepare() {
117 gnome2-live_src_prepare
118 }
119
120 -# Run manually for ebuilds that have a custom pkg_postinst
121 +# @FUNCTION: gnome2-live_pkg_postinst
122 +# @DESCRIPTION:
123 +# Must be run manually for ebuilds that have a custom pkg_postinst
124 gnome2-live_pkg_postinst() {
125 ewarn "This is a live ebuild, upstream trunks will mostly be UNstable"
126 ewarn "Do NOT report bugs about this package to Gentoo"