2012-01-06 16:45:14 +00:00
|
|
|
{stdenv, fetchurl, m4, zlib, bzip2, xz, bison, flex, gettext}:
|
2009-02-17 16:42:51 +00:00
|
|
|
|
2012-01-05 23:15:48 +00:00
|
|
|
# TODO: Look at the hardcoded paths to kernel, modules etc.
|
2009-02-17 16:42:51 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2012-01-05 23:15:48 +00:00
|
|
|
name = "elfutils-${version}";
|
|
|
|
version = "0.152";
|
2009-02-17 16:42:51 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2010-08-09 16:37:14 +01:00
|
|
|
urls = [
|
2012-01-05 23:15:48 +00:00
|
|
|
"https://fedorahosted.org/releases/e/l/elfutils/${version}/${name}.tar.bz2"
|
2010-08-09 16:37:14 +01:00
|
|
|
"mirror://gentoo/distfiles/${name}.tar.bz2"
|
|
|
|
];
|
2012-01-05 23:15:48 +00:00
|
|
|
sha256 = "19mlgxyzcwiv64ynj2cibgkiw4qkm3n37kizvy6555dsmlaqfybq";
|
2009-02-17 16:42:51 +00:00
|
|
|
};
|
|
|
|
|
2012-01-06 16:45:14 +00:00
|
|
|
patches = [
|
|
|
|
(fetchurl {
|
|
|
|
url = https://fedorahosted.org/releases/e/l/elfutils/0.152/elfutils-portability.patch;
|
|
|
|
sha256 = "0q318w4cvvqv9ps4xcwphapj1gl31isgjyya4y9sm72qj68n61p0";
|
|
|
|
}) ];
|
2012-01-05 23:15:48 +00:00
|
|
|
|
2012-01-06 16:45:14 +00:00
|
|
|
# We need bzip2 in NativeInputs because otherwise we can't unpack the src,
|
|
|
|
# as the host-bzip2 will be in the path.
|
|
|
|
buildNativeInputs = [m4 bison flex gettext bzip2];
|
|
|
|
buildInputs = [zlib bzip2 xz];
|
|
|
|
|
|
|
|
crossAttrs = {
|
|
|
|
|
|
|
|
/* Having bzip2 will harm, because anything using elfutils
|
|
|
|
as buildInput cross-building, will not be able to run 'bzip2' */
|
|
|
|
propagatedBuildInputs = [ zlib.hostDrv ];
|
|
|
|
|
|
|
|
# This program does not cross-build fine. So I only cross-build some parts
|
|
|
|
# I need for the linux perf tool.
|
|
|
|
# On the awful cross-building:
|
|
|
|
# http://comments.gmane.org/gmane.comp.sysutils.elfutils.devel/2005
|
|
|
|
#
|
|
|
|
# I wrote this testing for the nanonote.
|
|
|
|
buildPhase = ''
|
|
|
|
pushd libebl
|
|
|
|
make
|
|
|
|
popd
|
|
|
|
pushd libelf
|
|
|
|
make
|
|
|
|
popd
|
|
|
|
pushd libdwfl
|
|
|
|
make
|
|
|
|
popd
|
|
|
|
pushd libdw
|
|
|
|
make
|
|
|
|
popd
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
pushd libelf
|
|
|
|
make install
|
|
|
|
popd
|
2012-01-06 21:10:19 +00:00
|
|
|
pushd libdwfl
|
|
|
|
make install
|
|
|
|
popd
|
2012-01-06 16:45:14 +00:00
|
|
|
pushd libdw
|
|
|
|
make install
|
|
|
|
popd
|
|
|
|
cp version.h $out/include
|
|
|
|
'';
|
|
|
|
};
|
2009-02-17 16:42:51 +00:00
|
|
|
|
|
|
|
dontAddDisableDepTrack = true;
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = https://fedorahosted.org/elfutils/;
|
|
|
|
};
|
|
|
|
}
|