diff --git a/land/git/PKGBUILD b/land/git/PKGBUILD new file mode 100644 index 00000000..03e5337e --- /dev/null +++ b/land/git/PKGBUILD @@ -0,0 +1,44 @@ +pkgname=git +pkgver=2.42.1 +pkgrel=3 +pkgdesc="Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency." +arch=('i786') +makedepend=('openssl' 'pcre2' 'curl' 'libexpat' 'zlib') +url="https://git-scm.com/" +source=( + 'https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.42.1.tar.xz' + "$pkgname-$pkgver.patch" +) +sha256sums=( + '8e46fa96bf35a65625d85fde50391e39bc0620d1bb39afb70b96c4a237a1a4f7' + 'SKIP' +) + +prepare() { + cd $pkgname-$pkgver + patch -p0 < ../$pkgname-$pkgver.patch +} + + +build() { + cd $pkgname-$pkgver + ac_cv_fread_reads_directories=n \ + ac_cv_snprintf_returns_bogus=n \ + NO_MMAP=y \ + ./configure \ + --host=i786-pc-xelix \ + --prefix=/usr \ + --sysconfdir=/etc \ + --disable-pthreads \ + --with-openssl \ + --with-libpcre2 \ + --with-curl \ + --with-expat + + make -j$(nproc) +} + +package() { + cd $pkgname-$pkgver + make DESTDIR=$pkgdir install +} diff --git a/land/git/git-2.42.1.patch b/land/git/git-2.42.1.patch new file mode 100644 index 00000000..33bcd11e --- /dev/null +++ b/land/git/git-2.42.1.patch @@ -0,0 +1,80 @@ +--- compat/disk.h ++++ compat/disk.h.new +@@ -35,6 +35,7 @@ + strbuf_humanise_bytes(out, avail2caller.QuadPart); + strbuf_addch(out, '\n'); + #else ++#ifndef __xelix__ + struct statvfs stat; + + strbuf_realpath(&buf, ".", 1); +@@ -48,6 +49,7 @@ + strbuf_addf(out, "Available space on '%s': ", buf.buf); + strbuf_humanise_bytes(out, (off_t)stat.f_bsize * (off_t)stat.f_bavail); + strbuf_addf(out, " (mount flags 0x%lx)\n", stat.f_flag); ++#endif + #endif + + cleanup: +--- git-compat-util.h ++++ git-compat-util.h.new +@@ -278,7 +278,9 @@ + #include + #include + #include ++#ifndef __xelix__ + #include ++#endif + #include + #ifndef NO_SYS_SELECT_H + #include +@@ -400,7 +402,7 @@ + #include + #endif + +-#ifdef HAVE_SYSINFO ++#ifndef __xelix__ + # include + #endif + +--- builtin/gc.c ++++ builtin/gc.c.new +@@ -262,7 +262,7 @@ + + static uint64_t total_ram(void) + { +-#if defined(HAVE_SYSINFO) ++#if 0 + struct sysinfo si; + + if (!sysinfo(&si)) +--- Makefile ++++ Makefile.new +@@ -2078,9 +2078,9 @@ + BASIC_CFLAGS += -DHAVE_SYNC_FILE_RANGE + endif + +-ifdef NEEDS_LIBRT +- EXTLIBS += -lrt +-endif ++#ifdef NEEDS_LIBRT ++# EXTLIBS += -lrt ++#endif + + ifdef HAVE_BSD_SYSCTL + BASIC_CFLAGS += -DHAVE_BSD_SYSCTL +--- progress.c ++++ progress.c.new +@@ -102,8 +102,12 @@ + + static int is_foreground_fd(int fd) + { ++#ifndef __xelix__ + int tpgrp = tcgetpgrp(fd); + return tpgrp < 0 || tpgrp == getpgid(0); ++#else ++ return 1; ++#endif + } + + static void display(struct progress *progress, uint64_t n, const char *done)