/[gentoo-x86]/eclass/gnome.org.eclass
Gentoo

Diff of /eclass/gnome.org.eclass

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

Revision 1.8 Revision 1.15
1# Copyright 1999-2004 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/gnome.org.eclass,v 1.8 2005/07/06 20:20:03 agriffis Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/gnome.org.eclass,v 1.15 2011/09/12 15:54:53 pacho Exp $
4#
5# Authors:
6# Spidler <spidler@gentoo.org>
7# with help of carparski.
8#
9# Gnome ECLASS. mainly SRC_URI settings
10 4
11INHERITED="$INHERITED $ECLASS" 5# @ECLASS: gnome.org.eclass
6# @MAINTAINER:
7# gnome@gentoo.org
8# @AUTHOR:
9# Authors: Spidler <spidler@gentoo.org> with help of carparski.
10# eclass variable additions and documentation: Gilles Dartiguelongue <eva@gentoo.org>
11# @BLURB: Helper eclass for gnome.org hosted archives
12# @DESCRIPTION:
13# Provide a default SRC_URI for tarball hosted on gnome.org mirrors.
12 14
13[ -z "${GNOME_TARBALL_SUFFIX}" ] && export GNOME_TARBALL_SUFFIX="bz2" 15inherit versionator
14PVP=(${PV//[-\._]/ })
15SRC_URI="mirror://gnome/sources/${PN}/${PVP[0]}.${PVP[1]}/${P}.tar.${GNOME_TARBALL_SUFFIX}"
16 16
17# @ECLASS-VARIABLE: GNOME_TARBALL_SUFFIX
18# @DESCRIPTION:
19# Most projects hosted on gnome.org mirrors provide tarballs as tar.bz2 or
20# tar.xz. This eclass defaults to bz2 for EAPI 0, 1, 2, 3 and defaults to xz for
21# everything else. This is because the gnome mirrors are moving to only have xz
22# tarballs for new releases.
23if has "${EAPI:-0}" 0 1 2 3; then
24 : ${GNOME_TARBALL_SUFFIX:="bz2"}
25else
26 : ${GNOME_TARBALL_SUFFIX:="xz"}
27fi
28
29# Even though xz-utils are in @system, they must still be added to DEPEND; see
30# http://archives.gentoo.org/gentoo-dev/msg_a0d4833eb314d1be5d5802a3b710e0a4.xml
31if [[ ${GNOME_TARBALL_SUFFIX} == "xz" ]]; then
32 DEPEND="${DEPEND} app-arch/xz-utils"
33fi
34
35# @ECLASS-VARIABLE: GNOME_ORG_MODULE
36# @DESCRIPTION:
37# Name of the module as hosted on gnome.org mirrors.
38# Leave unset if package name matches module name.
39: ${GNOME_ORG_MODULE:=$PN}
40
41# @ECLASS-VARIABLE: GNOME_ORG_PVP
42# @INTERNAL
43# @DESCRIPTION:
44# Major and minor numbers of the version number.
45: ${GNOME_ORG_PVP:=$(get_version_component_range 1-2)}
46
47SRC_URI="mirror://gnome/sources/${GNOME_ORG_MODULE}/${GNOME_ORG_PVP}/${GNOME_ORG_MODULE}-${PV}.tar.${GNOME_TARBALL_SUFFIX}"
48
49S="${WORKDIR}/${GNOME_ORG_MODULE}-${PV}"

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.15

  ViewVC Help
Powered by ViewVC 1.1.20