Gentoo Archives: gentoo-commits

From: Mike Gilbert <floppym@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-boot/grub/
Date: Thu, 17 Dec 2015 15:30:30
Message-Id: 1450366218.502e797619d943c2f41784c0edbb0b7d14f2b8b1.floppym@gentoo
1 commit: 502e797619d943c2f41784c0edbb0b7d14f2b8b1
2 Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
3 AuthorDate: Thu Dec 17 15:30:18 2015 +0000
4 Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
5 CommitDate: Thu Dec 17 15:30:18 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=502e7976
7
8 sys-boot/grub: Remove old
9
10 Package-Manager: portage-2.2.26_p32
11
12 sys-boot/grub/grub-2.02_beta2-r7.ebuild | 314 --------------------------------
13 1 file changed, 314 deletions(-)
14
15 diff --git a/sys-boot/grub/grub-2.02_beta2-r7.ebuild b/sys-boot/grub/grub-2.02_beta2-r7.ebuild
16 deleted file mode 100644
17 index 8231ff6..0000000
18 --- a/sys-boot/grub/grub-2.02_beta2-r7.ebuild
19 +++ /dev/null
20 @@ -1,314 +0,0 @@
21 -# Copyright 1999-2015 Gentoo Foundation
22 -# Distributed under the terms of the GNU General Public License v2
23 -# $Id$
24 -
25 -EAPI=5
26 -
27 -AUTOTOOLS_AUTORECONF=1
28 -GRUB_AUTOGEN=1
29 -
30 -if [[ -n ${GRUB_AUTOGEN} ]]; then
31 - PYTHON_COMPAT=( python{2_7,3_3,3_4} )
32 - inherit python-any-r1
33 -fi
34 -
35 -inherit autotools-utils bash-completion-r1 eutils flag-o-matic mount-boot multibuild pax-utils toolchain-funcs versionator
36 -
37 -if [[ ${PV} != 9999 ]]; then
38 - if [[ ${PV} == *_alpha* || ${PV} == *_beta* || ${PV} == *_rc* ]]; then
39 - # The quote style is to work with <=bash-4.2 and >=bash-4.3 #503860
40 - MY_P=${P/_/'~'}
41 - SRC_URI="mirror://gnu-alpha/${PN}/${MY_P}.tar.xz
42 - https://dev.gentoo.org/~floppym/dist/${P}-gentoo-r3.tar.xz"
43 - S=${WORKDIR}/${MY_P}
44 - else
45 - SRC_URI="mirror://gnu/${PN}/${P}.tar.xz
46 - https://dev.gentoo.org/~floppym/dist/${P}.tar.xz"
47 - S=${WORKDIR}/${P%_*}
48 - fi
49 - KEYWORDS="amd64 x86"
50 - PATCHES=()
51 -else
52 - inherit git-r3
53 - EGIT_REPO_URI="git://git.sv.gnu.org/grub.git
54 - http://git.savannah.gnu.org/r/grub.git"
55 -fi
56 -
57 -DEJAVU=dejavu-sans-ttf-2.34
58 -UNIFONT=unifont-7.0.06
59 -SRC_URI+=" fonts? ( mirror://gnu/unifont/${UNIFONT}/${UNIFONT}.pcf.gz )
60 - themes? ( mirror://sourceforge/dejavu/${DEJAVU}.zip )"
61 -
62 -DESCRIPTION="GNU GRUB boot loader"
63 -HOMEPAGE="https://www.gnu.org/software/grub/"
64 -
65 -# Includes licenses for dejavu and unifont
66 -LICENSE="GPL-3 fonts? ( GPL-2-with-font-exception ) themes? ( BitstreamVera )"
67 -SLOT="2"
68 -IUSE="debug device-mapper doc efiemu +fonts mount +multislot nls static sdl test +themes truetype libzfs"
69 -
70 -GRUB_ALL_PLATFORMS=( coreboot efi-32 efi-64 emu ieee1275 loongson multiboot qemu qemu-mips pc uboot xen )
71 -IUSE+=" ${GRUB_ALL_PLATFORMS[@]/#/grub_platforms_}"
72 -
73 -REQUIRED_USE="
74 - grub_platforms_coreboot? ( fonts )
75 - grub_platforms_qemu? ( fonts )
76 - grub_platforms_ieee1275? ( fonts )
77 - grub_platforms_loongson? ( fonts )
78 -"
79 -
80 -# os-prober: Used on runtime to detect other OSes
81 -# xorriso (dev-libs/libisoburn): Used on runtime for mkrescue
82 -RDEPEND="
83 - app-arch/xz-utils
84 - >=sys-libs/ncurses-5.2-r5:0=
85 - debug? (
86 - sdl? ( media-libs/libsdl )
87 - )
88 - device-mapper? ( >=sys-fs/lvm2-2.02.45 )
89 - libzfs? ( sys-fs/zfs )
90 - mount? ( sys-fs/fuse )
91 - truetype? ( media-libs/freetype:2= )
92 - ppc? ( sys-apps/ibm-powerpc-utils sys-apps/powerpc-utils )
93 - ppc64? ( sys-apps/ibm-powerpc-utils sys-apps/powerpc-utils )
94 -"
95 -DEPEND="${RDEPEND}
96 - ${PYTHON_DEPS}
97 - app-misc/pax-utils
98 - sys-devel/flex
99 - sys-devel/bison
100 - sys-apps/help2man
101 - sys-apps/texinfo
102 - fonts? ( media-libs/freetype:2 )
103 - grub_platforms_xen? ( app-emulation/xen-tools:= )
104 - static? (
105 - app-arch/xz-utils[static-libs(+)]
106 - truetype? (
107 - app-arch/bzip2[static-libs(+)]
108 - media-libs/freetype[static-libs(+)]
109 - sys-libs/zlib[static-libs(+)]
110 - )
111 - )
112 - test? (
113 - dev-libs/libisoburn
114 - app-emulation/qemu
115 - )
116 - themes? (
117 - app-arch/unzip
118 - media-libs/freetype:2
119 - )
120 -"
121 -RDEPEND+="
122 - kernel_linux? (
123 - grub_platforms_efi-32? ( sys-boot/efibootmgr )
124 - grub_platforms_efi-64? ( sys-boot/efibootmgr )
125 - )
126 - !multislot? ( !sys-boot/grub:0 )
127 - nls? ( sys-devel/gettext )
128 -"
129 -
130 -DEPEND+=" !!=media-libs/freetype-2.5.4"
131 -
132 -STRIP_MASK="*/grub/*/*.{mod,img}"
133 -RESTRICT="test"
134 -
135 -QA_EXECSTACK="
136 - usr/bin/grub*-emu*
137 - usr/lib*/grub/*/*.mod
138 - usr/lib*/grub/*/*.module
139 - usr/lib*/grub/*/kernel.exec
140 - usr/lib*/grub/*/kernel.img
141 -"
142 -
143 -QA_WX_LOAD="
144 - usr/lib*/grub/*/kernel.exec
145 - usr/lib*/grub/*/kernel.img
146 - usr/lib*/grub/*/*.image
147 -"
148 -
149 -QA_PRESTRIPPED="
150 - usr/lib.*/grub/.*/kernel.img
151 -"
152 -
153 -src_unpack() {
154 - if [[ ${PV} == 9999 ]]; then
155 - git-r3_src_unpack
156 - fi
157 - default_src_unpack
158 -}
159 -
160 -src_prepare() {
161 - EPATCH_SUFFIX="patch" EPATCH_FORCE="yes" epatch
162 -
163 - [[ ${PATCHES} ]] && epatch "${PATCHES[@]}"
164 -
165 - sed -i -e /autoreconf/d autogen.sh || die
166 -
167 - if use multislot; then
168 - # fix texinfo file name, bug 416035
169 - sed -i -e 's/^\* GRUB:/* GRUB2:/' -e 's/(grub)/(grub2)/' docs/grub.texi || die
170 - fi
171 -
172 - epatch_user
173 -
174 - if [[ -n ${GRUB_AUTOGEN} ]]; then
175 - python_setup
176 - bash autogen.sh || die
177 - fi
178 -
179 - if [[ -n ${AUTOTOOLS_AUTORECONF} ]]; then
180 - autopoint() { return 0; }
181 - eautoreconf
182 - fi
183 -}
184 -
185 -setup_fonts() {
186 - ln -s "${WORKDIR}/${UNIFONT}.pcf" unifont.pcf || die
187 - if use themes; then
188 - ln -s "${WORKDIR}/${DEJAVU}/ttf/DejaVuSans.ttf" DejaVuSans.ttf || die
189 - fi
190 -}
191 -
192 -grub_configure() {
193 - local platform
194 -
195 - case ${MULTIBUILD_VARIANT} in
196 - efi-32)
197 - platform=efi
198 - if [[ ${CTARGET:-${CHOST}} == x86_64* ]]; then
199 - local CTARGET=${CTARGET:-i386}
200 - fi ;;
201 - efi-64)
202 - platform=efi
203 - if [[ ${CTARGET:-${CHOST}} == i?86* ]]; then
204 - local CTARGET=${CTARGET:-x86_64}
205 - local TARGET_CFLAGS="-Os -march=x86-64 ${TARGET_CFLAGS}"
206 - local TARGET_CPPFLAGS="-march=x86-64 ${TARGET_CPPFLAGS}"
207 - export TARGET_CFLAGS TARGET_CPPFLAGS
208 - fi ;;
209 - guessed) ;;
210 - *) platform=${MULTIBUILD_VARIANT} ;;
211 - esac
212 -
213 - local myeconfargs=(
214 - --disable-werror
215 - --program-prefix=
216 - --libdir="${EPREFIX}"/usr/lib
217 - --htmldir="${EPREFIX}"/usr/share/doc/${PF}/html
218 - $(use_enable debug mm-debug)
219 - $(use_enable debug grub-emu-usb)
220 - $(use_enable device-mapper)
221 - $(use_enable mount grub-mount)
222 - $(use_enable nls)
223 - $(use_enable themes grub-themes)
224 - $(use_enable truetype grub-mkfont)
225 - $(use_enable libzfs)
226 - $(use sdl && use_enable debug grub-emu-sdl)
227 - ${platform:+--with-platform=}${platform}
228 -
229 - # Let configure detect this where supported
230 - $(usex efiemu '' '--disable-efiemu')
231 - )
232 -
233 - if use multislot; then
234 - myeconfargs+=( --program-transform-name="s,grub,grub2," )
235 - fi
236 -
237 - mkdir -p "${BUILD_DIR}" || die
238 - run_in_build_dir setup_fonts
239 -
240 - autotools-utils_src_configure
241 -}
242 -
243 -src_configure() {
244 - # Bug 508758.
245 - replace-flags -O3 -O2
246 -
247 - # We don't want to leak flags onto boot code.
248 - export HOST_CCASFLAGS=${CCASFLAGS}
249 - export HOST_CFLAGS=${CFLAGS}
250 - export HOST_CPPFLAGS=${CPPFLAGS}
251 - export HOST_LDFLAGS=${LDFLAGS}
252 - unset CCASFLAGS CFLAGS CPPFLAGS LDFLAGS
253 -
254 - use static && HOST_LDFLAGS+=" -static"
255 -
256 - tc-ld-disable-gold #439082 #466536 #526348
257 - export TARGET_LDFLAGS="${TARGET_LDFLAGS} ${LDFLAGS}"
258 - unset LDFLAGS
259 -
260 - tc-export CC NM OBJCOPY RANLIB STRIP
261 - tc-export BUILD_CC # Bug 485592
262 -
263 - # Portage will take care of cleaning up GRUB_PLATFORMS
264 - MULTIBUILD_VARIANTS=( ${GRUB_PLATFORMS:-guessed} )
265 - multibuild_parallel_foreach_variant grub_configure
266 -}
267 -
268 -src_compile() {
269 - # Sandbox bug 404013.
270 - use libzfs && addpredict /etc/dfs:/dev/zfs
271 -
272 - multibuild_foreach_variant autotools-utils_src_compile
273 -
274 - use doc && multibuild_for_best_variant \
275 - autotools-utils_src_compile -C docs html
276 -}
277 -
278 -src_test() {
279 - # The qemu dependency is a bit complex.
280 - # You will need to adjust QEMU_SOFTMMU_TARGETS to match the cpu/platform.
281 - multibuild_foreach_variant autotools-utils_src_test
282 -}
283 -
284 -src_install() {
285 - multibuild_foreach_variant autotools-utils_src_install \
286 - bashcompletiondir="$(get_bashcompdir)"
287 -
288 - local grub=grub
289 - if use multislot; then
290 - grub=grub2
291 - mv "${ED%/}"/usr/share/info/grub{,2}.info || die
292 - mv "${ED%/}"/$(get_bashcompdir)/grub{,2} || die
293 - fi
294 -
295 - bashcomp_alias ${grub} ${grub}-{install,set-default,mkrescue,reboot,script-check,editenv,sparc64-setup,mkfont,mkpasswd-pbkdf2,mkimage,bios-setup,mkconfig,probe}
296 -
297 - use doc && multibuild_for_best_variant run_in_build_dir \
298 - emake -C docs DESTDIR="${D}" install-html
299 -
300 - insinto /etc/default
301 - newins "${FILESDIR}"/grub.default-3 grub
302 -}
303 -
304 -pkg_postinst() {
305 - mount-boot_mount_boot_partition
306 -
307 - if [[ -e "${ROOT%/}/boot/grub2/grub.cfg" ]]; then
308 - ewarn "The grub directory has changed from /boot/grub2 to /boot/grub."
309 - ewarn "Please run grub2-install and grub2-mkconfig -o /boot/grub/grub.cfg."
310 -
311 - if [[ ! -e "${ROOT%/}/boot/grub/grub.cfg" ]]; then
312 - mkdir -p "${ROOT%/}/boot/grub"
313 - ln -s ../grub2/grub.cfg "${ROOT%/}/boot/grub/grub.cfg"
314 - fi
315 - fi
316 -
317 - mount-boot_pkg_postinst
318 -
319 - elog "For information on how to configure GRUB2 please refer to the guide:"
320 - elog " https://wiki.gentoo.org/wiki/GRUB2_Quick_Start"
321 -
322 - if has_version 'sys-boot/grub:0'; then
323 - elog "A migration guide for GRUB Legacy users is available:"
324 - elog " https://wiki.gentoo.org/wiki/GRUB2_Migration"
325 - fi
326 -
327 - if [[ -z ${REPLACING_VERSIONS} ]]; then
328 - elog
329 - elog "You may consider installing the following optional packages:"
330 - optfeature "Detect other operating systems (grub-mkconfig)" sys-boot/os-prober
331 - optfeature "Create rescue media (grub-mkrescue)" dev-libs/libisoburn
332 - optfeature "Enable RAID device detection" sys-fs/mdadm
333 - fi
334 -}