From 2b569f1ef8fec74f4b5e98ac9333a657ad05cd04 Mon Sep 17 00:00:00 2001 From: Cameron Nemo Date: Sat, 26 Jan 2019 11:29:36 -0800 Subject: [PATCH] xbps-src: add show host/makedepends subcommand --- common/xbps-src/shutils/show.sh | 21 +++++++++++++++++---- xbps-src | 14 ++++++++++++++ 2 files changed, 31 insertions(+), 4 deletions(-) diff --git a/common/xbps-src/shutils/show.sh b/common/xbps-src/shutils/show.sh index 83f15c82df9..f2a2b39f4e7 100644 --- a/common/xbps-src/shutils/show.sh +++ b/common/xbps-src/shutils/show.sh @@ -58,15 +58,14 @@ show_avail() { check_pkg_arch "$XBPS_CROSS_BUILD" 2>/dev/null } -show_pkg_build_deps() { +show_pkg_build_depends() { local f x _pkgname _srcpkg _dep found result - - setup_pkg_depends + local _deps="$1" result=$(mktemp || exit 1) # build time deps - for f in ${host_build_depends} ${build_depends} ${run_depends}; do + for f in ${_deps}; do # ignore virtual deps local _rpkg="${f%\?*}" local _vpkg="${f#*\?}" @@ -105,6 +104,20 @@ show_pkg_build_deps() { rm -f $result } +show_pkg_build_deps() { + setup_pkg_depends + show_pkg_build_depends "${host_build_depends} ${build_depends} ${run_depends}" +} + +show_pkg_hostmakedepends() { + setup_pkg_depends + show_pkg_build_depends "${host_build_depends}" +} + +show_pkg_makedepends() { + setup_pkg_depends + show_pkg_build_depends "${build_depends}" +} show_pkg_build_options() { local f opt desc diff --git a/xbps-src b/xbps-src index a673c917d81..cacb4de0c6f 100755 --- a/xbps-src +++ b/xbps-src @@ -91,6 +91,12 @@ show-deps show-files Show files installed by . Package must be installed into destdir. +show-hostmakedepends + Show required host build dependencies for . + +show-makedepends + Show required target build dependencies for . + show-options Show available build options by . @@ -750,6 +756,14 @@ case "$XBPS_TARGET" in read_pkg ignore-problems show_pkg_build_deps ;; + show-hostmakedepends) + read_pkg ignore-problems + show_pkg_hostmakedepends + ;; + show-makedepends) + read_pkg ignore-problems + show_pkg_makedepends + ;; show-pkg-var) read_pkg ignore-problems for sub_name in $subpackages; do