blob: 3a16eb14dea6ca13e36d72fa8350680a5d5ef70e [file] [log] [blame]
# Copyright 2018 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
EAPI=6
SRC_URI="https://github.com/makedumpfile/makedumpfile/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz"
DESCRIPTION="minimize and compress /proc/vmcore for use with crash"
HOMEPAGE="http://sourceforge.net/projects/makedumpfile/"
LICENSE="GPL-2+"
KEYWORDS="*"
SLOT="0"
IUSE=""
RDEPEND="dev-libs/elfutils"
DEPEND="${RDEPEND}"
S="${WORKDIR}/${P}"
src_compile () {
# makedumpfile's string constants for architectures
# differ from the ones in portages
if [ "${ARCH}" = "arm64" ]; then
TARGET="aarch64"
elif [ "${ARCH}" = "amd64" ]; then
TARGET="x86_64"
else
eerror "unsupported architecture: ${ARCH}"
die
fi
# This is a work around for lacking of lelf. See:
# https://github.com/pratyushanand/makedumpfile/blob/70a9e5edd5b63cf8cce0232d3642fa5397cc0c34/README#L165
emake TARGET="${TARGET}" LINKTYPE=dynamic
}