From 1dd0e467211716ebfd4ee5a07f67e40f43776d39 Mon Sep 17 00:00:00 2001
From: Ian Douglas Scott <ian@iandouglasscott.com>
Date: Fri, 7 Jul 2017 13:28:39 -0700
Subject: [PATCH] git: Avoid patching Makefile

---
 recipes/git/git.patch | 57 -------------------------------------------
 recipes/git/recipe.sh |  2 +-
 2 files changed, 1 insertion(+), 58 deletions(-)

diff --git a/recipes/git/git.patch b/recipes/git/git.patch
index b853970b1..ff708f0df 100644
--- a/recipes/git/git.patch
+++ b/recipes/git/git.patch
@@ -725,50 +725,6 @@ diff -ru git-2.13.1/line-log.c git-2.13.1-new/line-log.c
  	       c_reset);
  	fprintf(opt->file, "%s%s+++ b/%s%s\n", prefix, c_meta, pair->two->path, c_reset);
  	for (i = 0; i < range->ranges.nr; i++) {
-diff -ru git-2.13.1/Makefile git-2.13.1-new/Makefile
---- git-2.13.1/Makefile	2017-06-04 18:08:11.000000000 -0700
-+++ git-2.13.1-new/Makefile	2017-06-25 15:02:55.796346882 -0700
-@@ -1202,7 +1202,7 @@
- 	ifdef NEEDS_LIBINTL_BEFORE_LIBICONV
- 		ICONV_LINK += -lintl
- 	endif
--	EXTLIBS += $(ICONV_LINK) -liconv
-+	EXTLIBS += $(ICONV_LINK)
- endif
- ifdef NEEDS_LIBGEN
- 	EXTLIBS += -lgen
-@@ -1260,11 +1260,9 @@
- 	BASIC_CFLAGS += -DNO_GETTEXT
- 	USE_GETTEXT_SCHEME ?= fallthrough
- endif
--ifdef NO_POLL
- 	NO_SYS_POLL_H = YesPlease
- 	COMPAT_CFLAGS += -DNO_POLL -Icompat/poll
- 	COMPAT_OBJS += compat/poll/poll.o
--endif
- ifdef NO_STRCASESTR
- 	COMPAT_CFLAGS += -DNO_STRCASESTR
- 	COMPAT_OBJS += compat/strcasestr.o
-@@ -1368,11 +1366,9 @@
- 	LIB_OBJS += compat/inet_pton.o
- 	BASIC_CFLAGS += -DNO_INET_PTON
- endif
--ifndef NO_UNIX_SOCKETS
- 	LIB_OBJS += unix-socket.o
- 	PROGRAM_OBJS += credential-cache.o
- 	PROGRAM_OBJS += credential-cache--daemon.o
--endif
- 
- ifdef NO_ICONV
- 	BASIC_CFLAGS += -DNO_ICONV
-@@ -1530,7 +1526,6 @@
- endif
- 
- ifdef NEEDS_LIBRT
--	EXTLIBS += -lrt
- endif
- 
- ifdef HAVE_BSD_SYSCTL
 diff -ru git-2.13.1/path.c git-2.13.1-new/path.c
 --- git-2.13.1/path.c	2017-06-04 18:08:11.000000000 -0700
 +++ git-2.13.1-new/path.c	2017-07-05 12:23:08.831145653 -0700
@@ -946,19 +902,6 @@ diff -ru git-2.13.1/strbuf.c git-2.13.1-new/strbuf.c
  			strbuf_setlen(sb, strlen(sb->buf));
  			return 0;
  		}
-diff -ru git-2.13.1/unix-socket.c git-2.13.1-new/unix-socket.c
---- git-2.13.1/unix-socket.c	2017-06-04 18:08:11.000000000 -0700
-+++ git-2.13.1-new/unix-socket.c	2017-06-25 15:19:23.024088698 -0700
-@@ -1,3 +1,4 @@
-+#if 0
- #include "cache.h"
- #include "unix-socket.h"
- 
-@@ -121,3 +122,4 @@
- 	errno = saved_errno;
- 	return -1;
- }
-+#endif
 diff -ru git-2.13.1/wrapper.c git-2.13.1-new/wrapper.c
 --- git-2.13.1/wrapper.c	2017-06-04 18:08:11.000000000 -0700
 +++ git-2.13.1-new/wrapper.c	2017-06-25 15:19:23.014088636 -0700
diff --git a/recipes/git/recipe.sh b/recipes/git/recipe.sh
index b19f0403a..ec9a5d92b 100644
--- a/recipes/git/recipe.sh
+++ b/recipes/git/recipe.sh
@@ -16,7 +16,7 @@ export RANLIB="${HOST}-ranlib"
 export READELF="${HOST}-readelf"
 export STRIP="${HOST}-strip"
 
-MAKEFLAGS="NO_MMAP=1 NEEDS_SSL_WITH_CURL=1 NEEDS_CRYPTO_WITH_SSL=1"
+MAKEFLAGS="NO_MMAP=1 NEEDS_SSL_WITH_CURL=1 NEEDS_CRYPTO_WITH_SSL=1 NO_UNIX_SOCKETS=1 NO_POLL=1 NEEDS_LIBICONV= NEEDS_LIBRT="
 
 function recipe_version {
     echo "$VERSION"
-- 
GitLab