summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Elias Pipping <pipping@exherbo.org> 2014-01-05 02:26:52 +0100
committerAvatar Elias Pipping <pipping@exherbo.org> 2014-01-05 14:11:28 +0100
commita32911dbee5da3a0ec303b1c87450d47e1069ace (patch)
treec167462b194cecacd85fbe40a3f693c1f0f36621
parent48b4b5287ec4e2901905397f8194ec95e6ac37bb (diff)
downloademacs-a32911dbee5da3a0ec303b1c87450d47e1069ace.tar.gz
emacs-a32911dbee5da3a0ec303b1c87450d47e1069ace.tar.xz
slime: Moved to github, Fix version detection
-rw-r--r--packages/app-emacs/slime/files/slime-changelog.patch56
-rw-r--r--packages/app-emacs/slime/slime-scm.exheres-04
-rw-r--r--packages/app-emacs/slime/slime.exlib19
3 files changed, 67 insertions, 12 deletions
diff --git a/packages/app-emacs/slime/files/slime-changelog.patch b/packages/app-emacs/slime/files/slime-changelog.patch
new file mode 100644
index 0000000..2ec46a9
--- /dev/null
+++ b/packages/app-emacs/slime/files/slime-changelog.patch
@@ -0,0 +1,56 @@
+Source: Elias Pipping <pipping@exherbo.org>
+Upstream: no
+Reason: We install the changelog to /usr/share/doc
+
+---
+ slime.el | 4 +++-
+ swank-loader.lisp | 4 +++-
+ 2 files changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/slime.el b/slime.el
+index d70ecde..2fe0b82 100644
+--- a/slime.el
++++ b/slime.el
+@@ -89,6 +89,8 @@ This is used to load the supporting Common Lisp library, Swank.
+ The default value is automatically computed from the location of the
+ Emacs Lisp package."))
+
++(defvar slime-changelog-directory "SLIME_CHANGELOG_DIRECTORY")
++
+ (defvar slime-lisp-modes '(lisp-mode))
+ (defvar slime-setup-contribs nil)
+
+@@ -120,7 +122,7 @@ CONTRIBS is a list of contrib packages to load."
+ "Return the datestring of the latest entry in the ChangeLog file.
+ Return nil if the ChangeLog file cannot be found."
+ (interactive "p")
+- (let ((changelog (expand-file-name "ChangeLog" slime-path))
++ (let ((changelog (expand-file-name "ChangeLog" slime-changelog-directory))
+ (date nil))
+ (when (file-exists-p changelog)
+ (with-temp-buffer
+diff --git a/swank-loader.lisp b/swank-loader.lisp
+index ccfe416..44e6034 100644
+--- a/swank-loader.lisp
++++ b/swank-loader.lisp
+@@ -26,6 +26,8 @@
+
+ (cl:in-package :swank-loader)
+
++(defvar *slime-changelog-directory* "SLIME_CHANGELOG_DIRECTORY")
++
+ (defvar *source-directory*
+ (make-pathname :name nil :type nil
+ :defaults (or *load-pathname* *default-pathname-defaults*))
+@@ -123,7 +125,7 @@ operating system, and hardware architecture."
+ (defun slime-version-string ()
+ "Return a string identifying the SLIME version.
+ Return nil if nothing appropriate is available."
+- (with-open-file (s (merge-pathnames "ChangeLog" *source-directory*)
++ (with-open-file (s (merge-pathnames "ChangeLog" *slime-changelog-directory*)
+ :if-does-not-exist nil)
+ (and s (symbol-name (read s)))))
+
+--
+1.8.5.2
+
diff --git a/packages/app-emacs/slime/slime-scm.exheres-0 b/packages/app-emacs/slime/slime-scm.exheres-0
index 434571e..81991c3 100644
--- a/packages/app-emacs/slime/slime-scm.exheres-0
+++ b/packages/app-emacs/slime/slime-scm.exheres-0
@@ -1,9 +1,7 @@
# Copyright 2009 Elias Pipping <elias@pipping.org>
# Distributed under the terms of the GNU General Public License v2
-SCM_REPOSITORY="git://common-lisp.net/projects/mirror/slime.git"
-
-require scm-git slime
+require github slime
PLATFORMS="~amd64"
diff --git a/packages/app-emacs/slime/slime.exlib b/packages/app-emacs/slime/slime.exlib
index 8e97939..dbc987f 100644
--- a/packages/app-emacs/slime/slime.exlib
+++ b/packages/app-emacs/slime/slime.exlib
@@ -24,21 +24,22 @@ DEPENDENCIES="
"
src_prepare() {
+ ## Fix version detection (pt. 1)
+ expatch "${FILES}"/slime-changelog.patch
edo sed \
- -e '/"ChangeLog"/'s:slime-path:\"/usr/share/doc/${PNVR}/\": \
- -i slime.el
-
- # For emacs 24; see http://stackoverflow.com/a/9164713/179927
- edo sed \
- -e '/^;; lexical-binding: t$/s|t$|:nil|' \
- -i slime.el
+ -e s:SLIME_CHANGELOG_DIRECTORY:/usr/share/doc/${PNVR}/: \
+ -i slime.el swank-loader.lisp
}
src_compile() {
- elisp-compile *.el
+ ## Fix version detection (pt. 2)
+ # slime already stores the version at compile-time, before installation. Thus, ./ChangeLog needs
+ # to be read. swank only determines it later, from the docdir.
+ ELISP_COMPILE_FLAGS+=( --eval '(defvar slime-changelog-directory ".")' )
+ elisp-compile !(slime-tests).el
(
edo cd contrib
- ELISP_COMPILE_FLAGS+=( --directory .. --load slime )
+ ELISP_COMPILE_FLAGS+=( --directory .. )
elisp-compile *.el
)
emake -C doc slime.info