{"thread":{"id":"7332","subject":"[PATCH] Added make options NO_GUI and WITH_P4IMPORT.","startedAt":"2007-03-20T11:45:25Z","lastAt":"2007-04-05T12:50:28Z","messageCount":47,"participants":["Eygene Ryabinkin","Jakub Narebski","Johannes Schindelin","Paolo Bonzini","Alex Riesen","Junio C Hamano","Brian Gernhardt","Tom Prince"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"37617","messageId":"20070320114525.GP96806@codelabs.ru","threadId":"7332","inReplyTo":null,"subject":"[PATCH] Added make options NO_GUI and WITH_P4IMPORT.","fromName":"Eygene Ryabinkin","fromEmail":"rea-git@codelabs.ru","sentAt":"2007-03-20T11:45:25Z","receivedAt":"2007-03-20T11:45:25Z","isPatch":true,"sender":{"key":"rea-git@codelabs.ru","avatar":null},"body":"NO_GUI disables the building and installation of the git GUI part.\nWITH_P4IMPORT enables the installation of the Perforce import script.\n\nThis patch was originally developed for the FreeBSD port of git,\nbut I think that it will not harm to integrate this patch into the\ndevelopment tree.\n\nSigned-off-by: Eygene Ryabinkin <rea-git@codelabs.ru>\n---\n Makefile |   44 ++++++++++++++++++++++++++++++++++++++++++++\n 1 files changed, 44 insertions(+), 0 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex 51c1fed..8b142f0 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -110,6 +110,10 @@ all::\n # Define NO_PERL_MAKEMAKER if you cannot use Makefiles generated by perl's\n # MakeMaker (e.g. using ActiveState under Cygwin).\n #\n+# Define NO_GUI if you do not want Tcl/Tk GUI.\n+#\n+# Define WITH_P4IMPORT to build and install Python git-p4import script.\n+#\n \n GIT-VERSION-FILE: .FORCE-GIT-VERSION-FILE\n \t@$(SHELL_PATH) ./GIT-VERSION-GEN\n@@ -196,9 +200,20 @@ SCRIPT_PERL = \\\n \tgit-svnimport.perl git-cvsexportcommit.perl \\\n \tgit-send-email.perl git-svn.perl\n \n+SCRIPT_PYTHON = \\\n+\tgit-p4import.py\n+\n+ifdef WITH_P4IMPORT\n+SCRIPTS = $(patsubst %.sh,%,$(SCRIPT_SH)) \\\n+\t  $(patsubst %.perl,%,$(SCRIPT_PERL)) \\\n+\t  $(patsubst %.py,%,$(SCRIPT_PYTHON)) \\\n+\t  git-status git-instaweb\n+else\n SCRIPTS = $(patsubst %.sh,%,$(SCRIPT_SH)) \\\n \t  $(patsubst %.perl,%,$(SCRIPT_PERL)) \\\n \t  git-status git-instaweb\n+endif\n+\n \n # ... and all the rest that could be moved out of bindir to gitexecdir\n PROGRAMS = \\\n@@ -241,6 +256,9 @@ endif\n ifndef PERL_PATH\n \tPERL_PATH = /usr/bin/perl\n endif\n+ifndef PYTHON_PATH\n+\tPYTHON_PATH = /usr/local/bin/python\n+endif\n \n export PERL_PATH\n \n@@ -646,6 +664,7 @@ prefix_SQ = $(subst ','\\'',$(prefix))\n \n SHELL_PATH_SQ = $(subst ','\\'',$(SHELL_PATH))\n PERL_PATH_SQ = $(subst ','\\'',$(PERL_PATH))\n+PYTHON_PATH_SQ = $(subst ','\\'',$(PYTHON_PATH))\n \n LIBS = $(GITLIBS) $(EXTLIBS)\n \n@@ -667,7 +686,9 @@ ifneq (,$X)\n endif\n \n all::\n+ifndef NO_GUI\n \t$(QUIET_SUBDIR0)git-gui $(QUIET_SUBDIR1) all\n+endif\n \t$(QUIET_SUBDIR0)perl $(QUIET_SUBDIR1) PERL_PATH='$(PERL_PATH_SQ)' prefix='$(prefix_SQ)' all\n \t$(QUIET_SUBDIR0)templates $(QUIET_SUBDIR1)\n \n@@ -699,6 +720,15 @@ $(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh\n \n $(patsubst %.perl,%,$(SCRIPT_PERL)): perl/perl.mak\n \n+$(patsubst %.py,%,$(SCRIPT_PYTHON)) : % : %.py\n+\trm -f $@ $@+\n+\tsed -e '1s|#!.*/python|#!$(PYTHON_PATH_SQ)|' \\\n+\t    -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \\\n+\t    -e 's/@@NO_CURL@@/$(NO_CURL)/g' \\\n+\t    $@.py >$@+\n+\tchmod +x $@+\n+\tmv $@+ $@\n+\n perl/perl.mak: GIT-CFLAGS\n \t$(QUIET_SUBDIR0)perl $(QUIET_SUBDIR1) PERL_PATH='$(PERL_PATH_SQ)' prefix='$(prefix_SQ)' $(@F)\n \n@@ -892,10 +922,16 @@ install: all\n \t$(INSTALL) -d -m755 '$(DESTDIR_SQ)$(bindir_SQ)'\n \t$(INSTALL) -d -m755 '$(DESTDIR_SQ)$(gitexecdir_SQ)'\n \t$(INSTALL) $(ALL_PROGRAMS) '$(DESTDIR_SQ)$(gitexecdir_SQ)'\n+ifndef NO_GUI\n \t$(INSTALL) git$X gitk '$(DESTDIR_SQ)$(bindir_SQ)'\n+else\n+\t$(INSTALL) git$X '$(DESTDIR_SQ)$(bindir_SQ)'\n+endif\n \t$(MAKE) -C templates DESTDIR='$(DESTDIR_SQ)' install\n \t$(MAKE) -C perl prefix='$(prefix_SQ)' install\n+ifndef NO_GUI\n \t$(MAKE) -C git-gui install\n+endif\n \tif test 'z$(bindir_SQ)' != 'z$(gitexecdir_SQ)'; \\\n \tthen \\\n \t\tln -f '$(DESTDIR_SQ)$(bindir_SQ)/git$X' \\\n@@ -929,11 +965,17 @@ dist: git.spec git-archive\n \t@mkdir -p $(GIT_TARNAME)\n \t@cp git.spec $(GIT_TARNAME)\n \t@echo $(GIT_VERSION) > $(GIT_TARNAME)/version\n+ifndef NO_GUI\n \t@$(MAKE) -C git-gui TARDIR=../$(GIT_TARNAME)/git-gui dist-version\n \t$(TAR) rf $(GIT_TARNAME).tar \\\n \t\t$(GIT_TARNAME)/git.spec \\\n \t\t$(GIT_TARNAME)/version \\\n \t\t$(GIT_TARNAME)/git-gui/version\n+else\n+\t$(TAR) rf $(GIT_TARNAME).tar \\\n+\t\t$(GIT_TARNAME)/git.spec \\\n+\t\t$(GIT_TARNAME)/version\n+endif\n \t@rm -rf $(GIT_TARNAME)\n \tgzip -f -9 $(GIT_TARNAME).tar\n \n@@ -974,7 +1016,9 @@ clean:\n \trm -f gitweb/gitweb.cgi\n \t$(MAKE) -C Documentation/ clean\n \t$(MAKE) -C perl clean\n+ifndef NO_GUI\n \t$(MAKE) -C git-gui clean\n+endif\n \t$(MAKE) -C templates/ clean\n \t$(MAKE) -C t/ clean\n \trm -f GIT-VERSION-FILE GIT-CFLAGS\n-- \n1.5.0.3-dirty\n-- \nEygene\n"},{"id":"37650","messageId":"etpuen$2uo$2@sea.gmane.org","threadId":"7332","inReplyTo":"20070320114525.GP96806@codelabs.ru","subject":"Re: [PATCH] Added make options NO_GUI and WITH_P4IMPORT.","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2007-03-21T00:35:22Z","receivedAt":"2007-03-21T00:35:22Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Eygene Ryabinkin wrote:\n\n> NO_GUI disables the building and installation of the git GUI part.\n\nBy the way, it would be nice for ./configure script (generated from\nconfigure.ac) to detect if Tcl/Tk is available and disable\ngit-gui and gitk installation if it is not found.\n\n-- \nJakub Narebski\nWarsaw, Poland\nShadeHawk on #git\n"},{"id":"37658","messageId":"20070321051406.GW96806@codelabs.ru","threadId":"7332","inReplyTo":"etpuen$2uo$2@sea.gmane.org","subject":"Re: [PATCH] Added make options NO_GUI and WITH_P4IMPORT.","fromName":"Eygene Ryabinkin","fromEmail":"rea-git@codelabs.ru","sentAt":"2007-03-21T05:14:06Z","receivedAt":"2007-03-21T05:14:06Z","isPatch":true,"sender":{"key":"rea-git@codelabs.ru","avatar":null},"body":"Jakub, good day.\n\nWed, Mar 21, 2007 at 01:35:22AM +0100, Jakub Narebski wrote:\n> Eygene Ryabinkin wrote:\n> \n> > NO_GUI disables the building and installation of the git GUI part.\n> \n> By the way, it would be nice for ./configure script (generated from\n> configure.ac) to detect if Tcl/Tk is available and disable\n> git-gui and gitk installation if it is not found.\n\nWill try to implement. But still, NO_GUI should ban the GUI tools\nfrom being built and installed, because user can have the Tcl/Tk\navailable, but have no intention to use the git GUI. Am I right?\n-- \nEygene\n"},{"id":"37665","messageId":"Pine.LNX.4.63.0703211213100.22628@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"7332","inReplyTo":"20070321051406.GW96806@codelabs.ru","subject":"Re: [PATCH] Added make options NO_GUI and WITH_P4IMPORT.","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-03-21T11:16:40Z","receivedAt":"2007-03-21T11:16:40Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Wed, 21 Mar 2007, Eygene Ryabinkin wrote:\n\n> Will try to implement. But still, NO_GUI should ban the GUI tools from \n> being built and installed, because user can have the Tcl/Tk available, \n> but have no intention to use the git GUI. Am I right?\n\nI am not quite certain if I agree. With a similar reasoning, you could \nintroduce a flag to prevent pull-request from being installed, and \ngit-tag, or other rarely used functions. Is it so bad to have gitk and \ngit-gui installed? I mean, you are likely to just try them (and possibly \nlike them!) at some stage, because the graphical representation is so much \nclearer than what _any_ text representation can do.\n\nCiao,\nDscho\n"},{"id":"37666","messageId":"20070321115004.GB14837@codelabs.ru","threadId":"7332","inReplyTo":"Pine.LNX.4.63.0703211213100.22628@wbgn013.biozentrum.uni-wuerzburg.de","subject":"Re: [PATCH] Added make options NO_GUI and WITH_P4IMPORT.","fromName":"Eygene Ryabinkin","fromEmail":"rea-git@codelabs.ru","sentAt":"2007-03-21T11:50:04Z","receivedAt":"2007-03-21T11:50:04Z","isPatch":true,"sender":{"key":"rea-git@codelabs.ru","avatar":null},"body":"Johannes, good day.\n\nWed, Mar 21, 2007 at 12:16:40PM +0100, Johannes Schindelin wrote:\n> > Will try to implement. But still, NO_GUI should ban the GUI tools from \n> > being built and installed, because user can have the Tcl/Tk available, \n> > but have no intention to use the git GUI. Am I right?\n> \n> I am not quite certain if I agree. With a similar reasoning, you could \n> introduce a flag to prevent pull-request from being installed, and \n> git-tag, or other rarely used functions. Is it so bad to have gitk and \n> git-gui installed?\n\nI am happening to develop on some machines on which I have no\nX-Windows or any GUI providers at all, so I prefer not to have the\nTcl/Tk dependency at all. Once again, the patch was originally done\nfor the FreeBSD where the port system installs the dependencies\nautomatically. And I do not need the Tcl/Tk on some machines: imagine\nthe server that uses Git for its configuration tracking. It is\nserver, there is absolutely no need for any GUIs there. And one of\nmy developing machines has no X-Windows, so Tcl/Tk is again useless.\nThis is the reasons for the NO_GUI knob. As it is turned off by\ndefault it does not breaks the expectations of the users who are\nused to the git GUI tools.\n\n> I mean, you are likely to just try them (and possibly \n> like them!) at some stage, because the graphical representation is so much \n> clearer than what _any_ text representation can do.\n\nYes, sometimes I use the graphical representation. But there are\nuse-cases when no GUI is needed at all.\n-- \nEygene\n"},{"id":"37668","messageId":"Pine.LNX.4.63.0703211522320.22628@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"7332","inReplyTo":"20070321115004.GB14837@codelabs.ru","subject":"Re: [PATCH] Added make options NO_GUI and WITH_P4IMPORT.","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-03-21T14:25:32Z","receivedAt":"2007-03-21T14:25:32Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Wed, 21 Mar 2007, Eygene Ryabinkin wrote:\n\n> Wed, Mar 21, 2007 at 12:16:40PM +0100, Johannes Schindelin wrote:\n> > > Will try to implement. But still, NO_GUI should ban the GUI tools from \n> > > being built and installed, because user can have the Tcl/Tk available, \n> > > but have no intention to use the git GUI. Am I right?\n> > \n> > I am not quite certain if I agree. With a similar reasoning, you could \n> > introduce a flag to prevent pull-request from being installed, and \n> > git-tag, or other rarely used functions. Is it so bad to have gitk and \n> > git-gui installed?\n> \n> I am happening to develop on some machines on which I have no\n> X-Windows or any GUI providers at all, so I prefer not to have the\n> Tcl/Tk dependency at all.\n\nMy point (and I think it's the same point as Jakub's) is that NO_GUI is a \nmisnomer. It should be NO_TCL, since the only reason you state to skip \ninstallation of these parts is that they depend on X11, which is not \ninstalled on the machine.\n\nIf you don't do something, it is often interesting to state why: if you \ndon't install something to prevent a dependency you don't want to have, it \nis different from saying that you do not want to have a GUI, _even if_ the \ndependency is there already.\n\nConclusion: I am in favour of NO_TCL, but not of NO_GUI.\n\nCiao,\nDscho\n"},{"id":"37669","messageId":"4601437D.1010700@gnu.org","threadId":"7332","inReplyTo":"Pine.LNX.4.63.0703211522320.22628@wbgn013.biozentrum.uni-wuerzburg.de","subject":"Re: [PATCH] Added make options NO_GUI and WITH_P4IMPORT.","fromName":"Paolo Bonzini","fromEmail":"bonzini@gnu.org","sentAt":"2007-03-21T14:38:53Z","receivedAt":"2007-03-21T14:38:53Z","isPatch":true,"sender":{"key":"bonzini@gnu.org","avatar":"https://avatars.githubusercontent.com/u/42082?v=4"},"body":"\n>> I am happening to develop on some machines on which I have no\n>> X-Windows or any GUI providers at all, so I prefer not to have the\n>> Tcl/Tk dependency at all.\n> \n> If you don't do something, it is often interesting to state why: if you \n> don't install something to prevent a dependency you don't want to have, it \n> is different from saying that you do not want to have a GUI, _even if_ the \n> dependency is there already.\n\nI read his message as \"these are useless for me, so why introduce a\nuseless dependency?\"  The \"effect\" is to have no Tcl dependence,\nbut the original reason is to have no GUI.\n\nSo, \"If you don't do something, it is often interesting to state why\".\nWhy no TCL (in git)?  Because no X11 (on the machine).\n\nPaolo\n"},{"id":"37670","messageId":"20070321144008.GE14837@codelabs.ru","threadId":"7332","inReplyTo":"Pine.LNX.4.63.0703211522320.22628@wbgn013.biozentrum.uni-wuerzburg.de","subject":"Re: [PATCH] Added make options NO_GUI and WITH_P4IMPORT.","fromName":"Eygene Ryabinkin","fromEmail":"rea-git@codelabs.ru","sentAt":"2007-03-21T14:40:08Z","receivedAt":"2007-03-21T14:40:08Z","isPatch":true,"sender":{"key":"rea-git@codelabs.ru","avatar":null},"body":"Johannes,\n\nWed, Mar 21, 2007 at 03:25:32PM +0100, Johannes Schindelin wrote:\n> > I am happening to develop on some machines on which I have no\n> > X-Windows or any GUI providers at all, so I prefer not to have the\n> > Tcl/Tk dependency at all.\n> \n> My point (and I think it's the same point as Jakub's) is that NO_GUI is a \n> misnomer. It should be NO_TCL, since the only reason you state to skip \n> installation of these parts is that they depend on X11, which is not \n> installed on the machine.\n\nCan't speak for Jakub, but it seems to me that he just suggested\nthat the configure should look if the Tcl/Tk is available and refuse\nto install the GUI tools if there is no Tcl/Tk. Though only Jakub\ncan tell for sure.\n\n> If you don't do something, it is often interesting to state why: if you \n> don't install something to prevent a dependency you don't want to have, it \n> is different from saying that you do not want to have a GUI, _even if_ the \n> dependency is there already.\n\nBut I am saying that I do not want the GUI tools installed because\nI do not need GUI at all. And if the GUI will be rewritten to the\nQt (oh, my, don't do that) I will still have no need of it.\n\n> Conclusion: I am in favour of NO_TCL, but not of NO_GUI.\n\nI am not against such renaming as long as the TCL will be used\nfor the GUI part of git. Should I file a patch for the NO_GUI ->\nNO_TCL change? What do others think about the knob name?\n-- \nEygene\n"},{"id":"37671","messageId":"20070321144210.GF14837@codelabs.ru","threadId":"7332","inReplyTo":"4601437D.1010700@gnu.org","subject":"Re: [PATCH] Added make options NO_GUI and WITH_P4IMPORT.","fromName":"Eygene Ryabinkin","fromEmail":"rea-git@codelabs.ru","sentAt":"2007-03-21T14:42:11Z","receivedAt":"2007-03-21T14:42:11Z","isPatch":true,"sender":{"key":"rea-git@codelabs.ru","avatar":null},"body":"Paolo, good day.\n\nWed, Mar 21, 2007 at 03:38:53PM +0100, Paolo Bonzini wrote:\n> >> I am happening to develop on some machines on which I have no\n> >> X-Windows or any GUI providers at all, so I prefer not to have the\n> >> Tcl/Tk dependency at all.\n> > \n> > If you don't do something, it is often interesting to state why: if you \n> > don't install something to prevent a dependency you don't want to have, it \n> > is different from saying that you do not want to have a GUI, _even if_ the \n> > dependency is there already.\n> \n> I read his message as \"these are useless for me, so why introduce a\n> useless dependency?\"  The \"effect\" is to have no Tcl dependence,\n> but the original reason is to have no GUI.\n\nYep, you're right. That was I meant originally. How do you feel\nabout NO_GUI or NO_TCL names?\n-- \nEygene\n"},{"id":"37672","messageId":"460145FE.8090300@lu.unisi.ch","threadId":"7332","inReplyTo":"20070321144210.GF14837@codelabs.ru","subject":"Re: [PATCH] Added make options NO_GUI and WITH_P4IMPORT.","fromName":"Paolo Bonzini","fromEmail":"paolo.bonzini@lu.unisi.ch","sentAt":"2007-03-21T14:49:34Z","receivedAt":"2007-03-21T14:49:34Z","isPatch":true,"sender":{"key":"bonzini@gnu.org","avatar":"https://avatars.githubusercontent.com/u/42082?v=4"},"body":"\n>> I read his message as \"these are useless for me, so why introduce a\n>> useless dependency?\"  The \"effect\" is to have no Tcl dependence,\n>> but the original reason is to have no GUI.\n> \n> Yep, you're right. That was I meant originally. How do you feel\n> about NO_GUI or NO_TCL names?\n\nI agree with you. ;-)\n\nPaolo\n"},{"id":"37673","messageId":"81b0412b0703210758v32e7a692p426f45de9ee6db42@mail.gmail.com","threadId":"7332","inReplyTo":"20070321144210.GF14837@codelabs.ru","subject":"Re: [PATCH] Added make options NO_GUI and WITH_P4IMPORT.","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2007-03-21T14:58:02Z","receivedAt":"2007-03-21T14:58:02Z","isPatch":true,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"On 3/21/07, Eygene Ryabinkin <rea-git@codelabs.ru> wrote:\n> Wed, Mar 21, 2007 at 03:38:53PM +0100, Paolo Bonzini wrote:\n> > >> I am happening to develop on some machines on which I have no\n> > >> X-Windows or any GUI providers at all, so I prefer not to have the\n> > >> Tcl/Tk dependency at all.\n> > >\n> > > If you don't do something, it is often interesting to state why: if you\n> > > don't install something to prevent a dependency you don't want to have, it\n> > > is different from saying that you do not want to have a GUI, _even if_ the\n> > > dependency is there already.\n> >\n> > I read his message as \"these are useless for me, so why introduce a\n> > useless dependency?\"  The \"effect\" is to have no Tcl dependence,\n> > but the original reason is to have no GUI.\n>\n> Yep, you're right. That was I meant originally. How do you feel\n> about NO_GUI or NO_TCL names?\n\nThat'd be NO_TCL_TK. TCL has nothing to do with graphics.\nAnd you have one more supporter for NO_GUI (my server has no\nusable graphics, will never have and runs cron jobs with git in them).\n"},{"id":"37676","messageId":"Pine.LNX.4.63.0703211630160.22628@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"7332","inReplyTo":"20070321144008.GE14837@codelabs.ru","subject":"Re: [PATCH] Added make options NO_GUI and WITH_P4IMPORT.","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2007-03-21T15:35:03Z","receivedAt":"2007-03-21T15:35:03Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nI will make my point very clear now:\n\nPeople like you compile the source not so much to develop _in_ Git, but \n_with_ Git. So, you are likely to \"./configure && make install\".\n\nFor something like \"./configure && make install\", it makes tons of sense \nto check which dependencies are there, and which are not. Then, depending \nif it is possible to compile (or install) only parts of Git, because some \ndependencies are not met, ./configure can figure out what flags to set.\n\nNow, if you have no X11 installed (and consequently no Tk), it is very \neasy for ./configure to find out what to do.\n\nHowever, if you state that you want to have no gui (and you state it as \nsuch), you are not caring if X11 is installed or not! And ./configure \ncannot figure out what you want, based on what it finds, since it cannot \nread your mind. At least that is what I expect.\n\nNow, enough talk, if my point is still not clear enough, I'll just let it \nbe.\n\nCiao,\nDscho\n"},{"id":"37678","messageId":"20070321160126.GH14837@codelabs.ru","threadId":"7332","inReplyTo":"Pine.LNX.4.63.0703211630160.22628@wbgn013.biozentrum.uni-wuerzburg.de","subject":"Re: [PATCH] Added make options NO_GUI and WITH_P4IMPORT.","fromName":"Eygene Ryabinkin","fromEmail":"rea-git@codelabs.ru","sentAt":"2007-03-21T16:01:26Z","receivedAt":"2007-03-21T16:01:26Z","isPatch":true,"sender":{"key":"rea-git@codelabs.ru","avatar":null},"body":"Johannes,\n\nWed, Mar 21, 2007 at 04:35:03PM +0100, Johannes Schindelin wrote:\n> I will make my point very clear now:\n> \n> People like you compile the source not so much to develop _in_ Git, but \n> _with_ Git. So, you are likely to \"./configure && make install\".\n> \n> For something like \"./configure && make install\", it makes tons of sense \n> to check which dependencies are there, and which are not. Then, depending \n> if it is possible to compile (or install) only parts of Git, because some \n> dependencies are not met, ./configure can figure out what flags to set.\n\nYes, I see your point. But up to date (with 1.5.0.3 tarball) I saw no\nstock configure and thus used the 'make && make install' sequence with\nthe 'prefix' set to some good location. Reading the INSTALL file\nI've found that the\n'make configure && ./configure --prefix=<blah> && make && make install'\nwill do the trick too. I just was unaware of it since I was using the\nfirst sequence. And thus I happened to do 'NO_GUI=yes make && make install'.\n\n> Now, if you have no X11 installed (and consequently no Tk), it is very \n> easy for ./configure to find out what to do.\n> \n> However, if you state that you want to have no gui (and you state it as \n> such), you are not caring if X11 is installed or not! And ./configure \n> cannot figure out what you want, based on what it finds, since it cannot \n> read your mind. At least that is what I expect.\n\nOK. So configure needs the detection of the Tcl/Tk and the --disable-gui\noption. And the Makefile can be modified to get the additional\nNO_TCL_TK option that will help configure to inform the Makefile\nthat no Tcl/Tk is here.\n\nTechnically, the checks in Makefile will look as 'ifndef NO_GUI && NO_TCL_TK'\ninstead of 'ifndef NO_GUI'. Later they can diverge as the software will\nevolve.\n\nAre people happy with such plan?\n-- \nEygene\n"},{"id":"37680","messageId":"7v1wji371q.fsf@assigned-by-dhcp.cox.net","threadId":"7332","inReplyTo":"20070321160126.GH14837@codelabs.ru","subject":"Re: [PATCH] Added make options NO_GUI and WITH_P4IMPORT.","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-03-21T16:17:21Z","receivedAt":"2007-03-21T16:17:21Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Eygene Ryabinkin <rea-git@codelabs.ru> writes:\n\n> Technically, the checks in Makefile will look as 'ifndef NO_GUI && NO_TCL_TK'\n> instead of 'ifndef NO_GUI'. Later they can diverge as the software will\n> evolve.\n>\n> Are people happy with such plan?\n\nMaybe later you might even want to view the graphical history\nfrom the server displaying on remote X, who knows?\n\nWe have NO_CURL and such because lack of the necessary libraries\nand headers prevent your build from completing, but in the case\nof git-gui and gitk, they are just scripts and you would not\nhave any trouble in building.  I do not know if adding more\nconditional to Makefile in order to skip them is worth it.\n"},{"id":"37927","messageId":"200703250016.25963.jnareb@gmail.com","threadId":"7332","inReplyTo":"81b0412b0703210758v32e7a692p426f45de9ee6db42@mail.gmail.com","subject":"Re: [PATCH] Added make options NO_GUI and WITH_P4IMPORT.","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2007-03-24T23:16:25Z","receivedAt":"2007-03-24T23:16:25Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"On Wed, Mar 21, 2007, Alex Riesen wrote:\n> On 3/21/07, Eygene Ryabinkin <rea-git@codelabs.ru> wrote:\n\n>> Yep, you're right. That was I meant originally. How do you feel\n>> about NO_GUI or NO_TCL names?\n> \n> That'd be NO_TCL_TK. TCL has nothing to do with graphics.\n> And you have one more supporter for NO_GUI (my server has no\n> usable graphics, will never have and runs cron jobs with git in them).\n\nActually the value for NO_TCL_TK (or NO_TCLTK) can be detected \nautomatically by ./configure in similar way that we used to detect the \nexistence of Python in the old days when there were core code which \nwritten in Python. Perhaps we should provide way to override \nautodetection _and_ provide path to 'wish' executable with the \n--with-wish=PATH or --with-tcltk=PATH to ./configure script (similar to \nhow Python dependency was handled, and how paths to shell and Perl are \nhandled).\n\nThe NO_GUI is another issue, if to be configured by ./configure script, \nthen only as an user option, not something to be autodetected: either \n--without-gui (treat gui as package, although usually it is about \npackage to be used, not package provided) or --disable-gui (treat gui \nas feature of project).\n\nThe fact that all GUI that comes with git repository is in Tcl/Tk \nslightly clouds this issue. As do the fact that those affect only \ninstallation stage, and not build (well, with the exception of \nWISH_PATH / TCLTK_PATH).\n\n-- \nJakub Narebski\nPoland\n"},{"id":"37997","messageId":"20070326073143.GB44578@codelabs.ru","threadId":"7332","inReplyTo":"7v1wji371q.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] Added make options NO_GUI and WITH_P4IMPORT.","fromName":"Eygene Ryabinkin","fromEmail":"rea-git@codelabs.ru","sentAt":"2007-03-26T07:31:43Z","receivedAt":"2007-03-26T07:31:43Z","isPatch":true,"sender":{"key":"rea-git@codelabs.ru","avatar":null},"body":"Junio, good day.\n\nWed, Mar 21, 2007 at 09:17:21AM -0700, Junio C Hamano wrote:\n> Eygene Ryabinkin <rea-git@codelabs.ru> writes:\n> \n> > Technically, the checks in Makefile will look as 'ifndef NO_GUI && NO_TCL_TK'\n> > instead of 'ifndef NO_GUI'. Later they can diverge as the software will\n> > evolve.\n> >\n> > Are people happy with such plan?\n> \n> Maybe later you might even want to view the graphical history\n> from the server displaying on remote X, who knows?\n\nNot sure: I don't like X on the servers ;)) But others can...\n\n> We have NO_CURL and such because lack of the necessary libraries\n> and headers prevent your build from completing, but in the case\n> of git-gui and gitk, they are just scripts and you would not\n> have any trouble in building.  I do not know if adding more\n> conditional to Makefile in order to skip them is worth it.\n\nOK, I reworked the patch following the suggestion of Jakub and Johannes:\nnow configure has the built-in detection of the Tcl/Tk binary and has\nthe --with-tcltk/--without-tcltk options. To implement this I still\nneed the NO_TCLTK knob in the Makefile. Moreover, the configure's\nswitch --with-tcltk=/path/to/binary works as expected: the location\nof the Tcl/Tk interpreter will be rewritten in the gitk and git-gui.\nThe patch follows on this thread.\n\nAnd regarding the building troubles and the additional knob in the\nMakefile: the trouble is in the packaging process. For example, RPM\nor FreeBSD ports are looking at what is really installed, so if\nuser do not want the Tcl/Tk part, then no package parts that depend\non it should be installed. And the bare 'make install' installs all\nthings. Sure, you can make 'make install && rm -f <not needed\nfiles>', but it is always a pain for the package builders to get\nthe idea about the precise file list. So I just wanted to integrate\nthe desired behaviour in the mainstream Git to make packager's life\na bit easy. May be by the cost of making developer's life a bit\nharder: he should watch for the NO_TCLTK in his Makefiles.\n-- \nEygene\n"},{"id":"37998","messageId":"20070326073250.GC44578@codelabs.ru","threadId":"7332","inReplyTo":"20070326073143.GB44578@codelabs.ru","subject":"[PATCH] Added options NO_TCLTK, WITH_P4IMPORT and --with-tcltk/--without-tcltk.","fromName":"Eygene Ryabinkin","fromEmail":"rea-git@codelabs.ru","sentAt":"2007-03-26T07:32:50Z","receivedAt":"2007-03-26T07:32:50Z","isPatch":true,"sender":{"key":"rea-git@codelabs.ru","avatar":null},"body":"The following make options were added:\n- NO_TCLTK: disables building and installation of the git GUI part\nthat depends on the Tcl/Tk.\n- WITH_P4IMPORT: enables the installation of the Perforce import\nscript.\n\nConfigure's options --with-tcltk and --without-tcltk were added and\nconfigure script teached to search for the Tcl/Tk interpreter.\nThe GUI part will not be installed if system lacks Tcl/Tk binary.\n\nInternal make option TCLTK was added: it governs the location of\nthe Tcl/Tk interpreter, so user can specify its own binary location\neither with './configure --with-tcltk=/path/to/binary' or\n'TCLTK=/path/to/binary make'.\n\nSigned-off-by: Eygene Ryabinkin <rea-git@codelabs.ru>\n---\n Makefile         |   56 ++++++++++++++++++++++++++++++++++++++++++++++++++++-\n config.mak.in    |    1 +\n configure.ac     |   19 ++++++++++++++++++\n git-gui/Makefile |    1 +\n 4 files changed, 75 insertions(+), 2 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex 51c1fed..3cccf79 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -110,6 +110,13 @@ all::\n # Define NO_PERL_MAKEMAKER if you cannot use Makefiles generated by perl's\n # MakeMaker (e.g. using ActiveState under Cygwin).\n #\n+# Define NO_TCLTK if you do not want Tcl/Tk GUI.\n+#\n+# The TCLTK variable governs the location of the Tck/Tk interpreter.\n+# If not set it defaults to the bare 'wish'.\n+#\n+# Define WITH_P4IMPORT to build and install Python git-p4import script.\n+#\n \n GIT-VERSION-FILE: .FORCE-GIT-VERSION-FILE\n \t@$(SHELL_PATH) ./GIT-VERSION-GEN\n@@ -159,6 +166,7 @@ AR = ar\n TAR = tar\n INSTALL = install\n RPMBUILD = rpmbuild\n+TCLTK ?= wish\n \n # sparse is architecture-neutral, which means that we need to tell it\n # explicitly what architecture to check for. Fix this up for yours..\n@@ -196,9 +204,20 @@ SCRIPT_PERL = \\\n \tgit-svnimport.perl git-cvsexportcommit.perl \\\n \tgit-send-email.perl git-svn.perl\n \n+SCRIPT_PYTHON = \\\n+\tgit-p4import.py\n+\n+ifdef WITH_P4IMPORT\n SCRIPTS = $(patsubst %.sh,%,$(SCRIPT_SH)) \\\n \t  $(patsubst %.perl,%,$(SCRIPT_PERL)) \\\n+\t  $(patsubst %.py,%,$(SCRIPT_PYTHON)) \\\n \t  git-status git-instaweb\n+else\n+SCRIPTS = $(patsubst %.sh,%,$(SCRIPT_SH)) \\\n+\t  $(patsubst %.perl,%,$(SCRIPT_PERL)) \\\n+\t  git-status git-instaweb\n+endif\n+\n \n # ... and all the rest that could be moved out of bindir to gitexecdir\n PROGRAMS = \\\n@@ -241,6 +260,9 @@ endif\n ifndef PERL_PATH\n \tPERL_PATH = /usr/bin/perl\n endif\n+ifndef PYTHON_PATH\n+\tPYTHON_PATH = /usr/local/bin/python\n+endif\n \n export PERL_PATH\n \n@@ -608,6 +630,10 @@ ifdef NO_PERL_MAKEMAKER\n \texport NO_PERL_MAKEMAKER\n endif\n \n+ifeq ($(TCLTK),)\n+NO_TCLTK=YesPlease\n+endif\n+\n QUIET_SUBDIR0  = $(MAKE) -C # space to separate -C and subdir\n QUIET_SUBDIR1  =\n \n@@ -646,6 +672,7 @@ prefix_SQ = $(subst ','\\'',$(prefix))\n \n SHELL_PATH_SQ = $(subst ','\\'',$(SHELL_PATH))\n PERL_PATH_SQ = $(subst ','\\'',$(PERL_PATH))\n+PYTHON_PATH_SQ = $(subst ','\\'',$(PYTHON_PATH))\n \n LIBS = $(GITLIBS) $(EXTLIBS)\n \n@@ -667,7 +694,9 @@ ifneq (,$X)\n endif\n \n all::\n+ifndef NO_TCLTK\n \t$(QUIET_SUBDIR0)git-gui $(QUIET_SUBDIR1) all\n+endif\n \t$(QUIET_SUBDIR0)perl $(QUIET_SUBDIR1) PERL_PATH='$(PERL_PATH_SQ)' prefix='$(prefix_SQ)' all\n \t$(QUIET_SUBDIR0)templates $(QUIET_SUBDIR1)\n \n@@ -699,6 +728,15 @@ $(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh\n \n $(patsubst %.perl,%,$(SCRIPT_PERL)): perl/perl.mak\n \n+$(patsubst %.py,%,$(SCRIPT_PYTHON)) : % : %.py\n+\trm -f $@ $@+\n+\tsed -e '1s|#!.*/python|#!$(PYTHON_PATH_SQ)|' \\\n+\t    -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \\\n+\t    -e 's/@@NO_CURL@@/$(NO_CURL)/g' \\\n+\t    $@.py >$@+\n+\tchmod +x $@+\n+\tmv $@+ $@\n+\n perl/perl.mak: GIT-CFLAGS\n \t$(QUIET_SUBDIR0)perl $(QUIET_SUBDIR1) PERL_PATH='$(PERL_PATH_SQ)' prefix='$(prefix_SQ)' $(@F)\n \n@@ -892,10 +930,16 @@ install: all\n \t$(INSTALL) -d -m755 '$(DESTDIR_SQ)$(bindir_SQ)'\n \t$(INSTALL) -d -m755 '$(DESTDIR_SQ)$(gitexecdir_SQ)'\n \t$(INSTALL) $(ALL_PROGRAMS) '$(DESTDIR_SQ)$(gitexecdir_SQ)'\n-\t$(INSTALL) git$X gitk '$(DESTDIR_SQ)$(bindir_SQ)'\n+\t$(INSTALL) git$X '$(DESTDIR_SQ)$(bindir_SQ)'\n+ifndef NO_TCLTK\n+\tsed -i .bak -e'1,3s|^exec .* \"$$0\"|exec '\"$(TCLTK)\"' \"$$0\"|' gitk && rm -f gitk.bak\n+\t$(INSTALL) gitk '$(DESTDIR_SQ)$(bindir_SQ)'\n+endif\n \t$(MAKE) -C templates DESTDIR='$(DESTDIR_SQ)' install\n \t$(MAKE) -C perl prefix='$(prefix_SQ)' install\n-\t$(MAKE) -C git-gui install\n+ifndef NO_TCLTK\n+\t$(MAKE) -C git-gui TCLTK='$(TCLTK)' install\n+endif\n \tif test 'z$(bindir_SQ)' != 'z$(gitexecdir_SQ)'; \\\n \tthen \\\n \t\tln -f '$(DESTDIR_SQ)$(bindir_SQ)/git$X' \\\n@@ -929,11 +973,17 @@ dist: git.spec git-archive\n \t@mkdir -p $(GIT_TARNAME)\n \t@cp git.spec $(GIT_TARNAME)\n \t@echo $(GIT_VERSION) > $(GIT_TARNAME)/version\n+ifndef NO_TCLTK\n \t@$(MAKE) -C git-gui TARDIR=../$(GIT_TARNAME)/git-gui dist-version\n \t$(TAR) rf $(GIT_TARNAME).tar \\\n \t\t$(GIT_TARNAME)/git.spec \\\n \t\t$(GIT_TARNAME)/version \\\n \t\t$(GIT_TARNAME)/git-gui/version\n+else\n+\t$(TAR) rf $(GIT_TARNAME).tar \\\n+\t\t$(GIT_TARNAME)/git.spec \\\n+\t\t$(GIT_TARNAME)/version\n+endif\n \t@rm -rf $(GIT_TARNAME)\n \tgzip -f -9 $(GIT_TARNAME).tar\n \n@@ -974,7 +1024,9 @@ clean:\n \trm -f gitweb/gitweb.cgi\n \t$(MAKE) -C Documentation/ clean\n \t$(MAKE) -C perl clean\n+ifndef NO_TCLTK\n \t$(MAKE) -C git-gui clean\n+endif\n \t$(MAKE) -C templates/ clean\n \t$(MAKE) -C t/ clean\n \trm -f GIT-VERSION-FILE GIT-CFLAGS\ndiff --git a/config.mak.in b/config.mak.in\nindex 9a57840..8e441dd 100644\n--- a/config.mak.in\n+++ b/config.mak.in\n@@ -6,6 +6,7 @@ CFLAGS = @CFLAGS@\n AR = @AR@\n TAR = @TAR@\n #INSTALL = @INSTALL@\t\t# needs install-sh or install.sh in sources\n+TCLTK = @TCLTK@\n \n prefix = @prefix@\n exec_prefix = @exec_prefix@\ndiff --git a/configure.ac b/configure.ac\nindex 3a8e778..a95dbfb 100644\n--- a/configure.ac\n+++ b/configure.ac\n@@ -75,6 +75,12 @@ GIT_ARG_SET_PATH(shell)\n # Define PERL_PATH to provide path to Perl.\n GIT_ARG_SET_PATH(perl)\n #\n+# Declare the with-tcltk/without-tcltk options.\n+AC_ARG_WITH(tcltk,\n+AS_HELP_STRING([--with-tcltk],[use Tcl/Tk GUI (default is YES)])\n+AS_HELP_STRING([],[ARG is the full path to the Tcl/Tk interpreter]),\\\n+GIT_PARSE_WITH(tcltk))\n+#\n \n \n ## Checks for programs.\n@@ -84,6 +90,19 @@ AC_PROG_CC([cc gcc])\n #AC_PROG_INSTALL\t\t# needs install-sh or install.sh in sources\n AC_CHECK_TOOL(AR, ar, :)\n AC_CHECK_PROGS(TAR, [gtar tar])\n+# TCLTK will be set to some value if we want Tcl/Tk\n+# or will be empty otherwise.\n+if test -z \"$NO_TCLTK\"; then\n+  if test \"$with_tcltk\" = \"yes\" -o \"$with_tcltk\" = \"\"; then\n+    AC_CHECK_PROGS(TCLTK, [wish], )\n+  elif ! test -x \"$with_tcltk\"; then\n+    AC_MSG_ERROR([Tcl/Tk interpreter was not found in $with_tcltk])\n+  else\n+    AC_MSG_RESULT([Using Tcl/Tk interpreter $with_tcltk])\n+    TCLTK=\"$with_tcltk\"\n+    AC_SUBST(TCLTK)\n+  fi\n+fi\n \n ## Checks for libraries.\n AC_MSG_NOTICE([CHECKS for libraries])\ndiff --git a/git-gui/Makefile b/git-gui/Makefile\nindex b82789e..09c28ed 100644\n--- a/git-gui/Makefile\n+++ b/git-gui/Makefile\n@@ -55,6 +55,7 @@ all:: $(ALL_PROGRAMS)\n \n install: all\n \t$(INSTALL) -d -m755 '$(DESTDIR_SQ)$(gitexecdir_SQ)'\n+\tsed -i .bak -e'1,3s|^exec .* \"$$0\"|exec '\"$(TCLTK)\"' \"$$0\"|' git-gui && rm git-gui.bak\n \t$(INSTALL) git-gui '$(DESTDIR_SQ)$(gitexecdir_SQ)'\n \t$(foreach p,$(GITGUI_BUILT_INS), rm -f '$(DESTDIR_SQ)$(gitexecdir_SQ)/$p' && ln '$(DESTDIR_SQ)$(gitexecdir_SQ)/git-gui' '$(DESTDIR_SQ)$(gitexecdir_SQ)/$p' ;)\n \n-- \n1.5.0.3-dirty\n"},{"id":"38006","messageId":"7v648oza1r.fsf@assigned-by-dhcp.cox.net","threadId":"7332","inReplyTo":"20070326073143.GB44578@codelabs.ru","subject":"Re: [PATCH] Added make options NO_GUI and WITH_P4IMPORT.","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-03-26T08:25:04Z","receivedAt":"2007-03-26T08:25:04Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Eygene Ryabinkin <rea-git@codelabs.ru> writes:\n\n>> Maybe later you might even want to view the graphical history\n>> from the server displaying on remote X, who knows?\n>\n> Not sure: I don't like X on the servers ;)) But others can...\n\nDid you know that you can have only minimum X clients on your\nserver machine, and display on remote X terminals?  But that is\nbesides the point.\n\n>> We have NO_CURL and such because lack of the necessary libraries\n>> and headers prevent your build from completing, but in the case\n>> of git-gui and gitk, they are just scripts and you would not\n>> have any trouble in building.  I do not know if adding more\n>> conditional to Makefile in order to skip them is worth it.\n>\n> OK, I reworked the patch following the suggestion of Jakub and Johannes:\n> now configure has the built-in detection of the Tcl/Tk binary and has\n> the --with-tcltk/--without-tcltk options.\n\nThat is exactly what I am quite against.  I often find other\npeople's packages silly when they disable tk support only\nbecause the build procedure does not find tcl/tk installed on\nthe system it is built on, even when the tk component of the\npackage is pure wish script and does not have any C native stuff\n(which requires libtcl development component on the build\nsystem, which in turn justifies such disabling).\n\n> And regarding the building troubles and the additional knob in the\n> Makefile: the trouble is in the packaging process. For example, RPM\n> or FreeBSD ports are looking at what is really installed, so if\n> user do not want the Tcl/Tk part, then no package parts that depend\n> on it should be installed.\n\nI think the simple RPM spec file we ship with git.git takes care\nof that nicely by splitting gitk into a separate package (As it\nwas Chris Wright's work, I cannot take credit for that part at\nall). I would imagine both modern distro's packaging system and\npeople who actually maintain packages for distros are capable\nenough to handle this situation just fine.  I still do not think\nthe \"packaging difficulty\" is not a strong enough reason.  \n\nBut I could be persuaded otherwise...\n"},{"id":"38007","messageId":"7v1wjcz9x1.fsf@assigned-by-dhcp.cox.net","threadId":"7332","inReplyTo":"20070326073250.GC44578@codelabs.ru","subject":"Re: [PATCH] Added options NO_TCLTK, WITH_P4IMPORT and --with-tcltk/--without-tcltk.","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-03-26T08:27:54Z","receivedAt":"2007-03-26T08:27:54Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Please do not mix P4IMPORT and TCLTK issues in the same patch.\nAs I am still not convinced about what to do with NO_TCLTK, this\nforces people who might want to see P4IMPORT to wait longer than\nnecessary.\n"},{"id":"38008","messageId":"200703261030.49382.jnareb@gmail.com","threadId":"7332","inReplyTo":"20070326073250.GC44578@codelabs.ru","subject":"Re: [PATCH] Added options NO_TCLTK, WITH_P4IMPORT and --with-tcltk/--without-tcltk.","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2007-03-26T08:30:49Z","receivedAt":"2007-03-26T08:30:49Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Thanks a lot for the patch, but...\n\nEygene Ryabinkin wrote:\n\n> Internal make option TCLTK was added: it governs the location of\n> the Tcl/Tk interpreter, so user can specify its own binary location\n> either with './configure --with-tcltk=/path/to/binary' or\n> 'TCLTK=/path/to/binary make'.\n\n...shouldn't it be TCLTK_PATH?\n-- \nJakub Narebski\nPoland\n"},{"id":"38012","messageId":"7vmz20xuxq.fsf@assigned-by-dhcp.cox.net","threadId":"7332","inReplyTo":"200703261030.49382.jnareb@gmail.com","subject":"Re: [PATCH] Added options NO_TCLTK, WITH_P4IMPORT and --with-tcltk/--without-tcltk.","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-03-26T08:36:49Z","receivedAt":"2007-03-26T08:36:49Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jakub Narebski <jnareb@gmail.com> writes:\n\n> Thanks a lot for the patch, but...\n>\n> Eygene Ryabinkin wrote:\n>\n>> Internal make option TCLTK was added: it governs the location of\n>> the Tcl/Tk interpreter, so user can specify its own binary location\n>> either with './configure --with-tcltk=/path/to/binary' or\n>> 'TCLTK=/path/to/binary make'.\n>\n> ...shouldn't it be TCLTK_PATH?\n\nThanks for sanity checking.  That means that the absense of\ntcltk would make it impossible to munge the scripts to point at\nthe wish binary, so makes the NO_TCLTK stuff easier to swallow.\n"},{"id":"38022","messageId":"20070326100344.GV14837@codelabs.ru","threadId":"7332","inReplyTo":"7vmz20xuxq.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] Added options NO_TCLTK, WITH_P4IMPORT and --with-tcltk/--without-tcltk.","fromName":"Eygene Ryabinkin","fromEmail":"rea-git@codelabs.ru","sentAt":"2007-03-26T10:03:44Z","receivedAt":"2007-03-26T10:03:44Z","isPatch":true,"sender":{"key":"rea-git@codelabs.ru","avatar":null},"body":"Jakub, Junio,\n\nMon, Mar 26, 2007 at 01:36:49AM -0700, Junio C Hamano wrote:\n> Jakub Narebski <jnareb@gmail.com> writes:\n> \n> > Thanks a lot for the patch, but...\n> >\n> > Eygene Ryabinkin wrote:\n> >\n> >> Internal make option TCLTK was added: it governs the location of\n> >> the Tcl/Tk interpreter, so user can specify its own binary location\n> >> either with './configure --with-tcltk=/path/to/binary' or\n> >> 'TCLTK=/path/to/binary make'.\n> >\n> > ...shouldn't it be TCLTK_PATH?\n\nYes, probably is should be TCLTK_PATH.\n\n> Thanks for sanity checking.  That means that the absense of\n> tcltk would make it impossible to munge the scripts to point at\n> the wish binary, so makes the NO_TCLTK stuff easier to swallow.\n\nSorry, did not get the point. The TCLTK is initialized to the 'wish'\nby 'TCLTK ?= wish', so TCLTK will always be here and initialized\nto the wish by-default.\n-- \nEygene\n"},{"id":"38104","messageId":"7vejnbtjdq.fsf@assigned-by-dhcp.cox.net","threadId":"7332","inReplyTo":"20070326100344.GV14837@codelabs.ru","subject":"Re: [PATCH] Added options NO_TCLTK, WITH_P4IMPORT and --with-tcltk/--without-tcltk.","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-03-27T04:12:17Z","receivedAt":"2007-03-27T04:12:17Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Eygene Ryabinkin <rea-git@codelabs.ru> writes:\n\n> Mon, Mar 26, 2007 at 01:36:49AM -0700, Junio C Hamano wrote:\n> ...\n>> Thanks for sanity checking.  That means that the absense of\n>> tcltk would make it impossible to munge the scripts to point at\n>> the wish binary, so makes the NO_TCLTK stuff easier to swallow.\n>\n> Sorry, did not get the point. The TCLTK is initialized to the 'wish'\n> by 'TCLTK ?= wish', so TCLTK will always be here and initialized\n> to the wish by-default.\n\nEarlier I said I did not see a reason for not building wish\napplications on a build system that lack them.  I am stating\nthat you could argue that your rewriting the path to wish is a\ngood reason (I would say it is half-good, as you can still tell\nthe build procedure where wish will be on the deployed system\nwithout having it on your build system) for not building wish\napplications in a build that lacks wish installation.\n"},{"id":"38116","messageId":"20070327065940.GC51155@codelabs.ru","threadId":"7332","inReplyTo":"7vejnbtjdq.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] Added options NO_TCLTK, WITH_P4IMPORT and --with-tcltk/--without-tcltk.","fromName":"Eygene Ryabinkin","fromEmail":"rea-git@codelabs.ru","sentAt":"2007-03-27T06:59:40Z","receivedAt":"2007-03-27T06:59:40Z","isPatch":true,"sender":{"key":"rea-git@codelabs.ru","avatar":null},"body":"Junio, good day.\n\nMon, Mar 26, 2007 at 09:12:17PM -0700, Junio C Hamano wrote:\n> Eygene Ryabinkin <rea-git@codelabs.ru> writes:\n> \n> > Mon, Mar 26, 2007 at 01:36:49AM -0700, Junio C Hamano wrote:\n> > ...\n> >> Thanks for sanity checking.  That means that the absense of\n> >> tcltk would make it impossible to munge the scripts to point at\n> >> the wish binary, so makes the NO_TCLTK stuff easier to swallow.\n> >\n> > Sorry, did not get the point. The TCLTK is initialized to the 'wish'\n> > by 'TCLTK ?= wish', so TCLTK will always be here and initialized\n> > to the wish by-default.\n> \n> Earlier I said I did not see a reason for not building wish\n> applications on a build system that lack them.  I am stating\n> that you could argue that your rewriting the path to wish is a\n> good reason (I would say it is half-good, as you can still tell\n> the build procedure where wish will be on the deployed system\n> without having it on your build system) for not building wish\n> applications in a build that lacks wish installation.\n\nOK, so, probably, I should modify the behaviour of the --with-tcltk\nand configure to look for the Tcl/Tk interpreter _only_ if\n--with-tcltk[=PATH] was given and to leave the things unmodified\nin the case of absence of that option. But still, --without-tcltk\nwill disable Tcl/Tk dependant parts. Will people be happy with such\nbehaviour?\n-- \nEygene\n"},{"id":"38126","messageId":"20070327102437.GM14837@codelabs.ru","threadId":"7332","inReplyTo":"20070327065940.GC51155@codelabs.ru","subject":"[PATCH] Added configure options --with-tcltk/--without-tcltk.","fromName":"Eygene Ryabinkin","fromEmail":"rea-git@codelabs.ru","sentAt":"2007-03-27T10:24:37Z","receivedAt":"2007-03-27T10:24:37Z","isPatch":true,"sender":{"key":"rea-git@codelabs.ru","avatar":null},"body":"Configure's options --with-tcltk and --without-tcltk were added and\nconfigure script teached to search for the Tcl/Tk interpreter.\n\nThe default behaviour to install Tcl/Tk dependant parts is left\nintact: Tcl/Tk detection will be enabled only if --with-tcltk option\nis given to configure.\n\nMakefiles got two external options:\n- TCLTK_PATH: the path to the Tcl/Tk interpreter.\n- NO_TCLCK: disables the installation of Tcl/Tk dependend parts.\n\nSigned-off-by: Eygene Ryabinkin <rea-git@codelabs.ru>\n---\n Makefile         |   30 ++++++++++++++++++++++++++++--\n config.mak.in    |    1 +\n configure.ac     |   26 ++++++++++++++++++++++++++\n git-gui/Makefile |    3 +++\n 4 files changed, 58 insertions(+), 2 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex a294ec8..06b6c6b 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -112,6 +112,11 @@ all::\n #\n # Define WITH_P4IMPORT to build and install Python git-p4import script.\n #\n+# Define NO_TCLTK if you do not want Tcl/Tk GUI.\n+#\n+# The TCLTK_PATH variable governs the location of the Tck/Tk interpreter.\n+# If not set it defaults to the bare 'wish'.\n+#\n \n GIT-VERSION-FILE: .FORCE-GIT-VERSION-FILE\n \t@$(SHELL_PATH) ./GIT-VERSION-GEN\n@@ -161,6 +166,7 @@ AR = ar\n TAR = tar\n INSTALL = install\n RPMBUILD = rpmbuild\n+TCLTK_PATH ?= wish\n \n # sparse is architecture-neutral, which means that we need to tell it\n # explicitly what architecture to check for. Fix this up for yours..\n@@ -624,6 +630,10 @@ ifdef NO_PERL_MAKEMAKER\n \texport NO_PERL_MAKEMAKER\n endif\n \n+ifeq ($(TCLTK_PATH),)\n+NO_TCLTK=YesPlease\n+endif\n+\n QUIET_SUBDIR0  = $(MAKE) -C # space to separate -C and subdir\n QUIET_SUBDIR1  =\n \n@@ -684,7 +694,9 @@ ifneq (,$X)\n endif\n \n all::\n+ifndef NO_TCLTK\n \t$(QUIET_SUBDIR0)git-gui $(QUIET_SUBDIR1) all\n+endif\n \t$(QUIET_SUBDIR0)perl $(QUIET_SUBDIR1) PERL_PATH='$(PERL_PATH_SQ)' prefix='$(prefix_SQ)' all\n \t$(QUIET_SUBDIR0)templates $(QUIET_SUBDIR1)\n \n@@ -918,10 +930,16 @@ install: all\n \t$(INSTALL) -d -m755 '$(DESTDIR_SQ)$(bindir_SQ)'\n \t$(INSTALL) -d -m755 '$(DESTDIR_SQ)$(gitexecdir_SQ)'\n \t$(INSTALL) $(ALL_PROGRAMS) '$(DESTDIR_SQ)$(gitexecdir_SQ)'\n-\t$(INSTALL) git$X gitk '$(DESTDIR_SQ)$(bindir_SQ)'\n+\t$(INSTALL) git$X '$(DESTDIR_SQ)$(bindir_SQ)'\n+ifndef NO_TCLTK\n+\tsed -i .bak -e'1,3s|^exec .* \"$$0\"|exec '\"$(TCLTK_PATH)\"' \"$$0\"|' gitk && rm -f gitk.bak\n+\t$(INSTALL) gitk '$(DESTDIR_SQ)$(bindir_SQ)'\n+endif\n \t$(MAKE) -C templates DESTDIR='$(DESTDIR_SQ)' install\n \t$(MAKE) -C perl prefix='$(prefix_SQ)' install\n-\t$(MAKE) -C git-gui install\n+ifndef NO_TCLTK\n+\t$(MAKE) -C git-gui TCLTK_PATH='$(TCLTK_PATH)' install\n+endif\n \tif test 'z$(bindir_SQ)' != 'z$(gitexecdir_SQ)'; \\\n \tthen \\\n \t\tln -f '$(DESTDIR_SQ)$(bindir_SQ)/git$X' \\\n@@ -955,11 +973,17 @@ dist: git.spec git-archive\n \t@mkdir -p $(GIT_TARNAME)\n \t@cp git.spec $(GIT_TARNAME)\n \t@echo $(GIT_VERSION) > $(GIT_TARNAME)/version\n+ifndef NO_TCLTK\n \t@$(MAKE) -C git-gui TARDIR=../$(GIT_TARNAME)/git-gui dist-version\n \t$(TAR) rf $(GIT_TARNAME).tar \\\n \t\t$(GIT_TARNAME)/git.spec \\\n \t\t$(GIT_TARNAME)/version \\\n \t\t$(GIT_TARNAME)/git-gui/version\n+else\n+\t$(TAR) rf $(GIT_TARNAME).tar \\\n+\t\t$(GIT_TARNAME)/git.spec \\\n+\t\t$(GIT_TARNAME)/version\n+endif\n \t@rm -rf $(GIT_TARNAME)\n \tgzip -f -9 $(GIT_TARNAME).tar\n \n@@ -1000,7 +1024,9 @@ clean:\n \trm -f gitweb/gitweb.cgi\n \t$(MAKE) -C Documentation/ clean\n \t$(MAKE) -C perl clean\n+ifndef NO_TCLTK\n \t$(MAKE) -C git-gui clean\n+endif\n \t$(MAKE) -C templates/ clean\n \t$(MAKE) -C t/ clean\n \trm -f GIT-VERSION-FILE GIT-CFLAGS\ndiff --git a/config.mak.in b/config.mak.in\nindex 9a57840..eb9d7a5 100644\n--- a/config.mak.in\n+++ b/config.mak.in\n@@ -6,6 +6,7 @@ CFLAGS = @CFLAGS@\n AR = @AR@\n TAR = @TAR@\n #INSTALL = @INSTALL@\t\t# needs install-sh or install.sh in sources\n+TCLTK_PATH = @TCLTK_PATH@\n \n prefix = @prefix@\n exec_prefix = @exec_prefix@\ndiff --git a/configure.ac b/configure.ac\nindex 3a8e778..43a6769 100644\n--- a/configure.ac\n+++ b/configure.ac\n@@ -75,6 +75,14 @@ GIT_ARG_SET_PATH(shell)\n # Define PERL_PATH to provide path to Perl.\n GIT_ARG_SET_PATH(perl)\n #\n+# Declare the with-tcltk/without-tcltk options.\n+AC_ARG_WITH(tcltk,\n+AS_HELP_STRING([--with-tcltk],[use Tcl/Tk GUI (default is YES)])\n+AS_HELP_STRING([],[ARG is the full path to the Tcl/Tk interpreter.])\n+AS_HELP_STRING([],[Bare --with-tcltk will make the GUI part only if])\n+AS_HELP_STRING([],[Tcl/Tk interpreter will be found in a system.]),\\\n+GIT_PARSE_WITH(tcltk))\n+#\n \n \n ## Checks for programs.\n@@ -84,6 +92,24 @@ AC_PROG_CC([cc gcc])\n #AC_PROG_INSTALL\t\t# needs install-sh or install.sh in sources\n AC_CHECK_TOOL(AR, ar, :)\n AC_CHECK_PROGS(TAR, [gtar tar])\n+# TCLTK_PATH will be set to some value if we want Tcl/Tk\n+# or will be empty otherwise.\n+if test -z \"$NO_TCLTK\"; then\n+  if test \"$with_tcltk\" = \"\"; then\n+  # No Tcl/Tk switches given. Do not check for Tcl/Tk, use bare 'wish'.\n+    TCLTK_PATH=wish\n+    AC_SUBST(TCLTK_PATH)\n+  elif test \"$with_tcltk\" = \"yes\"; then\n+  # Tcl/Tk check requested.\n+    AC_CHECK_PROGS(TCLTK_PATH, [wish], )\n+  elif ! test -x \"$with_tcltk\"; then\n+    AC_MSG_ERROR([Tcl/Tk interpreter was not found in $with_tcltk])\n+  else\n+    AC_MSG_RESULT([Using Tcl/Tk interpreter $with_tcltk])\n+    TCLTK_PATH=\"$with_tcltk\"\n+    AC_SUBST(TCLTK_PATH)\n+  fi\n+fi\n \n ## Checks for libraries.\n AC_MSG_NOTICE([CHECKS for libraries])\ndiff --git a/git-gui/Makefile b/git-gui/Makefile\nindex b82789e..2316b24 100644\n--- a/git-gui/Makefile\n+++ b/git-gui/Makefile\n@@ -28,6 +28,8 @@ ifndef V\n \tQUIET_BUILT_IN = @echo '   ' BUILTIN $@;\n endif\n \n+TCLTK_PATH ?= wish\n+\n ifeq ($(findstring $(MAKEFLAGS),s),s)\n QUIET_GEN =\n QUIET_BUILT_IN =\n@@ -55,6 +57,7 @@ all:: $(ALL_PROGRAMS)\n \n install: all\n \t$(INSTALL) -d -m755 '$(DESTDIR_SQ)$(gitexecdir_SQ)'\n+\tsed -i .bak -e'1,3s|^exec .* \"$$0\"|exec '\"$(TCLTK_PATH)\"' \"$$0\"|' git-gui && rm git-gui.bak\n \t$(INSTALL) git-gui '$(DESTDIR_SQ)$(gitexecdir_SQ)'\n \t$(foreach p,$(GITGUI_BUILT_INS), rm -f '$(DESTDIR_SQ)$(gitexecdir_SQ)/$p' && ln '$(DESTDIR_SQ)$(gitexecdir_SQ)/git-gui' '$(DESTDIR_SQ)$(gitexecdir_SQ)/$p' ;)\n \n-- \n1.5.0.3-dirty\n"},{"id":"38127","messageId":"20070327102601.GN14837@codelabs.ru","threadId":"7332","inReplyTo":"7v1wjcz9x1.fsf@assigned-by-dhcp.cox.net","subject":"[PATCH] Add the WITH_P4IMPORT knob to the Makefile.","fromName":"Eygene Ryabinkin","fromEmail":"rea-git@codelabs.ru","sentAt":"2007-03-27T10:26:01Z","receivedAt":"2007-03-27T10:26:01Z","isPatch":true,"sender":{"key":"rea-git@codelabs.ru","avatar":null},"body":"WITH_P4IMPORT: enables the installation of the Perforce import\nscript.\n\nSigned-off-by: Eygene Ryabinkin <rea-git@codelabs.ru>\n---\n Makefile |   26 ++++++++++++++++++++++++++\n 1 files changed, 26 insertions(+), 0 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex 51c1fed..a294ec8 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -110,6 +110,8 @@ all::\n # Define NO_PERL_MAKEMAKER if you cannot use Makefiles generated by perl's\n # MakeMaker (e.g. using ActiveState under Cygwin).\n #\n+# Define WITH_P4IMPORT to build and install Python git-p4import script.\n+#\n \n GIT-VERSION-FILE: .FORCE-GIT-VERSION-FILE\n \t@$(SHELL_PATH) ./GIT-VERSION-GEN\n@@ -196,9 +198,20 @@ SCRIPT_PERL = \\\n \tgit-svnimport.perl git-cvsexportcommit.perl \\\n \tgit-send-email.perl git-svn.perl\n \n+SCRIPT_PYTHON = \\\n+\tgit-p4import.py\n+\n+ifdef WITH_P4IMPORT\n SCRIPTS = $(patsubst %.sh,%,$(SCRIPT_SH)) \\\n \t  $(patsubst %.perl,%,$(SCRIPT_PERL)) \\\n+\t  $(patsubst %.py,%,$(SCRIPT_PYTHON)) \\\n \t  git-status git-instaweb\n+else\n+SCRIPTS = $(patsubst %.sh,%,$(SCRIPT_SH)) \\\n+\t  $(patsubst %.perl,%,$(SCRIPT_PERL)) \\\n+\t  git-status git-instaweb\n+endif\n+\n \n # ... and all the rest that could be moved out of bindir to gitexecdir\n PROGRAMS = \\\n@@ -241,6 +254,9 @@ endif\n ifndef PERL_PATH\n \tPERL_PATH = /usr/bin/perl\n endif\n+ifndef PYTHON_PATH\n+\tPYTHON_PATH = /usr/local/bin/python\n+endif\n \n export PERL_PATH\n \n@@ -646,6 +662,7 @@ prefix_SQ = $(subst ','\\'',$(prefix))\n \n SHELL_PATH_SQ = $(subst ','\\'',$(SHELL_PATH))\n PERL_PATH_SQ = $(subst ','\\'',$(PERL_PATH))\n+PYTHON_PATH_SQ = $(subst ','\\'',$(PYTHON_PATH))\n \n LIBS = $(GITLIBS) $(EXTLIBS)\n \n@@ -699,6 +716,15 @@ $(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh\n \n $(patsubst %.perl,%,$(SCRIPT_PERL)): perl/perl.mak\n \n+$(patsubst %.py,%,$(SCRIPT_PYTHON)) : % : %.py\n+\trm -f $@ $@+\n+\tsed -e '1s|#!.*/python|#!$(PYTHON_PATH_SQ)|' \\\n+\t    -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \\\n+\t    -e 's/@@NO_CURL@@/$(NO_CURL)/g' \\\n+\t    $@.py >$@+\n+\tchmod +x $@+\n+\tmv $@+ $@\n+\n perl/perl.mak: GIT-CFLAGS\n \t$(QUIET_SUBDIR0)perl $(QUIET_SUBDIR1) PERL_PATH='$(PERL_PATH_SQ)' prefix='$(prefix_SQ)' $(@F)\n \n-- \n1.5.0.3-dirty\n"},{"id":"38137","messageId":"7vtzw7nej6.fsf@assigned-by-dhcp.cox.net","threadId":"7332","inReplyTo":"20070327102437.GM14837@codelabs.ru","subject":"Re: [PATCH] Added configure options --with-tcltk/--without-tcltk.","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-03-27T10:53:33Z","receivedAt":"2007-03-27T10:53:33Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Eygene Ryabinkin <rea-git@codelabs.ru> writes:\n\n> Configure's options --with-tcltk and --without-tcltk were added and\n> configure script teached to search for the Tcl/Tk interpreter.\n>\n> The default behaviour to install Tcl/Tk dependant parts is left\n> intact: Tcl/Tk detection will be enabled only if --with-tcltk option\n> is given to configure.\n>\n> Makefiles got two external options:\n> - TCLTK_PATH: the path to the Tcl/Tk interpreter.\n> - NO_TCLCK: disables the installation of Tcl/Tk dependend parts.\n>\n> Signed-off-by: Eygene Ryabinkin <rea-git@codelabs.ru>\n\nThanks.\n\n> diff --git a/Makefile b/Makefile\n> index a294ec8..06b6c6b 100644\n> --- a/Makefile\n> +++ b/Makefile\n> @@ -112,6 +112,11 @@ all::\n>  #\n>  # Define WITH_P4IMPORT to build and install Python git-p4import script.\n>  #\n> +# Define NO_TCLTK if you do not want Tcl/Tk GUI.\n> +#\n> +# The TCLTK_PATH variable governs the location of the Tck/Tk interpreter.\n> +# If not set it defaults to the bare 'wish'.\n> +#\n>...\n> +TCLTK_PATH ?= wish\n> ...  \n> +ifeq ($(TCLTK_PATH),)\n> +NO_TCLTK=YesPlease\n> +endif\n> +\n\nThis seems to contradict the log message that makes these two\noptions sound as if they are not dependent of each other.\n\n> @@ -918,10 +930,16 @@ install: all\n>  \t$(INSTALL) -d -m755 '$(DESTDIR_SQ)$(bindir_SQ)'\n>  \t$(INSTALL) -d -m755 '$(DESTDIR_SQ)$(gitexecdir_SQ)'\n>  \t$(INSTALL) $(ALL_PROGRAMS) '$(DESTDIR_SQ)$(gitexecdir_SQ)'\n> -\t$(INSTALL) git$X gitk '$(DESTDIR_SQ)$(bindir_SQ)'\n> +\t$(INSTALL) git$X '$(DESTDIR_SQ)$(bindir_SQ)'\n> +ifndef NO_TCLTK\n> +\tsed -i .bak -e'1,3s|^exec .* \"$$0\"|exec '\"$(TCLTK_PATH)\"' \"$$0\"|' gitk && rm -f gitk.bak\n> +\t$(INSTALL) gitk '$(DESTDIR_SQ)$(bindir_SQ)'\n> +endif\n\nThis is a no-no. \"make $args; su make $args install\" should\nnever cause anything built by root with the second invocation of\nthe make command.  Don't assume you can write into the build\ndirectory while you are running \"make install\" (root user can be\nmapped nobody on a nfs mounted build directory, while the local\ntarget directory is writable by it).\n\nAlso please quote $(TCLTK_PATH) like everybody else does in the\nMakefile.  For that purpose, I think the way $(SCRIPT_SH) are\nbuilt using $(SHELL_PATH_SQ) can be learned from.\n\nI suspect that the change to allow not installing gitk/git-gui\nand the change to allow using specific \"wish\" are two\nindependent tasks.  You seem to have a grip on the use of\nconditional in Makefile to do the former task, and I do not\nthink there is any need for further commenting.\n\nFor the latter task, you can probably do something like this:\n\n\tgitk-wish: gitk \n        \trm -f $@+ $@\n\t\tsed -e '3s| wish | ...' <gitk >$@+\n                mv $@+ $@\n\n\tall:: gitk-wish\n\tinstall: all\n        \t...\n                $(INSTALL) gitk-wish '$(DESTDIR_SQ)$(bindir_SQ)'/gitk\n\nAlso you need to rebuild gitk-wish when the builder gives\ndifferent TCLTK_PATH; I suspect the easiest way is tack it to\nTRACK_CFLAGS and make gitk-wish depend on GIT-CFLAGS.\n"},{"id":"38138","messageId":"7vps6vnehz.fsf@assigned-by-dhcp.cox.net","threadId":"7332","inReplyTo":"20070327102601.GN14837@codelabs.ru","subject":"Re: [PATCH] Add the WITH_P4IMPORT knob to the Makefile.","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-03-27T10:54:16Z","receivedAt":"2007-03-27T10:54:16Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Eygene Ryabinkin <rea-git@codelabs.ru> writes:\n\n> WITH_P4IMPORT: enables the installation of the Perforce import\n> script.\n>\n> Signed-off-by: Eygene Ryabinkin <rea-git@codelabs.ru>\n\nThanks.  I wonder if we need to update git.spec.in file if we\nwere to take this patch.\n"},{"id":"38141","messageId":"20070327110714.GA14837@codelabs.ru","threadId":"7332","inReplyTo":"7vtzw7nej6.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] Added configure options --with-tcltk/--without-tcltk.","fromName":"Eygene Ryabinkin","fromEmail":"rea-git@codelabs.ru","sentAt":"2007-03-27T11:07:15Z","receivedAt":"2007-03-27T11:07:15Z","isPatch":true,"sender":{"key":"rea-git@codelabs.ru","avatar":null},"body":"Junio, good day.\n\nTue, Mar 27, 2007 at 03:53:33AM -0700, Junio C Hamano wrote:\n> > +ifeq ($(TCLTK_PATH),)\n> > +NO_TCLTK=YesPlease\n> > +endif\n> > +\n> \n> This seems to contradict the log message that makes these two\n> options sound as if they are not dependent of each other.\n\nOK, will add a sentence about the dependency to the log.\n\n> \n> > @@ -918,10 +930,16 @@ install: all\n> >  \t$(INSTALL) -d -m755 '$(DESTDIR_SQ)$(bindir_SQ)'\n> >  \t$(INSTALL) -d -m755 '$(DESTDIR_SQ)$(gitexecdir_SQ)'\n> >  \t$(INSTALL) $(ALL_PROGRAMS) '$(DESTDIR_SQ)$(gitexecdir_SQ)'\n> > -\t$(INSTALL) git$X gitk '$(DESTDIR_SQ)$(bindir_SQ)'\n> > +\t$(INSTALL) git$X '$(DESTDIR_SQ)$(bindir_SQ)'\n> > +ifndef NO_TCLTK\n> > +\tsed -i .bak -e'1,3s|^exec .* \"$$0\"|exec '\"$(TCLTK_PATH)\"' \"$$0\"|' gitk && rm -f gitk.bak\n> > +\t$(INSTALL) gitk '$(DESTDIR_SQ)$(bindir_SQ)'\n> > +endif\n> \n> This is a no-no. \"make $args; su make $args install\" should\n> never cause anything built by root with the second invocation of\n> the make command.  Don't assume you can write into the build\n> directory while you are running \"make install\" (root user can be\n> mapped nobody on a nfs mounted build directory, while the local\n> target directory is writable by it).\n> Also please quote $(TCLTK_PATH) like everybody else does in the\n> Makefile.  For that purpose, I think the way $(SCRIPT_SH) are\n> built using $(SHELL_PATH_SQ) can be learned from.\n\nOK.\n\n> I suspect that the change to allow not installing gitk/git-gui\n> and the change to allow using specific \"wish\" are two\n> independent tasks.\n\nBut then the configure will be first teached to recognise only\n'--with-tcltk/--without-tcltk' and the second modification will\nadd '--with-tcltk=/path/to/wish', right?\n\n> You seem to have a grip on the use of\n> conditional in Makefile to do the former task, and I do not\n> think there is any need for further commenting.\n> \n> For the latter task, you can probably do something like this:\n> \n> \tgitk-wish: gitk \n>         \trm -f $@+ $@\n> \t\tsed -e '3s| wish | ...' <gitk >$@+\n>                 mv $@+ $@\n> \n> \tall:: gitk-wish\n> \tinstall: all\n>         \t...\n>                 $(INSTALL) gitk-wish '$(DESTDIR_SQ)$(bindir_SQ)'/gitk\n> \n> Also you need to rebuild gitk-wish when the builder gives\n> different TCLTK_PATH; I suspect the easiest way is tack it to\n> TRACK_CFLAGS and make gitk-wish depend on GIT-CFLAGS.\n\nOK, will try to provide the splitted patches.\n-- \nEygene\n"},{"id":"38143","messageId":"20070327112202.GB14837@codelabs.ru","threadId":"7332","inReplyTo":"7vps6vnehz.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] Add the WITH_P4IMPORT knob to the Makefile.","fromName":"Eygene Ryabinkin","fromEmail":"rea-git@codelabs.ru","sentAt":"2007-03-27T11:22:03Z","receivedAt":"2007-03-27T11:22:03Z","isPatch":true,"sender":{"key":"rea-git@codelabs.ru","avatar":null},"body":"Tue, Mar 27, 2007 at 03:54:16AM -0700, Junio C Hamano wrote:\n> Eygene Ryabinkin <rea-git@codelabs.ru> writes:\n> \n> > WITH_P4IMPORT: enables the installation of the Perforce import\n> > script.\n> >\n> > Signed-off-by: Eygene Ryabinkin <rea-git@codelabs.ru>\n> \n> Thanks.\n\nYou're welcome ;))\n\n> I wonder if we need to update git.spec.in file if we\n> were to take this patch.\n\nCreated a quick patch, but have no Linux host with autoconf >= 2.59\nat hand, so can not test. The patch follows.\n-- \nEygene\n"},{"id":"38144","messageId":"20070327112514.GC14837@codelabs.ru","threadId":"7332","inReplyTo":"20070327112202.GB14837@codelabs.ru","subject":"[PATCH] Added git-p4 package to the list of git RPMs.","fromName":"Eygene Ryabinkin","fromEmail":"rea-git@codelabs.ru","sentAt":"2007-03-27T11:25:15Z","receivedAt":"2007-03-27T11:25:15Z","isPatch":true,"sender":{"key":"rea-git@codelabs.ru","avatar":null},"body":"Signed-off-by: Eygene Ryabinkin <rea-git@codelabs.ru>\n---\n git.spec.in |   25 +++++++++++++++++++++----\n 1 files changed, 21 insertions(+), 4 deletions(-)\n\ndiff --git a/git.spec.in b/git.spec.in\nindex 46aee88..8c79a79 100644\n--- a/git.spec.in\n+++ b/git.spec.in\n@@ -50,6 +50,13 @@ Requires:       git-core = %{version}-%{release}, tla\n %description arch\n Git tools for importing Arch repositories.\n \n+%package p4\n+Summary:        Git tools for importing Perforce repositories\n+Group:          Development/Tools\n+Requires:       git-core = %{version}-%{release}, python\n+%description p4\n+Git tools for importing Perforce repositories.\n+\n %package email\n Summary:        Git tools for sending email\n Group:          Development/Tools\n@@ -86,22 +93,22 @@ Perl interface to Git\n \n %build\n make %{_smp_mflags} CFLAGS=\"$RPM_OPT_FLAGS\" WITH_OWN_SUBPROCESS_PY=YesPlease \\\n-     prefix=%{_prefix} all %{!?_without_docs: doc}\n+     WITH_P4IMPORT=YesPlease prefix=%{_prefix} all %{!?_without_docs: doc}\n \n %install\n rm -rf $RPM_BUILD_ROOT\n make %{_smp_mflags} CFLAGS=\"$RPM_OPT_FLAGS\" DESTDIR=$RPM_BUILD_ROOT \\\n-     WITH_OWN_SUBPROCESS_PY=YesPlease \\\n+     WITH_OWN_SUBPROCESS_PY=YesPlease WITH_P4IMPORT=YesPlease \\\n      prefix=%{_prefix} mandir=%{_mandir} INSTALLDIRS=vendor \\\n      install %{!?_without_docs: install-doc}\n find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} ';'\n find $RPM_BUILD_ROOT -type f -name '*.bs' -empty -exec rm -f {} ';'\n find $RPM_BUILD_ROOT -type f -name perllocal.pod -exec rm -f {} ';'\n \n-(find $RPM_BUILD_ROOT%{_bindir} -type f | grep -vE \"archimport|svn|cvs|email|gitk|git-gui|git-citool\" | sed -e s@^$RPM_BUILD_ROOT@@)               > bin-man-doc-files\n+(find $RPM_BUILD_ROOT%{_bindir} -type f | grep -vE \"p4import|archimport|svn|cvs|email|gitk|git-gui|git-citool\" | sed -e s@^$RPM_BUILD_ROOT@@)               > bin-man-doc-files\n (find $RPM_BUILD_ROOT%{perl_vendorlib} -type f | sed -e s@^$RPM_BUILD_ROOT@@) >> perl-files\n %if %{!?_without_docs:1}0\n-(find $RPM_BUILD_ROOT%{_mandir} $RPM_BUILD_ROOT/Documentation -type f | grep -vE \"archimport|svn|git-cvs|email|gitk|git-gui|git-citool\" | sed -e s@^$RPM_BUILD_ROOT@@ -e 's/$/*/' ) >> bin-man-doc-files\n+(find $RPM_BUILD_ROOT%{_mandir} $RPM_BUILD_ROOT/Documentation -type f | grep -vE \"p4import|archimport|svn|git-cvs|email|gitk|git-gui|git-citool\" | sed -e s@^$RPM_BUILD_ROOT@@ -e 's/$/*/' ) >> bin-man-doc-files\n %else\n rm -rf $RPM_BUILD_ROOT%{_mandir}\n %endif\n@@ -133,6 +140,13 @@ rm -rf $RPM_BUILD_ROOT\n %{!?_without_docs: %{_mandir}/man1/git-archimport.1*}\n %{!?_without_docs: %doc Documentation/git-archimport.html }\n \n+%files p4\n+%defattr(-,root,root)\n+%doc Documentation/git-p4import.txt\n+%{_bindir}/git-p4import\n+%{!?_without_docs: %{_mandir}/man1/git-p4import.1*}\n+%{!?_without_docs: %doc Documentation/git-p4import.html }\n+\n %files email\n %defattr(-,root,root)\n %doc Documentation/*email*.txt\n@@ -167,6 +181,9 @@ rm -rf $RPM_BUILD_ROOT\n %{!?_without_docs: %doc Documentation/*.html }\n \n %changelog\n+* Tue Mar 27 2007 Eygene Ryabinkin <rea-git@codelabs.ru>\n+- Added the git-p4 package: Perforce import stuff.\n+\n * Mon Feb 13 2007 Nicolas Pitre <nico@cam.org>\n - Update core package description (Git isn't as stupid as it used to be)\n \n-- \n1.5.0.3-dirty\n"},{"id":"38156","messageId":"20070327160343.GA1884@170.242.249.10.in-addr.arpa","threadId":"7332","inReplyTo":"20070327112514.GC14837@codelabs.ru","subject":"[PATCH] Remove unused WITH_OWN_SUBPROCESS_PY from RPM spec","fromName":"Brian Gernhardt","fromEmail":"benji@silverinsanity.com","sentAt":"2007-03-27T16:03:43Z","receivedAt":"2007-03-27T16:03:43Z","isPatch":true,"sender":{"key":"benji@silverinsanity.com","avatar":"https://gravatar.com/avatar/e06c101dbc25c68114d859b4a9ec7cf8a2c52fd2b0270ef0eac0e2e63ff22311?d=mp&s=160"},"body":"We don't have a copy of subprocess.py anymore, so we removed that\noption from the Makefile.  Let's not leave that cruft around the RPM\nspec file either.\n---\n\nThis applies on top of \"[PATCH] Added git-p4 package to the list of git\nRPMs.\", which is what made me notice that it was there.  Untested, but\nsimply removing a completely unused option from the make command line\nshouldn't cause any problems, right?  Right?\n\n git.spec.in |    9 ++++-----\n 1 files changed, 4 insertions(+), 5 deletions(-)\n\ndiff --git a/git.spec.in b/git.spec.in\nindex e469f21..4bf7a8f 100644\n--- a/git.spec.in\n+++ b/git.spec.in\n@@ -92,15 +92,14 @@ Perl interface to Git\n %setup -q\n \n %build\n-make %{_smp_mflags} CFLAGS=\"$RPM_OPT_FLAGS\" WITH_OWN_SUBPROCESS_PY=YesPlease \\\n-     WITH_P4IMPORT=YesPlease prefix=%{_prefix} all %{!?_without_docs: doc}\n+make %{_smp_mflags} CFLAGS=\"$RPM_OPT_FLAGS\" WITH_P4IMPORT=YesPlease \\\n+     prefix=%{_prefix} all %{!?_without_docs: doc}\n \n %install\n rm -rf $RPM_BUILD_ROOT\n make %{_smp_mflags} CFLAGS=\"$RPM_OPT_FLAGS\" DESTDIR=$RPM_BUILD_ROOT \\\n-     WITH_OWN_SUBPROCESS_PY=YesPlease WITH_P4IMPORT=YesPlease \\\n-     prefix=%{_prefix} mandir=%{_mandir} INSTALLDIRS=vendor \\\n-     install %{!?_without_docs: install-doc}\n+     WITH_P4IMPORT=YesPlease prefix=%{_prefix} mandir=%{_mandir} \\\n+     INSTALLDIRS=vendor install %{!?_without_docs: install-doc}\n find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} ';'\n find $RPM_BUILD_ROOT -type f -name '*.bs' -empty -exec rm -f {} ';'\n find $RPM_BUILD_ROOT -type f -name perllocal.pod -exec rm -f {} ';'\n-- \n1.5.1.rc2\n"},{"id":"38220","messageId":"7vps6um8wv.fsf@assigned-by-dhcp.cox.net","threadId":"7332","inReplyTo":"20070327110714.GA14837@codelabs.ru","subject":"Re: [PATCH] Added configure options --with-tcltk/--without-tcltk.","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-03-28T01:52:32Z","receivedAt":"2007-03-28T01:52:32Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Eygene Ryabinkin <rea-git@codelabs.ru> writes:\n\n>> I suspect that the change to allow not installing gitk/git-gui\n>> and the change to allow using specific \"wish\" are two\n>> independent tasks.\n>\n> But then the configure will be first teached to recognise only\n> '--with-tcltk/--without-tcltk' and the second modification will\n> add '--with-tcltk=/path/to/wish', right?\n\nThat sounds sensible to me.\n\nThanks.\n"},{"id":"38241","messageId":"20070328091209.GQ14837@codelabs.ru","threadId":"7332","inReplyTo":"7vps6um8wv.fsf@assigned-by-dhcp.cox.net","subject":"[PATCH] Add --with-tcltk and --without-tcltk to configure.","fromName":"Eygene Ryabinkin","fromEmail":"rea-git@codelabs.ru","sentAt":"2007-03-28T09:12:09Z","receivedAt":"2007-03-28T09:12:09Z","isPatch":true,"sender":{"key":"rea-git@codelabs.ru","avatar":null},"body":"--with-tcltk enables the search of the Tcl/Tk interpreter. If no\ninterpreter is found then Tcl/Tk dependend parts are disabled.\n\n--without-tcltk unconditionally disables Tcl/Tk dependent parts.\n\nThe original behaviour is not changed: bare './configure' just\ninstalls the Tcl/Tk part doing no checks for the interpreter.\n\nMakefile knob named NO_TCLTK was introduced. It prevents the build\nand installation of the Tcl/Tk dependent parts.\n\nSigned-off-by: Eygene Ryabinkin <rea-git@codelabs.ru>\n---\n Makefile         |   31 +++++++++++++++++++++++++++++--\n config.mak.in    |    1 +\n configure.ac     |   26 ++++++++++++++++++++++++++\n git-gui/Makefile |    3 +++\n 4 files changed, 59 insertions(+), 2 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex a294ec8..bfde029 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -112,6 +112,12 @@ all::\n #\n # Define WITH_P4IMPORT to build and install Python git-p4import script.\n #\n+# Define NO_TCLTK if you do not want Tcl/Tk GUI.\n+#\n+# The TCLTK_PATH variable governs the location of the Tck/Tk interpreter.\n+# If not set it defaults to the bare 'wish'. If it is set to the empty\n+# string then NO_TCLTK will be forced (this is used by configure script).\n+#\n \n GIT-VERSION-FILE: .FORCE-GIT-VERSION-FILE\n \t@$(SHELL_PATH) ./GIT-VERSION-GEN\n@@ -161,6 +167,7 @@ AR = ar\n TAR = tar\n INSTALL = install\n RPMBUILD = rpmbuild\n+TCLTK_PATH ?= wish\n \n # sparse is architecture-neutral, which means that we need to tell it\n # explicitly what architecture to check for. Fix this up for yours..\n@@ -624,6 +631,10 @@ ifdef NO_PERL_MAKEMAKER\n \texport NO_PERL_MAKEMAKER\n endif\n \n+ifeq ($(TCLTK_PATH),)\n+NO_TCLTK=YesPlease\n+endif\n+\n QUIET_SUBDIR0  = $(MAKE) -C # space to separate -C and subdir\n QUIET_SUBDIR1  =\n \n@@ -663,6 +674,7 @@ prefix_SQ = $(subst ','\\'',$(prefix))\n SHELL_PATH_SQ = $(subst ','\\'',$(SHELL_PATH))\n PERL_PATH_SQ = $(subst ','\\'',$(PERL_PATH))\n PYTHON_PATH_SQ = $(subst ','\\'',$(PYTHON_PATH))\n+TCLTK_PATH_SQ = $(subst ','\\'',$(TCLTK_PATH))\n \n LIBS = $(GITLIBS) $(EXTLIBS)\n \n@@ -684,7 +696,9 @@ ifneq (,$X)\n endif\n \n all::\n+ifndef NO_TCLTK\n \t$(QUIET_SUBDIR0)git-gui $(QUIET_SUBDIR1) all\n+endif\n \t$(QUIET_SUBDIR0)perl $(QUIET_SUBDIR1) PERL_PATH='$(PERL_PATH_SQ)' prefix='$(prefix_SQ)' all\n \t$(QUIET_SUBDIR0)templates $(QUIET_SUBDIR1)\n \n@@ -918,10 +932,15 @@ install: all\n \t$(INSTALL) -d -m755 '$(DESTDIR_SQ)$(bindir_SQ)'\n \t$(INSTALL) -d -m755 '$(DESTDIR_SQ)$(gitexecdir_SQ)'\n \t$(INSTALL) $(ALL_PROGRAMS) '$(DESTDIR_SQ)$(gitexecdir_SQ)'\n-\t$(INSTALL) git$X gitk '$(DESTDIR_SQ)$(bindir_SQ)'\n+\t$(INSTALL) git$X '$(DESTDIR_SQ)$(bindir_SQ)'\n+ifndef NO_TCLTK\n+\t$(INSTALL) gitk '$(DESTDIR_SQ)$(bindir_SQ)'\n+endif\n \t$(MAKE) -C templates DESTDIR='$(DESTDIR_SQ)' install\n \t$(MAKE) -C perl prefix='$(prefix_SQ)' install\n-\t$(MAKE) -C git-gui install\n+ifndef NO_TCLTK\n+\t$(MAKE) -C git-gui TCLTK_PATH='$(TCLTK_PATH_SQ)' install\n+endif\n \tif test 'z$(bindir_SQ)' != 'z$(gitexecdir_SQ)'; \\\n \tthen \\\n \t\tln -f '$(DESTDIR_SQ)$(bindir_SQ)/git$X' \\\n@@ -955,11 +974,17 @@ dist: git.spec git-archive\n \t@mkdir -p $(GIT_TARNAME)\n \t@cp git.spec $(GIT_TARNAME)\n \t@echo $(GIT_VERSION) > $(GIT_TARNAME)/version\n+ifndef NO_TCLTK\n \t@$(MAKE) -C git-gui TARDIR=../$(GIT_TARNAME)/git-gui dist-version\n \t$(TAR) rf $(GIT_TARNAME).tar \\\n \t\t$(GIT_TARNAME)/git.spec \\\n \t\t$(GIT_TARNAME)/version \\\n \t\t$(GIT_TARNAME)/git-gui/version\n+else\n+\t$(TAR) rf $(GIT_TARNAME).tar \\\n+\t\t$(GIT_TARNAME)/git.spec \\\n+\t\t$(GIT_TARNAME)/version\n+endif\n \t@rm -rf $(GIT_TARNAME)\n \tgzip -f -9 $(GIT_TARNAME).tar\n \n@@ -1000,7 +1025,9 @@ clean:\n \trm -f gitweb/gitweb.cgi\n \t$(MAKE) -C Documentation/ clean\n \t$(MAKE) -C perl clean\n+ifndef NO_TCLTK\n \t$(MAKE) -C git-gui clean\n+endif\n \t$(MAKE) -C templates/ clean\n \t$(MAKE) -C t/ clean\n \trm -f GIT-VERSION-FILE GIT-CFLAGS\ndiff --git a/config.mak.in b/config.mak.in\nindex 9a57840..eb9d7a5 100644\n--- a/config.mak.in\n+++ b/config.mak.in\n@@ -6,6 +6,7 @@ CFLAGS = @CFLAGS@\n AR = @AR@\n TAR = @TAR@\n #INSTALL = @INSTALL@\t\t# needs install-sh or install.sh in sources\n+TCLTK_PATH = @TCLTK_PATH@\n \n prefix = @prefix@\n exec_prefix = @exec_prefix@\ndiff --git a/configure.ac b/configure.ac\nindex 3a8e778..43a6769 100644\n--- a/configure.ac\n+++ b/configure.ac\n@@ -75,6 +75,14 @@ GIT_ARG_SET_PATH(shell)\n # Define PERL_PATH to provide path to Perl.\n GIT_ARG_SET_PATH(perl)\n #\n+# Declare the with-tcltk/without-tcltk options.\n+AC_ARG_WITH(tcltk,\n+AS_HELP_STRING([--with-tcltk],[use Tcl/Tk GUI (default is YES)])\n+AS_HELP_STRING([],[ARG is the full path to the Tcl/Tk interpreter.])\n+AS_HELP_STRING([],[Bare --with-tcltk will make the GUI part only if])\n+AS_HELP_STRING([],[Tcl/Tk interpreter will be found in a system.]),\\\n+GIT_PARSE_WITH(tcltk))\n+#\n \n \n ## Checks for programs.\n@@ -84,6 +92,24 @@ AC_PROG_CC([cc gcc])\n #AC_PROG_INSTALL\t\t# needs install-sh or install.sh in sources\n AC_CHECK_TOOL(AR, ar, :)\n AC_CHECK_PROGS(TAR, [gtar tar])\n+# TCLTK_PATH will be set to some value if we want Tcl/Tk\n+# or will be empty otherwise.\n+if test -z \"$NO_TCLTK\"; then\n+  if test \"$with_tcltk\" = \"\"; then\n+  # No Tcl/Tk switches given. Do not check for Tcl/Tk, use bare 'wish'.\n+    TCLTK_PATH=wish\n+    AC_SUBST(TCLTK_PATH)\n+  elif test \"$with_tcltk\" = \"yes\"; then\n+  # Tcl/Tk check requested.\n+    AC_CHECK_PROGS(TCLTK_PATH, [wish], )\n+  elif ! test -x \"$with_tcltk\"; then\n+    AC_MSG_ERROR([Tcl/Tk interpreter was not found in $with_tcltk])\n+  else\n+    AC_MSG_RESULT([Using Tcl/Tk interpreter $with_tcltk])\n+    TCLTK_PATH=\"$with_tcltk\"\n+    AC_SUBST(TCLTK_PATH)\n+  fi\n+fi\n \n ## Checks for libraries.\n AC_MSG_NOTICE([CHECKS for libraries])\ndiff --git a/git-gui/Makefile b/git-gui/Makefile\nindex b82789e..733c07e 100644\n--- a/git-gui/Makefile\n+++ b/git-gui/Makefile\n@@ -28,6 +28,8 @@ ifndef V\n \tQUIET_BUILT_IN = @echo '   ' BUILTIN $@;\n endif\n \n+TCLTK_PATH ?= wish\n+\n ifeq ($(findstring $(MAKEFLAGS),s),s)\n QUIET_GEN =\n QUIET_BUILT_IN =\n@@ -36,6 +38,7 @@ endif\n DESTDIR_SQ = $(subst ','\\'',$(DESTDIR))\n gitexecdir_SQ = $(subst ','\\'',$(gitexecdir))\n SHELL_PATH_SQ = $(subst ','\\'',$(SHELL_PATH))\n+TCLTK_PATH_SQ = $(subst ','\\'',$(TCLTK_PATH))\n \n $(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh\n \t$(QUIET_GEN)rm -f $@ $@+ && \\\n-- \n1.5.0.3-dirty\n"},{"id":"38242","messageId":"20070328091344.GR14837@codelabs.ru","threadId":"7332","inReplyTo":"20070328091209.GQ14837@codelabs.ru","subject":"[PATCH] Added Tcl/Tk interpreter path rewriting for the GUI tools.","fromName":"Eygene Ryabinkin","fromEmail":"rea-git@codelabs.ru","sentAt":"2007-03-28T09:13:44Z","receivedAt":"2007-03-28T09:13:44Z","isPatch":true,"sender":{"key":"rea-git@codelabs.ru","avatar":null},"body":"--with-tcltk=/path/to/wish sets the TCLTK_PATH variable that is\nused to substitute the location of the wish interpreter in the\nTcl/Tk programs.\n\nNew tracking file, GIT-GUI-VARS, was introduced: it tracks the\nlocation of the Tcl/Tk interpreter and activates the GUI tools\nrebuild if the interpreter path was changed. The separate tracker\nis better than the GIT-CFLAGS: there is no need to rebuild the whole\ngit if the interpreter path was changed.\n\nSigned-off-by: Eygene Ryabinkin <rea-git@codelabs.ru>\n---\n Makefile         |   31 ++++++++++++++++++++++++++++---\n git-gui/Makefile |   17 +++++++++++++++--\n 2 files changed, 43 insertions(+), 5 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex bfde029..0034666 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -690,11 +690,15 @@ export prefix gitexecdir TAR INSTALL DESTDIR SHELL_PATH template_dir\n \n ### Build rules\n \n-all:: $(ALL_PROGRAMS) $(BUILT_INS) git$X gitk gitweb/gitweb.cgi\n+all:: $(ALL_PROGRAMS) $(BUILT_INS) git$X gitweb/gitweb.cgi\n ifneq (,$X)\n \t$(foreach p,$(patsubst %$X,%,$(filter %$X,$(ALL_PROGRAMS) $(BUILT_INS) git$X)), rm -f '$p';)\n endif\n \n+ifndef NO_TCLTK\n+all:: gitk-wish\n+endif\n+\n all::\n ifndef NO_TCLTK\n \t$(QUIET_SUBDIR0)git-gui $(QUIET_SUBDIR1) all\n@@ -705,6 +709,12 @@ endif\n strip: $(PROGRAMS) git$X\n \t$(STRIP) $(STRIP_OPTS) $(PROGRAMS) git$X\n \n+gitk-wish: gitk GIT-GUI-VARS\n+\t$(QUIET_GEN)rm -f $@ $@+ && \\\n+\tsed -e'1,3s|^exec .* \"$$0\"|exec $(subst |,'\\|',$(TCLTK_PATH_SQ)) \"$$0\"|' < gitk > $@+ && \\\n+\tchmod +x $@+ && \\\n+\tmv -f $@+ $@\n+\n git$X: git.c common-cmds.h $(BUILTIN_OBJS) $(GITLIBS) GIT-CFLAGS\n \t$(QUIET_LINK)$(CC) -DGIT_VERSION='\"$(GIT_VERSION)\"' \\\n \t\t$(ALL_CFLAGS) -o $@ $(filter %.c,$^) \\\n@@ -892,6 +902,18 @@ GIT-CFLAGS: .FORCE-GIT-CFLAGS\n \t\techo \"$$FLAGS\" >GIT-CFLAGS; \\\n             fi\n \n+### Detect Tck/Tk interpreter path changes\n+ifndef NO_TCLTK\n+TRACK_VARS = $(subst ','\\'',-DTCLTK_PATH='$(TCLTK_PATH_SQ)')\n+\n+GIT-GUI-VARS: .FORCE-GIT-GUI-VARS\n+\t@VARS='$(TRACK_VARS)'; \\\n+\t    if test x\"$$VARS\" != x\"`cat $@ 2>/dev/null`\" ; then \\\n+\t\techo 1>&2 \"    * new Tcl/Tk interpreter location\"; \\\n+\t\techo \"$$VARS\" >$@; \\\n+            fi\n+endif\n+\n ### Testing rules\n \n # GNU make supports exporting all variables by \"export\" without parameters.\n@@ -934,7 +956,7 @@ install: all\n \t$(INSTALL) $(ALL_PROGRAMS) '$(DESTDIR_SQ)$(gitexecdir_SQ)'\n \t$(INSTALL) git$X '$(DESTDIR_SQ)$(bindir_SQ)'\n ifndef NO_TCLTK\n-\t$(INSTALL) gitk '$(DESTDIR_SQ)$(bindir_SQ)'\n+\t$(INSTALL) gitk-wish '$(DESTDIR_SQ)$(bindir_SQ)'/gitk\n endif\n \t$(MAKE) -C templates DESTDIR='$(DESTDIR_SQ)' install\n \t$(MAKE) -C perl prefix='$(prefix_SQ)' install\n@@ -1030,10 +1052,13 @@ ifndef NO_TCLTK\n endif\n \t$(MAKE) -C templates/ clean\n \t$(MAKE) -C t/ clean\n-\trm -f GIT-VERSION-FILE GIT-CFLAGS\n+\trm -f GIT-VERSION-FILE GIT-CFLAGS GIT-GUI-VARS\n \n .PHONY: all install clean strip\n .PHONY: .FORCE-GIT-VERSION-FILE TAGS tags .FORCE-GIT-CFLAGS\n+ifndef NO_TCLTK\n+.PHONY: .FORCE-GIT-GUI-VARS\n+endif\n \n ### Check documentation\n #\ndiff --git a/git-gui/Makefile b/git-gui/Makefile\nindex 733c07e..4ef6fac 100644\n--- a/git-gui/Makefile\n+++ b/git-gui/Makefile\n@@ -40,10 +40,13 @@ gitexecdir_SQ = $(subst ','\\'',$(gitexecdir))\n SHELL_PATH_SQ = $(subst ','\\'',$(SHELL_PATH))\n TCLTK_PATH_SQ = $(subst ','\\'',$(TCLTK_PATH))\n \n+git-gui: GIT-GUI-VARS\n+\n $(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh\n \t$(QUIET_GEN)rm -f $@ $@+ && \\\n \tsed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \\\n \t\t-e 's/@@GITGUI_VERSION@@/$(GITGUI_VERSION)/g' \\\n+\t\t-e'1,3s|^exec .* \"$$0\"|exec $(subst |,'\\|',$(TCLTK_PATH_SQ)) \"$$0\"|' \\\n \t\t$@.sh >$@+ && \\\n \tchmod +x $@+ && \\\n \tmv $@+ $@\n@@ -66,7 +69,17 @@ dist-version:\n \t@echo $(GITGUI_VERSION) > $(TARDIR)/version\n \n clean::\n-\trm -f $(ALL_PROGRAMS) GIT-VERSION-FILE\n+\trm -f $(ALL_PROGRAMS) GIT-VERSION-FILE GIT-GUI-VARS\n+\n+### Detect Tck/Tk interpreter path changes\n+TRACK_VARS = $(subst ','\\'',-DTCLTK_PATH='$(TCLTK_PATH_SQ)')\n+\n+GIT-GUI-VARS: .FORCE-GIT-GUI-VARS\n+\t@VARS='$(TRACK_VARS)'; \\\n+\t    if test x\"$$VARS\" != x\"`cat $@ 2>/dev/null`\" ; then \\\n+\t\techo 1>&2 \"    * new Tcl/Tk interpreter location\"; \\\n+\t\techo \"$$VARS\" >$@; \\\n+            fi\n \n .PHONY: all install dist-version clean\n-.PHONY: .FORCE-GIT-VERSION-FILE\n+.PHONY: .FORCE-GIT-VERSION-FILE .FORCE-GIT-GUI-VARS\n-- \n1.5.0.3-dirty\n"},{"id":"38261","messageId":"7vps6tf8te.fsf@assigned-by-dhcp.cox.net","threadId":"7332","inReplyTo":"20070328091209.GQ14837@codelabs.ru","subject":"Re: [PATCH] Add --with-tcltk and --without-tcltk to configure.","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-03-28T19:48:45Z","receivedAt":"2007-03-28T19:48:45Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Eygene Ryabinkin <rea-git@codelabs.ru> writes:\n\n> --with-tcltk enables the search of the Tcl/Tk interpreter. If no\n> interpreter is found then Tcl/Tk dependend parts are disabled.\n>\n> --without-tcltk unconditionally disables Tcl/Tk dependent parts.\n>\n> The original behaviour is not changed: bare './configure' just\n> installs the Tcl/Tk part doing no checks for the interpreter.\n>\n> Makefile knob named NO_TCLTK was introduced. It prevents the build\n> and installation of the Tcl/Tk dependent parts.\n>\n> Signed-off-by: Eygene Ryabinkin <rea-git@codelabs.ru>\n> ---\n\nThanks.\n\nIs this supposed to be the first in the series?  I thought you\nsaid you were going to do NO_TCLTK without anything else at all\nfirst, and then TCLTK_PATH patch.  I am a bit lost here.\n\n> +# Define NO_TCLTK if you do not want Tcl/Tk GUI.\n> +#\n> +# The TCLTK_PATH variable governs the location of the Tck/Tk interpreter.\n> +# If not set it defaults to the bare 'wish'. If it is set to the empty\n> +# string then NO_TCLTK will be forced (this is used by configure script).\n> +#\n\nGrumble.  If you are doing this, then there is not much point to\nhave two separate patches, is it?\n\n> @@ -684,7 +696,9 @@ ifneq (,$X)\n>  endif\n>  \n>  all::\n> +ifndef NO_TCLTK\n>  \t$(QUIET_SUBDIR0)git-gui $(QUIET_SUBDIR1) all\n> +endif\n>  \t$(QUIET_SUBDIR0)perl $(QUIET_SUBDIR1) PERL_PATH='$(PERL_PATH_SQ)' prefix='$(prefix_SQ)' all\n>  \t$(QUIET_SUBDIR0)templates $(QUIET_SUBDIR1)\n\nAlthough you were not supposed to be talking about paths, since\nyou've already introduced TCLTK_PATH, it should be passed down\nto git-gui here, I think.\n\n> @@ -955,11 +974,17 @@ dist: git.spec git-archive\n>  \t@mkdir -p $(GIT_TARNAME)\n>  \t@cp git.spec $(GIT_TARNAME)\n>  \t@echo $(GIT_VERSION) > $(GIT_TARNAME)/version\n> +ifndef NO_TCLTK\n>  \t@$(MAKE) -C git-gui TARDIR=../$(GIT_TARNAME)/git-gui dist-version\n>  \t$(TAR) rf $(GIT_TARNAME).tar \\\n>  \t\t$(GIT_TARNAME)/git.spec \\\n>  \t\t$(GIT_TARNAME)/version \\\n>  \t\t$(GIT_TARNAME)/git-gui/version\n> +else\n> +\t$(TAR) rf $(GIT_TARNAME).tar \\\n> +\t\t$(GIT_TARNAME)/git.spec \\\n> +\t\t$(GIT_TARNAME)/version\n> +endif\n>  \t@rm -rf $(GIT_TARNAME)\n>  \tgzip -f -9 $(GIT_TARNAME).tar\n>  \n\nWhy should a source distribution exclude git-gui/ directory?  I\nthink it is sensible to ship a source that contains all.  You\nare shipping gitk even without NO_TCLTK anyway, too.\n\nAnd from the part 2:\n\n> @@ -705,6 +709,12 @@ endif\n>  strip: $(PROGRAMS) git$X\n>  \t$(STRIP) $(STRIP_OPTS) $(PROGRAMS) git$X\n>  \n> +gitk-wish: gitk GIT-GUI-VARS\n> +\t$(QUIET_GEN)rm -f $@ $@+ && \\\n> +\tsed -e'1,3s|^exec .* \"$$0\"|exec $(subst |,'\\|',$(TCLTK_PATH_SQ)) \"$$0\"|' < gitk > $@+ && \\\n> +\tchmod +x $@+ && \\\n> +\tmv -f $@+ $@\n> +\n\nThis subst() is a nice attention to the detail.  I like it,\nalthough in practice I do not think anybody is insane enough to\nhave a pipe character in the directory name that leads to wish.\n\nI separated your two patches into three with minor modifications\nand parked them in 'pu'.  We need to arrange with Shawn when to\napply the git-gui/ parts of the patch to his tree, but we are\nnot in a rush.\n"},{"id":"38286","messageId":"20070329074424.GD59098@codelabs.ru","threadId":"7332","inReplyTo":"7vps6tf8te.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] Add --with-tcltk and --without-tcltk to configure.","fromName":"Eygene Ryabinkin","fromEmail":"rea-git@codelabs.ru","sentAt":"2007-03-29T07:44:24Z","receivedAt":"2007-03-29T07:44:24Z","isPatch":true,"sender":{"key":"rea-git@codelabs.ru","avatar":null},"body":"Junio, good day.\n\nWed, Mar 28, 2007 at 12:48:45PM -0700, Junio C Hamano wrote:\n> Eygene Ryabinkin <rea-git@codelabs.ru> writes:\n> \n> > --with-tcltk enables the search of the Tcl/Tk interpreter. If no\n> > interpreter is found then Tcl/Tk dependend parts are disabled.\n> >\n> > --without-tcltk unconditionally disables Tcl/Tk dependent parts.\n> >\n> > The original behaviour is not changed: bare './configure' just\n> > installs the Tcl/Tk part doing no checks for the interpreter.\n> >\n> > Makefile knob named NO_TCLTK was introduced. It prevents the build\n> > and installation of the Tcl/Tk dependent parts.\n> >\n> > Signed-off-by: Eygene Ryabinkin <rea-git@codelabs.ru>\n> > ---\n> \n> Thanks.\n> \n> Is this supposed to be the first in the series?  I thought you\n> said you were going to do NO_TCLTK without anything else at all\n> first, and then TCLTK_PATH patch.  I am a bit lost here.\n>\n> > +# Define NO_TCLTK if you do not want Tcl/Tk GUI.\n> > +#\n> > +# The TCLTK_PATH variable governs the location of the Tck/Tk interpreter.\n> > +# If not set it defaults to the bare 'wish'. If it is set to the empty\n> > +# string then NO_TCLTK will be forced (this is used by configure script).\n> > +#\n> \n> Grumble.  If you are doing this, then there is not much point to\n> have two separate patches, is it?\n\nI cheated, sorry: first patch prepared the configure's infrastructure\nfor the --with-tcltk/--without-tcltk including --with-tcltk=PATH.\n\nAnd the second one introduced the TCLTK_PATH usage for substituting\nthe 'wish' in the Tcl/Tk tools.\n\nSorry for the confusion.\n\n> \n> > @@ -684,7 +696,9 @@ ifneq (,$X)\n> >  endif\n> >  \n> >  all::\n> > +ifndef NO_TCLTK\n> >  \t$(QUIET_SUBDIR0)git-gui $(QUIET_SUBDIR1) all\n> > +endif\n> >  \t$(QUIET_SUBDIR0)perl $(QUIET_SUBDIR1) PERL_PATH='$(PERL_PATH_SQ)' prefix='$(prefix_SQ)' all\n> >  \t$(QUIET_SUBDIR0)templates $(QUIET_SUBDIR1)\n> \n> Although you were not supposed to be talking about paths, since\n> you've already introduced TCLTK_PATH, it should be passed down\n> to git-gui here, I think.\n\nYes, you're perfectly right.\n\n> \n> > @@ -955,11 +974,17 @@ dist: git.spec git-archive\n> >  \t@mkdir -p $(GIT_TARNAME)\n> >  \t@cp git.spec $(GIT_TARNAME)\n> >  \t@echo $(GIT_VERSION) > $(GIT_TARNAME)/version\n> > +ifndef NO_TCLTK\n> >  \t@$(MAKE) -C git-gui TARDIR=../$(GIT_TARNAME)/git-gui dist-version\n> >  \t$(TAR) rf $(GIT_TARNAME).tar \\\n> >  \t\t$(GIT_TARNAME)/git.spec \\\n> >  \t\t$(GIT_TARNAME)/version \\\n> >  \t\t$(GIT_TARNAME)/git-gui/version\n> > +else\n> > +\t$(TAR) rf $(GIT_TARNAME).tar \\\n> > +\t\t$(GIT_TARNAME)/git.spec \\\n> > +\t\t$(GIT_TARNAME)/version\n> > +endif\n> >  \t@rm -rf $(GIT_TARNAME)\n> >  \tgzip -f -9 $(GIT_TARNAME).tar\n> >  \n> \n> Why should a source distribution exclude git-gui/ directory?  I\n> think it is sensible to ship a source that contains all.  You\n> are shipping gitk even without NO_TCLTK anyway, too.\n\nOops: didn't noticed that it is the tarball construction.\n\n> And from the part 2:\n> \n> > @@ -705,6 +709,12 @@ endif\n> >  strip: $(PROGRAMS) git$X\n> >  \t$(STRIP) $(STRIP_OPTS) $(PROGRAMS) git$X\n> >  \n> > +gitk-wish: gitk GIT-GUI-VARS\n> > +\t$(QUIET_GEN)rm -f $@ $@+ && \\\n> > +\tsed -e'1,3s|^exec .* \"$$0\"|exec $(subst |,'\\|',$(TCLTK_PATH_SQ)) \"$$0\"|' < gitk > $@+ && \\\n> > +\tchmod +x $@+ && \\\n> > +\tmv -f $@+ $@\n> > +\n> \n> This subst() is a nice attention to the detail.  I like it,\n> although in practice I do not think anybody is insane enough to\n> have a pipe character in the directory name that leads to wish.\n\nThanks! And for the sanity: I do not think that the single quote\nin the path it sane too. But as I was teached, \"if we should\nquote something, we must quote it\". ;))\n\n> \n> I separated your two patches into three with minor modifications\n> and parked them in 'pu'.  We need to arrange with Shawn when to\n> apply the git-gui/ parts of the patch to his tree, but we are\n> not in a rush.\n\nThank you. Examined the 'origin/pu' and saw that you're already\nincorporated the git.spec.in patch. I've found a glitch in it:\nthe right PYTHON_PATH should be passed. The patch follows.\n\nBy the way, when I was creating the git.spec from the git.spec.in,\nI had the 'Version' field equal to the '1.5.1-rc1.GIT' and RPM\ndoes not like the '-' characters inside the versions. Did\n'tr - _' for specfile version and tarball name. The patch\nfollows.\n-- \nEygene\n"},{"id":"38288","messageId":"7vwt107a3g.fsf@assigned-by-dhcp.cox.net","threadId":"7332","inReplyTo":"20070329074424.GD59098@codelabs.ru","subject":"Re: [PATCH] Add --with-tcltk and --without-tcltk to configure.","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-03-29T08:00:35Z","receivedAt":"2007-03-29T08:00:35Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Eygene Ryabinkin <rea-git@codelabs.ru> writes:\n\n> Wed, Mar 28, 2007 at 12:48:45PM -0700, Junio C Hamano wrote:\n>> Eygene Ryabinkin <rea-git@codelabs.ru> writes:\n>> ...\n>> > +gitk-wish: gitk GIT-GUI-VARS\n>> > +\t$(QUIET_GEN)rm -f $@ $@+ && \\\n>> > +\tsed -e'1,3s|^exec .* \"$$0\"|exec $(subst |,'\\|',$(TCLTK_PATH_SQ)) \"$$0\"|' < gitk > $@+ && \\\n>> > +\tchmod +x $@+ && \\\n>> > +\tmv -f $@+ $@\n>> ...\n> Thanks! And for the sanity: I do not think that the single quote\n> in the path it sane too. But as I was teached, \"if we should\n> quote something, we must quote it\". ;))\n\nActually, look at the wish script you are running sed on.\n\n\texec wish \"$0\" -- \"$@\"\n\nIf you substitute \"wish\" with \"/i use stupid/$PATH/to/wish\", I\nthink Tcl splits the path at SP and does not protect $var\nreference, so the careful quoting in the Makefile is still not\ngood enough ;-).\n\nBut come to think of it, it lets shell handle $PATH to find wish\nanyway, so *unless* we have specific version dependency to wish\nthat wish binary normally found on user's $PATH is inadequate,\nwe probably should not even need to be doing any of this path\nmunging.  You might end up discovering the path to wish binary\nin your autoconf script, we do not have to use it.  ./configure\ncan just see if there is wish, and set NO_TCLTK appropriately\nwithout any of the path business.\n\nWhat do you think?\n\n> By the way, when I was creating the git.spec from the git.spec.in,\n> I had the 'Version' field equal to the '1.5.1-rc1.GIT' and RPM\n> does not like the '-' characters inside the versions.\n\nThat is semi-intended, in that you are not even supposed to be\nbuilding with \"1.5.1-rc1.GIT\".  The version file in the tarball\nthat git.spec file lives in should use git-describe, built from\nthe source before the tarball was made, to get the version\nnumber, and wouldn't be \"$anything.GIT\", which is the last-ditch\nfallback string, which is set by GIT-VERSION-GEN for people who\nbuild in a wrong way.\n"},{"id":"38296","messageId":"20070329082908.GH59098@codelabs.ru","threadId":"7332","inReplyTo":"7vwt107a3g.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] Add --with-tcltk and --without-tcltk to configure.","fromName":"Eygene Ryabinkin","fromEmail":"rea-git@codelabs.ru","sentAt":"2007-03-29T08:29:08Z","receivedAt":"2007-03-29T08:29:08Z","isPatch":true,"sender":{"key":"rea-git@codelabs.ru","avatar":null},"body":"Junio,\nThu, Mar 29, 2007 at 01:00:35AM -0700, Junio C Hamano wrote:\n> Actually, look at the wish script you are running sed on.\n> \n> \texec wish \"$0\" -- \"$@\"\n> \n> If you substitute \"wish\" with \"/i use stupid/$PATH/to/wish\", I\n> think Tcl splits the path at SP and does not protect $var\n> reference, so the careful quoting in the Makefile is still not\n> good enough ;-).\n\nIt is not Tcl/Tk, who interprets that string: it is for shell.\nSo, if the line will look like\nexec \"/insane path/to/wish\" \"$0\" -- \"$@\",\nthen we will just get the \"/insane path/to/wish\" executed with\nthe script name on the first place and other arguments following\nthe '--'.\n\nOr you meant something different? I am little confused with\nthe '$PATH' in your example. Was it intended?\n\n> But come to think of it, it lets shell handle $PATH to find wish\n> anyway, so *unless* we have specific version dependency to wish\n> that wish binary normally found on user's $PATH is inadequate,\n> we probably should not even need to be doing any of this path\n> munging.  You might end up discovering the path to wish binary\n> in your autoconf script, we do not have to use it.  ./configure\n> can just see if there is wish, and set NO_TCLTK appropriately\n> without any of the path business.\n> \n> What do you think?\n\nThere are problems at least with FreeBSD: it just installs the\nwish8.4, wish8.3, wish8.2, etc. It does not provide the bare 'wish'\nas the link to one of those: it is hard to tell what 'wish' we will\nlike to use. Sure, I can search for 'wish8.3', 'wish8.4' in the\nconfigure script. But when new wish will be out the Git configure\nshould be fixed for it. Seems like passing the path of the Tcl/Tk\ninterpreter still have some meaning in this situation.\n\n> \n> > By the way, when I was creating the git.spec from the git.spec.in,\n> > I had the 'Version' field equal to the '1.5.1-rc1.GIT' and RPM\n> > does not like the '-' characters inside the versions.\n> \n> That is semi-intended, in that you are not even supposed to be\n> building with \"1.5.1-rc1.GIT\".  The version file in the tarball\n> that git.spec file lives in should use git-describe, built from\n> the source before the tarball was made, to get the version\n> number, and wouldn't be \"$anything.GIT\", which is the last-ditch\n> fallback string, which is set by GIT-VERSION-GEN for people who\n> build in a wrong way.\n\nJust built the tarball and tried the produced specfile: it wanted\nto build 'git-1.5.1.rc1.26.g7a88-dirty'. Yes, my repository was\ndirty, I admit it. Maybe you're right and there is no good reason\nfor the '-' symbols in the version string.\n-- \nEygene\n"},{"id":"38298","messageId":"7v7it04fbo.fsf@assigned-by-dhcp.cox.net","threadId":"7332","inReplyTo":"20070329082908.GH59098@codelabs.ru","subject":"Re: [PATCH] Add --with-tcltk and --without-tcltk to configure.","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-03-29T08:35:55Z","receivedAt":"2007-03-29T08:35:55Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Eygene Ryabinkin <rea-git@codelabs.ru> writes:\n\n> Or you meant something different? I am little confused with\n> the '$PATH' in your example. Was it intended?\n\nYes, the dollar-sign-in-pathname is pretty much a part of my\npathological example. \n\n>> But come to think of it, it lets shell handle $PATH to find wish\n>> anyway, so *unless* we have specific version dependency to wish\n>> that wish binary normally found on user's $PATH is inadequate,\n>> we probably should not even need to be doing any of this path\n>> munging.  You might end up discovering the path to wish binary\n>> in your autoconf script, we do not have to use it.  ./configure\n>> can just see if there is wish, and set NO_TCLTK appropriately\n>> without any of the path business.\n>> \n>> What do you think?\n>\n> There are problems at least with FreeBSD: it just installs the\n> wish8.4, wish8.3, wish8.2, etc. It does not provide the bare 'wish'\n> as the link to one of those.\n\nThen sed -e 's/wish/$(WISH_NAME)/', still letting the shell to\nhandle the path part, could be a simpler option.  I dunno.\n"},{"id":"38299","messageId":"20070329085834.GJ59098@codelabs.ru","threadId":"7332","inReplyTo":"7v7it04fbo.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] Add --with-tcltk and --without-tcltk to configure.","fromName":"Eygene Ryabinkin","fromEmail":"rea-git@codelabs.ru","sentAt":"2007-03-29T08:58:35Z","receivedAt":"2007-03-29T08:58:35Z","isPatch":true,"sender":{"key":"rea-git@codelabs.ru","avatar":null},"body":"Thu, Mar 29, 2007 at 01:35:55AM -0700, Junio C Hamano wrote:\n> Eygene Ryabinkin <rea-git@codelabs.ru> writes:\n> \n> > Or you meant something different? I am little confused with\n> > the '$PATH' in your example. Was it intended?\n> \n> Yes, the dollar-sign-in-pathname is pretty much a part of my\n> pathological example. \n\nGot it. So you mean that the '$' sign should be escaped as well? ;))\nOr we can get another _SQ substitution to the script and the\nstring will look like\nexec 'whatever you'\\''d written here' \"$0\" -- \"$@\"\n\n> >> But come to think of it, it lets shell handle $PATH to find wish\n> >> anyway, so *unless* we have specific version dependency to wish\n> >> that wish binary normally found on user's $PATH is inadequate,\n> >> we probably should not even need to be doing any of this path\n> >> munging.  You might end up discovering the path to wish binary\n> >> in your autoconf script, we do not have to use it.  ./configure\n> >> can just see if there is wish, and set NO_TCLTK appropriately\n> >> without any of the path business.\n> >> \n> >> What do you think?\n> >\n> > There are problems at least with FreeBSD: it just installs the\n> > wish8.4, wish8.3, wish8.2, etc. It does not provide the bare 'wish'\n> > as the link to one of those.\n> \n> Then sed -e 's/wish/$(WISH_NAME)/', still letting the shell to\n> handle the path part, could be a simpler option.  I dunno.\n\nAh, you mean that './configure --with-tcltk=wish8.4' should also\ndo the trick? It seems to be easy to achieve by just skipping\nthe 'test -x' part in the configure.ac. So the semantics of\n'--with-tcltk=PATH' will be:\n\"If you're telling me about the path to the interpreter, it is\nyou who should take care of it. I do not mind if you will give\nme something unexecutable, unexistent and so on.\". Comments?\n-- \nEygene\n"},{"id":"38300","messageId":"20070329091239.GA8905@hermes","threadId":"7332","inReplyTo":"20070329085834.GJ59098@codelabs.ru","subject":"Re: [PATCH] Add --with-tcltk and --without-tcltk to configure.","fromName":"Tom Prince","fromEmail":"tom.prince@ualberta.net","sentAt":"2007-03-29T09:12:39Z","receivedAt":"2007-03-29T09:12:39Z","isPatch":true,"sender":{"key":"tom.prince@ualberta.net","avatar":"https://gravatar.com/avatar/a0ad19caee7618876339485106ec994f5202505eecd210ba5c0bd869feaa555a?d=mp&s=160"},"body":"On Thu, Mar 29, 2007 at 12:58:35PM +0400, Eygene Ryabinkin wrote:\n> Ah, you mean that './configure --with-tcltk=wish8.4' should also\n> do the trick? It seems to be easy to achieve by just skipping\n> the 'test -x' part in the configure.ac. So the semantics of\n> '--with-tcltk=PATH' will be:\n> \"If you're telling me about the path to the interpreter, it is\n> you who should take care of it. I do not mind if you will give\n> me something unexecutable, unexistent and so on.\". Comments?\n\nDefinitely, when cross compiling, or generating packages, you often\ndon't even have the program installed in the right place, so erroring\nout is the wrong thing to do in this case.\n\n  Tom\n"},{"id":"38302","messageId":"20070329100602.GM59098@codelabs.ru","threadId":"7332","inReplyTo":"20070329091239.GA8905@hermes","subject":"Re: [PATCH] Add --with-tcltk and --without-tcltk to configure.","fromName":"Eygene Ryabinkin","fromEmail":"rea-git@codelabs.ru","sentAt":"2007-03-29T10:06:03Z","receivedAt":"2007-03-29T10:06:03Z","isPatch":true,"sender":{"key":"rea-git@codelabs.ru","avatar":null},"body":"Tom, good day.\n\nThu, Mar 29, 2007 at 01:12:39PM +0400, Tom Prince wrote:\n> Definitely, when cross compiling, or generating packages, you often\n> don't even have the program installed in the right place, so erroring\n> out is the wrong thing to do in this case.\n\nOK, the patch follows.\n-- \nEygene\n"},{"id":"38303","messageId":"20070329100648.GN59098@codelabs.ru","threadId":"7332","inReplyTo":"20070329100602.GM59098@codelabs.ru","subject":"[PATCH] Eliminate checks of user-specified Tcl/Tk interpreter.","fromName":"Eygene Ryabinkin","fromEmail":"rea-git@codelabs.ru","sentAt":"2007-03-29T10:06:48Z","receivedAt":"2007-03-29T10:06:48Z","isPatch":true,"sender":{"key":"rea-git@codelabs.ru","avatar":null},"body":"Do not make the checks on the Tcl/Tk interpreter passed by\n'--with-tcltk=/path/to/wish' configure option: user is free to pass\nanything.\n\nSigned-off-by: Eygene Ryabinkin <rea-git@codelabs.ru>\n---\n configure.ac |    2 --\n 1 files changed, 0 insertions(+), 2 deletions(-)\n\ndiff --git a/configure.ac b/configure.ac\nindex 43a6769..50d2b85 100644\n--- a/configure.ac\n+++ b/configure.ac\n@@ -102,8 +102,6 @@ if test -z \"$NO_TCLTK\"; then\n   elif test \"$with_tcltk\" = \"yes\"; then\n   # Tcl/Tk check requested.\n     AC_CHECK_PROGS(TCLTK_PATH, [wish], )\n-  elif ! test -x \"$with_tcltk\"; then\n-    AC_MSG_ERROR([Tcl/Tk interpreter was not found in $with_tcltk])\n   else\n     AC_MSG_RESULT([Using Tcl/Tk interpreter $with_tcltk])\n     TCLTK_PATH=\"$with_tcltk\"\n-- \n1.5.0.3-dirty\n"},{"id":"38304","messageId":"20070329100747.GO59098@codelabs.ru","threadId":"7332","inReplyTo":"20070329074424.GD59098@codelabs.ru","subject":"[PATCH] Added correct Python path to the RPM specfile.","fromName":"Eygene Ryabinkin","fromEmail":"rea-git@codelabs.ru","sentAt":"2007-03-29T10:07:47Z","receivedAt":"2007-03-29T10:07:47Z","isPatch":true,"sender":{"key":"rea-git@codelabs.ru","avatar":null},"body":"Signed-off-by: Eygene Ryabinkin <rea-git@codelabs.ru>\n---\n git.spec.in |    9 +++++++--\n 1 files changed, 7 insertions(+), 2 deletions(-)\n\ndiff --git a/git.spec.in b/git.spec.in\nindex e469f21..1e96eaa 100644\n--- a/git.spec.in\n+++ b/git.spec.in\n@@ -1,4 +1,7 @@\n # Pass --without docs to rpmbuild if you don't want the documentation\n+\n+%define python_path /usr/bin/python\n+\n Name: \t\tgit\n Version: \t@@VERSION@@\n Release: \t1%{?dist}\n@@ -93,12 +96,14 @@ Perl interface to Git\n \n %build\n make %{_smp_mflags} CFLAGS=\"$RPM_OPT_FLAGS\" WITH_OWN_SUBPROCESS_PY=YesPlease \\\n-     WITH_P4IMPORT=YesPlease prefix=%{_prefix} all %{!?_without_docs: doc}\n+     WITH_P4IMPORT=YesPlease PYTHON_PATH=%{python_path} prefix=%{_prefix} all \\\n+     %{!?_without_docs: doc}\n \n %install\n rm -rf $RPM_BUILD_ROOT\n make %{_smp_mflags} CFLAGS=\"$RPM_OPT_FLAGS\" DESTDIR=$RPM_BUILD_ROOT \\\n-     WITH_OWN_SUBPROCESS_PY=YesPlease WITH_P4IMPORT=YesPlease \\\n+     WITH_OWN_SUBPROCESS_PY=YesPlease \\\n+     WITH_P4IMPORT=YesPlease PYTHON_PATH=%{python_path} \\\n      prefix=%{_prefix} mandir=%{_mandir} INSTALLDIRS=vendor \\\n      install %{!?_without_docs: install-doc}\n find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} ';'\n-- \n1.5.0.3-dirty\n"},{"id":"38642","messageId":"7v3b3g3sbk.fsf@assigned-by-dhcp.cox.net","threadId":"7332","inReplyTo":"20070327112514.GC14837@codelabs.ru","subject":"Re: [PATCH] Added git-p4 package to the list of git RPMs.","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-04-04T18:30:55Z","receivedAt":"2007-04-04T18:30:55Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Eygene Ryabinkin <rea-git@codelabs.ru> writes:\n\n> diff --git a/git.spec.in b/git.spec.in\n> index 46aee88..8c79a79 100644\n> --- a/git.spec.in\n> +++ b/git.spec.in\n> @@ -50,6 +50,13 @@ Requires:       git-core = %{version}-%{release}, tla\n>  %description arch\n>  Git tools for importing Arch repositories.\n>  \n> +%package p4\n> +Summary:        Git tools for importing Perforce repositories\n> +Group:          Development/Tools\n> +Requires:       git-core = %{version}-%{release}, python\n> +%description p4\n> +Git tools for importing Perforce repositories.\n> +\n>...\n\nThanks. I'll also add git-p4 here.\n\ndiff --git a/git.spec.in b/git.spec.in\nindex 1d3934b..f0746ed 100644\n--- a/git.spec.in\n+++ b/git.spec.in\n@@ -12,7 +12,7 @@ URL: \t\thttp://kernel.org/pub/software/scm/git/\n Source: \thttp://kernel.org/pub/software/scm/git/%{name}-%{version}.tar.gz\n BuildRequires:\tzlib-devel >= 1.2, openssl-devel, curl-devel, expat-devel  %{!?_without_docs:, xmlto, asciidoc > 6.0.3}\n BuildRoot:\t%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)\n-Requires:\tgit-core, git-svn, git-cvs, git-arch, git-email, gitk, git-gui, perl-Git\n+Requires:\tgit-core, git-svn, git-cvs, git-arch, git-email, gitk, git-gui, git-p4, perl-Git\n \n %description\n Git is a fast, scalable, distributed revision control system with an\n"},{"id":"38700","messageId":"20070405125027.GW26348@codelabs.ru","threadId":"7332","inReplyTo":"7v3b3g3sbk.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] Added git-p4 package to the list of git RPMs.","fromName":"Eygene Ryabinkin","fromEmail":"rea-git@codelabs.ru","sentAt":"2007-04-05T12:50:28Z","receivedAt":"2007-04-05T12:50:28Z","isPatch":true,"sender":{"key":"rea-git@codelabs.ru","avatar":null},"body":"Junio, good day.\n\nWed, Apr 04, 2007 at 11:30:55AM -0700, Junio C Hamano wrote:\n> Thanks. I'll also add git-p4 here.\n\nThank you.\n-- \nEygene\n"}]}