package cmake tags 427763 patch thanks You will find attached below a patch for adding proper emacsen initialization for cmake-mode.el, which fixes Bug#427763.
Thanks in advance for applying this patch or a variant of it in the cmake package. -- Rafael
diff -u cmake-2.4.7/debian/rules cmake-2.4.7/debian/rules --- cmake-2.4.7/debian/rules +++ cmake-2.4.7/debian/rules @@ -54,7 +54,6 @@ dh_testroot rm -rf .pc build-stamp configure-stamp patch-stamp rm -rf Build - rm -f debian/cmake.emacsen-* rm -f debian/ccmake.1 debian/cmake.1 debian/ctest.1 dh_clean @@ -69,8 +68,8 @@ install -D -m 644 debian/cmake.lintian debian/cmake/usr/share/lintian/overrides/cmake #cp Docs/cmake-indent.vim debian/cmake/usr/share/vim/addons/indent/cmake.vim #cp Docs/cmake-syntax.vim debian/cmake/usr/share/vim/addons/syntax/cmake.vim - #cp Docs/cmake-mode.el debian/cmake/usr/share/emacs/site-lisp/ - cp Docs/cmake-mode.el debian/cmake.emacsen-startup + cp Docs/cmake-mode.el debian/cmake/usr/share/emacs/site-lisp/ + Build/bin/ccmake --help-man > debian/ccmake.1 Build/bin/cmake --help-man > debian/cmake.1 #Build/bin/cpack --help-man > debian/cpack.1 diff -u cmake-2.4.7/debian/changelog cmake-2.4.7/debian/changelog --- cmake-2.4.7/debian/changelog +++ cmake-2.4.7/debian/changelog @@ -1,3 +1,12 @@ +cmake (2.4.7-1.1) UNRELEASED; urgency=low + + * debian/rules, debian/cmake.emacsen-{startup,install,remove}: Allow + byte-compilation of cmake-mode.el at install time and put in the + emacsen startup directory just the necessary initialization code + of cmake-mode (Closes: #427763) + + -- Rafael Laboissiere <[EMAIL PROTECTED]> Sat, 27 Oct 2007 21:44:38 +0200 + cmake (2.4.7-1) unstable; urgency=low * New upstream release. only in patch2: unchanged: --- cmake-2.4.7.orig/debian/cmake.emacsen-startup +++ cmake-2.4.7/debian/cmake.emacsen-startup @@ -0,0 +1,10 @@ +;; -*-emacs-lisp-*- +;; +;; Emacs startup file for the Debian GNU/Linux cmake package + +(autoload 'cmake-mode "cmake-mode") + +(setq auto-mode-alist + (append '(("CMakeLists\\.txt\\'" . cmake-mode) + ("\\.cmake\\'" . cmake-mode)) + auto-mode-alist)) only in patch2: unchanged: --- cmake-2.4.7.orig/debian/cmake.emacsen-install +++ cmake-2.4.7/debian/cmake.emacsen-install @@ -0,0 +1,25 @@ +#!/bin/sh +# +# emacsen install script for the Debian GNU/Linux cmake package + +FLAVOR=$1 +PACKAGE=cmake + +ELDIR=/usr/share/emacs/site-lisp/ +ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE} +ELFILE="cmake-mode.el" +FLAGS="-batch -no-site-file -l path.el -f batch-byte-compile" + +if [ ${FLAVOR} != emacs ]; then + echo install/${PACKAGE}: Byte-compiling for ${FLAVOR} + + install -m 755 -d ${ELCDIR} + cd ${ELDIR} + cp ${ELFILE} ${ELCDIR} + cd ${ELCDIR} + cat << EOF > path.el +(setq load-path (cons "." load-path) byte-compile-warnings nil) +EOF + ${FLAVOR} ${FLAGS} ${ELFILE} + rm -f ${ELFILE} path.el +fi only in patch2: unchanged: --- cmake-2.4.7.orig/debian/cmake.emacsen-remove +++ cmake-2.4.7/debian/cmake.emacsen-remove @@ -0,0 +1,11 @@ +#!/bin/sh +set -e + +FLAVOR=$1 +PACKAGE=cmake +ELCFILE=cmake-mode.elc + +if [ ${FLAVOR} != emacs ]; then + echo remove/${PACKAGE}: Purging byte-compiled files for ${FLAVOR} + rm -f /usr/share/${FLAVOR}/site-lisp/${ELCFILE} +fi