Bug 177498 - [PATCH] editors/tamago: fix runtime error and etc
Summary: [PATCH] editors/tamago: fix runtime error and etc
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Hiroki Sato
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-30 09:30 UTC by Yasuhiro Kimura
Modified: 2013-04-15 15:58 UTC (History)
0 users

See Also:


Attachments
patch-tamago (4.07 KB, text/plain)
2013-03-30 09:30 UTC, Yasuhiro Kimura
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yasuhiro Kimura freebsd_committer freebsd_triage 2013-03-30 09:30:00 UTC
	- Fix runtime error on Emacs 24.3 by replacing removed 'last-command-char' with 'last-command-event'.
	- Add OPTIONS_DEFINE to Makefile so that options selection dialog is show up.
	- Simplify the application of FreeBSD patches by renaming files/post-patch-* into files/patch-*.

	Because this patch includes fix of runtime error, it should be committed before package build for 8.4-RELEASE.

	This patch includes that of ports/177374. So it should also closed afterthe close of this PR.

Fix: Attached patch should be applied with following commands:

	% cd /usr/ports/editors/tamago
	% svn move files/post-patch-egg-wnn.el files/patch-egg-wnn.el
	% svn move files/post-patch-egg-wnnrpc.el files/patch-egg-wnnrpc.el
	% svn move files/post-patch-egg.el files/patch-egg.el
	% svn move files/post-patch-menudiag.el files/patch-menudiag.el
	% svn patch /somewhere/saved/dir/patch-tamago
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2013-03-30 09:30:08 UTC
Responsible Changed
From-To: freebsd-ports-bugs->hrs

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 dfilter service freebsd_committer freebsd_triage 2013-04-15 13:14:15 UTC
Author: hrs
Date: Mon Apr 15 12:14:06 2013
New Revision: 315801
URL: http://svnweb.freebsd.org/changeset/ports/315801

Log:
  - Rename obsolete symbol (s/last-command-char/last-command-event/) which
    prevents it from working with Emacs 24.3.
  - Minor style fixes.
  
  Submitted by:	Yasuhiro KIMURA
  PR:		ports/177498
  Approved by:	portmgr (bdrewery)

Added:
  head/editors/tamago/files/patch-egg-wnn.el
     - copied unchanged from r313372, head/editors/tamago/files/post-patch-egg-wnn.el
  head/editors/tamago/files/patch-egg-wnnrpc.el
     - copied unchanged from r313372, head/editors/tamago/files/post-patch-egg-wnnrpc.el
  head/editors/tamago/files/patch-egg.el
     - copied, changed from r313372, head/editors/tamago/files/post-patch-egg.el
  head/editors/tamago/files/patch-its.el   (contents, props changed)
  head/editors/tamago/files/patch-menudiag.el
     - copied, changed from r313372, head/editors/tamago/files/post-patch-menudiag.el
Deleted:
  head/editors/tamago/files/post-patch-egg-wnn.el
  head/editors/tamago/files/post-patch-egg-wnnrpc.el
  head/editors/tamago/files/post-patch-egg.el
  head/editors/tamago/files/post-patch-menudiag.el
Modified:
  head/editors/tamago/Makefile

Modified: head/editors/tamago/Makefile
==============================================================================
--- head/editors/tamago/Makefile	Mon Apr 15 12:04:32 2013	(r315800)
+++ head/editors/tamago/Makefile	Mon Apr 15 12:14:06 2013	(r315801)
@@ -3,7 +3,7 @@
 
 PORTNAME=	tamago
 PORTVERSION=	4.0.6.0.20041122.19
-PORTREVISION=	3
+PORTREVISION=	4
 CATEGORIES=	editors elisp
 MASTER_SITES=	${MASTER_SITE_DEBIAN}
 MASTER_SITE_SUBDIR=	pool/main/e/egg
@@ -29,8 +29,7 @@ PLIST_SUB=	ELISPDIR="${EMACS_LIBDIR_WITH
 PORTDOCS=	AUTHORS ChangeLog ChangeLog.1997-1998 \
 		ChangeLog.2000-2001 PROBLEMS README.ja.txt TODO \
 		README.Debian changelog.Debian
-
-POSTPATCHES=	${FILESDIR}/post-patch-*
+OPTIONS_DEFINE=	DOCS
 
 .include <bsd.port.pre.mk>
 
@@ -44,9 +43,6 @@ pre-configure:
 	@${REINPLACE_CMD} -e 's|emacs/site-lisp|${EMACS_NAME}/${EMACS_VER}/site-lisp|g' \
 	    ${WRKSRC}/configure
 
-post-patch:
-	cd ${PATCH_WRKSRC} && ${CAT} ${POSTPATCHES} | ${PATCH}
-
 post-build:
 	cd ${WRKSRC}/helper && ${MAKE} egg-helper
 	${INSTALL_DATA} ${WRKSRC}/debian/changelog ${WRKSRC}/changelog.Debian

Copied: head/editors/tamago/files/patch-egg-wnn.el (from r313372, head/editors/tamago/files/post-patch-egg-wnn.el)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/editors/tamago/files/patch-egg-wnn.el	Mon Apr 15 12:14:06 2013	(r315801, copy of r313372, head/editors/tamago/files/post-patch-egg-wnn.el)
@@ -0,0 +1,145 @@
+--- egg/wnn.el.2	2010-03-02 10:35:45.000000000 +0900
++++ egg/wnn.el	2010-03-02 11:54:30.000000000 +0900
+@@ -82,6 +82,10 @@
+ 			     (const wnn-uniq)
+ 			     (const wnn-uniq-kanji)))
+ 
++(defcustom egg-wnn-helper-path "egg-helper"
++  "path of wnn unix domain connection helper program"
++  :group 'wnn :type 'file)
++
+ (defcustom wnn-jserver nil
+   "jserver hostname list.  Use N-th port, if hostname is followed
+ by ':' and digit N."
+@@ -99,11 +103,21 @@
+  by ':' and digit N."
+   :group 'wnn :type '(repeat string))
+ 
++(setq wnn-jserverenv "JSERVER")
++(setq wnn-cserverenv "CSERVER")
++(setq wnn-tserverenv "TSERVER")
++(setq wnn-kserverenv "KSERVER")
++
+ (defcustom wnn-jport 22273 "jserver port number" :group 'wnn :type 'integer)
+ (defcustom wnn-cport 22289 "cserver port number" :group 'wnn :type 'integer)
+ (defcustom wnn-tport 22321 "tserver port number" :group 'wnn :type 'integer)
+ (defcustom wnn-kport 22305 "kserver port number" :group 'wnn :type 'integer)
+ 
++(defcustom wnn-judpath "/tmp/jd_sockV4" "jserver unix domain socket name" :group 'wnn :type 'string)
++(defcustom wnn-cudpath "/tmp/cd_sockV4" "cserver unix domain socket name" :group 'wnn :type 'string)
++(defcustom wnn-tudpath "/tmp/td_sockV4" "tserver unix domain socket name" :group 'wnn :type 'string)
++(defcustom wnn-kudpath "/tmp/kd_sockV4" "kserver unix domain socket name" :group 'wnn :type 'string)
++
+ (defmacro wnn-backend-plist ()
+   ''(egg-initialize-backend        wnn-init
+      egg-start-conversion          wnn-start-conversion
+@@ -559,11 +573,11 @@
+ 	  bunsetsu))
+ 
+ (defvar wnn-server-info-list
+-  ;; language    server  port      hostname    proc   coding-system
+-  '((Japanese    jserver wnn-jport wnn-jserver "Wnn"  (fixed-euc-jp    fixed-euc-jp))
+-    (Chinese-GB  cserver wnn-cport wnn-cserver "cWnn" (fixed-euc-py-cn fixed-euc-zy-cn))
+-    (Chinese-CNS tserver wnn-tport wnn-tserver "tWnn" (fixed-euc-py-tw fixed-euc-zy-tw))
+-    (Korean      kserver wnn-kport wnn-kserver "kWnn" (fixed-euc-kr    fixed-euc-kr))))
++  ;; language    server  port      hostname    unixdomain  serverenv      proc   coding-system
++  '((Japanese    jserver wnn-jport wnn-jserver wnn-judpath wnn-jserverenv "Wnn"  (fixed-euc-jp    fixed-euc-jp))
++    (Chinese-GB  cserver wnn-cport wnn-cserver wnn-cudpath wnn-cserverenv "cWnn" (fixed-euc-py-cn fixed-euc-zy-cn))
++    (Chinese-CNS tserver wnn-tport wnn-tserver wnn-tudpath wnn-tserverenv "tWnn" (fixed-euc-py-tw fixed-euc-zy-tw))
++    (Korean      kserver wnn-kport wnn-kserver wnn-kudpath wnn-kserverenv "kWnn" (fixed-euc-kr    fixed-euc-kr))))
+ 
+ (defsubst wnn-server-get-info (lang)
+   (or (assq lang wnn-server-info-list)
+@@ -577,12 +591,16 @@
+   (symbol-value (nth 2 info)))
+ (defsubst wnn-server-hostname (info)
+   (symbol-value (nth 3 info)))
++(defsubst wnn-server-udpath-name (info)
++  (symbol-value (nth 4 info)))
++(defsubst wnn-server-env-name (info)
++  (symbol-value (nth 5 info)))
+ (defsubst wnn-server-proc-name (info)
+-  (nth 4 info))
++  (nth 6 info))
+ (defsubst wnn-server-buffer-name (info)
+   (concat " *" (wnn-server-proc-name info) "*"))
+ (defsubst wnn-server-coding-system (info)
+-  (nth 5 info))
++  (nth 7 info))
+ 
+ (defconst wnn-accept-charset-alist
+   '((Chinese-CNS ascii chinese-sisheng chinese-cns11643-1 chinese-cns11643-2)))
+@@ -1209,9 +1227,11 @@
+ 	(port (wnn-server-port server-info))
+ 	(hostname-list (wnn-server-hostname server-info))
+ 	(proc-name (wnn-server-proc-name server-info))
++	(udpath (wnn-server-udpath-name server-info))
++	(serverenv (wnn-server-env-name server-info))
+ 	(msg-form "Wnn: connecting to %S at %s...")
+ 	(user-name (user-login-name))
+-	buf hostname myname port-off proc result msg)
++	buf hostname port-off proc result msg)
+     (unwind-protect
+ 	(progn
+ 	  (setq buf (generate-new-buffer (wnn-server-buffer-name server-info)))
+@@ -1225,13 +1245,24 @@
+ 	      (setq hostname-list (list hostname-list)))
+ 	  (while (and hostname-list (null proc))
+ 	    (setq hostname (or (car hostname-list) "")
+-		  hostname-list (cdr hostname-list)
+-		  myname (if (equal hostname "") "unix" wnn-system-name))
+-	    (if (null (string-match ":" hostname))
+-		(setq port-off 0)
+-	      (setq port-off (string-to-int (substring hostname (match-end 0)))
+-		    hostname (substring hostname 0 (match-beginning 0))))
+-	    (and (equal hostname "") (setq hostname "localhost"))
++		hostname-list (cdr hostname-list))
++	    (if (or (and (getenv serverenv)
++			 (string-match "^unix$" (getenv serverenv)))
++		    (and (null (getenv serverenv))
++			 (or (equal hostname "")
++			     (string-match "^unix$" hostname))))
++		(progn
++		  (setq hostname "unix"
++			family 'local
++			port udpath))
++	       (progn
++		(setq hostname (or (getenv serverenv) hostname "localhost"))
++		(if (null (string-match ":" hostname))
++		    (setq port-off 0)
++		  (setq port-off (string-to-number (substring hostname (match-end 0)))
++			hostname (substring hostname 0 (match-beginning 0))))
++		(setq family nil)))
++	    (setq host hostname)
+ 	    (let ((inhibit-quit save-inhibit-quit))
+ 	      (if (and msg
+ 		       (null (y-or-n-p (format "%s failed. Try to %s? "
+@@ -1241,16 +1272,22 @@
+ 			      server-type hostname))
+ 	    (message "%s" msg)
+ 	    (let ((inhibit-quit save-inhibit-quit))
+-	      (condition-case nil
+-		  (setq proc (open-network-stream proc-name buf hostname
+-						  (+ port port-off)))
+-		((error quit))))
+-	    (when proc
++             (if (fboundp 'make-network-process)
++                 (condition-case nil
++                     (setq proc (make-network-process :name proc-name :buffer buf :host host :service port :family family))
++                   ((error quit)))
++               (if (string-match "^unix$" hostname)
++                   (let ((process-connection-type nil))
++                     (setq proc (start-process proc-name buf egg-wnn-helper-path port)))
++                 (condition-case nil
++                     (setq proc (open-network-stream proc-name buf hostname port))
++                   (error quit)))))
++           (when (processp proc)
+ 	      (process-kill-without-query proc)
+ 	      (set-process-coding-system proc 'binary 'binary)
+ 	      (set-process-sentinel proc 'wnn-comm-sentinel)
+ 	      (set-marker-insertion-type (process-mark proc) t)
+-	      (setq result (wnnrpc-open proc myname user-name))
++	      (setq result (wnnrpc-open proc host user-name))
+ 	      (when (numberp result)
+ 		(delete-process proc)
+ 		(setq proc nil))))

Copied: head/editors/tamago/files/patch-egg-wnnrpc.el (from r313372, head/editors/tamago/files/post-patch-egg-wnnrpc.el)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/editors/tamago/files/patch-egg-wnnrpc.el	Mon Apr 15 12:14:06 2013	(r315801, copy of r313372, head/editors/tamago/files/post-patch-egg-wnnrpc.el)
@@ -0,0 +1,19 @@
+--- egg/wnnrpc.el.2	2010-03-02 10:34:18.000000000 +0900
++++ egg/wnnrpc.el	2010-03-02 10:34:42.000000000 +0900
+@@ -714,8 +714,14 @@
+      ,send-expr ,@rcv-exprs))
+ 
+ (defmacro wnnrpc-get-result (&rest body)
+-  `(let (result)
+-     (comm-unpack (i) result)
++  `(let (result resulth)
++     (comm-unpack (w w) resulth result)
++     (cond ((and (= result 65535) (= resulth 65535))
++           (setq result -1))
++          ((= resulth (lsh (lsh resulth 16) -16))
++           (setq result (+ (lsh resulth 16) result)))
++          (t
++           (error "overflow")))
+      (if (< result 0)
+        (progn
+ 	 (comm-unpack (i) result)

Copied and modified: head/editors/tamago/files/patch-egg.el (from r313372, head/editors/tamago/files/post-patch-egg.el)
==============================================================================
--- head/editors/tamago/files/post-patch-egg.el	Sun Mar  3 18:12:06 2013	(r313372, copy source)
+++ head/editors/tamago/files/patch-egg.el	Mon Apr 15 12:14:06 2013	(r315801)
@@ -1,5 +1,5 @@
---- egg.el.orig	2012-08-04 09:27:19.000000000 +0900
-+++ egg.el	2012-08-04 09:32:15.000000000 +0900
+--- egg.el.orig	2013-03-30 17:08:47.000000000 +0900
++++ egg.el	2013-03-30 17:11:22.000000000 +0900
 @@ -169,7 +169,8 @@
        (setq egg-modeless-mode t))
      (setq inactivate-current-input-method-function 'egg-mode)
@@ -10,3 +10,12 @@
      (add-hook 'input-method-activate-hook 'its-set-mode-line-title nil t)
      (if (eq (selected-window) (minibuffer-window))
  	(add-hook 'minibuffer-exit-hook 'egg-exit-from-minibuffer))
+@@ -184,7 +185,7 @@
+ 
+ (defun egg-self-insert-char ()
+   (interactive)
+-  (its-start last-command-char (and (eq last-command 'egg-use-context)
++  (its-start last-command-event (and (eq last-command 'egg-use-context)
+ 				    egg-context)))
+ 
+ (defun egg-remove-all-text-properties (from to &optional object)

Added: head/editors/tamago/files/patch-its.el
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/editors/tamago/files/patch-its.el	Mon Apr 15 12:14:06 2013	(r315801)
@@ -0,0 +1,20 @@
+--- its.el.orig	2002-08-02 12:07:34.000000000 +0900
++++ its.el	2013-03-30 17:11:53.000000000 +0900
+@@ -397,7 +397,7 @@
+ (defun its-self-insert-char ()
+   (interactive)
+   (let ((inhibit-read-only t)
+-	(key last-command-char)
++	(key last-command-event)
+ 	(cursor (get-text-property (point) 'its-cursor))
+ 	(syl (get-text-property (1- (point)) 'its-syl)))
+     (cond
+@@ -1264,7 +1264,7 @@
+   (interactive "P")
+   (let ((syl (and (null (get-text-property (point) 'its-cursor))
+ 		  (get-text-property (1- (point)) 'its-syl))))
+-    (if (its-keyseq-acceptable-p (vector last-command-char) syl)
++    (if (its-keyseq-acceptable-p (vector last-command-event) syl)
+ 	(its-self-insert-char)
+       (its-kick-convert-region n))))
+

Copied and modified: head/editors/tamago/files/patch-menudiag.el (from r313372, head/editors/tamago/files/post-patch-menudiag.el)
==============================================================================
--- head/editors/tamago/files/post-patch-menudiag.el	Sun Mar  3 18:12:06 2013	(r313372, copy source)
+++ head/editors/tamago/files/patch-menudiag.el	Mon Apr 15 12:14:06 2013	(r315801)
@@ -1,5 +1,14 @@
 --- menudiag.el.orig	2001-01-28 03:53:13.000000000 +0900
-+++ menudiag.el	2012-08-04 09:32:34.000000000 +0900
++++ menudiag.el	2013-03-30 17:12:23.000000000 +0900
+@@ -296,7 +296,7 @@
+ (defun menudiag-goto-item ()
+   (interactive)
+   (menudiag-check-current-menu)
+-  (let ((ch last-command-char)
++  (let ((ch last-command-event)
+ 	(n 0))
+     (setq n (menudiag-char-to-item-num ch))
+     (if (>= n (length menudiag-line))
 @@ -503,7 +503,8 @@
    (make-local-variable 'inhibit-read-only)
    (setq buffer-read-only t
@@ -10,3 +19,12 @@
    (add-hook 'post-command-hook 'menudiag-selection-align-to-item nil t)
    (use-local-map menudiag-selection-map)
    (setq mode-name "Menudiag Selection")
+@@ -619,7 +620,7 @@
+   (unless (eq last-command 'menudiag-selection-goto)
+     (setq menudiag-goto-number-list nil
+ 	  menudiag-original-point (point)))
+-  (setq menudiag-goto-number-list (cons (- last-command-char ?0)
++  (setq menudiag-goto-number-list (cons (- last-command-event ?0)
+ 					menudiag-goto-number-list))
+   (menudiag-selection-goto-internal))
+ 
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 3 Hiroki Sato freebsd_committer freebsd_triage 2013-04-15 15:57:43 UTC
State Changed
From-To: open->closed

Committed, thanks!