diff options
author | Joseph Jezak <josejx@gentoo.org> | 2012-05-12 03:08:26 +0000 |
---|---|---|
committer | Joseph Jezak <josejx@gentoo.org> | 2012-05-12 03:08:26 +0000 |
commit | a5c898882ad2e411d1651e2a65ba672cf47ada56 (patch) | |
tree | d02291b2b3aa24fccfe1caf73535f6c83956c8cc /sys-boot/yaboot | |
parent | keyword ~amd64-fbsd (diff) | |
download | gentoo-2-a5c898882ad2e411d1651e2a65ba672cf47ada56.tar.gz gentoo-2-a5c898882ad2e411d1651e2a65ba672cf47ada56.tar.bz2 gentoo-2-a5c898882ad2e411d1651e2a65ba672cf47ada56.zip |
Added patch to fix devspec path on newer kernels.
(Portage version: 2.1.10.57/cvs/Linux x86_64)
Diffstat (limited to 'sys-boot/yaboot')
-rw-r--r-- | sys-boot/yaboot/ChangeLog | 8 | ||||
-rw-r--r-- | sys-boot/yaboot/files/new-ofpath-devspec.patch | 28 | ||||
-rw-r--r-- | sys-boot/yaboot/yaboot-1.3.17-r2.ebuild | 61 |
3 files changed, 96 insertions, 1 deletions
diff --git a/sys-boot/yaboot/ChangeLog b/sys-boot/yaboot/ChangeLog index ab9a2e1e4f82..d228fb55c908 100644 --- a/sys-boot/yaboot/ChangeLog +++ b/sys-boot/yaboot/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for sys-boot/yaboot # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-boot/yaboot/ChangeLog,v 1.41 2012/05/05 12:38:15 josejx Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-boot/yaboot/ChangeLog,v 1.42 2012/05/12 03:08:26 josejx Exp $ + +*yaboot-1.3.17-r2 (12 May 2012) + + 12 May 2012; Joseph Jezak <josejx@gentoo.org> +yaboot-1.3.17-r2.ebuild, + +files/new-ofpath-devspec.patch: + Add patch to fix devspec location. 05 May 2012; Joseph Jezak <josejx@gentoo.org> files/yaboot-stubfuncs.patch: Update the stub functions to work with e2fsprogs-1.42.0. diff --git a/sys-boot/yaboot/files/new-ofpath-devspec.patch b/sys-boot/yaboot/files/new-ofpath-devspec.patch new file mode 100644 index 000000000000..ac03c15d8dd7 --- /dev/null +++ b/sys-boot/yaboot/files/new-ofpath-devspec.patch @@ -0,0 +1,28 @@ +--- ybin/ofpath.bak 2012-05-09 12:24:51.709911981 -0400 ++++ ybin/ofpath 2012-05-09 12:32:19.661560544 -0400 +@@ -85,11 +85,20 @@ + [ "$DEBUG" = 1 ] && echo "Devpath is: $DEVPATH" + + ### Get the OF Path of the controller +-case ${DISK_NAME} in +- sd*|sg*|sr*) CONTROLLER_PATH=$(cat ${DEVPATH}/../../../devspec) ;; +- hd*) CONTROLLER_PATH=$(cat ${DEVPATH}/../../devspec) ;; +- *) CONTROLLER_PATH="" ;; +-esac ++if [ -e "${DEVPATH}/../../devspec" ]; then ++ ### /dev/hd* ++ CONTROLLER_PATH=$(cat ${DEVPATH}/../../devspec); ++elif [ -e "${DEVPATH}/../../../devspec" ]; then ++ ### /dev/sd* on kernel <3.3 ++ CONTROLLER_PATH=$(cat ${DEVPATH}/../../../devspec); ++elif [ -e "${DEVPATH}/../../../../devspec" ]; then ++ ### /dev/sd* on kernel 3.3+ ++ CONTROLLER_PATH=$(cat ${DEVPATH}/../../../../devspec); ++else ++ ### None of the above... ++ CONTROLLER_PATH=""; ++fi ++ + if [ -z "$CONTROLLER_PATH" ]; then + echo "Unable to determine controller path!" + exit 1 diff --git a/sys-boot/yaboot/yaboot-1.3.17-r2.ebuild b/sys-boot/yaboot/yaboot-1.3.17-r2.ebuild new file mode 100644 index 000000000000..10a60ac85ac8 --- /dev/null +++ b/sys-boot/yaboot/yaboot-1.3.17-r2.ebuild @@ -0,0 +1,61 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-boot/yaboot/yaboot-1.3.17-r2.ebuild,v 1.1 2012/05/12 03:08:26 josejx Exp $ + +EAPI=2 + +inherit eutils toolchain-funcs + +DESCRIPTION="PPC Bootloader" +SRC_URI="http://yaboot.ozlabs.org/releases/${P}.tar.gz" +HOMEPAGE="http://yaboot.ozlabs.org" +SLOT="0" +LICENSE="GPL-2" +KEYWORDS="-* ~ppc -ppc64" +IUSE="ibm" + +DEPEND="sys-apps/powerpc-utils + sys-fs/e2fsprogs[static-libs]" +RDEPEND="!ibm? ( sys-fs/hfsutils + sys-fs/hfsplusutils + sys-fs/mac-fdisk )" + +src_unpack() { + unpack ${A} + cd "${S}" + cp "${FILESDIR}/new-ofpath" "${S}/ybin/ofpath" +} + +src_prepare() { + # dual boot patch + epatch "${FILESDIR}/yabootconfig-1.3.13.patch" + epatch "${FILESDIR}/chrpfix.patch" + if [[ "$(gcc-major-version)" -eq "3" ]]; then + epatch "${FILESDIR}/${PN}-nopiessp.patch" + fi + if [[ "$(gcc-major-version)" -eq "4" ]]; then + epatch "${FILESDIR}/${P}-nopiessp-gcc4.patch" + fi + + # Error only on real errors, for prom printing format compile failure + sed -i "s:-Werror:-Wno-error:g" Makefile + + # Stub out some functions that are not provided (and unneeded) + epatch "${FILESDIR}/${PN}-stubfuncs.patch" + + # Fix the devspec path on newer kernels + epatch "${FILESDIR}/new-ofpath-devspec.patch" +} + +src_compile() { + export -n CFLAGS + export -n CXXFLAGS + [ -n "$(tc-getCC)" ] || CC="gcc" + emake PREFIX=/usr MANDIR=share/man CC="$(tc-getCC)" || die +} + +src_install() { + sed -i -e 's/\/local//' etc/yaboot.conf + make ROOT="${D}" PREFIX=/usr MANDIR=share/man install || die + mv "${D}/etc/yaboot.conf" "${D}/etc/yaboot.conf.sample" +} |