void-packages/srcpkgs/justbuild/template

81 lines
2.3 KiB
Bash

# Template file for 'justbuild'
pkgname=justbuild
version=1.2.4
revision=1
create_wrksrc=yes
hostmakedepends="jo pandoc pkg-config python3 tar unzip wget"
makedepends="abseil-cpp-devel c-ares-devel catch2 fmt-devel grpc-devel json-c++
libarchive-devel libcurl-devel libgit2-devel openssl-devel re2-devel"
depends="python3"
short_desc="Generic build system supporting multi-repository builds"
maintainer="Leah Neukirchen <leah@vuxu.org>"
license="Apache-2.0"
homepage="https://github.com/just-buildsystem/justbuild/"
changelog="https://github.com/just-buildsystem/justbuild/blob/master/CHANGELOG.md"
distfiles="https://github.com/just-buildsystem/justbuild/archive/v${version}.tar.gz"
checksum=19790637542726b62b058a6de5a706f2f684900628208ce0a14322f28a098953
conflicts="just>=0"
nocross="not supported by bootstrapping"
case "$XBPS_TARGET_MACHINE" in
*-musl) makedepends+=" libexecinfo-devel"
esac
CFLAGS="-Wno-error -Wno-deprecated-declarations"
CXXFLAGS="-Wno-error -Wno-deprecated-declarations"
do_build() {
rm -rf just-work
mkdir -p just-work
export JUST_BUILD_CONF=$(jo \
AR=/usr/bin/ar \
COMPILER_FAMILY=gnu \
CC=$CC \
CXX=$CXX \
CFLAGS=$(jo -a -- $CFLAGS) \
ADD_CFLAGS=$(jo -a -- $CFLAGS) \
CXXFLAGS=$(jo -a -- $CXXFLAGS) \
ADD_CXXFLAGS=$(jo -a -- $CXXFLAGS) \
LDFLAGS=$(jo -a -- $LDFLAGS) \
SOURCE_DATE_EPOCH=$SOURCE_DATE_EPOCH \
VERSION_EXTRA_SUFFIX=-void
)
export NON_LOCAL_DEPS=$(jo -a \
bazel_remote_apis \
cli11 \
com_github_microsoft_gsl \
com_google_absl \
google_apis \
protobuf
)
sed -i "s/TaskSystem[(][0-9]*[)]/TaskSystem($XBPS_MAKEJOBS)/" \
justbuild-${version}/bin/parallel-bootstrap-traverser.py
PACKAGE=YES LOCALBASE=/usr python3 \
justbuild-${version}/bin/bootstrap.py \
justbuild-${version}/ $PWD/just-work
./just-work/src/out-boot/bin/just install \
-C $PWD/just-work/repo-conf.json \
-D "$JUST_BUILD_CONF" \
-o $PWD/just-work/out \
--local-build-root $PWD/just-work/.just \
'' just-mr
for m in justbuild-${version}/share/man/*.md; do
pandoc --standalone --to man -o ${m%.md}.man $m
done
}
do_install() {
vbin just-work/out/bin/just
vbin just-work/out/src/other_tools/just_mr/just-mr
vbin just-work/src/bin/just-import-git.py just-import-git
eval vcompletion justbuild-${version}/share/just_complete.bash bash
for m in justbuild-${version}/share/man/*.man; do
vman $m ${m%.man}
done
}