git: keep build flag consistent in all stage

git build system will trigger a rebuild if it detects
if flags passed to make changed.

In commit 82a5337c07, ("git: correct utf-16 and utf-32 conversion on
musl", 2019-10-30) , we tried to correct the git-iconv interaction on
musl, but we forget to pass that flag into `make install'.

Hence, on do_install, git build system rebuild git without
ICONV_OMITS_BOM=Yes flag, thus produce faulty binary.

Save that flag into config.mak[1] in order to keep it consistent across
build stage.

While we're at it, also move other make_*_args into config.mak

[1]: https://public-inbox.org/git/20191031181116.GC2133@sigill.intra.peff.net/
This commit is contained in:
Doan Tran Cong Danh 2019-11-01 09:44:39 +07:00 committed by Juan RP
parent a3d7ce6fce
commit 7556428da1

View file

@ -1,12 +1,10 @@
# Template file for 'git' # Template file for 'git'
pkgname=git pkgname=git
version=2.23.0 version=2.23.0
revision=2 revision=3
build_style=gnu-configure build_style=gnu-configure
configure_args="--with-curl --with-expat --with-tcltk --with-libpcre2 configure_args="--with-curl --with-expat --with-tcltk --with-libpcre2
ac_cv_snprintf_returns_bogus=no" ac_cv_snprintf_returns_bogus=no"
make_install_args="NO_INSTALL_HARDLINKS=1 INSTALLDIRS=vendor
perllibdir=/usr/share/perl5/vendor_perl"
make_check_target=test make_check_target=test
hostmakedepends="asciidoc perl pkg-config tk xmlto" hostmakedepends="asciidoc perl pkg-config tk xmlto"
makedepends="libglib-devel libcurl-devel libsecret-devel pcre2-devel tk-devel" makedepends="libglib-devel libcurl-devel libsecret-devel pcre2-devel tk-devel"
@ -27,11 +25,21 @@ subpackages="git-cvs git-svn gitk git-gui git-all git-libsecret"
case "$XBPS_TARGET_MACHINE" in case "$XBPS_TARGET_MACHINE" in
*-musl) *-musl)
configure_args+=" ac_cv_fread_reads_directories=yes" configure_args+=" ac_cv_fread_reads_directories=yes"
make_build_args+=" ICONV_OMITS_BOM=Yes"
;; ;;
*) configure_args+=" ac_cv_fread_reads_directories=no" ;; *) configure_args+=" ac_cv_fread_reads_directories=no" ;;
esac esac
post_configure() {
cat <<-EOF >config.mak
NO_INSTALL_HARDLINKS=Yes
INSTALLDIRS=vendor
perllibdir=/usr/share/perl5/vendor_perl
EOF
case "$XBPS_TARGET_MACHINE" in
*-musl) echo "ICONV_OMITS_BOM=Yes" >>config.mak ;;
esac
}
post_build() { post_build() {
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