mule-ucs stable port information

Package: mule-ucs
Version: 0.85+0.20061127
Revision: 3
Description: Mule universal encoding system
License: GPL
Maintainer: Todai Fink Team
BuildDepends: fink (>= 0.24.12)
Depends: emacsen
Source: http://fink.sodan.ecc.u-tokyo.ac.jp/pkgdists/%n-20061127-1.tar.gz
# taken from http://www.meadowy.org/~shirai/elips/mule-ucs.tar.gz
Source-MD5: 2f856c3d485fbbb8343ff3543b792381
PatchFile: %n.patch
PatchFile-MD5: ee3675bd504edfbaa848a490328023df
PatchScript: <<
sed 's|@PREFIX@|%p|g' < %{PatchFile} | sed 's|@VERSION@|%v-%r|g' | patch -p1
<<
CompileScript: echo "Nothing is compiled in this section."
InstallScript: <<
install -m 755 -d %i/share/emacs/site-lisp/%n/lisp/{big5conv,jisx0213,reldata}
install -m 644 mucs-comp.el %i/share/emacs/site-lisp/%n
install -m 644 lisp/*.el %i/share/emacs/site-lisp/%n/lisp
install -m 644 lisp/big5conv/*.el %i/share/emacs/site-lisp/%n/lisp/big5conv
install -m 644 lisp/jisx0213/*.el %i/share/emacs/site-lisp/%n/lisp/jisx0213
install -m 644 lisp/reldata/*.el %i/share/emacs/site-lisp/%n/lisp/reldata

install -m 755 -d %i/share/doc/%n/{big5conv,jisx0213}
install -m 644 lisp/big5conv/README %i/share/doc/%n/big5conv
install -m 644 lisp/jisx0213/{ChangeLog,readme.txt} %i/share/doc/%n/jisx0213

install -m 755 -d %i/etc/emacs/site-start.d
install -m 644 fink/%n-startup %i/etc/emacs/site-start.d/40%n.el

install -m 755 -d %i/lib/emacsen-common/packages/{install,remove}
install -m 755 fink/%n-install %i/lib/emacsen-common/packages/install/%n
install -m 755 fink/%n-remove %i/lib/emacsen-common/packages/remove/%n
<<
DocFiles: COPYING emacs-20.7-mule-4.1.patch.txt doc/mule-ucs.{sgml,texi} lisp/{ChangeLog,MuleUni.txt,README*,type.txt}
PostInstScript: <<
if [ "$1" = "configure" ] && [ -x %p/lib/emacsen-common/emacs-package-install ]
then
%p/lib/emacsen-common/emacs-package-install %n
fi
<<
PreRmScript: <<
if [ -x %p/lib/emacsen-common/emacs-package-remove ] ; then
%p/lib/emacsen-common/emacs-package-remove %n
fi
<<
ConfFiles: %p/etc/emacs/site-start.d/40%n.el
Homepage: http://tats.haun.org/mule-ucs/
DescDetail: <<
Mule-UCS is an Emacs Lisp library to define encoding/decoding
schemes by rather simple translation rules.

Mule-UCS provides flexible and complehensible encoding mechanism to
Emacs. Currently, Mule-UCS generates CCL program from the translation
rule, but in the future, Mule-UCS may support another conversion
engine on Emacs.

And we prepared 3 predefined conversions for Mule-UCS.

(1) ... Unicode(UTF-7/8/16) support.
(2) ... Big5 <-> CNS conversion support.
(3) ... JIS X 0213 support. (Kawabata-san contributed almost all of
the works.)

These are included in this package.
<<

mule-ucs stable port .patch

diff -Naur Mule-UCS-current.orig/fink/mule-ucs-install Mule-UCS-current/fink/mule-ucs-install
--- Mule-UCS-current.orig/fink/mule-ucs-install Thu Jan 1 09:00:00 1970
+++ Mule-UCS-current/fink/mule-ucs-install Mon Mar 14 01:34:13 2005
@@ -0,0 +1,111 @@
+#!/bin/sh
+# @PREFIX@/lib/emacsen-common/packages/install/mule-ucs
+set -e
+
+FLAVOR=$1
+VERSION=@VERSION@
+PACKAGE="mule-ucs"
+
+if [ -z "${FLAVOR}" ]; then
+ echo Need argument to determin FLAVOR of emacsen
+ exit 1
+fi
+if [ -z "${PACKAGE}" ]; then
+ echo Internal error: need package name
+ exit 1
+fi
+if [ -z "${VERSION}" ]; then
+ echo Internal error: need package version
+ exit 1
+fi
+if [ "X${FLAVOR}" = Xemacs ]; then exit 0; fi
+if [ "X${FLAVOR}" = Xemacs19 ]; then exit 0; fi
+if [ "X${FLAVOR}" = Xmule2 ]; then exit 0; fi
+
+FLAVOR_SUFFIX=`echo ${FLAVOR} | cut -s -d - -f 2`
+FLAVORTEST=`echo ${FLAVOR} | sed -e s/^s// | cut -c-6`
+if [ "X${FLAVORTEST}" = "Xxemacs" ]; then
+ FLAVOR_BODY=`echo ${FLAVOR} | cut -d - -f 1`
+ if [ "X${FLAVOR_SUFFIX}" = "Xmule" ]; then
+ EMACSEN_MULE=`ls @PREFIX@/bin/${FLAVOR_BODY}*-mule* 2>/dev/null | head -n 1`
+ if [ -n "${EMACSEN_MULE}" ]; then
+ EMACSEN_MULE=`basename ${EMACSEN_MULE}`
+ fi
+ elif [ "X${FLAVOR_SUFFIX}" = "Xnomule" ]; then
+ exit 0
+ else
+ EMACSEN_MULE=`ls @PREFIX@/bin/${FLAVOR}*-mule* 2>/dev/null | head -n 1`
+ if [ -n "${EMACSEN_MULE}" ]; then
+ EMACSEN_MULE=`basename ${EMACSEN_MULE}`
+ fi
+ fi
+else
+ EMACSEN_MULE=${FLAVOR}
+fi
+if [ -z "${EMACSEN_MULE}" ]; then exit 0; fi
+EMACSEN=${EMACSEN_MULE}
+
+ELDIR=@PREFIX@/share/emacs/site-lisp/${PACKAGE}
+ELCDIR=@PREFIX@/share/${FLAVOR}/site-lisp/${PACKAGE}
+SITELISP=@PREFIX@/share/${FLAVOR}/site-lisp
+STAMP=${ELCDIR}/compile-stamp
+
+/bin/echo "install/${PACKAGE}: Byte-compiling for ${FLAVOR} ...\c"
+if [ -e ${STAMP} ]; then
+ if [ X"${VERSION}" = X"`cat ${STAMP}`" ]; then
+ echo " skipped. (already compiled)"
+ exit 0
+ else
+ rm -f ${STAMP}
+ fi
+fi
+/bin/echo "This will take a while ...\c"
+rm -rf ${ELCDIR}
+install -m 755 -d ${ELCDIR}
+/bin/cp -R ${ELDIR}/* ${ELCDIR}/
+
+if [ X"${FLAVORTEST}" = Xxemacs ]; then
+ (cd ${ELCDIR}
+ ${EMACSEN} -q -no-site-file -batch -l mucs-comp.el > ${ELCDIR}/CompilationLog 2>&1
+ )
+else
+ # for GNU Emacs
+ (cd ${ELCDIR}/lisp/jisx0213
+ ${EMACSEN} -q -no-site-file -batch -l x0213-comp.el > ${ELCDIR}/CompilationLog 2>&1
+ )
+ (cd ${ELCDIR}/lisp/big5conv
+ sed -e 's/(load-file/;;(load-file/' big5-comp.el > big5-comp-without-mucs-comp.el
+ ${EMACSEN} -q -no-site-file -batch -l big5-comp-without-mucs-comp.el >> ${ELCDIR}/CompilationLog 2>&1
+ )
+ if [ -f ${ELCDIR}/lisp/jisx0213/x0213-cdef.elc ]; then
+ mv ${ELCDIR}/lisp/jisx0213/*.elc ${ELCDIR}/
+ ln -s ${ELDIR}/lisp/jisx0213/jisx0213.el ${ELCDIR}/
+ ln -s ${ELDIR}/lisp/jisx0213/egg-sim-jisx0213.el ${ELCDIR}/
+ fi
+ if [ -f ${ELCDIR}/lisp/big5conv/big5conv.elc ]; then
+ mv ${ELCDIR}/lisp/big5conv/*.elc ${ELCDIR}/
+ fi
+fi
+if [ -f ${ELCDIR}/lisp/un-define.elc ]; then
+ mv ${ELCDIR}/lisp/*.elc ${ELCDIR}/
+fi
+rm -rf ${ELCDIR}/lisp ${ELCDIR}/mucs-comp.el
+( for d in "${ELDIR}/lisp" "${ELDIR}/lisp/big5conv" "${ELDIR}/lisp/jisx0213" "${ELDIR}/lisp/reldata"; do
+ cd ${d}
+ for f in *.el; do
+ if [ -f ${ELCDIR}/${f}c ]; then
+ ln -sf ${d}/${f} ${ELCDIR}/${f}
+ fi
+ done
+ done
+)
+gzip -9 ${ELCDIR}/CompilationLog
+chmod 644 ${ELCDIR}/CompilationLog.gz
+if [ -f ${ELCDIR}/un-define.elc ]; then
+ chmod 644 ${ELCDIR}/*.elc
+ echo "${VERSION}" > ${STAMP}
+ chmod 644 ${STAMP}
+fi
+echo " done."
+
+exit 0
diff -Naur Mule-UCS-current.orig/fink/mule-ucs-remove Mule-UCS-current/fink/mule-ucs-remove
--- Mule-UCS-current.orig/fink/mule-ucs-remove Thu Jan 1 09:00:00 1970
+++ Mule-UCS-current/fink/mule-ucs-remove Mon Mar 14 01:37:09 2005
@@ -0,0 +1,26 @@
+#!/bin/sh
+# @PREFIX@/lib/emacsen-common/packages/remove/mule-ucs
+set -e
+
+FLAVOR=$1
+PACKAGE="mule-ucs"
+
+if [ -z "${FLAVOR}" ]; then
+ echo Need argument to determin FLAVOR of emacsen
+ exit 1
+fi
+if [ -z "${PACKAGE}" ]; then
+ echo Internal error: need package name
+ exit 1
+fi
+if [ "X${FLAVOR}" = Xemacs ]; then exit 0; fi
+if [ "X${FLAVOR}" = Xemacs19 ]; then exit 0; fi
+if [ "X${FLAVOR}" = Xmule2 ]; then exit 0; fi
+
+ELCDIR=@PREFIX@/share/${FLAVOR}/site-lisp/${PACKAGE}
+
+/bin/echo "remove/${PACKAGE}: Handling removal of emacsen flavor ${FLAVOR} ...\c"
+rm -rf ${ELCDIR}
+echo " done."
+
+exit 0
diff -Naur Mule-UCS-current.orig/fink/mule-ucs-startup Mule-UCS-current/fink/mule-ucs-startup
--- Mule-UCS-current.orig/fink/mule-ucs-startup Thu Jan 1 09:00:00 1970
+++ Mule-UCS-current/fink/mule-ucs-startup Thu Mar 24 16:15:48 2005
@@ -0,0 +1,338 @@
+;;; 40mule-ucs.el --- Fink mule-ucs startup file -*-mode: emacs-lisp;-*-
+
+;; Author: Tatsuya Kinoshita
+;; Created: 12 Nov 2002
+;; Revised: 30 Oct 2004
+
+;; Unlimited permission is granted to use, copy, distribute, and/or modify
+;; this file. There is NO WARRANTY.
+
+;;; Code:
+
+(let ((path (concat "@PREFIX@/share/"
+ (symbol-name fink-emacs-flavor)
+ "/site-lisp/mule-ucs"))
+ (case-fold-search t)
+ env unicode-flag jisx0213-flag prefer-latin-flag)
+ (cond
+ ((and (file-exists-p (concat path "/un-define.elc"))
+ (featurep 'mule)
+ (boundp 'emacs-major-version)
+ (>= emacs-major-version 20))
+ (if (and nil (fboundp 'fink-pkg-add-load-path-item)) ; fink-pkg-* is not
+ (fink-pkg-add-load-path-item elc-dir) ; correctly working.
+ (setq load-path (cons path load-path)))
+ ;;
+ (defun un-define-debian (&optional jisx0213-flag prefer-latin-flag)
+ "Enable Mule-UCS-Unicode for Debian system."
+ (interactive)
+ (if (featurep 'un-define)
+ (message "Feature un-define is already loaded")
+ (if (featurep 'xemacs)
+ () ;; `un-define-change-charset-order' doesn't work on XEmacs
+ (defvar unicode-basic-translation-charset-order-list
+ (let ((case-fold-search t)
+ cand elem result locale vars)
+ (setq vars '("LC_ALL" "LC_CTYPE" "LANG"))
+ (while (and vars (not (setq locale (getenv (car vars)))))
+ (setq vars (cdr vars)))
+ (setq cand
+ (append
+ '(ascii)
+ (if prefer-latin-flag
+ '(latin-iso8859-1
+ latin-iso8859-2
+ latin-iso8859-3
+ latin-iso8859-4
+ cyrillic-iso8859-5
+ ;;arabic-iso8859-6
+ greek-iso8859-7
+ hebrew-iso8859-8
+ latin-iso8859-9
+ latin-iso8859-14
+ latin-iso8859-15
+ ipa))
+ (cond
+ ((and (stringp locale)
+ (string-match "^ja" locale))
+ (append
+ '(japanese-jisx0208)
+ (if (not prefer-latin-flag)
+ '(latin-iso8859-1
+ latin-iso8859-2
+ latin-iso8859-3
+ latin-iso8859-4
+ cyrillic-iso8859-5
+ ;;arabic-iso8859-6
+ greek-iso8859-7
+ hebrew-iso8859-8
+ latin-iso8859-9
+ latin-iso8859-14
+ latin-iso8859-15
+ ipa))
+ (if jisx0213-flag '(japanese-jisx0213-1
+ japanese-jisx0213-2))
+ '(japanese-jisx0212
+ korean-ksc5601
+ chinese-gb2312
+ chinese-cns11643-1
+ chinese-cns11643-2
+ chinese-cns11643-3
+ chinese-cns11643-4
+ chinese-cns11643-5
+ chinese-cns11643-6
+ chinese-cns11643-7
+ chinese-big5-1
+ chinese-big5-2)))
+ ((and (stringp locale)
+ (string-match "^ko" locale))
+ (append
+ '(korean-ksc5601)
+ (if (not prefer-latin-flag)
+ '(latin-iso8859-1
+ latin-iso8859-2
+ latin-iso8859-3
+ latin-iso8859-4
+ cyrillic-iso8859-5
+ ;;arabic-iso8859-6
+ greek-iso8859-7
+ hebrew-iso8859-8
+ latin-iso8859-9
+ latin-iso8859-14
+ latin-iso8859-15
+ ipa))
+ '(japanese-jisx0208)
+ (if jisx0213-flag '(japanese-jisx0213-1
+ japanese-jisx0213-2))
+ '(japanese-jisx0212
+ chinese-gb2312
+ chinese-cns11643-1
+ chinese-cns11643-2
+ chinese-cns11643-3
+ chinese-cns11643-4
+ chinese-cns11643-5
+ chinese-cns11643-6
+ chinese-cns11643-7
+ chinese-big5-1
+ chinese-big5-2)))
+ ((and (stringp locale)
+ (string-match "^zh.*[._]big5" locale))
+ (append
+ '(chinese-big5-1
+ chinese-big5-2)
+ (if (not prefer-latin-flag)
+ '(latin-iso8859-1
+ latin-iso8859-2
+ latin-iso8859-3
+ latin-iso8859-4
+ cyrillic-iso8859-5
+ ;;arabic-iso8859-6
+ greek-iso8859-7
+ hebrew-iso8859-8
+ latin-iso8859-9
+ latin-iso8859-14
+ latin-iso8859-15
+ ipa))
+ '(chinese-gb2312
+ chinese-cns11643-1
+ chinese-cns11643-2
+ chinese-cns11643-3
+ chinese-cns11643-4
+ chinese-cns11643-5
+ chinese-cns11643-6
+ chinese-cns11643-7
+ korean-ksc5601
+ japanese-jisx0208)
+ (if jisx0213-flag '(japanese-jisx0213-1
+ japanese-jisx0213-2))
+ '(japanese-jisx0212)))
+ ((and (stringp locale)
+ (string-match "^zh_tw\\>" locale))
+ (append
+ '(chinese-cns11643-1
+ chinese-cns11643-2
+ chinese-cns11643-3
+ chinese-cns11643-4
+ chinese-cns11643-5
+ chinese-cns11643-6
+ chinese-cns11643-7)
+ (if (not prefer-latin-flag)
+ '(latin-iso8859-1
+ latin-iso8859-2
+ latin-iso8859-3
+ latin-iso8859-4
+ cyrillic-iso8859-5
+ ;;arabic-iso8859-6
+ greek-iso8859-7
+ hebrew-iso8859-8
+ latin-iso8859-9
+ latin-iso8859-14
+ latin-iso8859-15
+ ipa))
+ '(chinese-gb2312
+ chinese-big5-1
+ chinese-big5-2
+ korean-ksc5601
+ japanese-jisx0208)
+ (if jisx0213-flag '(japanese-jisx0213-1
+ japanese-jisx0213-2))
+ '(japanese-jisx0212)))
+ ((and (stringp locale)
+ (string-match "^zh" locale))
+ (append
+ '(chinese-gb2312)
+ (if (not prefer-latin-flag)
+ '(latin-iso8859-1
+ latin-iso8859-2
+ latin-iso8859-3
+ latin-iso8859-4
+ cyrillic-iso8859-5
+ ;;arabic-iso8859-6
+ greek-iso8859-7
+ hebrew-iso8859-8
+ latin-iso8859-9
+ latin-iso8859-14
+ latin-iso8859-15
+ ipa))
+ '(chinese-cns11643-1
+ chinese-cns11643-2
+ chinese-cns11643-3
+ chinese-cns11643-4
+ chinese-cns11643-5
+ chinese-cns11643-6
+ chinese-cns11643-7
+ chinese-big5-1
+ chinese-big5-2
+ korean-ksc5601
+ japanese-jisx0208)
+ (if jisx0213-flag '(japanese-jisx0213-1
+ japanese-jisx0213-2))
+ '(japanese-jisx0212)))
+ (t
+ (append
+ (if (not prefer-latin-flag)
+ '(latin-iso8859-1
+ latin-iso8859-2
+ latin-iso8859-3
+ latin-iso8859-4
+ cyrillic-iso8859-5
+ ;;arabic-iso8859-6
+ greek-iso8859-7
+ hebrew-iso8859-8
+ latin-iso8859-9
+ latin-iso8859-14
+ latin-iso8859-15
+ ipa))
+ '(japanese-jisx0208)
+ (if jisx0213-flag '(japanese-jisx0213-1
+ japanese-jisx0213-2))
+ '(japanese-jisx0212
+ chinese-gb2312
+ chinese-cns11643-1
+ chinese-cns11643-2
+ chinese-cns11643-3
+ chinese-cns11643-4
+ chinese-cns11643-5
+ chinese-cns11643-6
+ chinese-cns11643-7
+ chinese-big5-1
+ chinese-big5-2
+ korean-ksc5601))))
+ '(latin-jisx0201
+ katakana-jisx0201 thai-tis620 ethiopic
+ indian-is13194 chinese-sisheng lao
+ vietnamese-viscii-lower vietnamese-viscii-upper)
+ (if (fboundp
+ (function tibetan-pre-write-canonicalize-for-unicode))
+ '(tibetan))
+ '(mule-unicode-0100-24ff
+ mule-unicode-2500-33ff
+ mule-unicode-e000-ffff
+ mule-ucs-unicode-multichar)))
+ (while (setq elem (car cand))
+ (if (or (and (functionp 'charsetp) (charsetp elem))
+ (and (functionp 'find-charset) (find-charset elem))
+ (eq elem 'japanese-jisx0213-1)
+ (eq elem 'japanese-jisx0213-2)
+ (eq elem 'mule-unicode-0100-24ff)
+ (eq elem 'mule-unicode-2500-33ff)
+ (eq elem 'mule-unicode-e000-ffff)
+ (eq elem 'mule-ucs-unicode-multichar))
+ (setq result (cons elem result)))
+ (setq cand (cdr cand)))
+ (nreverse result)))) ;; should be before loading `un-define'
+ (or (featurep 'mule-ucs-unicode)
+ (load-library "unicode"))
+ (require 'un-define)
+ (if (featurep 'xemacs)
+ () ;; `un-define-change-charset-order' doesn't work on XEmacs
+ (if jisx0213-flag
+ ;; The JIS X 0213 feature is not yet fully integrated into
+ ;; Mule-UCS. It might cause conversion problems.
+ (require 'jisx0213)
+ (un-define-change-charset-order))
+ (require 'un-tools))
+ ;; define aliases for utf-16
+ (define-coding-system-alias 'utf-16le 'utf-16-le-no-signature)
+ (define-coding-system-alias 'utf-16be 'utf-16-be-no-signature)
+ (define-coding-system-alias 'utf-16le-with-signature 'utf-16-le)
+ (define-coding-system-alias 'utf-16be-with-signature 'utf-16-be)
+ ;; set coding-category of utf-8 for XEmacs
+ (and (featurep 'xemacs)
+ (fboundp 'coding-system-category)
+ (null (coding-system-category 'utf-8))
+ (fboundp 'coding-system-put)
+ (coding-system-put 'utf-8 'category 'utf-8)
+ (coding-system-put 'utf-8-unix 'category 'utf-8)
+ (coding-system-put 'utf-8-dos 'category 'utf-8)
+ (coding-system-put 'utf-8-mac 'category 'utf-8)
+ (coding-system-put 'utf-8-ws 'category 'utf-8)
+ (coding-system-put 'utf-8-ws-unix 'category 'utf-8)
+ (coding-system-put 'utf-8-ws-dos 'category 'utf-8)
+ (coding-system-put 'utf-8-ws-mac 'category 'utf-8)
+ (fboundp 'set-coding-category-system)
+ (set-coding-category-system 'utf-8 'utf-8))
+ ;; set coding-priority to use utf-8 auto-detection
+ (if (and (coding-system-category 'utf-8)
+ (not (eq (coding-system-category 'utf-8) 'coding-category-ccl)))
+ (let ((alist language-info-alist)
+ lang-name codings slot tmp)
+ (while (setq lang-name (car (nth 0 alist)))
+ ;; use copy-sequence so that we can handle read-only object
+ (setq codings (copy-sequence
+ (get-language-info lang-name 'coding-priority)))
+ (setq slot (memq 'mule-utf-8 codings))
+ (if (null slot)
+ (or (memq 'utf-8 codings)
+ (setq codings (append codings '(utf-8))))
+ ;; use utf-8 rather than mule-utf-8
+ (setcdr slot (cons 'utf-8 (cdr slot)))
+ (setq codings (delete 'mule-utf-8 codings)))
+ (setq tmp codings)
+ (while tmp (setq tmp (setcdr tmp (delete (car tmp) (cdr tmp)))))
+ (set-language-info lang-name 'coding-priority codings)
+ (setq alist (cdr alist)))))))
+ ;;
+ (setq env (or (getenv "DEB_MULEUCS_UNICODE") "on"))
+ (setq unicode-flag
+ (not (string-match "^\\(off\\|no\\|false\\|0\\)$" env)))
+ (setq env (or (getenv "DEB_MULEUCS_JISX0213") "off"))
+ (setq jisx0213-flag
+ (not (string-match "^\\(off\\|no\\|false\\|0\\)$" env)))
+ (setq env (or (getenv "DEB_MULEUCS_PREFER_LATIN") "on"))
+ (setq prefer-latin-flag
+ (not (string-match "^\\(off\\|no\\|false\\|0\\)$" env)))
+ (if (and (not (featurep 'xemacs))
+ (>= emacs-major-version 21))
+ (condition-case nil
+ (progn
+ (require 'ucs-tables) ;; should be before loading `un-define'
+ (unify-8859-on-encoding-mode 1)
+ (unify-8859-on-decoding-mode -1))
+ (error nil)))
+ (if unicode-flag
+ (un-define-debian jisx0213-flag prefer-latin-flag))
+ ;;
+ )))
+
+;;; 40mule-ucs.el ends here

mule-ucs _unstable_ port .patch