Gentoo Archives: gentoo-commits

From: "Anthony G. Basile" <blueness@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/catalyst/, dev-util/catalyst/files/
Date: Fri, 04 Mar 2016 02:15:54
Message-Id: 1457058351.468965432fa32bccb02a594a733b40e22ab6214b.blueness@gentoo
1 commit: 468965432fa32bccb02a594a733b40e22ab6214b
2 Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
3 AuthorDate: Fri Mar 4 02:25:30 2016 +0000
4 Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
5 CommitDate: Fri Mar 4 02:25:51 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=46896543
7
8 dev-util/catalyst: version bump to 2.0.18-r2
9
10 Package-Manager: portage-2.2.26
11
12 dev-util/catalyst/catalyst-2.0.18-r2.ebuild | 119 +++++++++++++++++++++
13 .../files/catalyst-2.0.18-fix-quotes.patch | 38 +++++++
14 2 files changed, 157 insertions(+)
15
16 diff --git a/dev-util/catalyst/catalyst-2.0.18-r2.ebuild b/dev-util/catalyst/catalyst-2.0.18-r2.ebuild
17 new file mode 100644
18 index 0000000..8405874
19 --- /dev/null
20 +++ b/dev-util/catalyst/catalyst-2.0.18-r2.ebuild
21 @@ -0,0 +1,119 @@
22 +# Copyright 1999-2016 Gentoo Foundation
23 +# Distributed under the terms of the GNU General Public License v2
24 +# $Id$
25 +
26 +EAPI=5
27 +
28 +if [[ ${PV} == *9999* ]]; then
29 + SRC_ECLASS="git-2"
30 + EGIT_REPO_URI="anongit.gentoo.org/proj/catalyst.git"
31 + EGIT_MASTER="master"
32 + S="${WORKDIR}/${PN}"
33 +else
34 + SRC_URI="mirror://gentoo/${P}.tar.bz2
35 + https://dev.gentoo.org/~jmbsvicetto/distfiles/${P}.tar.bz2
36 + https://dev.gentoo.org/~mattst88/distfiles/${P}.tar.bz2
37 + https://dev.gentoo.org/~zerochaos/distfiles/${P}.tar.bz2
38 + https://dev.gentoo.org/~dolsen/releases/catalyst/${P}.tar.bz2"
39 + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
40 +fi
41 +
42 +PYTHON_COMPAT=( python2_7 )
43 +
44 +inherit eutils multilib python-single-r1 ${SRC_ECLASS}
45 +
46 +DESCRIPTION="Release metatool used for creating releases based on Gentoo Linux"
47 +HOMEPAGE="https://www.gentoo.org/proj/en/releng/catalyst/"
48 +
49 +LICENSE="GPL-2"
50 +SLOT="0"
51 +IUSE="ccache kernel_linux"
52 +
53 +DEPEND="
54 + app-text/asciidoc
55 + ${PYTHON_DEPS}
56 +"
57 +RDEPEND="
58 + app-arch/lbzip2
59 + app-crypt/shash
60 + app-arch/tar[xattr]
61 + virtual/cdrtools
62 + amd64? ( >=sys-boot/syslinux-3.72 )
63 + ia64? ( sys-fs/dosfstools )
64 + x86? ( >=sys-boot/syslinux-3.72 )
65 + ccache? ( dev-util/ccache )
66 + kernel_linux? ( app-misc/zisofs-tools >=sys-fs/squashfs-tools-2.1 )
67 + ${PYTHON_DEPS}
68 +"
69 +
70 +REQUIRED_USE=${PYTHON_REQUIRED_USE}
71 +
72 +PATCHES=(
73 + "${FILESDIR}/catalyst-2.0.18-Do-notuntarwith--acls.patch"
74 + "${FILESDIR}/catalyst-2.0.18-fix-quotes.patch"
75 +)
76 +
77 +pkg_setup() {
78 + if use ccache ; then
79 + einfo "Enabling ccache support for catalyst."
80 + else
81 + ewarn "By default, ccache support for catalyst is disabled."
82 + ewarn "If this is not what you intended,"
83 + ewarn "then you should add ccache to your USE."
84 + fi
85 +
86 + echo
87 + einfo "The template spec files are now installed by default. You can find"
88 + einfo "them under /usr/share/doc/${PF}/examples"
89 + einfo "and they are considered to be the authorative source of information"
90 + einfo "on catalyst."
91 + echo
92 +
93 + python-single-r1_pkg_setup
94 +}
95 +
96 +src_prepare() {
97 + epatch "${PATCHES[@]}"
98 +}
99 +
100 +src_install() {
101 + insinto /usr/$(get_libdir)/${PN}
102 + exeinto /usr/$(get_libdir)/${PN}
103 + doexe catalyst || die "copying catalyst"
104 +
105 + if [[ ${PV} == 3.9999* ]]; then
106 + doins -r modules files || die "copying files"
107 + else
108 + doins -r arch modules livecd || die "copying files"
109 + fi
110 +
111 + for x in targets/*; do
112 + exeinto /usr/$(get_libdir)/${PN}/$x
113 + doexe $x/* || die "copying ${x}"
114 + done
115 +
116 + # Here is where we actually enable ccache
117 + use ccache && \
118 + sed -i -e 's:options="autoresume kern:options="autoresume ccache kern:' \
119 + files/catalyst.conf
120 +
121 + sed -i -e "s:/usr/lib/catalyst:/usr/$(get_libdir)/catalyst:" \
122 + files/catalyst.conf
123 +
124 + make_wrapper catalyst /usr/$(get_libdir)/${PN}/catalyst
125 + insinto /etc/catalyst
126 + doins files/catalyst.conf files/catalystrc || die "copying configuration"
127 + insinto /usr/share/doc/${PF}/examples
128 + doins examples/* || die
129 + dodoc README AUTHORS
130 + doman files/catalyst.1 files/catalyst-spec.5
131 +
132 + python_fix_shebang "${ED}usr/$(get_libdir)/catalyst/catalyst"
133 + python_optimize "${ED}"
134 +}
135 +
136 +pkg_postinst() {
137 + einfo "You can find more information about catalyst by checking out the"
138 + einfo "catalyst project page at:"
139 + einfo "https://www.gentoo.org/proj/en/releng/catalyst/index.xml"
140 +}
141
142 diff --git a/dev-util/catalyst/files/catalyst-2.0.18-fix-quotes.patch b/dev-util/catalyst/files/catalyst-2.0.18-fix-quotes.patch
143 new file mode 100644
144 index 0000000..ccaffbe
145 --- /dev/null
146 +++ b/dev-util/catalyst/files/catalyst-2.0.18-fix-quotes.patch
147 @@ -0,0 +1,38 @@
148 +From 1eabce3a9c15c5caf022e71c1959e8c8f4819fad Mon Sep 17 00:00:00 2001
149 +From: "Anthony G. Basile" <blueness@g.o>
150 +Date: Thu, 3 Mar 2016 20:48:43 -0500
151 +Subject: [PATCH] targets/support/chroot-functions.sh: correct quotes to allow
152 + expansion of $1
153 +
154 +This is a backport of commit b2473eff. The single quotes prevented the proper
155 +expansion of $1 in setup_pkgmgr(). Since this is usually called as
156 +`setup_pkgmgr "build"` during stage1 builds, it is surprising this was
157 +not caught earlier.
158 +---
159 + targets/support/chroot-functions.sh | 8 ++++----
160 + 1 file changed, 4 insertions(+), 4 deletions(-)
161 +
162 +diff --git a/targets/support/chroot-functions.sh b/targets/support/chroot-functions.sh
163 +index 3b7f77b..6c1a31c 100755
164 +--- a/targets/support/chroot-functions.sh
165 ++++ b/targets/support/chroot-functions.sh
166 +@@ -172,12 +172,12 @@ setup_pkgmgr(){
167 + # Use --update or portage might just waste time/cycles and reinstall the same version.
168 + # Use --newuse to make sure it rebuilds with any changed use flags.
169 + if [ -n "$1" ];then
170 +- echo "Adding USE='${USE} $1' to make.conf for portage build"
171 +- [ -e /etc/portage/make.conf ] && echo 'USE="${USE} $1"' >> /etc/portage/make.conf
172 ++ echo "Adding USE=\"${USE} $1\" to make.conf for portage build"
173 ++ [ -e /etc/portage/make.conf ] && echo "USE=\"\${USE} $1\"" >> /etc/portage/make.conf
174 + run_merge --oneshot --update --newuse sys-apps/portage
175 +- sed -i '/USE="${USE} $1"/d' /etc/portage/make.conf
176 ++ sed -i "/USE=\"\${USE} $1\"/d" /etc/portage/make.conf
177 + else
178 +- echo "Updating portage with USE='${USE}'"
179 ++ echo "Updating portage with USE=\"${USE}\""
180 + run_merge --oneshot --update --newuse sys-apps/portage
181 + fi
182 + }
183 +--
184 +2.4.10
185 +