From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1QR2Pb-0007Wb-V9 for garchives@archives.gentoo.org; Mon, 30 May 2011 13:21:40 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B34D3E0495; Mon, 30 May 2011 13:21:29 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 717BFE0495 for ; Mon, 30 May 2011 13:21:29 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id C4F772AC127 for ; Mon, 30 May 2011 13:21:28 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id E90BD80505 for ; Mon, 30 May 2011 13:21:27 +0000 (UTC) From: "Tomas Chvatal" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Tomas Chvatal" Message-ID: Subject: [gentoo-commits] dev/scarabeus:master commit in: sys-boot/grub/ X-VCS-Repository: dev/scarabeus X-VCS-Files: sys-boot/grub/Manifest sys-boot/grub/grub-1.99.ebuild sys-boot/grub/grub-9999.ebuild X-VCS-Directories: sys-boot/grub/ X-VCS-Committer: scarabeus X-VCS-Committer-Name: Tomas Chvatal X-VCS-Revision: f636811e4dcdd14a9196d36e04fa4cc742ac83d2 Date: Mon, 30 May 2011 13:21:27 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: 9c6850c9b39a3467b5556c08a450d619 commit: f636811e4dcdd14a9196d36e04fa4cc742ac83d2 Author: Tomas Chvatal gentoo org> AuthorDate: Mon May 30 13:20:20 2011 +0000 Commit: Tomas Chvatal gentoo org> CommitDate: Mon May 30 13:20:20 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Ddev/scarabeus.git;= a=3Dcommit;h=3Df636811e [sys-boot/grub] Add USE_EXPAND for platform. TODO: somehow make it not fa= il so we detect what useflag is possible on what cpu. --- sys-boot/grub/Manifest | 4 +- sys-boot/grub/grub-1.99.ebuild | 104 +++++++++++++++++++++++++++++++++-= ------ sys-boot/grub/grub-9999.ebuild | 104 +++++++++++++++++++++++++++++++++-= ------ 3 files changed, 176 insertions(+), 36 deletions(-) diff --git a/sys-boot/grub/Manifest b/sys-boot/grub/Manifest index e99e876..31425b7 100644 --- a/sys-boot/grub/Manifest +++ b/sys-boot/grub/Manifest @@ -1,5 +1,5 @@ AUX grub.default 1127 RMD160 a884e842cb203687cac4cac6551b0feed58d3b7a SH= A1 5878147845b5d4b4aac34ce046ead60b93c3170c SHA256 32664f2e0bdd05cf9579f8= e098aa0add76ef7bf7b37eb103c6d0f625204f44d3 DIST grub-1.99.tar.xz 2639224 RMD160 d59a47fa40b2be0d5ea5b2b00ff5538cfa1= 47747 SHA1 a5ae9558f30ce7757a76aa130088b053a87e2fb6 SHA256 f308148d4c83c6= f16a73b58a0cd39381656edb740929028cae7ad5f0d651021b -EBUILD grub-1.99.ebuild 4015 RMD160 35212619b0ec881a665bcd481062e7e64007= 1cfe SHA1 bdff1287700e0da8a16f7d079dd04ed9c75e96e5 SHA256 8a312c21f31e6dd= a4c80fd52b3178b28a9284c186015f430483779637088d922 -EBUILD grub-9999.ebuild 4015 RMD160 35212619b0ec881a665bcd481062e7e64007= 1cfe SHA1 bdff1287700e0da8a16f7d079dd04ed9c75e96e5 SHA256 8a312c21f31e6dd= a4c80fd52b3178b28a9284c186015f430483779637088d922 +EBUILD grub-1.99.ebuild 5608 RMD160 7d5fc5f793e025bc271077c02d5942f19a2f= 2a61 SHA1 7a6087fd1c58d6566b5eab0faecf4b192b1502dd SHA256 b68ca2209a986c6= 83177e8abb2f5c98d25820a919388880e52eeb82b5f339c9e +EBUILD grub-9999.ebuild 5608 RMD160 7d5fc5f793e025bc271077c02d5942f19a2f= 2a61 SHA1 7a6087fd1c58d6566b5eab0faecf4b192b1502dd SHA256 b68ca2209a986c6= 83177e8abb2f5c98d25820a919388880e52eeb82b5f339c9e MISC metadata.xml 264 RMD160 3cb995676f964b9637fbfc0027a81b9409802608 SH= A1 c4d35e3a71c545cdf1aae525de803126bf54f596 SHA256 9bd1ce830cf1b821978ab9= 0c81b2e369177a8d7c1bfe2dd2868419872c097f64 diff --git a/sys-boot/grub/grub-1.99.ebuild b/sys-boot/grub/grub-1.99.ebu= ild index a00a605..2d41728 100644 --- a/sys-boot/grub/grub-1.99.ebuild +++ b/sys-boot/grub/grub-1.99.ebuild @@ -2,9 +2,6 @@ # Distributed under the terms of the GNU General Public License v2 # $Header: $ =20 -# FIXME: somehow depend on python-2 only; using python eclass maybe? -# NOTE: good idea would be to move grub-2 to new package called grub2 - EAPI=3D4 =20 if [[ ${PV} =3D=3D "9999" ]] ; then @@ -29,6 +26,12 @@ SLOT=3D"0" [[ ${PV} !=3D "9999" ]] && KEYWORDS=3D"~amd64 ~x86" IUSE=3D"custom-cflags debug device-mapper nls static sdl truetype" =20 +GRUB_PLATFORMS=3D"coreboot efi emu ieee1275 pc qemu yeeloong" +for i in ${GRUB_PLATFORMS}; do + IUSE+=3D" grub_platform_${i}" +done +unset i + # os-prober: Used on runtime to detect other OSes # xorriso (dev-libs/libisoburn): Used on runtime for mkrescue RDEPEND=3D" @@ -59,23 +62,34 @@ QA_EXECSTACK=3D" bin/grub-fstest " =20 -DOCS=3D( AUTHORS ChangeLog NEWS README THANKS TODO ) +grub_run_phase() { + local phase=3D$1 + local platform=3D$2 + [[ -z ${phase} ]] && die "${FUNCNAME}: Phase is undefined" + [[ -z ${platform} ]] && die "${FUNCNAME}: Platform is undefined" =20 -src_prepare() { - epatch_user + [[ -d "${WORKDIR}/build-${platform}" ]] || \ + { mkdir "${WORKDIR}/build-${platform}" || die ; } + pushd "${WORKDIR}/build-${platform}" > /dev/null || die =20 - # autogen.sh does more than just run autotools - if [[ ${PV} =3D=3D "9999" ]] ; then - sed -i -e '/^autoreconf/ d' autogen.sh || die - (. ./autogen.sh) || die - eautoreconf - fi + echo ">>> Running ${phase} for platform \"${platform}\"" + echo ">>> Working in: \"${WORKDIR}/build-${platform}\"" + + grub_${phase} ${platform} + + popd > /dev/null || die } =20 -src_configure() { - use custom-cflags || unset CFLAGS CPPFLAGS LDFLAGS - use static && append-ldflags -static +grub_src_configure() { + local platform=3D$1 =20 + [[ -z ${platform} ]] && die "${FUNCNAME}: Platform is undefined" + + [[ ${platform} =3D=3D "guessed" ]] \ + && platform=3D"" \ + || platform=3D"--with-platform=3D${platform}" + + ECONF_SOURCE=3D"${WORKDIR}/${P}/" \ econf \ --disable-werror \ --sbindir=3D/sbin \ @@ -87,12 +101,68 @@ src_configure() { $(use_enable nls) \ $(use_enable debug mm-debug) \ $(use sdl && use_enable debug grub-emu-sdl) \ - $(use_enable debug grub-emu-usb) + $(use_enable debug grub-emu-usb) \ + ${platform} +} + +grub_src_compile() { + default_src_compile +} + +grub_src_install() { + default_src_install +} + +src_prepare() { + local i + + epatch_user + + # autogen.sh does more than just run autotools + if [[ ${PV} =3D=3D "9999" ]] ; then + sed -i -e '/^autoreconf/ d' autogen.sh || die + (. ./autogen.sh) || die + eautoreconf + fi + + # get enabled platforms + GRUB_ENABLED_PLATFORMS=3D"" + for i in ${GRUB_PLATFORMS}; do + use grub_platform_${i} && GRUB_ENABLED_PLATFORMS+=3D" ${i}" + done +} + +src_configure() { + local i + + use custom-cflags || unset CFLAGS CPPFLAGS LDFLAGS + use static && append-ldflags -static + + [[ -z ${GRUB_ENABLED_PLATFORMS} ]] && grub_run_phase ${FUNCNAME} guesse= d + for i in ${GRUB_ENABLED_PLATFORMS}; do + grub_run_phase ${FUNCNAME} ${i} + done +} + +src_compile() { + local i + + [[ -z ${GRUB_ENABLED_PLATFORMS} ]] && grub_run_phase ${FUNCNAME} guesse= d + for i in ${GRUB_ENABLED_PLATFORMS}; do + grub_run_phase ${FUNCNAME} ${i} + done } =20 src_install() { - default + local i + + [[ -z ${GRUB_ENABLED_PLATFORMS} ]] && grub_run_phase ${FUNCNAME} guesse= d + for i in ${GRUB_ENABLED_PLATFORMS}; do + grub_run_phase ${FUNCNAME} ${i} + done =20 + # can't be in docs array as we use defualt_src_install in different bui= lddir + dodoc AUTHORS ChangeLog NEWS README THANKS TODO insinto /etc/default newins "${FILESDIR}"/grub.default grub cat <<-EOF >> "${D}"/lib*/grub/grub-mkconfig_lib diff --git a/sys-boot/grub/grub-9999.ebuild b/sys-boot/grub/grub-9999.ebu= ild index a00a605..2d41728 100644 --- a/sys-boot/grub/grub-9999.ebuild +++ b/sys-boot/grub/grub-9999.ebuild @@ -2,9 +2,6 @@ # Distributed under the terms of the GNU General Public License v2 # $Header: $ =20 -# FIXME: somehow depend on python-2 only; using python eclass maybe? -# NOTE: good idea would be to move grub-2 to new package called grub2 - EAPI=3D4 =20 if [[ ${PV} =3D=3D "9999" ]] ; then @@ -29,6 +26,12 @@ SLOT=3D"0" [[ ${PV} !=3D "9999" ]] && KEYWORDS=3D"~amd64 ~x86" IUSE=3D"custom-cflags debug device-mapper nls static sdl truetype" =20 +GRUB_PLATFORMS=3D"coreboot efi emu ieee1275 pc qemu yeeloong" +for i in ${GRUB_PLATFORMS}; do + IUSE+=3D" grub_platform_${i}" +done +unset i + # os-prober: Used on runtime to detect other OSes # xorriso (dev-libs/libisoburn): Used on runtime for mkrescue RDEPEND=3D" @@ -59,23 +62,34 @@ QA_EXECSTACK=3D" bin/grub-fstest " =20 -DOCS=3D( AUTHORS ChangeLog NEWS README THANKS TODO ) +grub_run_phase() { + local phase=3D$1 + local platform=3D$2 + [[ -z ${phase} ]] && die "${FUNCNAME}: Phase is undefined" + [[ -z ${platform} ]] && die "${FUNCNAME}: Platform is undefined" =20 -src_prepare() { - epatch_user + [[ -d "${WORKDIR}/build-${platform}" ]] || \ + { mkdir "${WORKDIR}/build-${platform}" || die ; } + pushd "${WORKDIR}/build-${platform}" > /dev/null || die =20 - # autogen.sh does more than just run autotools - if [[ ${PV} =3D=3D "9999" ]] ; then - sed -i -e '/^autoreconf/ d' autogen.sh || die - (. ./autogen.sh) || die - eautoreconf - fi + echo ">>> Running ${phase} for platform \"${platform}\"" + echo ">>> Working in: \"${WORKDIR}/build-${platform}\"" + + grub_${phase} ${platform} + + popd > /dev/null || die } =20 -src_configure() { - use custom-cflags || unset CFLAGS CPPFLAGS LDFLAGS - use static && append-ldflags -static +grub_src_configure() { + local platform=3D$1 =20 + [[ -z ${platform} ]] && die "${FUNCNAME}: Platform is undefined" + + [[ ${platform} =3D=3D "guessed" ]] \ + && platform=3D"" \ + || platform=3D"--with-platform=3D${platform}" + + ECONF_SOURCE=3D"${WORKDIR}/${P}/" \ econf \ --disable-werror \ --sbindir=3D/sbin \ @@ -87,12 +101,68 @@ src_configure() { $(use_enable nls) \ $(use_enable debug mm-debug) \ $(use sdl && use_enable debug grub-emu-sdl) \ - $(use_enable debug grub-emu-usb) + $(use_enable debug grub-emu-usb) \ + ${platform} +} + +grub_src_compile() { + default_src_compile +} + +grub_src_install() { + default_src_install +} + +src_prepare() { + local i + + epatch_user + + # autogen.sh does more than just run autotools + if [[ ${PV} =3D=3D "9999" ]] ; then + sed -i -e '/^autoreconf/ d' autogen.sh || die + (. ./autogen.sh) || die + eautoreconf + fi + + # get enabled platforms + GRUB_ENABLED_PLATFORMS=3D"" + for i in ${GRUB_PLATFORMS}; do + use grub_platform_${i} && GRUB_ENABLED_PLATFORMS+=3D" ${i}" + done +} + +src_configure() { + local i + + use custom-cflags || unset CFLAGS CPPFLAGS LDFLAGS + use static && append-ldflags -static + + [[ -z ${GRUB_ENABLED_PLATFORMS} ]] && grub_run_phase ${FUNCNAME} guesse= d + for i in ${GRUB_ENABLED_PLATFORMS}; do + grub_run_phase ${FUNCNAME} ${i} + done +} + +src_compile() { + local i + + [[ -z ${GRUB_ENABLED_PLATFORMS} ]] && grub_run_phase ${FUNCNAME} guesse= d + for i in ${GRUB_ENABLED_PLATFORMS}; do + grub_run_phase ${FUNCNAME} ${i} + done } =20 src_install() { - default + local i + + [[ -z ${GRUB_ENABLED_PLATFORMS} ]] && grub_run_phase ${FUNCNAME} guesse= d + for i in ${GRUB_ENABLED_PLATFORMS}; do + grub_run_phase ${FUNCNAME} ${i} + done =20 + # can't be in docs array as we use defualt_src_install in different bui= lddir + dodoc AUTHORS ChangeLog NEWS README THANKS TODO insinto /etc/default newins "${FILESDIR}"/grub.default grub cat <<-EOF >> "${D}"/lib*/grub/grub-mkconfig_lib