From cb36dc477c0856061982bffe9cfded1bae7517f0 Mon Sep 17 00:00:00 2001 From: garga Date: Mon, 21 Mar 2016 10:50:29 +0000 Subject: Import a patch from git mailing list to fix build with gcc 4.2.1 and remove dependency of newer gcc to build it on 9.x Obtained from: http://thread.gmane.org/gmane.comp.version-control.git/289397 MFH: 2016Q1 --- devel/git/Makefile | 5 +---- devel/git/files/patch-git-compat-util.h | 13 +++++++++++++ 2 files changed, 14 insertions(+), 4 deletions(-) create mode 100644 devel/git/files/patch-git-compat-util.h (limited to 'devel/git') diff --git a/devel/git/Makefile b/devel/git/Makefile index d41268e287a9..c7527aa1adbc 100644 --- a/devel/git/Makefile +++ b/devel/git/Makefile @@ -3,6 +3,7 @@ PORTNAME= git DISTVERSION= 2.7.4 +PORTREVISION= 1 CATEGORIES= devel MASTER_SITES= KERNEL_ORG/software/scm/git DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \ @@ -97,10 +98,6 @@ CVS_RUN_DEPENDS= cvsps:${PORTSDIR}/devel/cvsps .include -.if ${OSVERSION} < 1000000 -USE_GCC= 4.8+ -.endif - # This is intentionally not exposed as an option. .ifndef (WITH_DEBUG) ALL_TARGET= all strip diff --git a/devel/git/files/patch-git-compat-util.h b/devel/git/files/patch-git-compat-util.h new file mode 100644 index 000000000000..92a9417304bc --- /dev/null +++ b/devel/git/files/patch-git-compat-util.h @@ -0,0 +1,13 @@ +--- git-compat-util.h.orig 2016-03-21 10:34:43 UTC ++++ git-compat-util.h +@@ -715,8 +715,8 @@ static inline size_t st_add(size_t a, si + (uintmax_t)a, (uintmax_t)b); + return a + b; + } +-#define st_add3(a,b,c) st_add((a),st_add((b),(c))) +-#define st_add4(a,b,c,d) st_add((a),st_add3((b),(c),(d))) ++#define st_add3(a,b,c) st_add(st_add((a),(b)),(c)) ++#define st_add4(a,b,c,d) st_add(st_add3((a),(b),(c)),(d)) + + static inline size_t st_mult(size_t a, size_t b) + { -- cgit