{"thread":{"id":"9251","subject":"[PATCH] zlib in custom location","startedAt":"2007-07-27T05:42:51Z","lastAt":"2007-07-27T06:14:56Z","messageCount":2,"participants":["Robert Schiele"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"48766","messageId":"20070727054251.GC30038@schiele.dyndns.org","threadId":"9251","inReplyTo":null,"subject":"[PATCH] zlib in custom location","fromName":"Robert Schiele","fromEmail":"rschiele@gmail.com","sentAt":"2007-07-27T05:42:51Z","receivedAt":"2007-07-27T05:42:51Z","isPatch":true,"sender":{"key":"rschiele@gmail.com","avatar":"https://gravatar.com/avatar/409473567eb2287d5f0157b51f5b703994b347f24f92172e3a0588741c27a492?d=mp&s=160"},"body":"Hi,\n\nI have some systems with zlib in a custom location and thus did the following\nchange to support a variable ZLIBDIR like it does already exist for\nOPENSSLDIR.  Would be great to see this in the main tree.\n\ncommit d61424558cda558b0c7893f545d548c6d6f211ff\nAuthor: Robert Schiele <rschiele@gmail.com>\nDate:   Thu Jul 26 22:34:16 2007 -0700\n\n    - add option to find zlib in custom path\n\ndiff --git a/Makefile b/Makefile\nindex 73b487f..0179339 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -372,7 +372,7 @@ BUILTIN_OBJS = \\\n \tbuiltin-pack-refs.o\n \n GITLIBS = $(LIB_FILE) $(XDIFF_LIB)\n-EXTLIBS = -lz\n+EXTLIBS =\n \n #\n # Platform specific tweaks\n@@ -517,6 +517,12 @@ ifndef NO_CURL\n \tendif\n endif\n \n+ifdef ZLIBDIR\n+\tBASIC_CFLAGS += -I$(ZLIBDIR)/include\n+\tEXTLIBS += -L$(ZLIBDIR)/lib $(CC_LD_DYNPATH)$(ZLIBDIR)/lib\n+endif\n+EXTLIBS += -lz\n+\n ifndef NO_OPENSSL\n \tOPENSSL_LIBSSL = -lssl\n \tifdef OPENSSLDIR\n\nRobert\n\n-- \nRobert Schiele\nDipl.-Wirtsch.informatiker\tmailto:rschiele@gmail.com\n\n\"Quidquid latine dictum sit, altum sonatur.\"\n"},{"id":"48772","messageId":"20070727061456.GD30038@schiele.dyndns.org","threadId":"9251","inReplyTo":"20070727054251.GC30038@schiele.dyndns.org","subject":"Re: [PATCH] zlib in custom location","fromName":"Robert Schiele","fromEmail":"rschiele@gmail.com","sentAt":"2007-07-27T06:14:56Z","receivedAt":"2007-07-27T06:14:56Z","isPatch":true,"sender":{"key":"rschiele@gmail.com","avatar":"https://gravatar.com/avatar/409473567eb2287d5f0157b51f5b703994b347f24f92172e3a0588741c27a492?d=mp&s=160"},"body":"On Fri, Jul 27, 2007 at 07:42:51AM +0200, Robert Schiele wrote:\n> Hi,\n> \n> I have some systems with zlib in a custom location and thus did the following\n> change to support a variable ZLIBDIR like it does already exist for\n> OPENSSLDIR.  Would be great to see this in the main tree.\n\nJust to follow up this change I have another one:\n\nSince some Linux archs use different names for the library directory than\n\"lib\" (like \"lib64\") I made this a config variable as well.  Currently this is\nonly an issue if you use custom directories for libraries used by git.\n\ncommit a1cffe56cc9092443cd8bd03b18eb7e222528e35\nAuthor: Robert Schiele <rschiele@gmail.com>\nDate:   Thu Jul 26 23:08:47 2007 -0700\n\n    - make the name of the library directory a config option\n\ndiff --git a/Makefile b/Makefile\nindex 0179339..64c0a59 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -151,6 +151,7 @@ sysconfdir = /etc\n else\n sysconfdir = $(prefix)/etc\n endif\n+lib = lib\n ETC_GITCONFIG = $(sysconfdir)/gitconfig\n # DESTDIR=\n \n@@ -170,7 +171,7 @@ GITWEB_FAVICON = git-favicon.png\n GITWEB_SITE_HEADER =\n GITWEB_SITE_FOOTER =\n \n-export prefix bindir gitexecdir sharedir template_dir sysconfdir\n+export prefix bindir gitexecdir sharedir template_dir sysconfdir lib\n \n CC = gcc\n AR = ar\n@@ -499,9 +500,9 @@ endif\n \n ifndef NO_CURL\n \tifdef CURLDIR\n-\t\t# Try \"-Wl,-rpath=$(CURLDIR)/lib\" in such a case.\n+\t\t# Try \"-Wl,-rpath=$(CURLDIR)/$(lib)\" in such a case.\n \t\tBASIC_CFLAGS += -I$(CURLDIR)/include\n-\t\tCURL_LIBCURL = -L$(CURLDIR)/lib $(CC_LD_DYNPATH)$(CURLDIR)/lib -lcurl\n+\t\tCURL_LIBCURL = -L$(CURLDIR)/$(lib) $(CC_LD_DYNPATH)$(CURLDIR)/$(lib) -lcurl\n \telse\n \t\tCURL_LIBCURL = -lcurl\n \tendif\n@@ -519,7 +520,7 @@ endif\n \n ifdef ZLIBDIR\n \tBASIC_CFLAGS += -I$(ZLIBDIR)/include\n-\tEXTLIBS += -L$(ZLIBDIR)/lib $(CC_LD_DYNPATH)$(ZLIBDIR)/lib\n+\tEXTLIBS += -L$(ZLIBDIR)/$(lib) $(CC_LD_DYNPATH)$(ZLIBDIR)/$(lib)\n endif\n EXTLIBS += -lz\n \n@@ -527,7 +528,7 @@ ifndef NO_OPENSSL\n \tOPENSSL_LIBSSL = -lssl\n \tifdef OPENSSLDIR\n \t\tBASIC_CFLAGS += -I$(OPENSSLDIR)/include\n-\t\tOPENSSL_LINK = -L$(OPENSSLDIR)/lib $(CC_LD_DYNPATH)$(OPENSSLDIR)/lib\n+\t\tOPENSSL_LINK = -L$(OPENSSLDIR)/$(lib) $(CC_LD_DYNPATH)$(OPENSSLDIR)/$(lib)\n \telse\n \t\tOPENSSL_LINK =\n \tendif\n@@ -544,7 +545,7 @@ endif\n ifdef NEEDS_LIBICONV\n \tifdef ICONVDIR\n \t\tBASIC_CFLAGS += -I$(ICONVDIR)/include\n-\t\tICONV_LINK = -L$(ICONVDIR)/lib $(CC_LD_DYNPATH)$(ICONVDIR)/lib\n+\t\tICONV_LINK = -L$(ICONVDIR)/$(lib) $(CC_LD_DYNPATH)$(ICONVDIR)/$(lib)\n \telse\n \t\tICONV_LINK =\n \tendif\n\nRobert\n\n-- \nRobert Schiele\nDipl.-Wirtsch.informatiker\tmailto:rschiele@gmail.com\n\n\"Quidquid latine dictum sit, altum sonatur.\"\n"}]}