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
1 changed files with 27 additions and 8 deletions

View File

@ -2,12 +2,12 @@
pkgname=git pkgname=git
version=2.31.1 version=2.31.1
revision=1 revision=1
build_style=gnu-configure hostmakedepends="asciidoc gettext perl pkg-config tk xmlto"
configure_args="--with-curl --with-expat --with-tcltk --with-libpcre2"
hostmakedepends="asciidoc gettext perl pkg-config tar tk xmlto"
makedepends="libglib-devel libcurl-devel libsecret-devel pcre2-devel tk-devel" makedepends="libglib-devel libcurl-devel libsecret-devel pcre2-devel tk-devel"
# Required by https:// # Required by https://
depends="ca-certificates perl-Authen-SASL perl-MIME-tools perl-Net-SMTP-SSL" 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" short_desc="Git Tree History Storage Tool"
maintainer="Đoàn Trần Công Danh <congdanhqx@gmail.com>" maintainer="Đoàn Trần Công Danh <congdanhqx@gmail.com>"
license="GPL-2.0-only" 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" subpackages="git-cvs git-svn gitk git-gui git-all git-libsecret git-netrc"
post_configure() { do_configure() {
cat <<-EOF >config.mak cat <<-EOF >config.mak
prefix = /usr
CC = $CC
AR = $AR
TAR = bsdtar
CFLAGS = $CFLAGS
LDFLAGS = $LDFLAGS
USE_LIBPCRE2=Yes
NO_INSTALL_HARDLINKS=Yes NO_INSTALL_HARDLINKS=Yes
INSTALLDIRS=vendor INSTALLDIRS=vendor
perllibdir=/usr/share/perl5/vendor_perl perllibdir=/usr/share/perl5/vendor_perl
PYTHON_PATH=/usr/bin/python3 PYTHON_PATH=/usr/bin/python3
DEFAULT_TEST_TARGET = prove
GIT_PROVE_OPTS = $makejobs
EOF 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 Documentation man
make ${makejobs} -C contrib/contacts all git-contacts.1 make ${makejobs} -C contrib/contacts all git-contacts.1
make ${makejobs} -C contrib/diff-highlight all make ${makejobs} -C contrib/diff-highlight all
@ -40,14 +59,14 @@ post_build() {
} }
do_check() { do_check() {
make ${makejobs} test make test
make -C contrib/diff-highlight test make -C contrib/diff-highlight test
make -C contrib/subtree test make -C contrib/subtree test
make -C contrib/credential/netrc test make -C contrib/credential/netrc test
} }
post_install() { do_install() {
make DESTDIR=${DESTDIR} install-doc make DESTDIR=${DESTDIR} install install-doc
vinstall contrib/completion/git-completion.bash 644 \ vinstall contrib/completion/git-completion.bash 644 \
usr/share/bash-completion/completions git usr/share/bash-completion/completions git
vinstall contrib/completion/git-prompt.sh 644 usr/share/git vinstall contrib/completion/git-prompt.sh 644 usr/share/git