Skip to content

Commit

Permalink
git: Add port
Browse files Browse the repository at this point in the history
Signed-off-by: Dennis Bonke <[email protected]>
  • Loading branch information
Dennisbonke committed Jul 23, 2021
1 parent 2b47084 commit 05d4378
Show file tree
Hide file tree
Showing 3 changed files with 114 additions and 0 deletions.
55 changes: 55 additions & 0 deletions bootstrap.d/dev-vcs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
packages:
- name: git
metadata:
summary: The Git version control system
description: Git is one of the most used version control systems designed to handle large projects efficiently.
spdx: 'GPL-2'
website: 'https://www.git-scm.com/'
maintainer: "Dennis Bonke <[email protected]>"
categories: ['dev-vcs']
source:
subdir: 'ports'
git: 'https://github.com/git/git.git'
tag: 'v2.32.0'
version: '2.32.0'
tools_required:
- host-autoconf-v2.69
- host-automake-v1.15
- host-libtool
regenerate:
- args: ['autoreconf']
tools_required:
- host-pkg-config
- system-gcc
- virtual: pkgconfig-for-target
triple: "@OPTION:arch-triple@"
pkgs_required:
- mlibc
- python
- libexpat
- zlib
- openssl
- curl
- libiconv
- pcre
configure:
- args: ['cp', '-r', '@THIS_SOURCE_DIR@/.', '@THIS_BUILD_DIR@']
- args:
- './configure'
- '--host=@OPTION:arch-triple@'
- '--prefix=/usr'
- '--with-python=python3'
- '--with-gitconfig=/etc/gitconfig'
- '--with-curl=@SYSROOT_DIR@/usr'
- '--without-iconv'
- '--with-libpcre'
- '--enable-jit'
- 'ac_cv_fread_reads_directories=1'
- 'ac_cv_snprintf_returns_bogus=1'
environ:
CURL_CONFIG: '@SYSROOT_DIR@/usr/bin/curl-config'
build:
- args: ['make', 'NO_GETTEXT=YesPlease', '-j@PARALLELISM@']
- args: ['make', 'NO_GETTEXT=YesPlease', 'install']
environ:
DESTDIR: '@THIS_COLLECT_DIR@'
1 change: 1 addition & 0 deletions bootstrap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ imports:
- file: bootstrap.d/dev-lang.yml
- file: bootstrap.d/dev-libs.yml
- file: bootstrap.d/dev-util.yml
- file: bootstrap.d/dev-vcs.yml
- file: bootstrap.d/games-board.yml
- file: bootstrap.d/games-misc.yml
- file: bootstrap.d/media-fonts.yml
Expand Down
58 changes: 58 additions & 0 deletions patches/git/0001-Initial-Managarm-support.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
From 53584e9beb2c607d6dd77422db652c6014ddabcb Mon Sep 17 00:00:00 2001
From: Dennis Bonke <[email protected]>
Date: Fri, 16 Jul 2021 15:58:28 +0200
Subject: [PATCH] Initial Managarm support

Signed-off-by: Dennis Bonke <[email protected]>
---
config.mak.uname | 12 ++++++------
git-compat-util.h | 10 ++--------
2 files changed, 8 insertions(+), 14 deletions(-)

diff --git a/config.mak.uname b/config.mak.uname
index cb443b4e02..6cb9520c54 100644
--- a/config.mak.uname
+++ b/config.mak.uname
@@ -4,12 +4,12 @@
# Microsoft's Safe Exception Handling in libraries (such as zlib).
# Typically required for VS2013+/32-bit compilation on Vista+ versions.

-uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
-uname_M := $(shell sh -c 'uname -m 2>/dev/null || echo not')
-uname_O := $(shell sh -c 'uname -o 2>/dev/null || echo not')
-uname_R := $(shell sh -c 'uname -r 2>/dev/null || echo not')
-uname_P := $(shell sh -c 'uname -p 2>/dev/null || echo not')
-uname_V := $(shell sh -c 'uname -v 2>/dev/null || echo not')
+uname_S := #$(shell sh -c 'uname -s 2>/dev/null || echo not')
+uname_M := #$(shell sh -c 'uname -m 2>/dev/null || echo not')
+uname_O := #$(shell sh -c 'uname -o 2>/dev/null || echo not')
+uname_R := #$(shell sh -c 'uname -r 2>/dev/null || echo not')
+uname_P := #$(shell sh -c 'uname -p 2>/dev/null || echo not')
+uname_V := #$(shell sh -c 'uname -v 2>/dev/null || echo not')

ifdef MSVC
# avoid the MingW and Cygwin configuration sections
diff --git a/git-compat-util.h b/git-compat-util.h
index a508dbe5a3..efd1fd96f9 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -1263,14 +1263,8 @@ int open_nofollow(const char *path, int flags);
#endif

#ifndef _POSIX_THREAD_SAFE_FUNCTIONS
-static inline void flockfile(FILE *fh)
-{
- ; /* nothing */
-}
-static inline void funlockfile(FILE *fh)
-{
- ; /* nothing */
-}
+#define flockfile(fh)
+#define funlockfile(fh)
#define getc_unlocked(fh) getc(fh)
#endif

--
2.32.0

0 comments on commit 05d4378

Please sign in to comment.