Gentoo Archives: gentoo-commits

From: "Tomas Chvatal (scarabeus)" <scarabeus@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-boot/grub: ChangeLog grub-9999.ebuild grub-2.00.ebuild grub-2.00_rc1.ebuild grub-2.00_beta1.ebuild grub-2.00_beta2-r1.ebuild grub-2.00_beta0.ebuild grub-2.00_beta3.ebuild grub-2.00_beta5.ebuild grub-2.00_beta3-r2.ebuild grub-2.00_beta2.ebuild
Date: Thu, 28 Jun 2012 10:10:18
Message-Id: 20120628101005.10DAD2004C@flycatcher.gentoo.org
1 scarabeus 12/06/28 10:10:05
2
3 Modified: ChangeLog grub-9999.ebuild
4 Added: grub-2.00.ebuild
5 Removed: grub-2.00_rc1.ebuild grub-2.00_beta1.ebuild
6 grub-2.00_beta2-r1.ebuild grub-2.00_beta0.ebuild
7 grub-2.00_beta3.ebuild grub-2.00_beta5.ebuild
8 grub-2.00_beta3-r2.ebuild grub-2.00_beta2.ebuild
9 Log:
10 Version bump to 2.00. Depend also on dejavu (otherwise starfield is not distributed). Add info about themes to default config file. Remove older betas/rcs apart from latest beta to ensure fallback if 2.00 has regressions.
11
12 (Portage version: 2.2.0_alpha114/cvs/Linux x86_64)
13
14 Revision Changes Path
15 1.214 sys-boot/grub/ChangeLog
16
17 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-boot/grub/ChangeLog?rev=1.214&view=markup
18 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-boot/grub/ChangeLog?rev=1.214&content-type=text/plain
19 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-boot/grub/ChangeLog?r1=1.213&r2=1.214
20
21 Index: ChangeLog
22 ===================================================================
23 RCS file: /var/cvsroot/gentoo-x86/sys-boot/grub/ChangeLog,v
24 retrieving revision 1.213
25 retrieving revision 1.214
26 diff -u -r1.213 -r1.214
27 --- ChangeLog 25 Jun 2012 03:53:43 -0000 1.213
28 +++ ChangeLog 28 Jun 2012 10:10:04 -0000 1.214
29 @@ -1,6 +1,17 @@
30 # ChangeLog for sys-boot/grub
31 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
32 -# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/ChangeLog,v 1.213 2012/06/25 03:53:43 floppym Exp $
33 +# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/ChangeLog,v 1.214 2012/06/28 10:10:04 scarabeus Exp $
34 +
35 +*grub-2.00 (28 Jun 2012)
36 +
37 + 28 Jun 2012; Tomáš Chvátal <scarabeus@g.o> +files/grub.default-2,
38 + -grub-2.00_beta0.ebuild, -grub-2.00_beta1.ebuild, -grub-2.00_beta2.ebuild,
39 + -grub-2.00_beta2-r1.ebuild, -grub-2.00_beta3.ebuild,
40 + -grub-2.00_beta3-r2.ebuild, -grub-2.00_beta5.ebuild, -grub-2.00_rc1.ebuild,
41 + +grub-2.00.ebuild, grub-9999.ebuild:
42 + Version bump to 2.00. Depend also on dejavu (otherwise starfield is not
43 + distributed). Add info about themes to default config file. Remove older
44 + betas/rcs apart from latest beta to ensure fallback if 2.00 has regressions.
45
46 *grub-2.00_rc1 (25 Jun 2012)
47
48
49
50
51 1.69 sys-boot/grub/grub-9999.ebuild
52
53 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-boot/grub/grub-9999.ebuild?rev=1.69&view=markup
54 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-boot/grub/grub-9999.ebuild?rev=1.69&content-type=text/plain
55 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-boot/grub/grub-9999.ebuild?r1=1.68&r2=1.69
56
57 Index: grub-9999.ebuild
58 ===================================================================
59 RCS file: /var/cvsroot/gentoo-x86/sys-boot/grub/grub-9999.ebuild,v
60 retrieving revision 1.68
61 retrieving revision 1.69
62 diff -u -r1.68 -r1.69
63 --- grub-9999.ebuild 25 Jun 2012 03:53:43 -0000 1.68
64 +++ grub-9999.ebuild 28 Jun 2012 10:10:04 -0000 1.69
65 @@ -1,6 +1,6 @@
66 # Copyright 1999-2012 Gentoo Foundation
67 # Distributed under the terms of the GNU General Public License v2
68 -# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/grub-9999.ebuild,v 1.68 2012/06/25 03:53:43 floppym Exp $
69 +# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/grub-9999.ebuild,v 1.69 2012/06/28 10:10:04 scarabeus Exp $
70
71 EAPI=4
72
73 @@ -60,6 +60,7 @@
74 mount? ( sys-fs/fuse )
75 truetype? (
76 media-libs/freetype
77 + media-fonts/dejavu
78 >=media-fonts/unifont-5
79 )
80 ppc? ( sys-apps/ibm-powerpc-utils sys-apps/powerpc-utils )
81 @@ -287,7 +288,7 @@
82 # can't be in docs array as we use default_src_install in different builddir
83 dodoc AUTHORS ChangeLog NEWS README THANKS TODO
84 insinto /etc/default
85 - newins "${FILESDIR}"/grub.default grub
86 + newins "${FILESDIR}"/grub.default-2 grub
87 }
88
89 pkg_postinst() {
90
91
92
93 1.1 sys-boot/grub/grub-2.00.ebuild
94
95 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-boot/grub/grub-2.00.ebuild?rev=1.1&view=markup
96 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-boot/grub/grub-2.00.ebuild?rev=1.1&content-type=text/plain
97
98 Index: grub-2.00.ebuild
99 ===================================================================
100 # Copyright 1999-2012 Gentoo Foundation
101 # Distributed under the terms of the GNU General Public License v2
102 # $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/grub-2.00.ebuild,v 1.1 2012/06/28 10:10:04 scarabeus Exp $
103
104 EAPI=4
105
106 if [[ ${PV} == "9999" ]] ; then
107 EBZR_REPO_URI="http://bzr.savannah.gnu.org/r/grub/trunk/grub/"
108 LIVE_ECLASS="bzr"
109 SRC_URI=""
110 DO_AUTORECONF="true"
111 else
112 MY_P=${P/_/\~}
113 if [[ ${PV} == *_alpha* || ${PV} == *_beta* || ${PV} == *_rc* ]]; then
114 SRC_URI="mirror://gnu-alpha/${PN}/${MY_P}.tar.xz"
115 else
116 SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.xz
117 mirror://gentoo/${MY_P}.tar.xz"
118 fi
119 # Masked until documentation guys consolidate the guide and approve
120 # it for usage.
121 #KEYWORDS="~amd64 ~mips ~x86"
122 S=${WORKDIR}/${MY_P}
123 fi
124
125 inherit eutils flag-o-matic pax-utils toolchain-funcs ${DO_AUTORECONF:+autotools} ${LIVE_ECLASS}
126 unset LIVE_ECLASS
127
128 DESCRIPTION="GNU GRUB boot loader"
129 HOMEPAGE="http://www.gnu.org/software/grub/"
130
131 LICENSE="GPL-3"
132 SLOT="2"
133 IUSE="custom-cflags debug device-mapper efiemu mount nls static sdl truetype libzfs"
134
135 GRUB_PLATFORMS=(
136 # everywhere:
137 emu
138 # mips only:
139 qemu-mips yeeloong
140 # amd64, x86, ppc, ppc64:
141 ieee1275
142 # amd64, x86:
143 coreboot multiboot efi-32 pc qemu
144 # amd64, ia64:
145 efi-64
146 )
147 IUSE+=" ${GRUB_PLATFORMS[@]/#/grub_platforms_}"
148
149 # os-prober: Used on runtime to detect other OSes
150 # xorriso (dev-libs/libisoburn): Used on runtime for mkrescue
151 RDEPEND="
152 dev-libs/lzo
153 >=sys-libs/ncurses-5.2-r5
154 debug? (
155 sdl? ( media-libs/libsdl )
156 )
157 device-mapper? ( >=sys-fs/lvm2-2.02.45 )
158 libzfs? ( sys-fs/zfs )
159 mount? ( sys-fs/fuse )
160 truetype? (
161 media-libs/freetype
162 media-fonts/dejavu
163 >=media-fonts/unifont-5
164 )
165 ppc? ( sys-apps/ibm-powerpc-utils sys-apps/powerpc-utils )
166 ppc64? ( sys-apps/ibm-powerpc-utils sys-apps/powerpc-utils )
167 "
168 DEPEND="${RDEPEND}
169 >=dev-lang/python-2.5.2
170 sys-devel/flex
171 virtual/yacc
172 sys-apps/texinfo
173 static? (
174 truetype? (
175 app-arch/bzip2[static-libs(+)]
176 media-libs/freetype[static-libs(+)]
177 sys-libs/zlib[static-libs(+)]
178 )
179 )
180 "
181 RDEPEND+="
182 grub_platforms_efi-32? ( sys-boot/efibootmgr )
183 grub_platforms_efi-64? ( sys-boot/efibootmgr )
184 "
185 if [[ -n ${DO_AUTORECONF} ]] ; then
186 DEPEND+=" >=sys-devel/autogen-5.10 sys-apps/help2man"
187 else
188 DEPEND+=" app-arch/xz-utils"
189 fi
190
191 export STRIP_MASK="*/grub/*/*.{mod,img}"
192
193 QA_EXECSTACK="
194 usr/bin/grub*
195 usr/sbin/grub*
196 usr/lib*/grub/*/*.mod
197 usr/lib*/grub/*/kernel.exec
198 usr/lib*/grub/*/kernel.img
199 usr/lib*/grub/*/setjmp.module
200 "
201
202 QA_WX_LOAD="
203 usr/lib*/grub/*/kernel.exec
204 usr/lib*/grub/*/kernel.img
205 usr/lib*/grub/*/*.image
206 "
207
208 QA_PRESTRIPPED="
209 usr/lib.*/grub/.*/kernel.img
210 "
211
212 grub_run_phase() {
213 local phase=$1
214 local platform=$2
215 [[ -z ${phase} || -z ${platform} ]] && die "${FUNCNAME} [phase] [platform]"
216
217 [[ -d "${WORKDIR}/build-${platform}" ]] || \
218 { mkdir "${WORKDIR}/build-${platform}" || die ; }
219 pushd "${WORKDIR}/build-${platform}" > /dev/null || die
220
221 echo ">>> Running ${phase} for platform \"${platform}\""
222 echo ">>> Working in: \"${WORKDIR}/build-${platform}\""
223
224 grub_${phase} ${platform}
225
226 popd > /dev/null || die
227 }
228
229 grub_src_configure() {
230 local platform=$1
231 local with_platform=
232 local enable_efiemu="--disable-efiemu"
233
234 [[ -z ${platform} ]] && die "${FUNCNAME} [platform]"
235
236 # Used below for efi cross-building
237 tc-export CC NM OBJCOPY STRIP
238
239 estack_push CTARGET "${CTARGET}"
240 estack_push TARGET_CC "${TARGET_CC}"
241 estack_push TARGET_CFLAGS "${TARGET_CFLAGS}"
242 estack_push TARGET_CPPFLAGS "${TARGET_CPPFLAGS}"
243
244 case ${platform} in
245 efi-32)
246 if [[ ${CHOST} == x86_64* ]]; then
247 CTARGET="${CTARGET:-i386}"
248 TARGET_CC="${TARGET_CC:-${CC}}"
249 export TARGET_CC
250 fi
251 with_platform="--with-platform=efi"
252 ;;
253 efi-64)
254 if [[ ${CHOST} == i?86* ]]; then
255 CTARGET="${CTARGET:-x86_64}"
256 TARGET_CC="${TARGET_CC:-${CC}}"
257 TARGET_CFLAGS="-Os -march=x86-64 ${TARGET_CFLAGS}"
258 TARGET_CPPFLAGS="-march=x86-64 ${TARGET_CPPFLAGS}"
259 export TARGET_CC TARGET_CFLAGS TARGET_CPPFLAGS
260 fi
261 with_platform="--with-platform=efi"
262 ;;
263 guessed) ;;
264 *)
265 with_platform="--with-platform=${platform}"
266 case ${CTARGET:-${CHOST}} in
267 i?86*|x86_64*)
268 enable_efiemu=$(use_enable efiemu)
269 ;;
270 esac
271 ;;
272 esac
273
274 ECONF_SOURCE="${S}" \
275 econf \
276 --disable-werror \
277 --program-prefix= \
278 --program-transform-name="s,grub,grub2," \
279 --with-grubdir=grub2 \
280 ${with_platform} \
281 $(use_enable debug mm-debug) \
282 $(use_enable debug grub-emu-usb) \
283 $(use_enable device-mapper) \
284 ${enable_efiemu} \
285 $(use_enable mount grub-mount) \
286 $(use_enable nls) \
287 $(use_enable truetype grub-mkfont) \
288 $(use_enable libzfs) \
289 $(use sdl && use_enable debug grub-emu-sdl)
290
291 estack_pop CTARGET CTARGET || die
292 estack_pop TARGET_CC TARGET_CC || die
293 estack_pop TARGET_CFLAGS TARGET_CFLAGS || die
294 estack_pop TARGET_CPPFLAGS TARGET_CPPFLAGS || die
295 }
296
297 grub_src_compile() {
298 default_src_compile
299 pax-mark -mpes "${grub_binaries[@]}"
300 }
301
302 grub_src_install() {
303 default_src_install
304 }
305
306 src_prepare() {
307 local i j
308
309 # fix texinfo file name, bug 416035
310 sed -i \
311 -e 's/^\* GRUB:/* GRUB2:/' \
312 -e 's/(grub)/(grub2)/' -- \
313 "${S}"/docs/grub.texi
314
315 epatch_user
316
317 # autogen.sh does more than just run autotools
318 if [[ -n ${DO_AUTORECONF} ]] ; then
319 sed -i -e '/^autoreconf/s:^:set +e; e:' autogen.sh || die
320 (
321 autopoint() { :; }
322 . ./autogen.sh
323 ) || die
324 fi
325
326 # install into the right dir for eselect #372735
327 sed -i \
328 -e '/^bashcompletiondir =/s:=.*:= $(datarootdir)/bash-completion:' \
329 util/bash-completion.d/Makefile.in || die
330
331 # get enabled platforms
332 GRUB_ENABLED_PLATFORMS=""
333 for i in ${GRUB_PLATFORMS[@]}; do
334 use grub_platforms_${i} && GRUB_ENABLED_PLATFORMS+=" ${i}"
335 done
336 [[ -z ${GRUB_ENABLED_PLATFORMS} ]] && GRUB_ENABLED_PLATFORMS="guessed"
337 einfo "Going to build following platforms: ${GRUB_ENABLED_PLATFORMS}"
338 }
339
340 src_configure() {
341 local i
342
343 use custom-cflags || unset CFLAGS CPPFLAGS LDFLAGS
344 use libzfs && addpredict /etc/dfs
345 use static && append-ldflags -static
346
347 for i in ${GRUB_ENABLED_PLATFORMS}; do
348 grub_run_phase ${FUNCNAME} ${i}
349 done
350 }
351
352 src_compile() {
353 # Used for pax marking in grub_src_compile
354 local grub_binaries=(
355 grub-editenv
356 grub-fstest
357 grub-menulst2cfg
358 grub-mkimage
359 grub-mklayout
360 grub-mkpasswd-pbkdf2
361 grub-mkrelpath
362 grub-script-check
363 grub-bios-setup
364 grub-ofpathname
365 grub-probe
366 grub-sparc64-setup
367 )
368 use mount && grub_binaries+=( grub-mount )
369 use truetype && grub_binaries+=( grub-mkfont )
370
371 local i
372
373 for i in ${GRUB_ENABLED_PLATFORMS}; do
374 grub_run_phase ${FUNCNAME} ${i}
375 done
376 }
377
378 src_install() {
379 local i
380
381 for i in ${GRUB_ENABLED_PLATFORMS}; do
382 grub_run_phase ${FUNCNAME} ${i}
383 done
384
385 mv "${ED}"usr/share/info/grub{,2}.info || die
386
387 # can't be in docs array as we use default_src_install in different builddir
388 dodoc AUTHORS ChangeLog NEWS README THANKS TODO
389 insinto /etc/default
390 newins "${FILESDIR}"/grub.default-2 grub
391 }
392
393 pkg_postinst() {
394 # display the link to guide
395 elog "For information on how to configure grub-2 please refer to the guide:"
396 elog " http://wiki.gentoo.org/wiki/GRUB2_Quick_Start"
397 if ! has_version sys-boot/os-prober; then
398 elog "Install sys-boot/os-prober to enable detection of other operating systems using grub2-mkconfig."
399 fi
400 if ! has_version dev-libs/libisoburn; then
401 elog "Install dev-libs/libisoburn to enable creation of rescue media using grub2-mkrescue."
402 fi
403 }