{"thread":{"id":"12042","subject":"[PATCH] git-gui: support OS X 10.5","startedAt":"2008-02-11T19:21:31Z","lastAt":"2008-02-11T19:21:31Z","messageCount":1,"participants":["jaysoffian+git@gmail.com"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"68425","messageId":"1202757691-20054-1-git-send-email-jaysoffian+git@gmail.com","threadId":"12042","inReplyTo":null,"subject":"[PATCH] git-gui: support OS X 10.5","fromName":"","fromEmail":"jaysoffian+git@gmail.com","sentAt":"2008-02-11T19:21:31Z","receivedAt":"2008-02-11T19:21:31Z","isPatch":true,"sender":{"key":"jaysoffian@gmail.com","avatar":"https://avatars.githubusercontent.com/u/155970?v=4"},"body":"The Tk Framework moved its location in 10.5 compared to 10.4\n\nSigned-off-by: Jay Soffian <jaysoffian@gmail.com>\n---\n git-gui/Makefile          |   17 +++++++++++++----\n git-gui/macosx/Info.plist |    2 +-\n 2 files changed, 14 insertions(+), 5 deletions(-)\n\ndiff --git a/git-gui/Makefile b/git-gui/Makefile\nindex 34438cd..15f3718 100644\n--- a/git-gui/Makefile\n+++ b/git-gui/Makefile\n@@ -13,6 +13,7 @@ GIT-VERSION-FILE: .FORCE-GIT-VERSION-FILE\n \n uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')\n uname_O := $(shell sh -c 'uname -o 2>/dev/null || echo not')\n+uname_R := $(shell sh -c 'uname -r 2>/dev/null || echo not')\n \n SCRIPT_SH = git-gui.sh\n GITGUI_MAIN := git-gui\n@@ -93,7 +94,14 @@ endif\n \n TCL_PATH   ?= tclsh\n TCLTK_PATH ?= wish\n-TKFRAMEWORK = /Library/Frameworks/Tk.framework/Resources/Wish.app\n+\n+ifeq ($(uname_S),Darwin)\n+\tTKFRAMEWORK = /Library/Frameworks/Tk.framework/Resources/Wish.app\n+\tifeq ($(shell expr \"$(uname_R)\" : '9\\.'),2)\n+\t\tTKFRAMEWORK = /System/Library/Frameworks/Tk.framework/Resources/Wish\\ Shell.app\n+\tendif\n+\tTKEXECUTABLE = $(shell basename \"$(TKFRAMEWORK)\" .app)\n+endif\n \n ifeq ($(findstring $(MAKEFLAGS),s),s)\n QUIET_GEN =\n@@ -147,7 +155,7 @@ git-gui: GIT-VERSION-FILE GIT-GUI-VARS\n \techo then >>$@+ && \\\n \techo '\t'echo \\'git-gui version '$(GITGUI_VERSION)'\\' >>$@+ && \\\n \techo else >>$@+ && \\\n-\techo '\t'exec \\''$(libdir_SQ)/Git Gui.app/Contents/MacOS/Wish'\\' \\\n+\techo '\t'exec \\''$(libdir_SQ)/Git Gui.app/Contents/MacOS/$(subst \\,,$(TKEXECUTABLE))'\\' \\\n \t\t'\"$$0\" \"$$@\"' >>$@+ && \\\n \techo fi >>$@+ && \\\n \tchmod +x $@+ && \\\n@@ -157,14 +165,15 @@ Git\\ Gui.app: GIT-VERSION-FILE GIT-GUI-VARS \\\n \t\tmacosx/Info.plist \\\n \t\tmacosx/git-gui.icns \\\n \t\tmacosx/AppMain.tcl \\\n-\t\t$(TKFRAMEWORK)/Contents/MacOS/Wish\n+\t\t$(TKFRAMEWORK)/Contents/MacOS/Wish\\ Shell\n \t$(QUIET_GEN)rm -rf '$@' '$@'+ && \\\n \tmkdir -p '$@'+/Contents/MacOS && \\\n \tmkdir -p '$@'+/Contents/Resources/Scripts && \\\n-\tcp '$(subst ','\\'',$(TKFRAMEWORK))/Contents/MacOS/Wish' \\\n+\tcp '$(subst ','\\'',$(subst \\,,$(TKFRAMEWORK)/Contents/MacOS/$(TKEXECUTABLE)))' \\\n \t\t'$@'+/Contents/MacOS && \\\n \tcp macosx/git-gui.icns '$@'+/Contents/Resources && \\\n \tsed -e 's/@@GITGUI_VERSION@@/$(GITGUI_VERSION)/g' \\\n+\t\t-e 's/@@GITGUI_TKEXECUTABLE@@/$(TKEXECUTABLE)/g' \\\n \t\tmacosx/Info.plist \\\n \t\t>'$@'+/Contents/Info.plist && \\\n \tsed -e 's|@@gitexecdir@@|$(gitexecdir_SQ)|' \\\ndiff --git a/git-gui/macosx/Info.plist b/git-gui/macosx/Info.plist\nindex 99913ec..b3bf15f 100644\n--- a/git-gui/macosx/Info.plist\n+++ b/git-gui/macosx/Info.plist\n@@ -5,7 +5,7 @@\n \t<key>CFBundleDevelopmentRegion</key>\n \t<string>English</string>\n \t<key>CFBundleExecutable</key>\n-\t<string>Wish</string>\n+\t<string>@@GITGUI_TKEXECUTABLE@@</string>\n \t<key>CFBundleGetInfoString</key>\n \t<string>Git Gui @@GITGUI_VERSION@@ Â© 2006-2007 Shawn Pearce, et. al.</string>\n \t<key>CFBundleIconFile</key>\n-- \n1.5.4.1.1231.g4e386\n"}]}