diff options
author | Bertrand Jacquin <beber@meleeweb.net> | 2009-04-24 10:58:47 +0200 |
---|---|---|
committer | Bertrand Jacquin <beber@meleeweb.net> | 2009-04-24 10:58:47 +0200 |
commit | 7c315b65329c1ef08350c32cb9c9d81c9fedf155 (patch) | |
tree | 274f7ceb3e4e1b901f0d5f5d7fa3b18ef1bef52b | |
parent | wdd: New syslog patch (diff) | |
download | portage-7c315b65329c1ef08350c32cb9c9d81c9fedf155.tar.xz |
mtd-utils: precise CC and CCOPT for allow cross-compile
-rw-r--r-- | sys-fs/mtd-utils/Manifest | 3 | ||||
-rw-r--r-- | sys-fs/mtd-utils/files/mtd-utils-fixup.patch | 32 | ||||
-rw-r--r-- | sys-fs/mtd-utils/mtd-utils-20080907.ebuild | 54 |
3 files changed, 89 insertions, 0 deletions
diff --git a/sys-fs/mtd-utils/Manifest b/sys-fs/mtd-utils/Manifest new file mode 100644 index 00000000..60ff8827 --- /dev/null +++ b/sys-fs/mtd-utils/Manifest @@ -0,0 +1,3 @@ +AUX mtd-utils-fixup.patch 1172 RMD160 3372bedd828485d2edd6cf9ea61d3896d3e929f7 SHA1 fdfe1799fc2a4479b09e07d0df9f5e7c054960f4 SHA256 994c98f2866826c592a300a95304822f6453ea8cdc8ba6a20c26d5f07c92b0c8 +DIST mtd-utils-snapshot-20080907-41c53b6f2d756ae995c3ffa4455576515427c5e0.tar.gz 400957 RMD160 da8b2b632a33db084b735683b1fbf00dd55de611 SHA1 83c5ab77504cb9f09bf15d3d92a23122817a7339 SHA256 9d26274299de7722ee2d3080e16d3fced04fd0d428a84c20ea6a628e180953e9 +EBUILD mtd-utils-20080907.ebuild 1434 RMD160 b1cb0d890252979d84112dfbf90a5ccc1b6a12ea SHA1 3dc567b7f703bd6ab55ea7d079c2c90dd6026bbe SHA256 ab5f015eaf02659a89e5c59bf7f3cdea6f866e616f24d0a73520d7144ae15074 diff --git a/sys-fs/mtd-utils/files/mtd-utils-fixup.patch b/sys-fs/mtd-utils/files/mtd-utils-fixup.patch new file mode 100644 index 00000000..08991500 --- /dev/null +++ b/sys-fs/mtd-utils/files/mtd-utils-fixup.patch @@ -0,0 +1,32 @@ +Fix up the parallel building. Without this fix, each instance of the NTARGETS +will try to build the libraries seperately, and on a suitably fast machine this +can lead to overwriting. Add a specific instance to build the libraries first. + +Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> + +diff -Nuar mtd-utils.orig/ubi-utils/Makefile mtd-utils/ubi-utils/Makefile +--- mtd-utils.orig/ubi-utils/Makefile 2008-09-23 18:51:00.129193374 -0700 ++++ mtd-utils/ubi-utils/Makefile 2008-09-23 18:54:04.097290355 -0700 +@@ -34,7 +34,10 @@ + IGNORE=${wildcard .*.c.dep} + -include ${IGNORE} + +-$(NTARGETS): ++nlibs: ++ $(MAKE) -C new-utils libs ++ ++$(NTARGETS): nlibs + $(MAKE) -C new-utils $@ + mv new-utils/$@ $@ + +diff -Nuar mtd-utils.orig/ubi-utils/new-utils/Makefile mtd-utils/ubi-utils/new-utils/Makefile +--- mtd-utils.orig/ubi-utils/new-utils/Makefile 2008-09-23 18:51:00.179204851 -0700 ++++ mtd-utils/ubi-utils/new-utils/Makefile 2008-09-23 18:53:32.513881545 -0700 +@@ -19,6 +19,7 @@ + vpath %.c src + + all: $(UTILS) ++libs: $(addsuffix .a,$(LIBS)) + + # The below cancels existing implicite rule to make programs from .c files, + # in order to force make using our rule defined below diff --git a/sys-fs/mtd-utils/mtd-utils-20080907.ebuild b/sys-fs/mtd-utils/mtd-utils-20080907.ebuild new file mode 100644 index 00000000..a6eb1c28 --- /dev/null +++ b/sys-fs/mtd-utils/mtd-utils-20080907.ebuild @@ -0,0 +1,54 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-fs/mtd-utils/mtd-utils-20080907.ebuild,v 1.6 2009/03/08 00:23:04 vapier Exp $ + +inherit toolchain-funcs eutils + +# Git ID for the snapshot +MY_PV="${PV}-41c53b6f2d756ae995c3ffa4455576515427c5e0" +DESCRIPTION="MTD userspace tools, based on GIT snapshot from upstream" +HOMEPAGE="http://git.infradead.org/?p=mtd-utils.git;a=summary" +SRC_URI="mirror://gentoo/${PN}-snapshot-${MY_PV}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 arm ~mips ppc x86" +IUSE="xattr" + +RDEPEND="!sys-fs/mtd + dev-libs/lzo + sys-libs/zlib" +# ACL is only required for the <sys/acl.h> header file to build mkfs.jffs2 +# And ACL brings in Attr as well. +DEPEND="${RDEPEND} + xattr? ( sys-apps/acl )" + +S=${WORKDIR}/${PN} + +src_unpack() { + unpack ${A} + cd "${S}" + sed -i 's:-Werror::' $(find . -name Makefile) + epatch "${FILESDIR}"/mtd-utils-fixup.patch +} + +src_compile() { + emake \ + CC="$(tc-getCC)" \ + OPTFLAGS="${CFLAGS}" \ + $(use xattr || echo WITHOUT_XATTR=1) \ + || die +} + +src_install() { + emake install DESTDIR="${D}" \ + CC="$(tc-getCC)" \ + OPTFLAGS="${CFLAGS}" \ + || die + newman ubi-utils/doc/unubi.roff unubi.1 + dodoc *.txt */*.TXT + newdoc mkfs.ubifs/README README.mkfs.ubifs + newdoc ubi-utils/README README.ubi-utils + newdoc ubi-utils/new-utils/README README.new-utils + # TODO: check ubi-utils for docs+scripts +} |