mutt: Update from 1.8.2 to 1.8.3
[termux-packages] / packages / git / build.sh
CommitLineData
41c3c03a 1TERMUX_PKG_HOMEPAGE=https://git-scm.com/
59f0d218 2TERMUX_PKG_DESCRIPTION="Distributed version control system designed to handle everything from small to very large projects with speed and efficiency"
de255e9c
FF
3# less is required as a pager for git log, and the busybox less does not handle used escape sequences.
4TERMUX_PKG_DEPENDS="libcurl, less"
d6315450
FF
5TERMUX_PKG_VERSION=2.13.1.1
6# Work around broken git build for 2.13.1:
7_REAL_VERSION=2.13.0
8TERMUX_PKG_SRCURL=https://www.kernel.org/pub/software/scm/git/git-${_REAL_VERSION}.tar.xz
9TERMUX_PKG_SHA256=4bbf2ab6f2341253a38f95306ec7936833eb1c42572da5c1fa61f0abb2191258
5822f920 10## This requires a working $TERMUX_PREFIX/bin/sh on the host building:
41c3c03a
FF
11TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
12ac_cv_fread_reads_directories=yes
13ac_cv_header_libintl_h=no
14ac_cv_snprintf_returns_bogus=no
15--with-curl
16--without-tcltk
17--with-shell=$TERMUX_PREFIX/bin/sh
18"
59f0d218 19# expat is only used by git-http-push for remote lock management over DAV, so disable:
19ce3d74 20# NO_INSTALL_HARDLINKS to use symlinks instead of hardlinks (which does not work on Android M):
2a86d5d9 21TERMUX_PKG_EXTRA_MAKE_ARGS="NO_NSEC=1 NO_GETTEXT=1 NO_EXPAT=1 NO_INSTALL_HARDLINKS=1 PERL_PATH=$TERMUX_PREFIX/bin/perl"
59f0d218
FF
22TERMUX_PKG_BUILD_IN_SRC="yes"
23
24# Things to remove to save space:
25# bin/git-cvsserver - server emulating CVS
26# bin/git-shell - restricted login shell for Git-only SSH access
41c3c03a
FF
27TERMUX_PKG_RM_AFTER_INSTALL="
28bin/git-cvsserver
29bin/git-shell
30libexec/git-core/git-shell
31libexec/git-core/git-cvsserver
32share/man/man1/git-cvsserver.1
33share/man/man1/git-shell.1
34"
2a86d5d9
FF
35
36termux_step_pre_configure () {
37 # Setup perl so that the build process can execute it:
38 rm -f $TERMUX_PREFIX/bin/perl
39 ln -s `which perl` $TERMUX_PREFIX/bin/perl
40
41 # Force fresh perl files (otherwise files from earlier builds
42 # remains without bumped modification times, so are not picked
43 # up by the package):
44 rm -Rf $TERMUX_PREFIX/share/git-perl
dfb1a0ee
FF
45
46 # Fixes build if utfcpp is installed:
47 CPPFLAGS="-I$TERMUX_PKG_SRCDIR $CPPFLAGS"
2a86d5d9 48}
59f0d218
FF
49
50termux_step_post_make_install () {
51 # Installing man requires asciidoc and xmlto, so git uses separate make targets for man pages
52 make install-man
e8c88e69
FF
53
54 mkdir -p $TERMUX_PREFIX/etc/bash_completion.d/
55 cp $TERMUX_PKG_SRCDIR/contrib/completion/git-completion.bash \
56 $TERMUX_PREFIX/etc/bash_completion.d/
2a86d5d9
FF
57
58 # Remove the build machine perl setup in termux_step_pre_configure to avoid it being packaged:
59 rm $TERMUX_PREFIX/bin/perl
60
61 # Remove clutter:
62 rm -Rf $TERMUX_PREFIX/lib/*-linux*/perl
41c3c03a
FF
63
64 # Remove duplicated binaries in bin/ with symlink to the one in libexec/git-core:
65 (cd $TERMUX_PREFIX/bin; ln -s -f ../libexec/git-core/git git)
66 (cd $TERMUX_PREFIX/bin; ln -s -f ../libexec/git-core/git-upload-pack git-upload-pack)
59f0d218 67}
de255e9c
FF
68
69termux_step_post_massage () {
70 if [ ! -f libexec/git-core/git-remote-https ]; then
72f69cdc 71 termux_error_exit "Git built without https support"
de255e9c
FF
72 fi
73}