Add emacs-bzr package which adds my patches

This commit is contained in:
Tom Willemse 2013-10-20 13:14:55 +02:00
parent edaa6be7bf
commit 38915a3018
4 changed files with 213 additions and 0 deletions

80
emacs-bzr/PKGBUILD Normal file
View file

@ -0,0 +1,80 @@
# 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-bzr
pkgver=114727
pkgrel=1
pkgdesc='The extensible, customizable, self-documenting real-time display editor from its official Bzr 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')
makedepends=('bzr' 'pkgconfig' 'texinfo')
provides=("emacs=$pkgver")
conflicts=('emacs' 'emacs-nox' 'emacs-otf' 'emacs-cvs' 'emacs-git')
install=$pkgname.install
source=("bzr+http://bzr.savannah.gnu.org/r/emacs/trunk/"
'docstrings2.patch'
'pkgdep.patch')
_mandir=/usr/share/man
pkgver() {
cd "$srcdir"/trunk
bzr revno
}
build() {
cd "$srcdir"/trunk
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 \
--with-x-toolkit=lucid || return 1
patch -p0 -i "$srcdir"/docstrings2.patch || return 1
patch -p0 -i "$srcdir"/pkgdep.patch || return 1
make bootstrap
}
package() {
cd "$srcdir"/trunk
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
bzr revert
}
md5sums=('SKIP'
'3a868e5b80d5912ded06e6bdc040208a'
'aa2a780cbd8c22a972673d596dee943f')

View file

@ -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==

View file

@ -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
}

31
emacs-bzr/pkgdep.patch Normal file
View file

@ -0,0 +1,31 @@
=== modified file 'lisp/emacs-lisp/package.el'
--- lisp/emacs-lisp/package.el 2013-08-03 02:34:22 +0000
+++ lisp/emacs-lisp/package.el 2013-08-16 20:40:09 +0000
@@ -973,6 +973,17 @@
str)
(error nil))))
+(defun package--prepare-dependencies (deps)
+ "Turn DEPS into an acceptable list of dependencies.
+
+Any parts missing a version string get a default version string
+of \"0\" (meaning any version) and an appropriate level of lists
+is wrapped around any parts requiring it."
+ (cond
+ ((symbolp deps) `((,deps "0")))
+ ((stringp (cadr deps)) `(,deps))
+ (t (mapcar (lambda (dep) (if (symbolp dep) `(,dep "0") dep)) deps))))
+
(defun package-buffer-info ()
"Return a `package-desc' describing the package in the current buffer.
@@ -1003,7 +1014,9 @@
"Package lacks a \"Version\" or \"Package-Version\" header"))
(package-desc-from-define
file-name pkg-version desc
- (if requires-str (package-read-from-string requires-str))
+ (if requires-str
+ (package--prepare-dependencies
+ (package-read-from-string requires-str)))
:kind 'single
:url homepage))))