diff options
Diffstat (limited to 'emacs-git')
-rw-r--r-- | emacs-git/PKGBUILD | 79 | ||||
-rw-r--r-- | emacs-git/docstrings2.patch | 70 | ||||
-rw-r--r-- | emacs-git/emacs-git.install | 32 |
3 files changed, 181 insertions, 0 deletions
diff --git a/emacs-git/PKGBUILD b/emacs-git/PKGBUILD new file mode 100644 index 0000000..b0d39ae --- /dev/null +++ b/emacs-git/PKGBUILD @@ -0,0 +1,79 @@ +# Maintainer: Neil Santos <nsantos16+aur@gmail.com> + +# Emacs is leaking like a sieve on my box with the default values; +# this should be the number of bytes Emacs should allocate for pure +# storage (see Elisp manual). Default as of writing this is 1.62 megs +# (not the final value; there are still calculations done on it). +_opt_puresize="1820000" + +pkgname=emacs-git +pkgver=20141016 +pkgrel=1 +pkgdesc='The extensible, customizable, self-documenting real-time display editor from its official Git repository' +arch=('i686' 'x86_64') +url='http://www.gnu.org/software/emacs/' +license=('GPL3') +depends=('dbus-core' 'desktop-file-utils' 'libpng' 'libtiff' 'librsvg' + 'giflib' 'libxaw' 'libxpm' 'libjpeg>=7' 'hicolor-icon-theme' + 'imagemagick' 'libotf' 'm17n-lib') +makedepends=('git' 'pkgconfig' 'texinfo') +provides=("emacs=$pkgver") +conflicts=('emacs' 'emacs-nox' 'emacs-otf' 'emacs-cvs' 'emacs-bzr') +install=$pkgname.install +source=("git+http://git.savannah.gnu.org/r/emacs.git" + 'docstrings2.patch') + +_mandir=/usr/share/man + +pkgver() { + cd "$srcdir"/"$_name" + git log -1 --pretty=format:"%cd" --date=short | sed s/-//g +} + +build() { + cd "$srcdir"/emacs + msg "Adjusting BASE_PURESIZE to avoid possible leaks" + sed -i -e "s/\(define BASE_PURESIZE\s*(*\)[0-9]*/\1${_opt_puresize}/" \ + src/puresize.h + + export LDFLAGS="`pkg-config --libs MagickWand`" + + ./autogen.sh || return 1 + ac_cv_lib_gif_EGifPutExtensionLast=yes ./configure --prefix=/usr \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --libexecdir=/usr/lib \ + --mandir=${_mandir} \ + --without-sound \ + --with-xft \ + --without-gif \ + --without-gconf \ + --without-gsettings \ + --with-x-toolkit=lucid || return 1 + patch -p0 -i "$srcdir"/docstrings2.patch || return 1 + make bootstrap +} + +package() { + cd "$srcdir"/emacs + make DESTDIR=${pkgdir} install + + msg "Cleaning up..." + mv $pkgdir/usr/bin/{ctags,ctags.emacs} + mv $pkgdir/usr/bin/{etags,etags.emacs} + mv $pkgdir${_mandir}/man1/{etags.1,etags.emacs.1}.gz + mv $pkgdir${_mandir}/man1/{ctags.1,ctags.emacs.1}.gz + + # This is mostly superfluous, and conflicts with texinfo + rm $pkgdir/usr/share/info/info.info.gz + rm $pkgdir/usr/share/info/dir + + find $pkgdir/usr/share/emacs -type d -exec chmod 755 {} \; + find $pkgdir/usr/share/emacs -exec chown root.root {} \; + chmod 775 $pkgdir/var/games + chmod 775 $pkgdir/var/games/emacs + chmod 664 $pkgdir/var/games/emacs/* + chown -R root:50 $pkgdir/var/games +} +md5sums=('SKIP' + '3a868e5b80d5912ded06e6bdc040208a') diff --git a/emacs-git/docstrings2.patch b/emacs-git/docstrings2.patch new file mode 100644 index 0000000..5356521 --- /dev/null +++ b/emacs-git/docstrings2.patch @@ -0,0 +1,70 @@ +# Bazaar merge directive format 2 (Bazaar 0.90) +# revision_id: tom@ryuslash.org-20130202085403-n4iv0tg5xh4dwbnm +# target_branch: bzr://bzr.savannah.gnu.org/emacs/trunk/ +# testament_sha1: dca687d2bd301e20ea2dafb8af371ca897851137 +# timestamp: 2013-02-02 09:54:17 +0100 +# base_revision_id: rgm@gnu.org-20121227082108-3z2ppeegxrhychws +# +# Begin patch +=== modified file 'lisp/progmodes/python.el' +--- lisp/progmodes/python.el 2012-12-13 05:29:15 +0000 ++++ lisp/progmodes/python.el 2013-02-02 08:54:03 +0000 +@@ -406,6 +406,23 @@ + 'python-info-ppss-comment-or-string-p + #'python-syntax-comment-or-string-p "24.3") + ++(defun python-doc-string-at-p (pos) ++ "Check to see if there is a docstring at POS." ++ (save-excursion ++ (goto-char pos) ++ (if (looking-at-p "'''\\|\"\"\"") ++ (progn ++ (python-nav-backward-statement) ++ (looking-at "\\`\\|class \\|def ")) ++ nil))) ++ ++(defun python-font-lock-syntactic-face-function (state) ++ (if (nth 3 state) ++ (if (python-doc-string-at-p (nth 8 state)) ++ font-lock-doc-face ++ font-lock-string-face) ++ font-lock-comment-face)) ++ + (defvar python-font-lock-keywords + ;; Keywords + `(,(rx symbol-start +@@ -3213,7 +3230,10 @@ + 'python-nav-forward-sexp) + + (set (make-local-variable 'font-lock-defaults) +- '(python-font-lock-keywords nil nil nil nil)) ++ '(python-font-lock-keywords ++ nil nil nil nil ++ (font-lock-syntactic-face-function ++ . python-font-lock-syntactic-face-function))) + + (set (make-local-variable 'syntax-propertize-function) + python-syntax-propertize-function) + +# Begin bundle +IyBCYXphYXIgcmV2aXNpb24gYnVuZGxlIHY0CiMKQlpoOTFBWSZTWS+Ut6kAAd3fgF8QUOP/91sA +zIT/7//0UAQ7teAGnjYAA1NEamyjQ0yaPUaaBoAAA000NAZQmmo09NGiaExkIYjIxMjRjQjINRGT +QQGmI2kAAGTE0bUAZAamFCaGgNA0ADTIAGhoAAkkEaMhT01PQJoyGp6T1MmU2kDQzUbUQCEcFvCF +m1Q0hhKkAQlnV4XOCkeRYSGjmMQA0S1k2M6uUwwMBsAEsidybQKCR56SoTCJJQ6rqEc7HKlBsxXQ +ltSoYBL2oZMc8yTv3TTnKoM5IEel9AuO0mgqyHo5YllsY0agkYFjhLCIoQ5mKMgIycQxEyCAHPvm +qvkgaN/bxrecBH4VicHt2biwt+NV7lBQTPiyTt4m4+iguPGwkGf27pzWIUS1dsKYfKypKx7vi84r +n5OCphaIicKoTJ2trIDVJ1aaoUE5QXxe5vztFQsGVnZ6zXWX/Pcrk+FwVA2DtHzgJ/7ElSlS9LbK +W2hh5+l6LiemzUXwPgTyb1qk5CvFpTCepgzS9omnVFPi2E1oCGMakYd21V3itwVaUmR1VGmcHTdd +lAhtlZML++U7ldj05lMhRMDFPuRDHYGSzVZI6erXfnV0cBU3iaEBuq6QnksXPP9XgvAWmNZUWrT0 +9KibS87CuVkMG6FPfrp2EVdKhGyu9612KtRvdcynY5F1bhSLy6wwpO7bG2CtV1kYDYZ1usKYWTmT +fOMNFbV0cQcmqkDojpBXIhuFjPEt45MKLozKYwSsgRFKlF/y75Qdsfi30NdwLC3iD6coEatkAYzO +erteeL+4Xl30V/Zh4hTGp/Lo/M0cgPLfm5OsBrac58w1EqC6/NdyPLJMcvE3IYoL9NTzm6aKTYbO +CMlassL1iA2D3sRyPuargdZPk9hVAXLFAkfWHqqE5pE1pbgZzLUmFVQQjAkro15PekWwt+bxdHlC +WxAeYdAYqksLWmSFDIDCcOwuVEi3WkSytYKBQUFs7JmPXaUHAGOG5NOpAgk4wjAYhHTBmDGZQnkw +3vHZUuQ4SMwfHqdmoQyNQndCGDkfgJ1WKsy3JcxOcDXe0Uh6msgeS57IwTTx900L1lvH1I2r3eRO +AXzcMFnVojlJMEuIdvgKHLSg72y6Q6h/WGxmFIJOByUIKHXg/ztSyOdewoy8QclqU4X6NNw6spZK +orjBit9w56FWJjN0oqIRYCEV7e31F6q1SSb1WQ96tZXA5b9xcuCzSYyM1ae9aWwtDzQzIZelEveh +aSDR6pFS+kExdjiujX1MycfWtVtHTzW7+n2NFmTP/DcFwNyzoHZ3xfFyJ99CKQ8PmqvhpRFNoHtj +GIeaXddv2RKrY5v3GDbOjQkxtx67wdRYYpVyoUuacQ7XJnOVS1iGBsxlih6e1JGvwFWP4iKs6LKq +4eq47jcNH5YBJMhrGWnWnBp4CquwSwkL6p0lqDytFwUuSeoyF2JyuwVSvXAQ9KPmF+A/7L/xdyRT +hQkC+Ut6kA== diff --git a/emacs-git/emacs-git.install b/emacs-git/emacs-git.install new file mode 100644 index 0000000..35d11bd --- /dev/null +++ b/emacs-git/emacs-git.install @@ -0,0 +1,32 @@ +ICON_PATH=/usr/share/icons/hicolor +INFO_DIR=/usr/share/info + +INFO_FILES=(ada-mode auth autotype calc ccmode cl dbus dired-x ebrowse +ede ediff edt efaq eieio eintr elisp emacs emacs-mime epa erc ert eshell +eudc flymake forms gnus idlwave mairix-el message mh-e newsticker +nxml-mode org pcl-cvs pgg rcirc reftex remember sasl sc semantic ses +sieve smtpmail speedbar tramp url vip viper widget woman) + +post_install() { + gtk-update-icon-cache -q -t -f ${ICON_PATH} + update-desktop-database -q + + [[ -x /usr/bin/install-info ]] || return 0 + for f in ${INFO_FILES[@]}; do + install-info ${INFO_DIR}/$f.info.gz ${INFO_DIR}/dir 2> /dev/null + done +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + gtk-update-icon-cache -q -t -f ${ICON_PATH} + update-desktop-database -q + + [[ -x /usr/bin/install-info ]] || return 0 + for f in ${INFO_FILES[@]}; do + install-info --delete ${INFO_DIR}/$f.info.gz ${INFO_DIR}/dir 2> /dev/null + done +} |