git: build manually with make

Git project officially recommended to use "make" directly [1].

1: https://lore.kernel.org/git/xmqq4kxiiuba.fsf@gitster-ct.c.googlers.com/
This commit is contained in:
Đoàn Trần Công Danh 2021-05-20 00:26:04 +07:00 committed by Đoàn Trần Công Danh
parent 4c05ce7ffc
commit c563f0a9bb

View file

@ -2,12 +2,12 @@
pkgname=git
version=2.31.1
revision=1
build_style=gnu-configure
configure_args="--with-curl --with-expat --with-tcltk --with-libpcre2"
hostmakedepends="asciidoc gettext perl pkg-config tar tk xmlto"
hostmakedepends="asciidoc gettext perl pkg-config tk xmlto"
makedepends="libglib-devel libcurl-devel libsecret-devel pcre2-devel tk-devel"
# Required by https://
depends="ca-certificates perl-Authen-SASL perl-MIME-tools perl-Net-SMTP-SSL"
checkdepends="tar cvs cvsps2 perl-DBD-SQLite subversion subversion-perl
perl-Term-ReadKey tzdata"
short_desc="Git Tree History Storage Tool"
maintainer="Đoàn Trần Công Danh <congdanhqx@gmail.com>"
license="GPL-2.0-only"
@ -21,16 +21,35 @@ python_version=3
subpackages="git-cvs git-svn gitk git-gui git-all git-libsecret git-netrc"
post_configure() {
do_configure() {
cat <<-EOF >config.mak
prefix = /usr
CC = $CC
AR = $AR
TAR = bsdtar
CFLAGS = $CFLAGS
LDFLAGS = $LDFLAGS
USE_LIBPCRE2=Yes
NO_INSTALL_HARDLINKS=Yes
INSTALLDIRS=vendor
perllibdir=/usr/share/perl5/vendor_perl
PYTHON_PATH=/usr/bin/python3
DEFAULT_TEST_TARGET = prove
GIT_PROVE_OPTS = $makejobs
EOF
if [ "$XBPS_TARGET_LIBC" = musl ]; then
cat <<-EOF >>config.mak
ICONV_OMITS_BOM = Yes
NO_REGEX = Yes
# TZ=CST6CDT date --iso-8601=seconds -d"2005-01-31 18:00:00 -0600"
export GIT_SKIP_TESTS=t9604.2
EOF
fi
}
post_build() {
do_build() {
make ${makejobs}
make ${makejobs} -C Documentation man
make ${makejobs} -C contrib/contacts all git-contacts.1
make ${makejobs} -C contrib/diff-highlight all
@ -40,14 +59,14 @@ post_build() {
}
do_check() {
make ${makejobs} test
make test
make -C contrib/diff-highlight test
make -C contrib/subtree test
make -C contrib/credential/netrc test
}
post_install() {
make DESTDIR=${DESTDIR} install-doc
do_install() {
make DESTDIR=${DESTDIR} install install-doc
vinstall contrib/completion/git-completion.bash 644 \
usr/share/bash-completion/completions git
vinstall contrib/completion/git-prompt.sh 644 usr/share/git