Commits

Mitsuhiro Nakamura  committed 518d014

Remove aqua/emacs-app.

  • Participants
  • Parent commits b94c1a5

Comments (0)

Files changed (4)

File aqua/emacs-app/Portfile

-# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
-# $Id: $
-
-PortSystem 1.0
-
-name		emacs-app
-version		23.3
-categories	aqua editors
-maintainers	css
-description	The GNU Emacs text editor (Cocoa version)
-
-long_description	GNU Emacs is a self-documenting, customizable,      \
-	extensible real-time display editor. This is a port of the latest   \
-	GNU Emacs source to the OpenStep (or NeXTstep) APIs, as implemented \
-	by Cocoa on OS X. It differs from Carbon ports of GNU Emacs in that \
-	it makes a more concerted attempt from the ground up to follow OS X \
-	desktop and UI conventions.
-
-# Note that this distribution can support GNUstep as well, but that
-# configuration is untested at this time.
-
-platforms	darwin
-homepage	http://emacs-app.sourceforge.net/
-master_sites	gnu:emacs
-distname	emacs-${version}
-use_bzip2	yes
-checksums           md5     a673c163b4714362b94ff6096e4d784a \
-                    sha1    de2c924655f0f4e012cc119840cd341a1d40e32c \
-                    rmd160  bddaba77f543b41a91d133c6700078a9b41b0bf8
-
-depends_lib     port:ncurses
-use_parallel_build      yes
-
-patch.pre_args -p1
-
-configure.args	--with-ns --without-x --without-dbus
-
-variant fullscreen description {Add patches to add the fullscreen feature.} {
-    # See http://yebo-blog.blogspot.com/2011/03/emacs-233.html
-    patchfiles-append patch-fullscreen.diff
-}
-
-variant shiftmodifier description {Add patches to fix the shiftmodifier with IME problem.} {
-    # See http://yebo-blog.blogspot.com/2011/03/emacs-233.html
-    patchfiles-append patch-shiftmodifier-with-ime.diff
-}
-
-destroot {
-        system "cd ${worksrcpath} && make install"
-	xinstall -m 755 -d ${destroot}${applications_dir}
-	file copy ${worksrcpath}/nextstep/Emacs.app \
-		${destroot}${applications_dir}
-	file copy ${filespath}/site-start.el \
-		${destroot}${applications_dir}/Emacs.app/Contents/Resources/site-lisp
-}
-
-post-destroot {
-	reinplace "s|__PREFIX__|${prefix}|g" \
-		${destroot}${applications_dir}/Emacs.app/Contents/Resources/site-lisp/site-start.el
-}

File aqua/emacs-app/files/patch-fullscreen.diff

-diff --git a/lisp/term/ns-win.el b/lisp/term/ns-win.el
-index 157b2dd..f3807b7 100644
---- a/lisp/term/ns-win.el
-+++ b/lisp/term/ns-win.el
-@@ -1263,6 +1263,11 @@ the operating system.")
- (add-to-list 'window-system-initialization-alist '(ns . ns-initialize-window-system))
- 
- 
-+(declare-function ns-toggle-fullscreen-internal "nsfns.m" ())
-+(defun ns-toggle-fullscreen ()
-+  (interactive)
-+  (ns-toggle-fullscreen-internal))
-+
- (provide 'ns-win)
- 
- ;; arch-tag: eb138a45-4e2e-4d68-b1c9-a39665731644
-diff --git a/src/nsfns.m b/src/nsfns.m
-index 642ff79..03ffcf7 100644
---- a/src/nsfns.m
-+++ b/src/nsfns.m
-@@ -2589,6 +2589,34 @@ Value is t if tooltip was open, nil otherwise.  */)
- 
- #endif
- 
-+DEFUN ("ns-toggle-fullscreen-internal", Fns_toggle_fullscreen_internal, Sns_toggle_fullscreen_internal,
-+       0, 0, 0,
-+       doc: /* Toggle fulscreen mode */)
-+    ()
-+{
-+    struct frame *f = SELECTED_FRAME();
-+    EmacsWindow *window = ns_get_window(f);
-+
-+    EmacsWindow *new_window = [window toggleFullscreen];
-+    FRAME_NS_WINDOW(f) = new_window;
-+
-+    NSRect r = [new_window contentRectForFrameRect:[new_window frame]];
-+    int cols = FRAME_PIXEL_WIDTH_TO_TEXT_COLS(f, r.size.width);
-+    int rows = FRAME_PIXEL_HEIGHT_TO_TEXT_LINES(f, r.size.height);
-+
-+    change_frame_size (f, rows, cols, 0, 1, 0); /* pretend, delay, safe */
-+    FRAME_PIXEL_WIDTH (f) = (int)r.size.width;
-+    FRAME_PIXEL_HEIGHT (f) = (int)r.size.height;
-+
-+    f->border_width = [new_window frame].size.width - r.size.width;
-+    FRAME_NS_TITLEBAR_HEIGHT (f) =
-+        [new_window frame].size.height - r.size.height;
-+
-+    [[new_window delegate] windowDidMove:nil];
-+
-+    return Qnil;
-+}
-+
- 
- /* ==========================================================================
- 
-@@ -2676,6 +2704,8 @@ be used as the image of the icon representing the frame.  */);
-   defsubr (&Sx_show_tip);
-   defsubr (&Sx_hide_tip);
- 
-+  defsubr (&Sns_toggle_fullscreen_internal);
-+
-   /* used only in fontset.c */
-   check_window_system_func = check_ns;
- 
-diff --git a/src/nsterm.h b/src/nsterm.h
-index 29d312a..17b19e4 100644
---- a/src/nsterm.h
-+++ b/src/nsterm.h
-@@ -95,8 +95,25 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
- {
-   NSPoint grabOffset;
- }
-+
-+-(EmacsWindow *)toggleFullscreen;
-+
-+@end
-+
-+/* 10.5 or below is not supported [NSWindow setStyleMask:], so require content swap hack */
-+@interface EmacsFullWindow : EmacsWindow {
-+    EmacsWindow *normalWindow;
-+}
-+
-+-(id)initWithNormalWindow:(EmacsWindow *)window;
-+-(EmacsWindow *)getNormalWindow;
-+
- @end
- 
-+// dummy for 10.5-
-+#define NSApplicationPresentationDefault 0
-+#define NSApplicationPresentationAutoHideDock (1 <<  0)
-+#define NSApplicationPresentationAutoHideMenuBar (1 <<  2)
- 
- /* ==========================================================================
- 
-diff --git a/src/nsterm.m b/src/nsterm.m
-index 9256c08..8bbb575 100644
---- a/src/nsterm.m
-+++ b/src/nsterm.m
-@@ -686,6 +686,13 @@ ns_focus (struct frame *f, NSRect *r, int n)
- /*debug_lock--; */
-             }
- 
-+          if (view) {
-+              EmacsFullWindow *win = [view window];
-+              if ([win isKindOfClass:[EmacsFullWindow class]]) {
-+                  [[win getNormalWindow] orderOut:nil];
-+              }
-+          }
-+
-           if (view)
- #ifdef NS_IMPL_GNUSTEP
-             r ? [view lockFocusInRect: u] : [view lockFocus];
-@@ -1131,8 +1138,14 @@ x_set_window_size (struct frame *f, int change_grav, int cols, int rows)
-   f->scroll_bar_actual_width = NS_SCROLL_BAR_WIDTH (f);
-   compute_fringe_widths (f, 0);
- 
--  pixelwidth =  FRAME_TEXT_COLS_TO_PIXEL_WIDTH   (f, cols);
--  pixelheight = FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, rows);
-+  if ([window isKindOfClass:[EmacsFullWindow class]]) {
-+      pixelwidth = [[window screen] frame].size.width;
-+      pixelheight = [[window screen] frame].size.height;
-+  }
-+  else {
-+      pixelwidth =  FRAME_TEXT_COLS_TO_PIXEL_WIDTH   (f, cols);
-+      pixelheight = FRAME_TEXT_LINES_TO_PIXEL_HEIGHT (f, rows);
-+  }
- 
-   /* If we have a toolbar, take its height into account. */
-   if (tb)
-@@ -1150,7 +1163,7 @@ x_set_window_size (struct frame *f, int change_grav, int cols, int rows)
-                   + FRAME_NS_TOOLBAR_HEIGHT (f);
- 
-   /* constrain to screen if we can */
--  if (screen)
-+  if (screen && ![window isKindOfClass:[EmacsFullWindow class]])
-     {
-       NSSize sz = [screen visibleFrame].size;
-       NSSize ez = { wr.size.width - sz.width, wr.size.height - sz.height };
-@@ -1197,7 +1210,7 @@ x_set_window_size (struct frame *f, int change_grav, int cols, int rows)
-   change_frame_size (f, rows, cols, 0, 1, 0); /* pretend, delay, safe */
-   FRAME_PIXEL_WIDTH (f) = pixelwidth;
-   FRAME_PIXEL_HEIGHT (f) = pixelheight;
--/*  SET_FRAME_GARBAGED (f); // this short-circuits expose call in drawRect */
-+  /*  SET_FRAME_GARBAGED (f); // this short-circuits expose call in drawRect */
- 
-   mark_window_cursors_off (XWINDOW (f->root_window));
-   cancel_mouse_face (f);
-@@ -5609,6 +5622,59 @@ extern void update_window_cursor (struct window *w, int on);
- 
- @implementation EmacsWindow
- 
-+-(NSWindow *)toggleFullscreen {
-+    BOOL isFullscreen = [[self className] isEqualToString:@"EmacsFullWindow"];
-+    NSWindow *win;
-+
-+    if (isFullscreen) {
-+        EmacsFullWindow *f = (EmacsFullWindow *)self;
-+        EmacsWindow *w = [f getNormalWindow];
-+
-+        [w setContentView:[f contentView]];
-+        [w makeKeyAndOrderFront:nil];
-+
-+        [f close];
-+
-+        win = w;
-+
-+        if ([[self screen] isEqual:[[NSScreen screens] objectAtIndex:0]]) {
-+            if ([NSApp respondsToSelector:@selector(setPresentationOptions:)]) {
-+                [NSApp setPresentationOptions:NSApplicationPresentationDefault];
-+            }
-+            else {
-+                [NSMenu setMenuBarVisible:YES];
-+            }
-+        }
-+    }
-+    else {
-+        [self deminiaturize:nil];
-+
-+        if ([[self screen] isEqual:[[NSScreen screens] objectAtIndex:0]]) {
-+            if ([NSApp respondsToSelector:@selector(setPresentationOptions:)]) {
-+                [NSApp setPresentationOptions:NSApplicationPresentationAutoHideDock | NSApplicationPresentationAutoHideMenuBar];
-+            }
-+            else {
-+                [NSMenu setMenuBarVisible:NO];
-+            }
-+        }
-+
-+        [self orderOut:nil];
-+
-+        EmacsFullWindow *f = [[EmacsFullWindow alloc] initWithNormalWindow:self];
-+        EmacsView *view = (EmacsView *)[self delegate];
-+        [f setDelegate:view];
-+        [f makeFirstResponder:view];
-+        [f setContentView:[self contentView]];
-+        [f setContentSize:[[self screen] frame].size];
-+        [f setTitle:[self title]];
-+        [f makeKeyAndOrderFront:nil];
-+
-+        win = f;
-+    }
-+
-+    return win;
-+}
-+
- /* called only on resize clicks by special case in EmacsApp-sendEvent */
- - (void)mouseDown: (NSEvent *)theEvent
- {
-@@ -5667,6 +5733,32 @@ extern void update_window_cursor (struct window *w, int on);
- 
- @end /* EmacsWindow */
- 
-+@implementation EmacsFullWindow
-+
-+-(BOOL)canBecomeKeyWindow {
-+    return YES;
-+}
-+
-+-(id)initWithNormalWindow:(EmacsWindow *)window {
-+    self = [super initWithContentRect:[window contentRectForFrameRect:[[window screen] frame]]
-+                            styleMask:NSBorderlessWindowMask
-+                              backing:NSBackingStoreBuffered
-+                                defer:YES];
-+    if (self) {
-+        normalWindow = window;
-+        [self setAcceptsMouseMovedEvents: YES];
-+        [self useOptimizedDrawing: YES];
-+    }
-+
-+    return self;
-+}
-+
-+-(EmacsWindow *)getNormalWindow {
-+    return normalWindow;
-+}
-+
-+@end /* EmacsFullWindow */
-+
- 
- /* ==========================================================================
- 

File aqua/emacs-app/files/patch-shiftmodifier-with-ime.diff

-diff --git a/src/nsterm.m b/src/nsterm.m
-index b69344c..bb07580 100644
---- a/src/nsterm.m
-+++ b/src/nsterm.m
-@@ -4483,7 +4483,7 @@ extern void update_window_cursor (struct window *w, int on);
-              code, fnKeysym, flags, emacs_event->modifiers);
- 
-       /* if it was a function key or had modifiers, pass it directly to emacs */
--      if (fnKeysym || (emacs_event->modifiers
-+  if (fnKeysym || (emacs_event->modifiers && (emacs_event->modifiers != shift_modifier)
-                        && [[theEvent charactersIgnoringModifiers] length] > 0))
- /*[[theEvent characters] length] */
-         {

File aqua/emacs-app/files/site-start.el

-(setq load-path (cons "__PREFIX__/share/emacs/site-lisp" load-path))