{"thread":{"id":"3823","subject":"[PATCH] Fix paths on FreeBSD by processing gitk like other scripts","startedAt":"2006-04-07T21:03:51Z","lastAt":"2006-04-07T21:03:51Z","messageCount":1,"participants":["Eric Anholt"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"18457","messageId":"1144443831.7017.72.camel@leguin","threadId":"3823","inReplyTo":null,"subject":"[PATCH] Fix paths on FreeBSD by processing gitk like other scripts","fromName":"Eric Anholt","fromEmail":"eric@anholt.net","sentAt":"2006-04-07T21:03:51Z","receivedAt":"2006-04-07T21:03:51Z","isPatch":true,"sender":{"key":"eric@anholt.net","avatar":null},"body":"The paths for python and tk are not /usr/bin for FreeBSD, so I moved\ngitk to gitk.tk and added a rule to sed in the proper path to \"wish\" in\nmaking gitk, and also added the appropriate default path for python.\n\n-- \nEric Anholt                     anholt@FreeBSD.org\neric@anholt.net                 eric.anholt@intel.com\n\n\ndiff --git a/.gitignore b/.gitignore\nindex b5959d6..e9d5a7b 100644\n--- a/.gitignore\n+++ b/.gitignore\n@@ -121,6 +121,7 @@ git-verify-tag\n git-whatchanged\n git-write-tree\n git-core-*/?*\n+gitk\n test-date\n test-delta\n common-cmds.h\ndiff --git a/Makefile b/Makefile\nindex 3367b8c..de28dec 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -136,6 +136,9 @@ SCRIPT_PERL = \\\n SCRIPT_PYTHON = \\\n \tgit-merge-recursive.py\n \n+SCRIPT_TK = \\\n+\tgitk.tk\n+\n SCRIPTS = $(patsubst %.sh,%,$(SCRIPT_SH)) \\\n \t  $(patsubst %.perl,%,$(SCRIPT_PERL)) \\\n \t  $(patsubst %.py,%,$(SCRIPT_PYTHON)) \\\n@@ -174,6 +177,15 @@ # Backward compatibility -- to be remove\n PROGRAMS += git-ssh-pull$X git-ssh-push$X\n \n # Set paths to tools early so that they can be used for version tests.\n+ifeq ($(uname_S),FreeBSD)\n+\tifndef PYTHON_PATH\n+\t\tPYTHON_PATH = /usr/local/bin/python\n+\tendif\n+\tifndef WISH_PATH\n+\t\tWISH_PATH = /usr/local/bin/wish8.4\n+\tendif\t\n+endif\n+\n ifndef SHELL_PATH\n \tSHELL_PATH = /bin/sh\n endif\n@@ -183,6 +195,9 @@ endif\n ifndef PYTHON_PATH\n \tPYTHON_PATH = /usr/bin/python\n endif\n+ifndef WISH_PATH\n+\tWISH_PATH = wish\n+endif\n \n PYMODULES = \\\n \tgitMergeCommon.py\n@@ -484,6 +499,12 @@ common-cmds.h: Documentation/git-*.txt\n \t    -e 's|@@GIT_PYTHON_PATH@@|$(GIT_PYTHON_DIR_SQ)|g' \\\n \t    -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \\\n \t    $@.py >$@\n+\tchmod +x $@\n+\n+$(patsubst %.tk,%,$(SCRIPT_TK)) : % : %.tk\n+\trm -f $@\n+\tsed -e \"s|exec wish|exec $(WISH_PATH)|\" \\\n+\t    $@.tk >$@\n \tchmod +x $@\n \n git-cherry-pick: git-revert\ndiff --git a/gitk b/gitk.tk\nsimilarity index 100%\nrename from gitk\nrename to gitk.tk\n"}]}