summaryrefslogtreecommitdiff
path: root/sys-fs
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2011-03-27 03:35:08 +0000
committerMike Frysinger <vapier@gentoo.org>2011-03-27 03:35:08 +0000
commit37696d703bd205e047f9f68350e84c103d6a84e9 (patch)
tree57f23173e5c462292fa9df4db2e79464ffb84739 /sys-fs
parentold (diff)
downloadhistorical-37696d703bd205e047f9f68350e84c103d6a84e9.tar.gz
historical-37696d703bd205e047f9f68350e84c103d6a84e9.tar.bz2
historical-37696d703bd205e047f9f68350e84c103d6a84e9.zip
Respect toolchain env vars with patches by Nathan Phillip Brink #336175 by Marcin Mirosław.
Diffstat (limited to 'sys-fs')
-rw-r--r--sys-fs/mdadm/ChangeLog9
-rw-r--r--sys-fs/mdadm/files/mdadm-3.1.4-cflags.patch27
-rw-r--r--sys-fs/mdadm/mdadm-3.1.4.ebuild31
3 files changed, 57 insertions, 10 deletions
diff --git a/sys-fs/mdadm/ChangeLog b/sys-fs/mdadm/ChangeLog
index df778e8242bc..9d0e3cde9c97 100644
--- a/sys-fs/mdadm/ChangeLog
+++ b/sys-fs/mdadm/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for sys-fs/mdadm
-# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/mdadm/ChangeLog,v 1.140 2010/11/09 19:17:44 armin76 Exp $
+# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/mdadm/ChangeLog,v 1.141 2011/03/27 03:35:08 vapier Exp $
+
+ 27 Mar 2011; Mike Frysinger <vapier@gentoo.org> mdadm-3.1.4.ebuild,
+ +files/mdadm-3.1.4-cflags.patch:
+ Respect toolchain env vars with patches by Nathan Phillip Brink #336175 by
+ Marcin Mirosław.
09 Nov 2010; Raúl Porcel <armin76@gentoo.org> mdadm-3.1.4.ebuild:
ia64/sparc stable wrt #302116
diff --git a/sys-fs/mdadm/files/mdadm-3.1.4-cflags.patch b/sys-fs/mdadm/files/mdadm-3.1.4-cflags.patch
new file mode 100644
index 000000000000..4b59a0d5fe34
--- /dev/null
+++ b/sys-fs/mdadm/files/mdadm-3.1.4-cflags.patch
@@ -0,0 +1,27 @@
+by Nathan Phillip Brink <ohnobinki@ohnopublishing.net>
+
+Use CFLAGS when using the compiler driver during the linking stage.
+Fixes Gentoo portage-multilib compilation failure.
+
+http://bugs.gentoo.org/336175
+
+--- a/Makefile
++++ b/Makefile
+@@ -144,7 +144,7 @@
+ # mdadm.tcc doesn't work..
+
+ mdadm : $(OBJS)
+- $(CC) $(LDFLAGS) -o mdadm $(OBJS) $(LDLIBS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o mdadm $(OBJS) $(LDLIBS)
+
+ mdadm.static : $(OBJS) $(STATICOBJS)
+ $(CC) $(LDFLAGS) -static -o mdadm.static $(OBJS) $(STATICOBJS)
+@@ -167,7 +167,7 @@
+
+ # use '' to guarantee no dynamic linker interactions with the monitor thread
+ mdmon : $(MON_OBJS)
+- $(CC) $(LDFLAGS) $(MON_LDFLAGS) -z now -o mdmon $(MON_OBJS) $(LDLIBS)
++ $(CC) $(CFLAGS) $(LDFLAGS) $(MON_LDFLAGS) -z now -o mdmon $(MON_OBJS) $(LDLIBS)
+ msg.o: msg.c msg.h
+
+ test_stripe : restripe.c mdadm.h
diff --git a/sys-fs/mdadm/mdadm-3.1.4.ebuild b/sys-fs/mdadm/mdadm-3.1.4.ebuild
index d5e055d368c4..bbfec9c5cf9e 100644
--- a/sys-fs/mdadm/mdadm-3.1.4.ebuild
+++ b/sys-fs/mdadm/mdadm-3.1.4.ebuild
@@ -1,8 +1,8 @@
-# Copyright 1999-2010 Gentoo Foundation
+# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/mdadm/mdadm-3.1.4.ebuild,v 1.8 2010/11/09 19:17:44 armin76 Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/mdadm/mdadm-3.1.4.ebuild,v 1.9 2011/03/27 03:35:08 vapier Exp $
-inherit eutils flag-o-matic
+inherit eutils flag-o-matic toolchain-funcs
DESCRIPTION="A useful tool for running RAID systems - it can be used as a replacement for the raidtools"
HOMEPAGE="http://neil.brown.name/blog/mdadm"
@@ -16,24 +16,39 @@ IUSE="static"
DEPEND=""
RDEPEND=">=sys-apps/util-linux-2.16"
+# The tests edit values in /proc and run tests on software raid devices.
+# Thus, they shouldn't be run on systems with active software RAID devices.
+RESTRICT="test"
+
src_unpack() {
unpack ${A}
cd "${S}"
epatch "${FILESDIR}"/${PN}-3.0-dont-make-man.patch
epatch "${FILESDIR}"/${PN}-2.6-syslog-updates.patch
epatch "${FILESDIR}"/${PN}-2.6.4-mdassemble.patch #211426
+ epatch "${FILESDIR}"/${PN}-3.1.4-cflags.patch #336175
use static && append-ldflags -static
sed -i -e 's:-z now::' Makefile || die #331653
}
-src_compile() {
+mdadm_emake() {
emake \
- CROSS_COMPILE=${CHOST}- \
+ CC="$(tc-getCC)" \
CWFLAGS="-Wall" \
CXFLAGS="${CFLAGS}" \
- all mdassemble \
- || die "emake failed"
+ "$@" \
+ || die
+}
+
+src_compile() {
+ mdadm_emake all mdassemble
+}
+
+src_test() {
+ mdadm_emake test
+
+ sh ./test || die
}
src_install() {
@@ -55,7 +70,7 @@ src_install() {
# do not rely on /lib -> /libXX link
sed -i \
- -e "s-/lib/rcscripts/-/$(get_libdir)/rcscripts/-" \
+ -e "s:/lib/rcscripts/:/$(get_libdir)/rcscripts/:" \
"${D}"/etc/init.d/*
}