Gentoo Archives: gentoo-commits

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