2012-01-18 12:53:01 -08:00
|
|
|
{stdenv, fetchurl, m4, zlib, bzip2, bison, flex, gettext}:
|
2009-02-17 08:42:51 -08:00
|
|
|
|
2012-01-05 15:15:48 -08:00
|
|
|
# TODO: Look at the hardcoded paths to kernel, modules etc.
|
2009-02-17 08:42:51 -08:00
|
|
|
stdenv.mkDerivation rec {
|
2012-01-05 15:15:48 -08:00
|
|
|
name = "elfutils-${version}";
|
2015-08-01 17:24:23 -07:00
|
|
|
version = "0.163";
|
2013-03-17 02:26:44 -07:00
|
|
|
|
2009-02-17 08:42:51 -08:00
|
|
|
src = fetchurl {
|
2010-08-09 08:37:14 -07:00
|
|
|
urls = [
|
2013-03-17 02:26:44 -07:00
|
|
|
"http://fedorahosted.org/releases/e/l/elfutils/${version}/${name}.tar.bz2"
|
2010-08-09 08:37:14 -07:00
|
|
|
"mirror://gentoo/distfiles/${name}.tar.bz2"
|
|
|
|
];
|
2015-08-01 17:24:23 -07:00
|
|
|
sha256 = "7c774f1eef329309f3b05e730bdac50013155d437518a2ec0e24871d312f2e23";
|
2009-02-17 08:42:51 -08:00
|
|
|
};
|
|
|
|
|
2012-01-06 08:45:14 -08:00
|
|
|
patches = [
|
|
|
|
(fetchurl {
|
2015-08-01 17:24:23 -07:00
|
|
|
url = "http://fedorahosted.org/releases/e/l/elfutils/${version}/elfutils-portability-${version}.patch";
|
|
|
|
sha256 = "e4e82315dad2efaa4e4476503e7537e01b7c1b1f98a96de4ca1c7fa85f4f1045";
|
2012-01-06 08:45:14 -08:00
|
|
|
}) ];
|
2012-01-05 15:15:48 -08:00
|
|
|
|
2012-01-06 08:45:14 -08:00
|
|
|
# We need bzip2 in NativeInputs because otherwise we can't unpack the src,
|
|
|
|
# as the host-bzip2 will be in the path.
|
2012-12-28 10:20:09 -08:00
|
|
|
nativeBuildInputs = [m4 bison flex gettext bzip2];
|
2012-01-18 12:53:01 -08:00
|
|
|
buildInputs = [zlib bzip2];
|
2012-01-06 08:45:14 -08:00
|
|
|
|
2013-04-05 15:45:25 -07:00
|
|
|
configureFlags = "--disable-werror";
|
|
|
|
|
2012-01-06 08:45:14 -08:00
|
|
|
crossAttrs = {
|
|
|
|
|
2013-04-05 15:45:25 -07:00
|
|
|
/* Having bzip2 will harm, because anything using elfutils
|
2012-01-06 08:45:14 -08:00
|
|
|
as buildInput cross-building, will not be able to run 'bzip2' */
|
2012-12-28 10:08:19 -08:00
|
|
|
propagatedBuildInputs = [ zlib.crossDrv ];
|
2012-01-06 08:45:14 -08:00
|
|
|
|
|
|
|
# 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 13:10:19 -08:00
|
|
|
pushd libdwfl
|
|
|
|
make install
|
|
|
|
popd
|
2012-01-06 08:45:14 -08:00
|
|
|
pushd libdw
|
|
|
|
make install
|
|
|
|
popd
|
|
|
|
cp version.h $out/include
|
|
|
|
'';
|
|
|
|
};
|
2013-04-05 15:45:25 -07:00
|
|
|
|
2009-02-17 08:42:51 -08:00
|
|
|
dontAddDisableDepTrack = true;
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = https://fedorahosted.org/elfutils/;
|
|
|
|
};
|
|
|
|
}
|