diff options
author | Ulrich Müller <ulm@gentoo.org> | 2016-08-06 14:29:03 +0200 |
---|---|---|
committer | Ulrich Müller <ulm@gentoo.org> | 2016-08-06 14:29:03 +0200 |
commit | b67bfddd4a45e354541854999b63d00f16a66437 (patch) | |
tree | 783711fff4e547be9ef3f516f4f4fcf74f5f2412 | |
parent | dev-perl/DBIx-Class: Remove redundant dep on dev-perl/Test-Pod{,-Coverage} (diff) | |
download | gentoo-b67bfddd4a45e354541854999b63d00f16a66437.tar.gz gentoo-b67bfddd4a45e354541854999b63d00f16a66437.tar.bz2 gentoo-b67bfddd4a45e354541854999b63d00f16a66437.zip |
app-emacs/rudel: Fix compilation with Emacs 25.
Bug: 590340
Package-Manager: portage-2.3.0
-rw-r--r-- | app-emacs/rudel/files/rudel-0.3_pre20110721-emacs25.patch | 341 | ||||
-rw-r--r-- | app-emacs/rudel/rudel-0.3_pre20110721-r1.ebuild | 50 |
2 files changed, 391 insertions, 0 deletions
diff --git a/app-emacs/rudel/files/rudel-0.3_pre20110721-emacs25.patch b/app-emacs/rudel/files/rudel-0.3_pre20110721-emacs25.patch new file mode 100644 index 000000000000..98aa38f370d7 --- /dev/null +++ b/app-emacs/rudel/files/rudel-0.3_pre20110721-emacs25.patch @@ -0,0 +1,341 @@ +Fix byte-compilation with Emacs 25. +https://bugs.gentoo.org/590340 + +This comprises parts of the following commits from ELPA: + +commit 9ec4b84e27f3faae8ad3eb5d3e96c523ce1fece2 +Author: Stefan Monnier <monnier@iro.umontreal.ca> +Date: Sun Jul 10 18:16:39 2016 -0400 + + * rudel-backend.el: Try and fix compilation problem + +commit 5e4f147f6b23c392505cb0cbb5f13384d6d96304 +Author: Stefan Monnier <monnier@iro.umontreal.ca> +Date: Mon May 12 02:23:00 2014 -0400 + + Fix up headers and compilation + +--- rudel-orig/rudel-backend.el ++++ rudel/rudel-backend.el +@@ -46,8 +46,7 @@ + ;;; Code: + ;; + +-(eval-when-compile +- (require 'cl)) ++(require 'cl) + + (require 'warnings) + +@@ -97,24 +96,34 @@ + "Factory class that holds an object for each known backend + category. Objects manage backend implementation for one backend + category each.") +-(oset-default rudel-backend-factory factories ++(oset-default 'rudel-backend-factory factories + (make-hash-table :test #'eq)) + +-(defmethod initialize-instance ((this rudel-backend-factory) &rest slots) ++(defmethod initialize-instance ((this rudel-backend-factory) &rest _slots) + "Initialize slots of THIS with SLOTS." + (when (next-method-p) + (call-next-method)) +- (oset this :backends (make-hash-table :test #'eq))) ++ (oset this backends (make-hash-table :test #'eq))) ++ ++;;;###autoload ++(progn ++(defmacro rudel--with-memoization (place &rest code) ++ (declare (indent 1) (debug t)) ++ (gv-letplace (getter setter) place ++ `(or ,getter ++ ,(macroexp-let2 nil val (macroexp-progn code) ++ `(progn ++ ,(funcall setter val) ++ ,val)))))) + + ;;;###autoload + (defmethod rudel-get-factory :static ((this rudel-backend-factory) + category) + "Return the factory responsible for CATEGORY. + If there is no responsible factory, create one and return it." +- (with-slots (factories) this +- (or (gethash category factories) +- (puthash category (rudel-backend-factory category) factories))) +- ) ++ (rudel--with-memoization ++ (gethash category (eieio-oref-default this 'factories)) ++ (make-instance 'rudel-backend-factory))) ;; category + + ;;;###autoload + (defmethod rudel-add-backend ((this rudel-backend-factory) +@@ -188,7 +197,8 @@ + (unless (object-p class) + (condition-case error + (puthash name (make-instance +- class (symbol-name name)) backends) ++ class (symbol-name name)) ++ backends) + (error + ;; Store this error on the name symbol of the backend for + ;; later display. +@@ -224,7 +234,7 @@ + ;;;###autoload + (defun rudel-backend-get-factory (category) + "A shortcut for getting the factory object for CATEGORY." +- (rudel-get-factory rudel-backend-factory category)) ++ (rudel-get-factory 'rudel-backend-factory category)) + + (defun rudel-backend-suitable-backends (category predicate) + "Return backends from category CATEGORY that satisfy PREDICATE. +@@ -290,15 +300,15 @@ + + ;; Insert all backends provided by this factory. + (dolist (backend (rudel-all-backends factory)) +- (if (or (object-p (cdr backend)) +- (null (get (car backend) +- 'rudel-backend-last-load-error))) +- (insert (rudel-backend--format-backend-normal backend)) +- (insert (rudel-backend--format-backend-error backend)))) ++ (insert (if (or (object-p (cdr backend)) ++ (null (get (car backend) ++ 'rudel-backend-last-load-error))) ++ (rudel-backend--format-backend-normal backend) ++ (rudel-backend--format-backend-error backend)))) + + ;; One empty line between backend categories. + (insert "\n")) +- (oref rudel-backend-factory factories)) ++ (oref-default 'rudel-backend-factory factories)) + (current-buffer)) + + (defun rudel-backend--format-backend-normal (backend) +@@ -316,7 +326,7 @@ + (propertize + (if (object-p (cdr backend)) + (mapconcat #'prin1-to-string +- (oref (cdr backend) :version) ++ (oref (cdr backend) version) + ".") + "?") + 'face 'font-lock-constant-face) +@@ -324,7 +334,7 @@ + (propertize + (if (object-p (cdr backend)) + (mapconcat #'prin1-to-string +- (oref (cdr backend) :capabilities) ++ (oref (cdr backend) capabilities) + " ") + "?") + 'face 'font-lock-constant-face)) +--- rudel-orig/rudel-color.el ++++ rudel/rudel-color.el +@@ -46,6 +46,7 @@ + ;;; Code: + ;; + ++(eval-when-compile (require 'cl)) + + ;;; RGV <-> HSV conversion + ;; +--- rudel-orig/rudel.el ++++ rudel/rudel.el +@@ -41,8 +41,7 @@ + ;;; Code: + ;; + +-(eval-when-compile +- (require 'cl)) ++(require 'cl) + + (require 'eieio) + (require 'eieio-base) +--- rudel-orig/rudel-icons.el ++++ rudel/rudel-icons.el +@@ -41,8 +41,9 @@ + ;;; Image constants + ;; + ++(eval-and-compile + (defconst rudel-icons-image-formats '(svg png) +- "Image formats to try (in that order) when loading Rudel icons.") ++ "Image formats to try (in that order) when loading Rudel icons.")) + + (defvar rudel-icons-directory + (file-name-as-directory +--- rudel-orig/rudel-interactive.el ++++ rudel/rudel-interactive.el +@@ -38,6 +38,7 @@ + + ;;; Code: + ;; ++(require 'cl) + + (require 'rudel-compat) ;; for `read-color' replacement + (require 'rudel-backend) ;; for `rudel-backend-cons-p' +@@ -80,25 +81,29 @@ + (setq prompt "Session: ")) + ;; For presentation and identification of sessions, use the :name + ;; property. +- (flet ((to-string (session) +- (if (rudel-backend-cons-p session) +- (symbol-name (car session)) +- (plist-get session :name)))) ++ (let ((to-string ++ (lambda (session) ++ (if (rudel-backend-cons-p session) ++ (symbol-name (car session)) ++ (plist-get session :name))))) + ;; Read a session by name, then return that name or the + ;; corresponding session info. + (let ((session-name (completing-read prompt +- (mapcar #'to-string sessions) ++ (mapcar to-string sessions) + nil t))) + (cond + ((eq return 'object) + (find session-name sessions +- :key #'to-string :test #'string=)) ++ :key to-string :test #'string=)) + (t session-name)))) + ) + + (defvar rudel-read-user-name-history nil + "History of inputs read by `rudel-read-user-name'.") + ++(defvar rudel-default-username) ++(defvar rudel-current-session) ++ + (defun rudel-read-user-name () + "Read a username. + The default is taken from `rudel-default-username'." +--- rudel-orig/rudel-mode.el ++++ rudel/rudel-mode.el +@@ -48,6 +48,7 @@ + ;;; Code: + ;; + ++(require 'cl) + (require 'easy-mmode) + (require 'easymenu) + +@@ -132,6 +133,8 @@ + (rudel-buffer-document)))) + (force-mode-line-update)) + ++(defvar rudel-header-subscriptions-minor-mode) ++ + (defun rudel-header-subscriptions--options-changed () + "Update headers in buffers that have header subscriptions mode enabled." + (dolist (buffer (buffer-list)) +@@ -228,8 +231,7 @@ + #'rudel-header-subscriptions--remove-user)) + + ;; Reset header line to default format. +- (setq header-line-format default-header-line-format) +- (force-mode-line-update)) ;; TODO remove all handlers ++ (kill-local-variable 'header-line-format)) ;; TODO remove all handlers + + ;; No buffer document + (t +@@ -237,8 +239,7 @@ + (setq rudel-header-subscriptions-minor-mode nil) + + ;; Reset header line to default format. +- (setq header-line-format default-header-line-format) +- (force-mode-line-update))) ++ (kill-local-variable 'header-line-format))) + ) + + +@@ -411,6 +412,8 @@ + (force-mode-line-update) + ) + ++(defvar rudel-mode-line-publish-state-minor-mode) ++ + (defun rudel-mode-line-publish-state--document-attach (document buffer) + "Handle attaching of DOCUMENT to BUFFER. + When `rudel-mode-line-publish-state-minor-mode' is enabled in +--- rudel-orig/rudel-overlay.el ++++ rudel/rudel-overlay.el +@@ -36,8 +36,7 @@ + + (require 'custom) + +-(eval-when-compile +- (require 'cl)) ++(require 'cl) + + (require 'eieio) + +--- rudel-orig/rudel-session-initiation.el ++++ rudel/rudel-session-initiation.el +@@ -54,8 +54,7 @@ + ;;; Code: + ;; + +-(eval-when-compile +- (require 'cl)) ++(require 'cl) + + (require 'eieio) + +--- rudel-orig/rudel-speedbar.el ++++ rudel/rudel-speedbar.el +@@ -77,6 +77,8 @@ + '([ "Subscribe" #'ignore t]) + "Menu part in easymenu format used in speedbar while browsing objects.") + ++(defvar rudel-current-session) ++ + (defun rudel-speedbar-toplevel-buttons (dir) + "Return a list of objects to display in speedbar. + Argument DIR is the directory from which to derive the list of objects." +--- rudel-orig/rudel-state-machine.el ++++ rudel/rudel-state-machine.el +@@ -41,8 +41,7 @@ + ;;; Code: + ;; + +-(eval-when-compile +- (require 'cl)) ++(require 'cl) + + (require 'eieio) + +--- rudel-orig/rudel-transport-util.el ++++ rudel/rudel-transport-util.el +@@ -48,7 +48,10 @@ + + ;;; Code: + ;; + ++(eval-when-compile (require 'cl)) ++(require 'eieio) ++(eval-when-compile (require 'rudel-util)) + (require 'rudel-errors) ;; for `rudel-error' + (require 'rudel-transport) + +--- rudel-orig/rudel-util.el ++++ rudel/rudel-util.el +@@ -43,8 +43,7 @@ + ;;; Code: + ;; + +-(eval-when-compile +- (require 'cl)) ++(require 'cl) + + (require 'eieio) + +--- rudel-orig/rudel-xml.el ++++ rudel/rudel-xml.el +@@ -45,6 +45,7 @@ + ;;; Code: + ;; + ++(eval-when-compile (require 'cl)) + (require 'xml) + + diff --git a/app-emacs/rudel/rudel-0.3_pre20110721-r1.ebuild b/app-emacs/rudel/rudel-0.3_pre20110721-r1.ebuild new file mode 100644 index 000000000000..07b7c39be81e --- /dev/null +++ b/app-emacs/rudel/rudel-0.3_pre20110721-r1.ebuild @@ -0,0 +1,50 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 +NEED_EMACS=24 + +inherit readme.gentoo-r1 elisp + +DESCRIPTION="Collaborative editing environment for GNU Emacs" +HOMEPAGE="http://rudel.sourceforge.net/ + http://www.emacswiki.org/emacs/Rudel" +# snapshot of bzr://rudel.bzr.sourceforge.net/bzrroot/rudel/trunk +SRC_URI="https://dev.gentoo.org/~ulm/distfiles/${P}.tar.xz" + +LICENSE="GPL-3+" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +S="${WORKDIR}/${PN}" +ELISP_PATCHES="${P}-emacs25.patch" +SITEFILE="60${PN}-gentoo.el" + +src_compile() { + ${EMACS} ${EMACSFLAGS} -l rudel-compile.el || die +} + +src_install() { + local dir + + for dir in . adopted infinote jupiter obby socket telepathy tls \ + xmpp zeroconf + do + insinto "${SITELISP}/${PN}/${dir}" + doins ${dir}/*.{el,elc} + done + + elisp-site-file-install "${FILESDIR}/${SITEFILE}" + + insinto "${SITEETC}/${PN}" + doins -r icons + + dodoc README INSTALL ChangeLog TODO doc/card.pdf + + DOC_CONTENTS="Connections to Gobby servers require the gnutls-cli program + (net-libs/gnutls). + \\n\\nThe Avahi daemon (net-dns/avahi) is required for automatic + session discovery and advertising." + readme.gentoo_create_doc +} |