{"thread":{"id":"11486","subject":"[PATCH] git-gui/Makefile - Don't convert gg_libdir on Cygwin","startedAt":"2008-01-05T22:32:35Z","lastAt":"2008-01-18T04:01:46Z","messageCount":5,"participants":["Mark Levedahl","Shawn O. Pearce"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"64549","messageId":"1199572355-2720-1-git-send-email-mdl123@verizon.net","threadId":"11486","inReplyTo":null,"subject":"[PATCH] git-gui/Makefile - Don't convert gg_libdir on Cygwin","fromName":"Mark Levedahl","fromEmail":"mdl123@verizon.net","sentAt":"2008-01-05T22:32:35Z","receivedAt":"2008-01-05T22:32:35Z","isPatch":true,"sender":{"key":"mdl123@verizon.net","avatar":"https://avatars.githubusercontent.com/u/5302462?v=4"},"body":"gg_libdir was converted to an absolute Windows path as a remnant of\nlogic to check for relative / absolute location of libraries, but that\ndoes not work on Cygwin. Converting gg_libdir to a Windows path has the\nnasty side-effect that it cannot be prefixed with $DESTDIR, and this\nprecludes installing to a staging directory. So, don't convert it.\n\nSigned-off-by: Mark Levedahl <mdl123@verizon.net>\n---\n(resend, mistyped the git list address)\n git-gui/Makefile |    1 -\n 1 files changed, 0 insertions(+), 1 deletions(-)\n\ndiff --git a/git-gui/Makefile b/git-gui/Makefile\nindex c109eab..8eb9e05 100644\n--- a/git-gui/Makefile\n+++ b/git-gui/Makefile\n@@ -119,7 +119,6 @@ GITGUI_MACOSXAPP :=\n\n ifeq ($(uname_O),Cygwin)\n \tGITGUI_SCRIPT := `cygpath --windows --absolute \"$(GITGUI_SCRIPT)\"`\n-\tgg_libdir := $(shell cygpath --windows --absolute \"$(gg_libdir)\")\n else\n \tifeq ($(exedir),$(gg_libdir))\n \t\tGITGUI_RELATIVE := 1\n--\n1.5.4.rc2.50.gcfa92\n"},{"id":"65499","messageId":"20080116064012.GO24004@spearce.org","threadId":"11486","inReplyTo":"1199572355-2720-1-git-send-email-mdl123@verizon.net","subject":"Re: [PATCH] git-gui/Makefile - Don't convert gg_libdir on Cygwin","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2008-01-16T06:40:12Z","receivedAt":"2008-01-16T06:40:12Z","isPatch":true,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Mark Levedahl <mdl123@verizon.net> wrote:\n> gg_libdir was converted to an absolute Windows path as a remnant of\n> logic to check for relative / absolute location of libraries, but that\n> does not work on Cygwin. Converting gg_libdir to a Windows path has the\n> nasty side-effect that it cannot be prefixed with $DESTDIR, and this\n> precludes installing to a staging directory. So, don't convert it.\n\nHmmph.  That bites.\n\n>  ifeq ($(uname_O),Cygwin)\n>  \tGITGUI_SCRIPT := `cygpath --windows --absolute \"$(GITGUI_SCRIPT)\"`\n> -\tgg_libdir := $(shell cygpath --windows --absolute \"$(gg_libdir)\")\n>  else\n\nThe reason I'm doing the UNIX->Windows conversion here is I run\ngit-gui on a pure Win32 Tcl/Tk build, one that is a lot more recent\nthan the version that ships as a Cygwin package.  The pure Win32\nTcl/Tk cannot read UNIX paths, so I cannot allow libdir to be a\nUNIX path in that case.\n\nNow earlier we used to use relative paths on Windows to find the\nlibdir at runtime, but we don't do that anymore either, and I'm\nnot really sure why.  In theory it should still work to make it\nrelative when possible, and then my installation with the more\nnative Tcl/Tk would work just fine.\n\nI guess I'm willing to apply your patch and carry the reverse of your\npatch as a local-only hack for my needs, but I wonder if anyone else\nis also using git-gui on Cygwin with a pure Win32 Tcl/Tk build...\n\n-- \nShawn.\n"},{"id":"65655","messageId":"478EAACD.80100@verizon.net","threadId":"11486","inReplyTo":"20080116064012.GO24004@spearce.org","subject":"Re: [PATCH] git-gui/Makefile - Don't convert gg_libdir on Cygwin","fromName":"Mark Levedahl","fromEmail":"mdl123@verizon.net","sentAt":"2008-01-17T01:09:33Z","receivedAt":"2008-01-17T01:09:33Z","isPatch":true,"sender":{"key":"mdl123@verizon.net","avatar":"https://avatars.githubusercontent.com/u/5302462?v=4"},"body":"Shawn O. Pearce wrote:\n> I guess I'm willing to apply your patch and carry the reverse of your\n> patch as a local-only hack for my needs, but I wonder if anyone else\n> is also using git-gui on Cygwin with a pure Win32 Tcl/Tk build...\n>   \nUm, well, I would like to as the Cygwin tcl/tk is *never* going to be \nupdate. Drats. There has to be another way? Perhaps have a separate \nvariable for where to install vs. where to look for libraries?\n\nMark\n"},{"id":"65817","messageId":"1200628223-2280-1-git-send-email-mlevedahl@gmail.com","threadId":"11486","inReplyTo":"20080116064012.GO24004@spearce.org","subject":"[PATCH] git-gui/Makefile - Handle $DESTDIR on Cygwin","fromName":"Mark Levedahl","fromEmail":"mlevedahl@gmail.com","sentAt":"2008-01-18T03:50:23Z","receivedAt":"2008-01-18T03:50:23Z","isPatch":true,"sender":{"key":"mdl123@verizon.net","avatar":"https://avatars.githubusercontent.com/u/5302462?v=4"},"body":"From: Mark Levedahl <mdl123@verizon.net>\n\ngg_libdir is converted to an absolute Windows path on Cygwin,\nbut a later step attempts to prefix $DESTDIR to install to a\nstaging directory. Explicitly separate the uses of gg_libdir for\nthese two purposes so installation to $DESTDIR will work.\n\nSigned-off-by: Mark Levedahl <mdl123@verizon.net>\n---\ngit-gui built with this  passed tests on cygwin + tcl/tk 8.5,\ncygwin + normal tcl/tk, and linux. DESTDIR also works on cygwin,\nso I would suggest this rather than the previous patch.\n\n\n git-gui/Makefile |    5 +++--\n 1 files changed, 3 insertions(+), 2 deletions(-)\n\ndiff --git a/git-gui/Makefile b/git-gui/Makefile\nindex c109eab..1baf4b0 100644\n--- a/git-gui/Makefile\n+++ b/git-gui/Makefile\n@@ -110,7 +110,7 @@ TCLTK_PATH_SED = $(subst ','\\'',$(subst \\,\\\\,$(TCLTK_PATH)))\n\n gg_libdir ?= $(sharedir)/git-gui/lib\n libdir_SQ  = $(subst ','\\'',$(gg_libdir))\n-libdir_SED = $(subst ','\\'',$(subst \\,\\\\,$(gg_libdir)))\n+libdir_SED = $(subst ','\\'',$(subst \\,\\\\,$(gg_libdir_sed_in)))\n exedir     = $(dir $(gitexecdir))share/git-gui/lib\n\n GITGUI_SCRIPT   := $$0\n@@ -119,11 +119,12 @@ GITGUI_MACOSXAPP :=\n\n ifeq ($(uname_O),Cygwin)\n \tGITGUI_SCRIPT := `cygpath --windows --absolute \"$(GITGUI_SCRIPT)\"`\n-\tgg_libdir := $(shell cygpath --windows --absolute \"$(gg_libdir)\")\n+\tgg_libdir_sed_in := $(shell cygpath --windows --absolute \"$(gg_libdir)\")\n else\n \tifeq ($(exedir),$(gg_libdir))\n \t\tGITGUI_RELATIVE := 1\n \tendif\n+\tgg_libdir_sed_in := $(gg_libdir)\n endif\n ifeq ($(uname_S),Darwin)\n \tifeq ($(shell test -d $(TKFRAMEWORK) && echo y),y)\n--\n1.5.4.rc3.26.gf961e\n"},{"id":"65819","messageId":"20080118040146.GY24004@spearce.org","threadId":"11486","inReplyTo":"1200628223-2280-1-git-send-email-mlevedahl@gmail.com","subject":"Re: [PATCH] git-gui/Makefile - Handle $DESTDIR on Cygwin","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2008-01-18T04:01:46Z","receivedAt":"2008-01-18T04:01:46Z","isPatch":true,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Mark Levedahl <mlevedahl@gmail.com> wrote:\n> From: Mark Levedahl <mdl123@verizon.net>\n> \n> gg_libdir is converted to an absolute Windows path on Cygwin,\n> but a later step attempts to prefix $DESTDIR to install to a\n> staging directory. Explicitly separate the uses of gg_libdir for\n> these two purposes so installation to $DESTDIR will work.\n> \n> Signed-off-by: Mark Levedahl <mdl123@verizon.net>\n> ---\n> git-gui built with this  passed tests on cygwin + tcl/tk 8.5,\n> cygwin + normal tcl/tk, and linux. DESTDIR also works on cygwin,\n> so I would suggest this rather than the previous patch.\n\nExcellent.  I was about to think about writing this patch myself,\nbut you beat me to it.  I'm applying this and will include it as\npart of git-gui 0.9.2, which should be in git 1.5.4.\n\nThanks.\n \n-- \nShawn.\n"}]}