setup_pkg(): fix check for pkgname-32bit
+ Also update gcc-multilib to gcc-4.9.3 Trying to build `gcc-multilib` failed because `glibc-32bit` has no separate `srcpkg/glibc-32bit/template`, but is a result of building `glibc` for target arch `i686`. For gcc-4.9.3 to build a patch is required that gets us rid of strange errors when including /usr/include/bits/stdio2.h
This commit is contained in:
parent
49652836c7
commit
0c7cfd6abe
3 changed files with 40 additions and 11 deletions
|
@ -212,9 +212,10 @@ get_subpkgs() {
|
|||
|
||||
setup_pkg() {
|
||||
local pkg="$1" cross="$2"
|
||||
local val _vars f dbgflags arch
|
||||
local basepkg val _vars f dbgflags arch
|
||||
|
||||
[ -z "$pkg" ] && return 1
|
||||
basepkg=${pkg%-32bit}
|
||||
|
||||
# Start with a sane environment
|
||||
unset -v PKG_BUILD_OPTIONS XBPS_CROSS_CFLAGS XBPS_CROSS_CXXFLAGS XBPS_CROSS_CPPFLAGS XBPS_CROSS_LDFLAGS
|
||||
|
@ -272,15 +273,15 @@ setup_pkg() {
|
|||
source_file "$f"
|
||||
done
|
||||
|
||||
if [ ! -f ${XBPS_SRCPKGDIR}/${pkg}/template ]; then
|
||||
msg_error "xbps-src: unexistent file: ${XBPS_SRCPKGDIR}/${pkg}/template\n"
|
||||
if [ ! -f ${XBPS_SRCPKGDIR}/${basepkg}/template ]; then
|
||||
msg_error "xbps-src: unexistent file: ${XBPS_SRCPKGDIR}/${basepkg}/template\n"
|
||||
fi
|
||||
if [ -n "$cross" ]; then
|
||||
export CROSS_BUILD="$cross"
|
||||
source_file ${XBPS_SRCPKGDIR}/${pkg}/template
|
||||
source_file ${XBPS_SRCPKGDIR}/${basepkg}/template
|
||||
else
|
||||
unset CROSS_BUILD
|
||||
source_file ${XBPS_SRCPKGDIR}/${pkg}/template
|
||||
source_file ${XBPS_SRCPKGDIR}/${basepkg}/template
|
||||
fi
|
||||
|
||||
# Check if required vars weren't set.
|
||||
|
@ -316,14 +317,14 @@ setup_pkg() {
|
|||
subpackages="$(get_subpkgs)"
|
||||
fi
|
||||
|
||||
if [ -h $XBPS_SRCPKGDIR/$pkg ]; then
|
||||
if [ -h $XBPS_SRCPKGDIR/$basepkg ]; then
|
||||
# Source all subpkg environment setup snippets.
|
||||
for f in ${XBPS_COMMONDIR}/environment/setup-subpkg/*.sh; do
|
||||
source_file "$f"
|
||||
done
|
||||
pkgname=$pkg
|
||||
if ! declare -f ${pkg}_package >/dev/null; then
|
||||
msg_error "$pkgname: missing ${pkg}_package() function!\n"
|
||||
if ! declare -f ${basepkg}_package >/dev/null; then
|
||||
msg_error "$pkgname: missing ${basepkg}_package() function!\n"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue