diff options
author | Jason A. Donenfeld <zx2c4@gentoo.org> | 2019-12-16 21:55:20 +0100 |
---|---|---|
committer | Jason A. Donenfeld <zx2c4@gentoo.org> | 2019-12-16 22:03:10 +0100 |
commit | 4580d02134f001d96c73d15ac51f6abc4d0f50dd (patch) | |
tree | a258345cb39fc3dfa469e41aa11fddb7aecc6f54 /dev-util/dwarves | |
parent | app-emacs/websocket: Remove old. (diff) | |
download | gentoo-4580d02134f001d96c73d15ac51f6abc4d0f50dd.tar.gz gentoo-4580d02134f001d96c73d15ac51f6abc4d0f50dd.tar.bz2 gentoo-4580d02134f001d96c73d15ac51f6abc4d0f50dd.zip |
dev-util/dwarves: revbump to -r1 to use newer elfutils
Currently dwarves is holding back elfutils in the tree, due to a library
reorganization, so we patch dwarves in order to support the latest
elfutils.
Package-Manager: Portage-2.3.82, Repoman-2.3.20
Signed-off-by: Jason A. Donenfeld <zx2c4@gentoo.org>
Diffstat (limited to 'dev-util/dwarves')
-rw-r--r-- | dev-util/dwarves/dwarves-1.16-r1.ebuild | 46 | ||||
-rw-r--r-- | dev-util/dwarves/files/dwarves-1.16-no-libebl.patch | 89 |
2 files changed, 135 insertions, 0 deletions
diff --git a/dev-util/dwarves/dwarves-1.16-r1.ebuild b/dev-util/dwarves/dwarves-1.16-r1.ebuild new file mode 100644 index 000000000000..c58ef0fd660d --- /dev/null +++ b/dev-util/dwarves/dwarves-1.16-r1.ebuild @@ -0,0 +1,46 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python3_6 ) +inherit multilib cmake-utils python-single-r1 + +DESCRIPTION="pahole (Poke-a-Hole) and other DWARF2 utilities" +HOMEPAGE="https://git.kernel.org/cgit/devel/pahole/pahole.git/" + +LICENSE="GPL-2" # only +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="debug" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +RDEPEND="${PYTHON_DEPS} + >=dev-libs/elfutils-0.178 + sys-libs/zlib" +DEPEND="${RDEPEND}" + +if [[ ${PV//_p} == ${PV} ]]; then + SRC_URI="http://fedorapeople.org/~acme/dwarves/${P}.tar.xz" + S=${WORKDIR} +else + SRC_URI="https://dev.gentoo.org/~zzam/${PN}/${P}.tar.xz" +fi + +DOCS=( README README.ctracer NEWS ) + +PATCHES=( + "${FILESDIR}"/${PN}-1.10-python-import.patch + "${FILESDIR}"/${PN}-1.16-no-libebl.patch +) + +src_configure() { + local mycmakeargs=( "-D__LIB=$(get_libdir)" ) + cmake-utils_src_configure +} + +src_test() { :; } + +src_install() { + cmake-utils_src_install +} diff --git a/dev-util/dwarves/files/dwarves-1.16-no-libebl.patch b/dev-util/dwarves/files/dwarves-1.16-no-libebl.patch new file mode 100644 index 000000000000..78c6a4e3964f --- /dev/null +++ b/dev-util/dwarves/files/dwarves-1.16-no-libebl.patch @@ -0,0 +1,89 @@ +From fb56a460e23f44a4225d4f507b9ec7cf0790c75b Mon Sep 17 00:00:00 2001 +From: "Jason A. Donenfeld" <Jason@zx2c4.com> +Date: Mon, 16 Dec 2019 21:51:45 +0100 +Subject: [PATCH] cmake: libebl was merged into libdw + +Since elfutils 178, libebl is now part of libdw, so searching for libebl +always fails. Simply remove it from the search. + +Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> +--- + cmake/modules/FindDWARF.cmake | 23 +++++++---------------- + 1 file changed, 7 insertions(+), 16 deletions(-) + +diff --git a/cmake/modules/FindDWARF.cmake b/cmake/modules/FindDWARF.cmake +index f4feec4..027d06e 100644 +--- a/cmake/modules/FindDWARF.cmake ++++ b/cmake/modules/FindDWARF.cmake +@@ -37,14 +37,9 @@ find_library(ELF_LIBRARY + PATHS /usr/lib /usr/local/lib /usr/lib64 /usr/local/lib64 ~/usr/local/lib ~/usr/local/lib64 + ) + +-find_library(EBL_LIBRARY +- NAMES ebl +- PATHS /usr/lib /usr/local/lib /usr/lib64 /usr/local/lib64 ~/usr/local/lib ~/usr/local/lib64 +-) +- +-if (DWARF_INCLUDE_DIR AND LIBDW_INCLUDE_DIR AND DWARF_LIBRARY AND ELF_LIBRARY AND EBL_LIBRARY) ++if (DWARF_INCLUDE_DIR AND LIBDW_INCLUDE_DIR AND DWARF_LIBRARY AND ELF_LIBRARY) + set(DWARF_FOUND TRUE) +- set(DWARF_LIBRARIES ${DWARF_LIBRARY} ${ELF_LIBRARY} ${EBL_LIBRARY}) ++ set(DWARF_LIBRARIES ${DWARF_LIBRARY} ${ELF_LIBRARY}) + + set(CMAKE_REQUIRED_LIBRARIES ${DWARF_LIBRARIES}) + # check if libdw have the dwfl_module_build_id routine, i.e. if it supports the buildid +@@ -52,10 +47,10 @@ if (DWARF_INCLUDE_DIR AND LIBDW_INCLUDE_DIR AND DWARF_LIBRARY AND ELF_LIBRARY AN + # in distributions such as fedora). We do it against libelf because, IIRC, some distros + # include libdw linked statically into libelf. + check_library_exists(elf dwfl_module_build_id "" HAVE_DWFL_MODULE_BUILD_ID) +-else (DWARF_INCLUDE_DIR AND LIBDW_INCLUDE_DIR AND DWARF_LIBRARY AND ELF_LIBRARY AND EBL_LIBRARY) ++else (DWARF_INCLUDE_DIR AND LIBDW_INCLUDE_DIR AND DWARF_LIBRARY AND ELF_LIBRARY) + set(DWARF_FOUND FALSE) + set(DWARF_LIBRARIES) +-endif (DWARF_INCLUDE_DIR AND LIBDW_INCLUDE_DIR AND DWARF_LIBRARY AND ELF_LIBRARY AND EBL_LIBRARY) ++endif (DWARF_INCLUDE_DIR AND LIBDW_INCLUDE_DIR AND DWARF_LIBRARY AND ELF_LIBRARY) + + if (DWARF_FOUND) + if (NOT DWARF_FIND_QUIETLY) +@@ -63,7 +58,6 @@ if (DWARF_FOUND) + message(STATUS "Found elfutils/libdw.h header: ${LIBDW_INCLUDE_DIR}") + message(STATUS "Found libdw library: ${DWARF_LIBRARY}") + message(STATUS "Found libelf library: ${ELF_LIBRARY}") +- message(STATUS "Found libebl library: ${EBL_LIBRARY}") + endif (NOT DWARF_FIND_QUIETLY) + else (DWARF_FOUND) + if (DWARF_FIND_REQUIRED) +@@ -73,9 +67,9 @@ else (DWARF_FOUND) + find_path(FEDORA fedora-release /etc) + find_path(REDHAT redhat-release /etc) + if (FEDORA OR REDHAT) +- if (NOT DWARF_INCLUDE_DIR OR NOT LIBDW_INCLUDE_DIR OR NOT EBL_LIBRARY) ++ if (NOT DWARF_INCLUDE_DIR OR NOT LIBDW_INCLUDE_DIR) + message(STATUS "Please install the elfutils-devel package") +- endif (NOT DWARF_INCLUDE_DIR OR NOT LIBDW_INCLUDE_DIR OR NOT EBL_LIBRARY) ++ endif (NOT DWARF_INCLUDE_DIR OR NOT LIBDW_INCLUDE_DIR) + if (NOT DWARF_LIBRARY) + message(STATUS "Please install the elfutils-libs package") + endif (NOT DWARF_LIBRARY) +@@ -89,9 +83,6 @@ else (DWARF_FOUND) + if (NOT LIBDW_INCLUDE_DIR) + message(STATUS "Could NOT find libdw include dir") + endif (NOT LIBDW_INCLUDE_DIR) +- if (NOT EBL_LIBRARY) +- message(STATUS "Could NOT find libebl library") +- endif (NOT EBL_LIBRARY) + if (NOT DWARF_LIBRARY) + message(STATUS "Could NOT find libdw library") + endif (NOT DWARF_LIBRARY) +@@ -103,7 +94,7 @@ else (DWARF_FOUND) + endif (DWARF_FIND_REQUIRED) + endif (DWARF_FOUND) + +-mark_as_advanced(DWARF_INCLUDE_DIR LIBDW_INCLUDE_DIR DWARF_LIBRARY ELF_LIBRARY EBL_LIBRARY) ++mark_as_advanced(DWARF_INCLUDE_DIR LIBDW_INCLUDE_DIR DWARF_LIBRARY ELF_LIBRARY) + include_directories(${DWARF_INCLUDE_DIR} ${LIBDW_INCLUDE_DIR}) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_SOURCE_DIR}/config.h) + +-- +2.24.1 + |