2014-04-09 16:40:27 +02:00
|
|
|
# vim: set ts=4 sw=4 et:
|
2014-03-22 12:31:42 +01:00
|
|
|
|
|
|
|
show_pkg() {
|
2022-12-12 07:21:29 +01:00
|
|
|
show_pkg_var "pkgname" "$pkgname"
|
|
|
|
show_pkg_var "version" "$version"
|
|
|
|
show_pkg_var "revision" "$revision"
|
|
|
|
show_pkg_var "distfiles" "$distfiles" 1
|
|
|
|
show_pkg_var "checksum" "$checksum" 1
|
|
|
|
show_pkg_var "archs" "$archs" 1
|
|
|
|
show_pkg_var "maintainer" "${maintainer}"
|
|
|
|
show_pkg_var "Upstream URL" "$homepage"
|
|
|
|
show_pkg_var "License(s)" "${license//,/ }" 1
|
|
|
|
show_pkg_var "Changelog" "$changelog"
|
|
|
|
show_pkg_var "build_style" "$build_style"
|
|
|
|
show_pkg_var "build_helper" "$build_helper" 1
|
|
|
|
show_pkg_var "configure_args" "$configure_args" 1
|
|
|
|
show_pkg_var "short_desc" "$short_desc"
|
|
|
|
show_pkg_var "subpackages" "$subpackages" 1
|
2017-11-29 13:19:21 +01:00
|
|
|
set -f
|
2022-12-12 07:21:29 +01:00
|
|
|
show_pkg_var "conf_files" "$conf_files" 1
|
2017-11-29 13:19:21 +01:00
|
|
|
set +f
|
2022-12-12 07:21:29 +01:00
|
|
|
show_pkg_var "replaces" "$replaces" 1
|
|
|
|
show_pkg_var "provides" "$provides" 1
|
|
|
|
show_pkg_var "conflicts" "$conflicts" 1
|
2019-10-16 21:57:17 +02:00
|
|
|
local OIFS="$IFS"
|
|
|
|
IFS=','
|
|
|
|
for var in $1; do
|
|
|
|
IFS=$OIFS
|
|
|
|
if [ ${var} != ${var/'*'} ]
|
|
|
|
then
|
|
|
|
var="${var/'*'}"
|
2022-12-12 07:21:29 +01:00
|
|
|
show_pkg_var "$var" "${!var//$'\n'/' '}"
|
2019-10-16 21:57:17 +02:00
|
|
|
else
|
2022-12-12 07:21:29 +01:00
|
|
|
show_pkg_var "$var" "${!var}" 1
|
2019-10-16 21:57:17 +02:00
|
|
|
fi
|
|
|
|
done
|
|
|
|
IFS="$OIFS"
|
2016-03-06 22:52:35 +01:00
|
|
|
|
|
|
|
return 0
|
2014-03-22 12:31:42 +01:00
|
|
|
}
|
|
|
|
|
2022-12-12 07:21:29 +01:00
|
|
|
show_pkg_var() {
|
|
|
|
local _sep i=
|
|
|
|
local _label="$1"
|
|
|
|
local _value="$2"
|
|
|
|
local _always_split="$3"
|
|
|
|
if [ -n "$_value" ] && [ -n "$_label" ]; then
|
|
|
|
# on short labels, use more padding so everything lines up
|
|
|
|
if [ "${#_label}" -lt 7 ]; then
|
|
|
|
_sep=" "
|
|
|
|
else
|
|
|
|
_sep=" "
|
|
|
|
fi
|
|
|
|
if [ -n "$_always_split" ] || [[ "$_value" =~ $'\n' ]]; then
|
|
|
|
for i in ${_value}; do
|
|
|
|
[ -n "$i" ] && echo "${_label}:${_sep}${i}"
|
|
|
|
done
|
|
|
|
else
|
|
|
|
echo "${_label}:${_sep}${_value}"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2014-03-22 12:31:42 +01:00
|
|
|
show_pkg_deps() {
|
2014-04-09 16:40:27 +02:00
|
|
|
[ -f "${PKGDESTDIR}/rdeps" ] && cat ${PKGDESTDIR}/rdeps
|
2014-03-22 12:31:42 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
show_pkg_files() {
|
2014-04-09 16:40:27 +02:00
|
|
|
[ -d ${PKGDESTDIR} ] && find ${PKGDESTDIR} -print
|
2014-03-22 12:31:42 +01:00
|
|
|
}
|
|
|
|
|
2015-04-16 08:38:32 +02:00
|
|
|
show_avail() {
|
|
|
|
check_pkg_arch "$XBPS_CROSS_BUILD" 2>/dev/null
|
|
|
|
}
|
|
|
|
|
2020-12-31 15:49:51 +01:00
|
|
|
show_eval_dep() {
|
|
|
|
local f x _pkgname _srcpkg found
|
|
|
|
local _dep="$1"
|
|
|
|
local _host="$2"
|
|
|
|
if [ -z "$CROSS_BUILD" ] || [ -z "$_host" ]; then
|
|
|
|
# ignore dependency on itself
|
|
|
|
[[ $_dep == $sourcepkg ]] && return
|
|
|
|
fi
|
|
|
|
if [ ! -f $XBPS_SRCPKGDIR/$_dep/template ]; then
|
|
|
|
msg_error "$pkgver: dependency '$_dep' does not exist!\n"
|
|
|
|
fi
|
|
|
|
# ignore virtual dependencies
|
|
|
|
[[ ${_dep%\?*} != ${_dep#*\?} ]] && _dep=${_dep#*\?}
|
|
|
|
unset found
|
|
|
|
# check for subpkgs
|
|
|
|
for x in ${subpackages}; do
|
|
|
|
[[ $_dep == $x ]] && found=1 && break
|
|
|
|
done
|
|
|
|
[[ $found ]] && return
|
|
|
|
_pkgname=${_dep/-32bit}
|
|
|
|
_srcpkg=$(readlink -f ${XBPS_SRCPKGDIR}/${_pkgname})
|
|
|
|
_srcpkg=${_srcpkg##*/}
|
|
|
|
echo $_srcpkg
|
|
|
|
}
|
|
|
|
|
2019-01-26 20:29:36 +01:00
|
|
|
show_pkg_build_depends() {
|
2020-12-31 15:49:51 +01:00
|
|
|
local f result
|
2019-01-26 20:29:36 +01:00
|
|
|
local _deps="$1"
|
2020-12-31 15:49:51 +01:00
|
|
|
local _hostdeps="$2"
|
2015-03-26 04:18:42 +01:00
|
|
|
|
2019-06-17 17:38:07 +02:00
|
|
|
result=$(mktemp) || exit 1
|
2015-03-26 04:18:42 +01:00
|
|
|
|
2014-04-09 16:40:27 +02:00
|
|
|
# build time deps
|
2019-01-26 20:29:36 +01:00
|
|
|
for f in ${_deps}; do
|
2020-12-31 15:49:51 +01:00
|
|
|
show_eval_dep $f "" >> $result
|
|
|
|
done
|
|
|
|
for f in ${_hostdeps}; do
|
|
|
|
show_eval_dep $f "hostdep" >> $result
|
2014-04-09 16:40:27 +02:00
|
|
|
done
|
2015-03-26 04:18:42 +01:00
|
|
|
sort -u $result
|
|
|
|
rm -f $result
|
2014-03-22 12:31:42 +01:00
|
|
|
}
|
|
|
|
|
2019-01-26 20:29:36 +01:00
|
|
|
show_pkg_build_deps() {
|
2020-12-31 15:49:51 +01:00
|
|
|
show_pkg_build_depends "${makedepends} $(setup_pkg_depends '' 1 1)" "${hostmakedepends}"
|
2019-01-26 20:29:36 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
show_pkg_hostmakedepends() {
|
2020-12-31 15:49:51 +01:00
|
|
|
show_pkg_build_depends "" "${hostmakedepends}"
|
2019-01-26 20:29:36 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
show_pkg_makedepends() {
|
2020-12-31 15:49:51 +01:00
|
|
|
show_pkg_build_depends "${makedepends}" ""
|
2019-01-26 20:29:36 +01:00
|
|
|
}
|
2014-03-22 12:31:42 +01:00
|
|
|
|
2014-06-30 11:32:07 +02:00
|
|
|
show_pkg_build_options() {
|
|
|
|
local f opt desc
|
|
|
|
|
|
|
|
[ -z "$PKG_BUILD_OPTIONS" ] && return 0
|
|
|
|
|
|
|
|
source $XBPS_COMMONDIR/options.description
|
|
|
|
msg_normal "$pkgver: the following build options are set:\n"
|
|
|
|
for f in ${PKG_BUILD_OPTIONS}; do
|
|
|
|
opt="${f#\~}"
|
|
|
|
eval desc="\${desc_option_${opt}}"
|
|
|
|
if [[ ${f:0:1} == '~' ]]; then
|
2014-10-28 10:15:58 +01:00
|
|
|
echo " $opt: $desc (OFF)"
|
2014-06-30 11:32:07 +02:00
|
|
|
else
|
2014-10-30 07:09:33 +01:00
|
|
|
printf " "
|
2014-06-30 11:32:07 +02:00
|
|
|
msg_normal_append "$opt: "
|
|
|
|
printf "$desc (ON)\n"
|
2014-04-09 16:40:27 +02:00
|
|
|
fi
|
|
|
|
done
|
2014-03-22 12:31:42 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
show_pkg_shlib_provides() {
|
2014-04-09 16:40:27 +02:00
|
|
|
[ -f "${PKGDESTDIR}/shlib-provides" ] && cat ${PKGDESTDIR}/shlib-provides
|
2014-03-22 12:31:42 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
show_pkg_shlib_requires() {
|
2014-04-09 16:40:27 +02:00
|
|
|
[ -f "${PKGDESTDIR}/shlib-requires" ] && cat ${PKGDESTDIR}/shlib-requires
|
2014-03-22 12:31:42 +01:00
|
|
|
}
|