localedef is only available with glibc, so that defer locale creation
once the chroot is ready.
This fixes installing bootstrap glibc pkgs on musl hosts.
Some autotool files (configure.ac) expect host build flags to be
defined as BUILD_CFLAGS, BUILD_CXXFLAGS, BUILD_CPPFLAGS and
BUILD_LDFLAGS. Especially these files tend to default to
LDFLAGS for BUILD_LDFLAGS, which makes host utilities built
with these flags fail with buildpie=yes because of differing
compiler and linker options.
One example is libatasmart where this patch fixes the build.
+ 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 expects a variable argument list with package names that will be
returned to stdout topologically sorted.
$ ./xbps-src sort-dependencies libarchive-devel liblzma-devel libxbps zlib-devel bzip2-devel
bzip2
xz
zlib
libarchive
xbps
Such packages should set the `restricted' var to allow building a binary package.
Note that such packages do not allow redistribution of sources and binaries,
so that it's up to the user if (s)he wants to pkg it locally.
When building with -C and without -t (xbps-uchroot(1) with overlayfs),
make sure to remove autodeps prior to start resolving dependencies.
This is necessary for cases where a previous built pkg contains the
same build dependency required for another pkg with -C, resulting
in dependencies being detected as installed and later removed.
Thanks to @dominikh and @Gottox for info and comments.
If XBPS_CHROOT_CMD == uchroot with overlayfs (-O), the temporary masterdir
will be removed completely after synchronizing remote repositories, and
later on, when the build starts the repos are unsynchronized.
So do the sync on the real masterdir before entering the chroot.
When sourcing templates to get $checksum there are templates
calling msg_error(). This is not relevant for this function,
thus define a local dummy msg_error() to ignore these cases.
This should result in a considerable performance improvement, because the
expensive configuration phase of all dependencies is skipped.
Hopefully this does not introduce build issues :-)