index 9341ad5..d8b75f8 100644
a
|
b
|
PortSystem 1.0 |
5 | 5 | |
6 | 6 | name emacs-app |
7 | 7 | version 24.3 |
8 | | revision 1 |
| 8 | revision 2 |
9 | 9 | categories aqua editors |
10 | 10 | maintainers hum css openmaintainer |
11 | 11 | |
… |
… |
depends_lib port:ncurses \ |
36 | 36 | port:libxml2 \ |
37 | 37 | port:gnutls |
38 | 38 | |
39 | | patchfiles patch-src_emacs.c.diff |
| 39 | patchfiles patch-mavericks-home.diff patch-mavericks-psn.diff patch-src_emacs.c.diff |
40 | 40 | |
41 | 41 | post-patch { |
42 | 42 | reinplace "s|__PREFIX__|${prefix}|" ${worksrcpath}/src/emacs.c |
diff --git a/dports/aqua/emacs-app/files/patch-mavericks-home.diff b/dports/aqua/emacs-app/files/patch-mavericks-home.diff
new file mode 100644
index 0000000..ae884df
-
|
+
|
|
| 1 | --- src/emacs.c.orig |
| 2 | +++ src/emacs.c |
| 3 | @@ -1156,10 +1156,13 @@ |
| 4 | if (!noninteractive) |
| 5 | { |
| 6 | #ifdef NS_IMPL_COCOA |
| 7 | - if (skip_args < argc) |
| 8 | + /* Started from GUI? */ |
| 9 | + /* FIXME: Do the right thing if getenv returns NULL, or if |
| 10 | + chdir fails. */ |
| 11 | + if (! inhibit_window_system && ! isatty (0)) |
| 12 | + chdir (getenv ("HOME")); |
| 13 | + else if (skip_args < argc) |
| 14 | { |
| 15 | - /* FIXME: Do the right thing if getenv returns NULL, or if |
| 16 | - chdir fails. */ |
| 17 | if (!strncmp (argv[skip_args], "-psn", 4)) |
| 18 | { |
| 19 | skip_args += 1; |
diff --git a/dports/aqua/emacs-app/files/patch-mavericks-psn.diff b/dports/aqua/emacs-app/files/patch-mavericks-psn.diff
new file mode 100644
index 0000000..7c25d30
-
|
+
|
|
| 1 | --- src/emacs.c.orig |
| 2 | +++ src/emacs.c |
| 3 | @@ -1201,7 +1201,7 @@ |
| 4 | chdir fails. */ |
| 5 | if (! inhibit_window_system && ! isatty (0)) |
| 6 | chdir (getenv ("HOME")); |
| 7 | - else if (skip_args < argc) |
| 8 | + if (skip_args < argc) |
| 9 | { |
| 10 | if (!strncmp (argv[skip_args], "-psn", 4)) |
| 11 | { |