git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Fix paths on FreeBSD by processing gitk like other scripts

From
EAEric Anholt <eric@anholt.net>
Date
Apr 7, 2006, 21:03 UTC
Message-ID
<1144443831.7017.72.camel@leguin>

The paths for python and tk are not /usr/bin for FreeBSD, so I moved gitk to gitk.tk and added a rule to sed in the proper path to "wish" in making gitk, and also added the appropriate default path for python.

-- 
Eric Anholt                     anholt@FreeBSD.org
eric@anholt.net                 eric.anholt@intel.com


diff --git a/.gitignore b/.gitignore
index b5959d6..e9d5a7b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -121,6 +121,7 @@ git-verify-tag
 git-whatchanged
 git-write-tree
 git-core-*/?*
+gitk
 test-date
 test-delta
 common-cmds.h
diff --git a/Makefile b/Makefile
index 3367b8c..de28dec 100644
--- a/Makefile
+++ b/Makefile
@@ -136,6 +136,9 @@ SCRIPT_PERL = \
 SCRIPT_PYTHON = \
 	git-merge-recursive.py
 
+SCRIPT_TK = \
+	gitk.tk
+
 SCRIPTS = $(patsubst %.sh,%,$(SCRIPT_SH)) \
 	  $(patsubst %.perl,%,$(SCRIPT_PERL)) \
 	  $(patsubst %.py,%,$(SCRIPT_PYTHON)) \
@@ -174,6 +177,15 @@ # Backward compatibility -- to be remove
 PROGRAMS += git-ssh-pull$X git-ssh-push$X
 
 # Set paths to tools early so that they can be used for version tests.
+ifeq ($(uname_S),FreeBSD)
+	ifndef PYTHON_PATH
+		PYTHON_PATH = /usr/local/bin/python
+	endif
+	ifndef WISH_PATH
+		WISH_PATH = /usr/local/bin/wish8.4
+	endif	
+endif
+
 ifndef SHELL_PATH
 	SHELL_PATH = /bin/sh
 endif
@@ -183,6 +195,9 @@ endif
 ifndef PYTHON_PATH
 	PYTHON_PATH = /usr/bin/python
 endif
+ifndef WISH_PATH
+	WISH_PATH = wish
+endif
 
 PYMODULES = \
 	gitMergeCommon.py
@@ -484,6 +499,12 @@ common-cmds.h: Documentation/git-*.txt
 	    -e 's|@@GIT_PYTHON_PATH@@|$(GIT_PYTHON_DIR_SQ)|g' \
 	    -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \
 	    $@.py >$@
+	chmod +x $@
+
+$(patsubst %.tk,%,$(SCRIPT_TK)) : % : %.tk
+	rm -f $@
+	sed -e "s|exec wish|exec $(WISH_PATH)|" \
+	    $@.tk >$@
 	chmod +x $@
 
 git-cherry-pick: git-revert
diff --git a/gitk b/gitk.tk
similarity index 100%
rename from gitk
rename to gitk.tk
Message 1 of 1 in “Fix paths on FreeBSD by processing gitk like other scripts”
  1. Fix paths on FreeBSD by processing gitk like other scriptsEric Anholt, Apr 7, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.