prepare: Fix binpkg build for libcap

Since we have to build *sys-libs/libcap* with the default Portage
configuration in order to avoid the circular dependency with PAM,
our configuration for binary package builds is not yet in place.  We
need to explicitly specify where to put the built packages and enable
multi-instance packages.
master
Dustin 2023-03-03 12:30:51 -06:00
parent 52aae70db2
commit f3b63a1dc2
1 changed files with 5 additions and 2 deletions

View File

@ -14,13 +14,16 @@ chown portage: "$(portageq envvar DISTDIR)"
ARCH=$(PORTAGE_CONFIGROOT=/usr/${target} portageq envvar ARCH) ARCH=$(PORTAGE_CONFIGROOT=/usr/${target} portageq envvar ARCH)
if [ -f /usr/${target}/etc/portage/make.conf ]; then
sed -i '/PKGDIR=/d' /usr/${target}/etc/portage/make.conf
fi
# For some reason, libcap installs its pkg-config files in the wrong # For some reason, libcap installs its pkg-config files in the wrong
# place. More strangely, even though `PKG_CONFIG_PATH` contains that # place. More strangely, even though `PKG_CONFIG_PATH` contains that
# directory, `pkg-config` does not find the `.pc` files for libcap. # directory, `pkg-config` does not find the `.pc` files for libcap.
# We work around this by merging /usr/lib64/pkgconfig and # We work around this by merging /usr/lib64/pkgconfig and
# /usr/lib/pkgconfig. # /usr/lib/pkgconfig.
${target}-emerge -bk1vnj sys-libs/libcap FEATURES="${FEATURES} binpkg-multi-instance" \
${target}-emerge -kb1vnj sys-libs/libcap
if [ -d /usr/${target}/usr/lib/pkgconfig ] \ if [ -d /usr/${target}/usr/lib/pkgconfig ] \
&& [ ! -d /usr/${target}/usr/lib64/pkgconfig ]; then && [ ! -d /usr/${target}/usr/lib64/pkgconfig ]; then
mv /usr/${target}/usr/lib/pkgconfig /usr/${target}/usr/lib64 mv /usr/${target}/usr/lib/pkgconfig /usr/${target}/usr/lib64