forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: WANG Xuerui <[email protected]>
- Loading branch information
Showing
2 changed files
with
74 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
DIST pax-utils-1.3.3.tar.xz 725900 BLAKE2B 17004a4fe57f05e80e0c51a156931975cbaf73e20d96fa50dedf6bd1538ff3f8383591f4b5fd0df926a6a6b75cb083724aaf92b1a4d4ebc67290500520919c29 SHA512 bb0d03371cf8f0cc26a83cbee888a6d91e70416dedc740476cd5549ddaef67048c6802e30e469ab1aced0fd7f63f84e9644744602b2d483ef7af37191505f72e | ||
DIST pax-utils-1.3.4.tar.xz 753448 BLAKE2B c105ff568a8e4378cfef5f8b9acb415a850b1e209ea8413cdf518de82e5e925fdba60288557f042bf02d2e075ed5e538175b2078e4dafbe5c54117ed580fd87e SHA512 44a475860823e8b70b1d09d69e5fba3ed8298511d07e1e7b09ce62237cb8b1ecee8fc2fc550d6853d0b9f8db3c350bf78ced49d5f210997b294dc10e36627fcd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
# Copyright 1999-2022 Gentoo Authors | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI="7" | ||
|
||
# Note: if bumping pax-utils because of syscall changes in glibc, please | ||
# revbump glibc and update the dependency in its ebuild for the affected | ||
# versions. | ||
PYTHON_COMPAT=( python3_{8,9,10} ) | ||
|
||
inherit python-single-r1 toolchain-funcs | ||
|
||
DESCRIPTION="ELF utils that can check files for security relevant properties" | ||
HOMEPAGE="https://wiki.gentoo.org/index.php?title=Project:Hardened/PaX_Utilities" | ||
SRC_URI="mirror://gentoo/${P}.tar.xz | ||
https://dev.gentoo.org/~xen0n/distfiles/${P}.tar.xz" | ||
|
||
LICENSE="GPL-2" | ||
SLOT="0" | ||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" | ||
IUSE="caps debug python seccomp" | ||
|
||
RDEPEND="caps? ( >=sys-libs/libcap-2.24 ) | ||
python? ( | ||
${PYTHON_DEPS} | ||
$(python_gen_cond_dep ' | ||
dev-python/pyelftools[${PYTHON_USEDEP}] | ||
') | ||
) | ||
" | ||
DEPEND="${RDEPEND}" | ||
BDEPEND=" | ||
caps? ( virtual/pkgconfig ) | ||
" | ||
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" | ||
|
||
_emake() { | ||
emake \ | ||
USE_CAP=$(usex caps) \ | ||
USE_DEBUG=$(usex debug) \ | ||
USE_PYTHON=$(usex python) \ | ||
USE_SECCOMP=$(usex seccomp) \ | ||
"$@" | ||
} | ||
|
||
pkg_setup() { | ||
if use python; then | ||
python-single-r1_pkg_setup | ||
fi | ||
} | ||
|
||
src_configure() { | ||
# Avoid slow configure+gnulib+make if on an up-to-date Linux system | ||
if use prefix || ! use kernel_linux; then | ||
econf $(use_with caps) $(use_with debug) $(use_with python) $(use_with seccomp) | ||
else | ||
tc-export CC PKG_CONFIG | ||
fi | ||
} | ||
|
||
src_compile() { | ||
_emake | ||
} | ||
|
||
src_test() { | ||
_emake check | ||
} | ||
|
||
src_install() { | ||
_emake DESTDIR="${D}" PKGDOCDIR='$(DOCDIR)'/${PF} install | ||
|
||
use python && python_fix_shebang "${ED}"/usr/bin/lddtree | ||
} |