diff options
-rw-r--r-- | sys-boot/yaboot/ChangeLog | 8 | ||||
-rw-r--r-- | sys-boot/yaboot/Manifest | 10 | ||||
-rw-r--r-- | sys-boot/yaboot/files/yaboot-stubfuncs.patch | 158 | ||||
-rw-r--r-- | sys-boot/yaboot/yaboot-1.3.17-r1.ebuild | 52 |
4 files changed, 223 insertions, 5 deletions
diff --git a/sys-boot/yaboot/ChangeLog b/sys-boot/yaboot/ChangeLog index 8c1f839f9b86..21cab31e68cb 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.38 2012/02/24 15:15:33 josejx Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-boot/yaboot/ChangeLog,v 1.39 2012/05/02 06:09:57 josejx Exp $ + +*yaboot-1.3.17-r1 (02 May 2012) + + 02 May 2012; Joseph Jezak <josejx@gentoo.org> +yaboot-1.3.17-r1.ebuild, + +files/yaboot-stubfuncs.patch: + Added stubbed function patch to fix building with e2fsprogs-1.42. *yaboot-1.3.17 (24 Feb 2012) diff --git a/sys-boot/yaboot/Manifest b/sys-boot/yaboot/Manifest index 2d9574880776..69776121b7d3 100644 --- a/sys-boot/yaboot/Manifest +++ b/sys-boot/yaboot/Manifest @@ -8,19 +8,21 @@ AUX yaboot-1.3.16-memalign.patch 889 RMD160 e5ed2a0b6f0c9262ba9a9d3469c4a0c16e77 AUX yaboot-1.3.17-nopiessp-gcc4.patch 1495 RMD160 e79f715a1aff784b9fee789c41a8fa6deeab7b89 SHA1 e35d0c217ec5ff16fb293814fe95bca9009ff333 SHA256 b49b64f54de33026f9a8238685735bd737f007b898650b2a42eac4c4dbbc205d AUX yaboot-nopiessp-gcc4.patch 1623 RMD160 2c5cd0e61acf01bc82a5f49cf07838f143c49f99 SHA1 4a783fbb82f35f0d2792ff5a83dd480326677752 SHA256 61775623e47719ee0dfce343fa86957e17b4e40c6e695c254b1862cefa428fa1 AUX yaboot-nopiessp.patch 1885 RMD160 ad6bc10b7f9eca86a155691ed11e7e8b234ff6bf SHA1 6adb7f426fede91e9f2a5276bf87b6f2ad0bea1d SHA256 69fcfa7a6c464304b8a9c68da8331909948686955f4a9e10d23505f700bee1ab +AUX yaboot-stubfuncs.patch 3106 RMD160 abc64847706adb22c5ce4b990b7b0377a32410d5 SHA1 1143b8918545cf40d2333d5627075f931f57e731 SHA256 f5bf0256269b1865ee794dd1f04ed3fcba329fc881c6efc53ed2657050c0d82e AUX yabootconfig-1.3.13.patch 1655 RMD160 fd3e62c5cddbe359df3f2abee225392e0ff86144 SHA1 c50bd7dabe553e00c466cfa63cbdb9f20257a74b SHA256 ee662c068ba7800d1d0c85a927f3990658cc488ebd3672e40740b7473ba3bb20 DIST yaboot-1.3.14.tar.gz 219089 RMD160 dd46fc044732c5bdf3dc23b3faa1dd746895cdd5 SHA1 2bf7594a921075371acf468a46776d0f93e315a6 SHA256 b1b0ddc798e332dc03065bac871b05f700b6f8383951a05dee68a7438f644933 DIST yaboot-1.3.16.tar.gz 220360 RMD160 738118a5f12ab39c24c2e5983d8852e1b439c846 SHA1 6c87bb041e8dc569b624d99ec5a5d53c8911319f SHA256 16635d5ed0298d46e26e1da8f7a793e185ddb796e3e567554869676650a44650 DIST yaboot-1.3.17.tar.gz 224325 RMD160 6dce388238a6a4e554c1ab3e7cae4fbe4416dde3 SHA1 672011dbcd35890ae984ede6ddfcda0a75221115 SHA256 2fb738d8fd48b94ab2534a4fdf63738ad02c1a30f4b2add91f837baff8fa2aa1 EBUILD yaboot-1.3.14-r2.ebuild 1268 RMD160 dddd538a19b1720f3410f0c3d7089d64895ce78c SHA1 6b817e1c7169c1c8c43a71e5be0baed1aa6fa8d6 SHA256 7b47d3446fb9f7f26be7f17191a93082400643958792eb6f405a7dd732de73a6 EBUILD yaboot-1.3.16.ebuild 1341 RMD160 4b2126940730b0b9741c598426bea086cd7826e6 SHA1 853d744db363364f0c5b9af85b24b0f2f9a63192 SHA256 6a21594179712ca4819fdb7265cc6aa259a69a108f82de6529e7fa97c86bef7c +EBUILD yaboot-1.3.17-r1.ebuild 1430 RMD160 9642f33e2aa153573ec6c74c1b01d0d650f27de6 SHA1 49156f2f38f00c730e876db1a62062292354e9ed SHA256 835d894dff5b88fee7f1834f0205250955efc35030fcdb794dec7ad9ff9a5425 EBUILD yaboot-1.3.17.ebuild 1382 RMD160 a72b1e10eb053cadbb91ce70798fb3a8a6a39a4d SHA1 69456b6a0525fec2ff2b826f18f6b16f7b9abe8e SHA256 6193823e37ae89c66d483848b660f91ffd41189c14173a0995299cc3e1287c89 -MISC ChangeLog 9938 RMD160 83a404c7b5ce9d0a2b595f5f5b92c9cb331f3da7 SHA1 55cb0a7058112a59d33c8655c59dff7594d082cf SHA256 7f0ca8236380216247e42b2dd8e232d230e1a34ff93f21f25e4c98c67233b7bb +MISC ChangeLog 10147 RMD160 9836714de81209c933acb0b70f86b119fbe7c8fc SHA1 d6553c4bf07fc95ac71d1c8eecc41beff91f371e SHA256 dc91b5e09b45b8e416551edfca609089c8d205868c7e1010d2ecf8b60ad430eb MISC metadata.xml 175 RMD160 a674189a82ea2172e0949ce49eb80dd5bc23ddf5 SHA1 c203d37a08bfb7b826b080650c3019705490bfb1 SHA256 123ecdec2aa3d066ff52ce8a8013191ede4c949290dad2afc2a2c505500e765a -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (GNU/Linux) -iEYEARECAAYFAk9HqaIACgkQcsIHjyDViGTICwCbBZ86ZYMznZV7q9c2r9LwtOSR -O/kAnRTRT7lqginWQD47ggV3si9q4zOu -=R6kL +iEYEARECAAYFAk+gz7oACgkQcsIHjyDViGRRIACg22S+Hw4hLEN+PwJoqCuT3ews +kLYAn1hl6uEvR01AVZ2w5Rc7cqNfVQMo +=EL+S -----END PGP SIGNATURE----- diff --git a/sys-boot/yaboot/files/yaboot-stubfuncs.patch b/sys-boot/yaboot/files/yaboot-stubfuncs.patch new file mode 100644 index 000000000000..b315cc684c7d --- /dev/null +++ b/sys-boot/yaboot/files/yaboot-stubfuncs.patch @@ -0,0 +1,158 @@ +diff --git a/lib/malloc.c b/lib/malloc.c +index 0121112..d077630 100644 +--- a/lib/malloc.c ++++ b/lib/malloc.c +@@ -64,6 +64,17 @@ void *malloc (unsigned int size) + return caddr; + } + ++/* Calloc wrapper for malloc */ ++void *memset(void *s, int c, size_t n); ++void *calloc(size_t nmemb, size_t size) { ++ void *caddr; ++ caddr = malloc(nmemb * size); ++ memset(caddr, 0, nmemb * size); ++ return caddr; ++} ++ ++ ++ + /* Do not fall back to the malloc above as posix_memalign is needed by + * external libraries not yaboot */ + int posix_memalign(void **memptr, size_t alignment, size_t size) +diff --git a/lib/nonstd.c b/lib/nonstd.c +index 5aeb0cb..0a13246 100644 +--- a/lib/nonstd.c ++++ b/lib/nonstd.c +@@ -65,3 +65,131 @@ char *getenv(const char *name) + { + return NULL; + } ++ ++int open(const char *pathname, int flags) { ++ return (int) prom_open((char *)pathname); ++} ++ ++int open64(const char *pathname, int flags) { ++ return (int) prom_open((char *)pathname); ++} ++ ++int __open64_2 (__const char *__path, int __oflag) { ++ return (int) prom_open((char *)__path); ++} ++ ++int __xstat64 (int __ver, const char *__filename, struct stat64 *__stat_buf) { ++ return 0; ++} ++ ++int __fxstat64 (int __ver, int __filedesc, struct stat64 *__stat_buf) { ++ return 0; ++} ++ ++int read(int fd, void *buf, size_t count) { ++ return prom_read((void *)fd, buf, count); ++} ++ ++int close(int fd) { ++ prom_close((void *)fd); ++ return 0; ++} ++ ++void exit(int status) { ++ prom_exit(); ++} ++ ++int __printf_chk(int flag, const char *format, ...) { ++ va_list ap; ++ va_start (ap, format); ++ prom_vfprintf (prom_stdout, format, ap); ++ va_end (ap); ++ ++ return 0; ++} ++ ++int __sprintf_chk(char * str, int flag, size_t strlen, const char * format, ...) { ++ va_list ap; ++ va_start(ap, format); ++ // No sprintf? :( ++ va_end(ap); ++ return 0; ++ ++} ++ ++int __fprintf_chk(FILE *stream, int flag, const char *format, ...) { ++ va_list ap; ++ va_start (ap, format); ++ prom_vfprintf (prom_stdout, format, ap); ++ va_end (ap); ++ ++ return 0; ++} ++ ++void *memcpy(void *dest, const void *src, size_t n); ++void *__memcpy_chk(void *dest, const void *src, size_t n, size_t destlen) { ++ return memcpy(dest, src, n); ++} ++ ++ ++// Dummy functions ++signed int random(void) { ++ return 0; ++} ++ ++void srandom(unsigned int seed) { ++ return; ++} ++ ++unsigned int sleep(unsigned int seconds) { ++ return 0; ++} ++ ++int gettimeofday(void *tv, void *tz) { ++ return 0; ++} ++ ++long sysconf(int name) { ++ return 0; ++} ++ ++int getpagesize(void) { ++ return 0; ++} ++ ++int gethostname(char *name, size_t len) { ++ return 0; ++} ++ ++int getpid(void) { ++ return 0; ++} ++ ++int getuid(void) { ++ return 0; ++} ++ ++void qsort(void *base, size_t nmemb, size_t size, int(*compar)(const void *, const void *)) { ++ return; ++} ++ ++int * __errno_location(void) { ++ return 0; ++} ++ ++int lseek(int fd, int offset, int whence) { ++ return prom_lseek ((void *)fd, whence + offset); ++} ++ ++int lseek64(int fd, int offset, int whence) { ++ return prom_lseek ((void *)fd, whence + offset); ++} ++ ++// Stubbed ... ++size_t fwrite(const void *ptr, size_t size, size_t nmemb, void *stream) { ++ return 0; ++} ++ ++ ++int stderr = 0; ++int perror = 0; diff --git a/sys-boot/yaboot/yaboot-1.3.17-r1.ebuild b/sys-boot/yaboot/yaboot-1.3.17-r1.ebuild new file mode 100644 index 000000000000..2a874563bc9c --- /dev/null +++ b/sys-boot/yaboot/yaboot-1.3.17-r1.ebuild @@ -0,0 +1,52 @@ +# 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-r1.ebuild,v 1.1 2012/05/02 06:09:57 josejx Exp $ + +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" +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" + + # 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 + + epatch "${FILESDIR}/${PN}-stubfuncs.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" +} |