Gentoo Archives: gentoo-commits

From: "Ulrich Müller" <ulm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Mon, 03 Apr 2017 18:42:15
Message-Id: 1491244922.d20d7f2ee97e81251c65c57fc20ddd9b04f715a5.ulm@gentoo
1 commit: d20d7f2ee97e81251c65c57fc20ddd9b04f715a5
2 Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
3 AuthorDate: Mon Apr 3 18:23:38 2017 +0000
4 Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
5 CommitDate: Mon Apr 3 18:42:02 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d20d7f2e
7
8 xemacs-packages.eclass: Support EAPI 6.
9
10 - Do not export src_compile, as using the default has the same result.
11 - Precede PKG_CAT and EXPERIMENTAL variables with XEMACS_ for proper
12 namespace.
13 - Explicitly assign S, because there is no fallback to WORKDIR in
14 recent EAPIs.
15 - Move install directory logic into src_install function.
16 - Install into ${D}${EPREFIX} rather than ${D}.
17
18 Acked by: Mats Lidell <matsl <AT> gentoo.org>
19
20 eclass/xemacs-packages.eclass | 70 +++++++++++++++++++------------------------
21 1 file changed, 31 insertions(+), 39 deletions(-)
22
23 diff --git a/eclass/xemacs-packages.eclass b/eclass/xemacs-packages.eclass
24 index d1a8b845159..a40487bae78 100644
25 --- a/eclass/xemacs-packages.eclass
26 +++ b/eclass/xemacs-packages.eclass
27 @@ -1,4 +1,4 @@
28 -# Copyright 1999-2011 Gentoo Foundation
29 +# Copyright 1999-2017 Gentoo Foundation
30 # Distributed under the terms of the GNU General Public License v2
31
32 # @ECLASS: xemacs-packages.eclass
33 @@ -8,35 +8,13 @@
34 # @DESCRIPTION:
35 # This eclass supports ebuilds for packages distributed by XEmacs.
36
37 -EXPORT_FUNCTIONS src_unpack src_compile src_install
38 -
39 -RDEPEND="${RDEPEND} app-editors/xemacs"
40 -DEPEND="${DEPEND}"
41 -
42 -[ -z "$HOMEPAGE" ] && HOMEPAGE="http://xemacs.org/"
43 -[ -z "$LICENSE" ] && LICENSE="GPL-2"
44 -
45 -# @ECLASS-VARIABLE: PKG_CAT
46 +# @ECLASS-VARIABLE: XEMACS_PKG_CAT
47 # @REQUIRED
48 # @DESCRIPTION:
49 # The package category that the package is in. Can be either standard,
50 # mule, or contrib.
51
52 -case "${PKG_CAT}" in
53 - "standard" )
54 - MY_INSTALL_DIR="/usr/lib/xemacs/xemacs-packages" ;;
55 -
56 - "mule" )
57 - MY_INSTALL_DIR="/usr/lib/xemacs/mule-packages" ;;
58 -
59 - "contrib" )
60 - MY_INSTALL_DIR="/usr/lib/xemacs/site-packages" ;;
61 - *)
62 - die "Unsupported package category in PKG_CAT (or unset)" ;;
63 -esac
64 -[ -n "$DEBUG" ] && einfo "MY_INSTALL_DIR is ${MY_INSTALL_DIR}"
65 -
66 -# @ECLASS-VARIABLE: EXPERIMENTAL
67 +# @ECLASS-VARIABLE: XEMACS_EXPERIMENTAL
68 # @DEFAULT_UNSET
69 # @DESCRIPTION:
70 # If set then the package is downloaded from the experimental packages
71 @@ -44,24 +22,38 @@ esac
72 # in the experimental repository are auto-generated from XEmacs VCS, so
73 # they may not be well-tested.
74
75 -if [ -n "$EXPERIMENTAL" ]
76 -then
77 - [ -z "$SRC_URI" ] && SRC_URI="http://ftp.xemacs.org/pub/xemacs/beta/experimental/packages/${P}-pkg.tar.gz"
78 +EXPORT_FUNCTIONS src_unpack src_install
79 +
80 +RDEPEND="app-editors/xemacs"
81 +S="${WORKDIR}"
82 +
83 +: ${HOMEPAGE:="http://xemacs.org/"}
84 +: ${LICENSE:="GPL-2+"}
85 +
86 +# Backwards compatibility code, to be removed after 2017-05-03
87 +: ${XEMACS_PKG_CAT:=${PKG_CAT}}
88 +: ${XEMACS_EXPERIMENTAL:=${EXPERIMENTAL}}
89 +
90 +if [[ -n ${XEMACS_EXPERIMENTAL} ]]; then
91 + : ${SRC_URI:="http://ftp.xemacs.org/pub/xemacs/beta/experimental/packages/${P}-pkg.tar.gz"}
92 else
93 - [ -z "$SRC_URI" ] && SRC_URI="http://ftp.xemacs.org/pub/xemacs/packages/${P}-pkg.tar.gz"
94 + : ${SRC_URI:="http://ftp.xemacs.org/pub/xemacs/packages/${P}-pkg.tar.gz"}
95 fi
96 -[ -n "$DEBUG" ] && einfo "SRC_URI is ${SRC_URI}"
97
98 -xemacs-packages_src_unpack() {
99 - return 0
100 -}
101 -
102 -xemacs-packages_src_compile() {
103 - einfo "Nothing to compile"
104 -}
105 +xemacs-packages_src_unpack() { :; }
106
107 xemacs-packages_src_install() {
108 - dodir ${MY_INSTALL_DIR}
109 - cd "${D}${MY_INSTALL_DIR}"
110 + local install_dir
111 +
112 + case ${XEMACS_PKG_CAT} in
113 + standard) install_dir="/usr/lib/xemacs/xemacs-packages" ;;
114 + mule) install_dir="/usr/lib/xemacs/mule-packages" ;;
115 + contrib) install_dir="/usr/lib/xemacs/site-packages" ;;
116 + *) die "Unsupported package category in XEMACS_PKG_CAT (or unset)" ;;
117 + esac
118 + debug-print "install_dir is ${install_dir}"
119 +
120 + dodir "${install_dir}"
121 + cd "${D}${EPREFIX}${install_dir}" || die
122 unpack ${A}
123 }