summaryrefslogtreecommitdiff
path: root/pcr/emacs-js2-mode
diff options
context:
space:
mode:
Diffstat (limited to 'pcr/emacs-js2-mode')
-rw-r--r--pcr/emacs-js2-mode/PKGBUILD31
-rw-r--r--pcr/emacs-js2-mode/js2-mode-makefile.patch21
2 files changed, 43 insertions, 9 deletions
diff --git a/pcr/emacs-js2-mode/PKGBUILD b/pcr/emacs-js2-mode/PKGBUILD
index bff5e39a1..5e4a234dd 100644
--- a/pcr/emacs-js2-mode/PKGBUILD
+++ b/pcr/emacs-js2-mode/PKGBUILD
@@ -1,24 +1,37 @@
# Contributor (Arch): Hauke Wesselmann <hauke@h-dawg.de>
# Contributor (Arch): xgdgsc <xgdgsc at gmail dot com>
-# Contributor (Arch): Stefan Husmann <stefan-husmann@t-online.de>
-# Maintainer : Parabola GNU / Linux-libre Aurélien DESBRIÈRES <aurelien@hackers.camp>
+# Maintainer (Arch): Stefan Husmann <stefan-husmann@t-online.de>
+# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
pkgname=emacs-js2-mode
-pkgver=20121128
+pkgver=20150909
pkgrel=1
pkgdesc="An improved JavaScript mode for GNU Emacs"
arch=('any')
url="http://code.google.com/p/js2-mode/"
license=('GPL2')
depends=('emacs')
-source=(https://js2-mode.googlecode.com/files/js2-mode.el)
-md5sums=('4635201397803fd4b705b285f77b2321')
+source=("https://github.com/mooz/js2-mode/archive/$pkgver.tar.gz"
+ 'js2-mode-makefile.patch')
+md5sums=('41149d4ec8fa207a4df69d06fb0df54a'
+ '6c6f92086c627103f98e3fd4e4c2a5a7')
+
+prepare() {
+ cd "$srcdir"/${pkgname#emacs-}-$pkgver
+ patch -Np1 -i "${srcdir}/js2-mode-makefile.patch"
+}
build() {
- cd $srcdir
- emacs -batch -q -f batch-byte-compile js2-mode.el
+ cd "$srcdir"/${pkgname#emacs-}-$pkgver
+ make
}
package() {
- install -Dm644 $srcdir/js2-mode.el $pkgdir/usr/share/emacs/site-lisp/js2-mode.el
- install -Dm644 $srcdir/js2-mode.elc $pkgdir/usr/share/emacs/site-lisp/js2-mode.elc
+ cd "$srcdir"/${pkgname#emacs-}-$pkgver
+ install -Dm644 js2-mode.el "$pkgdir"/usr/share/emacs/site-lisp/js2-mode.el
+ install -Dm644 js2-mode.elc "$pkgdir"/usr/share/emacs/site-lisp/js2-mode.elc
+ install -Dm644 js2-old-indent.el "$pkgdir"/usr/share/emacs/site-lisp/js2-old-indent.el
+ install -Dm644 js2-imenu-extras.el \
+ "$pkgdir"/usr/share/emacs/site-lisp/js2-imenu-extras.el
+ install -Dm644 js2-imenu-extras.elc \
+ "$pkgdir"/usr/share/emacs/site-lisp/js2-imenu-extras.elc
}
diff --git a/pcr/emacs-js2-mode/js2-mode-makefile.patch b/pcr/emacs-js2-mode/js2-mode-makefile.patch
new file mode 100644
index 000000000..98fc693a6
--- /dev/null
+++ b/pcr/emacs-js2-mode/js2-mode-makefile.patch
@@ -0,0 +1,21 @@
+--- js2-mode-20150909.orig/Makefile 2015-09-09 13:37:51.000000000 -0500
++++ js2-mode-20150909/Makefile 2016-02-08 02:21:12.128814213 -0500
+@@ -10,17 +10,13 @@
+ OBJS = $(SRCS:.el=.elc)
+
+ %.elc: %.el
+- ${EMACS} $(BATCHFLAGS) -f batch-byte-compile $^
++ ${EMACS} $(BATCHFLAGS) -L . -f batch-byte-compile $^
+
+ all: $(OBJS)
+
+ clean:
+ -rm -f $(OBJS)
+
+-# custom build (require loads)
+-js2-imenu-extras.elc: js2-mode.elc
+- ${EMACS} $(BATCHFLAGS) -l ./js2-mode.elc -f batch-byte-compile $*.el
+-
+ test:
+ ${EMACS} $(BATCHFLAGS) -L . -l js2-mode.el -l js2-old-indent.el -l tests/parser.el\
+ -l tests/indent.el -l tests/externs.el -f ert-run-tests-batch-and-exit