The following commit has been merged in the master branch: commit a4ce0d2e254a323a1c0a7dc14e91b04ffa0cd2ee Author: Romain Beauxis <to...@rastageeks.org> Date: Tue May 14 01:12:15 2013 -0500
Emacs mode + backport previous NMU changes. Emacs stuff needs testing! diff --git a/debian/changelog b/debian/changelog index cb701ad..87eac69 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +liquidsoap (1.1.1-3) unstable; urgency=low + + * Added liquidsoap emacs mode package. + * Merge changes from NMU 1.0.1+repack1-1.1 + + -- Romain Beauxis <to...@rastageeks.org> Tue, 14 May 2013 00:35:34 -0500 + liquidsoap (1.1.1-2) unstable; urgency=low * Set inotify build-dep to linux-only. @@ -23,6 +30,16 @@ liquidsoap (1.1.0-1) experimental; urgency=low -- Romain Beauxis <to...@rastageeks.org> Sat, 20 Apr 2013 11:37:55 -0500 +liquidsoap (1.0.1+repack1-1.1) unstable; urgency=low + + * Non-maintainer upload. + * Fix "missing versioned depend on libcamomile-ocaml-data": + make (build) dependency on libcamomile-ocaml-{dev,data} versioned + [(>= 0.8)]. Thanks, Paul van Tilburg. + (Closes: #685632) + + -- gregor herrmann <gre...@debian.org> Sat, 20 Oct 2012 19:21:43 +0200 + liquidsoap (1.0.1+repack1-1) unstable; urgency=low * Repacked upstream tarball to remove unecessary diff --git a/debian/control b/debian/control index 3fdbade..96c311f 100644 --- a/debian/control +++ b/debian/control @@ -15,7 +15,7 @@ Build-Depends: libmad-ocaml-dev (>= 0.4.3), libdtools-ocaml-dev (>= 0.3.1), libtaglib-ocaml-dev (>= 0.3.1), - libcamomile-ocaml-dev, + libcamomile-ocaml-dev (>= 0.8), festival, libxml-dom-perl, python-gtk2-dev, @@ -68,7 +68,7 @@ Depends: ${misc:Depends}, ${ocaml:Depends}, ${perl:Depends}, - libcamomile-ocaml-data, + libcamomile-ocaml-data (>= 0.8), wget, sox, adduser @@ -779,3 +779,19 @@ Description: control GUI for liquidsoap . It can control a running instance of liquidsoap or launch its own instance. + +Package: liquidsoap-mode +Architecture: all +Depends: ${misc:Depends}, emacsen-common +Suggests: liquidsoap +Section: editors +Description: Emacs mode for editing Liquidsoap code + Liquidsoap is a powerful tool for building complex audio streaming systems, + typically targeting internet radios (e.g. icecast streams). + . + It consists of a simple script language, in which you can create, combine and + transform audio sources. Its design makes liquidsoap flexible and easily + extensible. + . + This package provides an (X)Emacs mode which makes it easier to edit + Liquidsoap source code. diff --git a/debian/emacsen-install b/debian/emacsen-install new file mode 100644 index 0000000..cda3a57 --- /dev/null +++ b/debian/emacsen-install @@ -0,0 +1,45 @@ +#! /bin/sh -e +# /usr/lib/emacsen-common/packages/install/liquidsoap-mode + +# Written by Jim Van Zandt <j...@vanzandt.mv.com>, borrowing heavily +# from the install scripts for gettext by Santiago Vila +# <sanv...@ctv.es> and octave by Dirk Eddelbuettel <e...@debian.org>. + +FLAVOR=$1 +PACKAGE=liquidsoap-mode + +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 +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} + +# Install-info-altdir does not actually exist. +# Maybe somebody will write it. +if test -x /usr/sbin/install-info-altdir; then + echo install/${PACKAGE}: install Info links for ${FLAVOR} + install-info-altdir --quiet --section "" "" --dirname=${FLAVOR} /usr/info/${PACKAGE}.info.gz +fi + +install -m 755 -d ${ELCDIR} +cd ${ELDIR} +FILES=`echo *.el` +cp ${FILES} ${ELCDIR} +cd ${ELCDIR} + +cat << EOF > path.el +(setq load-path (cons "." load-path) byte-compile-warnings nil) +EOF +${FLAVOR} ${FLAGS} ${FILES} +rm -f *.el path.el + +exit 0 diff --git a/debian/emacsen-remove b/debian/emacsen-remove new file mode 100644 index 0000000..c979e02 --- /dev/null +++ b/debian/emacsen-remove @@ -0,0 +1,15 @@ +#!/bin/sh -e +# /usr/lib/emacsen-common/packages/remove/liquidsoap-mode + +FLAVOR=$1 +PACKAGE=liquidsoap-mode + +if [ ${FLAVOR} != emacs ]; then + if test -x /usr/sbin/install-info-altdir; then + echo remove/${PACKAGE}: removing Info links for ${FLAVOR} + install-info-altdir --quiet --remove --dirname=${FLAVOR} /usr/info/liquidsoap-mode.info.gz + fi + + echo remove/${PACKAGE}: purging byte-compiled files for ${FLAVOR} + rm -rf /usr/share/${FLAVOR}/site-lisp/${PACKAGE} +fi diff --git a/debian/emacsen-startup b/debian/emacsen-startup new file mode 100644 index 0000000..c57e1ed --- /dev/null +++ b/debian/emacsen-startup @@ -0,0 +1,22 @@ +;; -*-emacs-lisp-*- +;; +;; Emacs startup file for the Debian GNU/Linux liquidsoap-mode package +;; +;; Originally contributed by Nils Naumann <naum...@unileoben.ac.at> +;; Modified by Dirk Eddelbuettel <e...@debian.org> +;; Adapted for dh-make by Jim Van Zandt <j...@vanzandt.mv.com> + +;; The liquidsoap-mode package follows the Debian/GNU Linux 'emacsen' policy and +;; byte-compiles its elisp files for each 'emacs flavor' (emacs19, +;; 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: +(let ((package-dir (concat "/usr/share/" + (symbol-name flavor) + "/site-lisp/liquidsoap-mode"))) + (when (file-directory-p package-dir) + (setq load-path (cons package-dir load-path)) + (autoload 'liquidsoap-mode "liquidsoap-mode" "Liquidsoap editing mode." t) + (setq auto-mode-alist + (cons (cons "\\.t$" 'liquidsoap-mode) + auto-mode-alist)))) diff --git a/debian/liquidsoap-mode.el b/debian/liquidsoap-mode.el new file mode 100644 index 0000000..b74ee01 --- /dev/null +++ b/debian/liquidsoap-mode.el @@ -0,0 +1,83 @@ +;; liquidsoap-mode.el -- Liquidsoap major mode +;; Copyright (C) 2013 Samuel Mimram + +(defvar liquidsoap-font-lock-keywords + '( + ("#.*" . 'font-lock-comment-face) + ("^\\(%ifdef .*\\|%ifencoder .*\\|%endif\\|%include\\)" . 'font-lock-preprocessor-face) + ("\\<\\(fun\\|def\\|begin\\|end\\|if\\|then\\|else\\|elsif\\)\\>\\|->\\|;" . font-lock-keyword-face) + ("\\<\\(and\\|or\\|not\\|mod\\|ref\\)\\>\\|:=" . font-lock-builtin-face) + ("\\<\\(true\\|false\\)\\>" . font-lock-constant-face) + ("\\<def[ \t]+\\([^ (]*\\)" 1 'font-lock-function-name-face) + ) +) + +(defvar liquidsoap-mode-syntax-table + (let ((st (make-syntax-table))) + ;; Allow some extra characters in words + (modify-syntax-entry ?_ "w" st) + ;; Comments + (modify-syntax-entry ?# "<" st) + (modify-syntax-entry ?\n ">" st) + st) + "Syntax table for Liquidsoap major mode.") + +(defvar liquidsoap-tab-width 2) + +;see http://www.emacswiki.org/emacs/ModeTutorial +(defun liquidsoap-indent-line () + "Indent current Liquidsoap line" + (interactive) + (beginning-of-line) + ; At begining, no indentation + (if (bobp) (indent-line-to 0) + ; not-indented is a boolean saying we found a match looking backward + ; cur-indent is the current indetation + (let ((not-indented t) cur-indent) + ; De-indent after end + (if (looking-at "^[ \t]*\\(end\\|else\\|elsif\\|then\\|%endif\\)") + (progn + (save-excursion + (forward-line -1) + (setq cur-indent (- (current-indentation) liquidsoap-tab-width))) + (if (< cur-indent 0) (setq cur-indent 0))) + (save-excursion + (while not-indented + (forward-line -1) + ; Indent as much as the last end + (if (looking-at "^[ \t]*\\(end\\|%endif\\)") + (progn + (setq cur-indent (current-indentation)) + (setq not-indented nil)) + ; Increment if we find that we are in a block + (if (looking-at "^[ \t]*\\(def\\|if\\|then\\|elsif\\|%ifdef\\|.*=$\\)") + (progn + (setq cur-indent (+ (current-indentation) liquidsoap-tab-width)) + (setq not-indented nil)) + ; Same as previous line otherwise + (if (bobp) (setq not-indented nil)) + ) + ) + ) + ) + ) + ; If we didn't see an indentation hint, then allow no indentation + (if cur-indent (indent-line-to cur-indent) (indent-line-to 0)) + ) + ) +) + +(define-derived-mode liquidsoap-mode fundamental-mode + "Liquidsoap" "Major mode for Liquidsoap files." + :syntax-table liquidsoap-mode-syntax-table + (set (make-local-variable 'comment-start) "#") + (set (make-local-variable 'comment-start-skip) "#+\\s-*") + (set (make-local-variable 'indent-line-function) 'liquidsoap-indent-line) + (set (make-local-variable 'font-lock-defaults) '(liquidsoap-font-lock-keywords)) + (setq mode-name "Liquidsoap") +) + +(provide 'liquidsoap-mode) + +;;;###autoload +(add-to-list 'auto-mode-alist '("\\.liq\\'" . liquidsoap-mode)) diff --git a/debian/liquidsoap-mode.install b/debian/liquidsoap-mode.install new file mode 100644 index 0000000..b95b419 --- /dev/null +++ b/debian/liquidsoap-mode.install @@ -0,0 +1 @@ +debian/liquidsoap-mode.el usr/share/emacs/site-lisp/liquidsoap-mode/ diff --git a/src/outputs/harbor_output.ml b/src/outputs/harbor_output.ml index e2270cf..d078aa6 100644 --- a/src/outputs/harbor_output.ml +++ b/src/outputs/harbor_output.ml @@ -361,7 +361,8 @@ class output ~kind p = let login user password = let (user, - password) = + password) + = let f = Configure. recode_tag @@ -564,7 +565,8 @@ class output ~kind p = s) in let (metaint, - icyheader) = + icyheader) + = try (assert (((List. @@ -899,7 +901,8 @@ class output ~kind p = (acc, 0) in let (data, - pos) = + pos) + = f [] 0 (b :: (List.rev @@ -1067,7 +1070,8 @@ class output ~kind p = "^(.+)\\?(.+)$" in let (base_uri, - args) = + args) + = try let sub = -- liquidsoap 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