The following commit has been merged in the master branch: commit 24e1bbba8ac22ee469137a7036884f78d5463225 Author: Hendrik Tews <hend...@askra.de> Date: Fri May 11 13:41:03 2012 +0200
fixing startup and install scripts of ocaml-mode diff --git a/debian/changelog b/debian/changelog index adde36f..d7fb55a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,14 @@ +ocaml (3.12.1-3) UNRELEASED; urgency=low + + * Fixes in startup and install files of ocaml-mode: + - symlink *el files into elc dir (Closes: #452340) + - use debian-pkg-add-load-path-item in emacsen-startup and emacsen-install + (Closes: 671559) + - compile el files with site-file enabled + - use debian-emacs-flavor in emacsen-startup (see #662163) + + -- Hendrik Tews <hend...@askra.de> Fri, 11 May 2012 00:00:35 +0200 + ocaml (3.12.1-2) unstable; urgency=low * Fix compilation on kfreebsd-any: do not add -R$dir in X11 link options diff --git a/debian/control b/debian/control index cf7add4..9cdfca9 100644 --- a/debian/control +++ b/debian/control @@ -263,6 +263,8 @@ Description: OCaml interpreter and standard libraries Package: ocaml-mode Architecture: all +Pre-Depends: + emacsen-common (>= 1.4.14) Depends: emacs23 | emacsen, ${shlibs:Depends}, diff --git a/debian/ocaml-mode.emacsen-install b/debian/ocaml-mode.emacsen-install index a23b159..8aa5eb0 100644 --- a/debian/ocaml-mode.emacsen-install +++ b/debian/ocaml-mode.emacsen-install @@ -12,16 +12,17 @@ if [ ${FLAVOR} = emacs ]; then exit 0; fi echo install/${PACKAGE}: Handling install for emacsen flavor ${FLAVOR} -FLAVORTEST=`echo $FLAVOR | cut -c-6` -if [ ${FLAVORTEST} = xemacs ] ; then - SITEFLAG="-no-site-file" -else - SITEFLAG="--no-site-file" -fi +# FLAVORTEST=`echo $FLAVOR | cut -c-6` +# if [ ${FLAVORTEST} = xemacs ] ; then +# SITEFLAG="-no-site-file" +# else +# SITEFLAG="--no-site-file" +# fi FLAGS="${SITEFLAG} -q -batch -l path.el -f batch-byte-compile" ELDIR=/usr/share/emacs/site-lisp/${PACKAGE} ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE} +RELELDIR=../../../emacs/site-lisp/${PACKAGE} # Install-info-altdir does not actually exist. # Maybe somebody will write it. @@ -43,13 +44,17 @@ case "${FLAVOR}" in ;; esac -cp ${FILES} ${ELCDIR} + cd ${ELCDIR} +for f in ${FILES} ; do + ln -sf ${RELELDIR}/$f . +done cat << EOF > path.el -(setq load-path (cons "." load-path) byte-compile-warnings nil) +(debian-pkg-add-load-path-item ".") +(setq byte-compile-warnings nil) EOF ${FLAVOR} ${FLAGS} ${FILES} -rm -f *.el path.el +rm -f path.el exit 0 diff --git a/debian/ocaml-mode.emacsen-startup b/debian/ocaml-mode.emacsen-startup index ca3f43e..e6f01ba 100644 --- a/debian/ocaml-mode.emacsen-startup +++ b/debian/ocaml-mode.emacsen-startup @@ -11,12 +11,14 @@ ;; xemacs19, emacs20, xemacs20...). The compiled code is then ;; installed in a subdirectory of the respective site-lisp directory. ;; We have to add this to the load-path: -(setq load-path - (nconc load-path - (list (concat "/usr/share/" - (symbol-name flavor) - "/site-lisp/ocaml-mode")))) -(setq auto-mode-alist +(let ((package-dir (concat "/usr/share/" + (symbol-name debian-emacs-flavor) + "/site-lisp/ocaml-mode"))) +;; If package-dir does not exist, the #PACKAGE# package must have +;; removed but not purged, and we should skip the setup. + (when (file-directory-p package-dir) + (debian-pkg-add-load-path-item package-dir) + (setq auto-mode-alist (cons '("\\.ml[iylp]?\\'" . caml-mode) auto-mode-alist)) -(autoload 'caml-mode "caml" "Major mode for editing Caml code." t) -(autoload 'run-caml "inf-caml" "Run an inferior Caml process." t) + (autoload 'caml-mode "caml" "Major mode for editing Caml code." t) + (autoload 'run-caml "inf-caml" "Run an inferior Caml process." t))) -- OCaml packaging _______________________________________________ Pkg-ocaml-maint-commits mailing list Pkg-ocaml-maint-commits@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-ocaml-maint-commits