foxygit / doom Log in
commit d4e56754210c2b449c3d7a8dc3eb9886d89ff593
Author:     Simon Howard <fraggle@gmail.com>
AuthorDate: Thu Mar 10 19:47:14 2011 +0000
Commit:     Simon Howard <fraggle@gmail.com>
CommitDate: Thu Mar 10 19:47:14 2011 +0000

    Include Unix manpages in MacOS package, and set MANPATH to point to them
    when opening a terminal window.

    Subversion-branch: /trunk/chocolate-doom
    Subversion-revision: 2302
---
 pkg/osx/Execute.m   | 2 ++
 pkg/osx/GNUmakefile | 4 ++++
 2 files changed, 6 insertions(+)

diff --git a/pkg/osx/Execute.m b/pkg/osx/Execute.m
index 608443e2..25f5e67d 100644
--- a/pkg/osx/Execute.m
+++ b/pkg/osx/Execute.m
@@ -175,6 +175,8 @@ void OpenTerminalWindow(const char *doomwadpath)
     fprintf(stream, "#!/bin/sh\n");
     //fprintf(stream, "set -x\n");
     fprintf(stream, "PATH=\"%s:$PATH\"\n", executable_path);
+    fprintf(stream, "MANPATH=\"%s/man:$(manpath)\"\n", executable_path);
+    fprintf(stream, "export MANPATH\n");
     fprintf(stream, "DOOMWADPATH=\"%s\"\n", doomwadpath);
     fprintf(stream, "export DOOMWADPATH\n");
     fprintf(stream, "rm -f \"%s\"\n", TEMP_SCRIPT);
diff --git a/pkg/osx/GNUmakefile b/pkg/osx/GNUmakefile
index f6fa24ff..f9bb6417 100644
--- a/pkg/osx/GNUmakefile
+++ b/pkg/osx/GNUmakefile
@@ -73,6 +73,10 @@ $(STAGING_DIR): launcher $(TOPLEVEL_DOCS)

 	find $(STAGING_DIR) -name .svn -delete -exec rm -rf {} \; || true

+	mkdir -p "$(APP_BIN_DIR)/man/man5" "$(APP_BIN_DIR)/man/man6"
+	cp $(TOPLEVEL)/man/*.5 "$(APP_BIN_DIR)/man/man5"
+	cp $(TOPLEVEL)/man/*.6 "$(APP_BIN_DIR)/man/man6"
+
 clean : launcher_clean
 	rm -f $(DMG)
 	rm -rf $(STAGING_DIR)