libxml2

Details
Source
FROM scratch AS build
ARG VERSION
COPY --from=stagex/core-busybox . /
COPY --from=stagex/core-gcc . /
COPY --from=stagex/core-binutils . /
COPY --from=stagex/core-make . /
COPY --from=stagex/core-musl . /
COPY --from=stagex/core-python . /
COPY --from=stagex/core-perl . /
COPY --from=stagex/core-autoconf . /
COPY --from=stagex/core-automake . /
COPY --from=stagex/core-pkgconf . /
COPY --from=stagex/core-libtool . /
COPY --from=stagex/core-zlib . /
COPY --from=stagex/core-m4 . /
ADD fetch/libxml2-${VERSION}.tar.gz .
WORKDIR /libxml2-v${VERSION}
RUN --network=none <<-EOF
	set -eux
	sh autogen.sh
	./configure \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--enable-static \
		--with-legacy \
		--with-lzma \
		--with-zlib \
		--with-python=/usr/bin/python3
	make -j "$(nproc)"
	make DESTDIR=/rootfs install
	find /rootfs | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf
EOF
FROM stagex/core-filesystem AS package
COPY --from=build /rootfs/ /