void-packages/srcpkgs/chroot-distcc/template
Jürgen Buchmüller 5bd249f091 chroot-distcc: needs -fcommon for gcc10
[ci skip]
2020-08-28 18:25:30 +02:00

49 lines
1.5 KiB
Bash

# Template file for 'chroot-distcc'
pkgname=chroot-distcc
version=3.3.3
revision=1
wrksrc="distcc-${version}"
bootstrap=yes
build_style=gnu-configure
configure_args="--with-included-popt --without-avahi --without-gnome
--without-gtk --disable-Werror --disable-pump-mode --without-libiberty"
make_install_target=install-programs
makedepends="binutils-devel"
short_desc="Distributed compilation for faster C/C++ builds -- for xbps-src use"
maintainer="Enno Boland <gottox@voidlinux.org>"
license="GPL-2.0-or-later"
homepage="https://distcc.github.io"
distfiles="https://github.com/distcc/distcc/releases/download/v${version}/distcc-${version}.tar.gz"
checksum=bead25471d5a53ecfdf8f065a6fe48901c14d5008956c318c700e56bc87bf0bc
conflicts="distcc>=0"
CFLAGS="-fcommon"
pre_configure() {
# Copy files generated by package distcc running autogen.sh
# Manual update is required for every new version
cp -p "${FILESDIR}"/configure ${wrksrc}
cp -p "${FILESDIR}"/Makefile.in ${wrksrc}
cp -p "${FILESDIR}"/config.h.in ${wrksrc}/src
}
post_install() {
local f x
# Remove useless files.
rm -f ${DESTDIR}/usr/bin/distccd
rm -rf ${DESTDIR}/etc
rm -rf ${DESTDIR}/usr/share
# gcc wrappers
vmkdir usr/lib/distcc/bin
for f in gcc cc c++ g++; do
ln -sfr ${DESTDIR}/usr/bin/distcc ${DESTDIR}/usr/lib/distcc/bin/${f}
done
# cross-gcc wrappers
for x in arm-linux-gnueabi arm-linux-gnueabihf armv7l-linux-gnueabihf \
arm-linux-musleabihf armv7l-linux-musleabihf; do
for f in gcc cc c++ g++; do
ln -sfr ${DESTDIR}/usr/bin/distcc ${DESTDIR}/usr/lib/distcc/bin/${x}-${f}
done
done
}