diff -Naur emacs-w3m-1.4.4.orig/fink/emacs-w3m-install emacs-w3m-1.4.4/fink/emacs-w3m-install --- emacs-w3m-1.4.4.orig/fink/emacs-w3m-install Thu Jan 1 09:00:00 1970 +++ emacs-w3m-1.4.4/fink/emacs-w3m-install Sat Apr 9 15:01:15 2005 @@ -0,0 +1,88 @@ +#! /bin/sh -e +# @PREFIX@/lib/emacsen-common/packages/install/emacs-w3m + +# Written by Jim Van Zandt , borrowing heavily +# from the install scripts for gettext by Santiago Vila +# and octave by Dirk Eddelbuettel . + +FLAVOR=$1 +PACKAGE=w3m + +ELDIR=@PREFIX@/share/emacs/site-lisp/${PACKAGE} +ELCDIR=@PREFIX@/share/${FLAVOR}/site-lisp/${PACKAGE} + +if [ ${FLAVOR} = emacs ]; then exit 0; fi + +echo install/${PACKAGE}: Handling install for emacsen flavor ${FLAVOR} ... + +install -m 755 -d ${ELCDIR} +install -m 755 -d ${ELCDIR}/shimbun + +case ${FLAVOR} in +xemacs*) + SITEFLAG="-no-site-file";; +*) + SITEFLAG="--no-site-file";; +esac +LPATH="NONE" +for el in apel mule-ucs +do + if [ -d @PREFIX@/share/emacs/site-lisp/${el} -a ! -d @PREFIX@/share/${FLAVOR}/site-lisp/${el} ]; then + @PREFIX@/lib/emacsen-common/emacs-package-install ${el} + fi + if [ -d @PREFIX@/share/${FLAVOR}/site-lisp/${el} ]; then + LPATH="${LPATH}:@PREFIX@/share/${FLAVOR}/site-lisp/${el}" + fi +done +for el in flim mew bitmap-mule gnus t-gnus +do + if [ -d @PREFIX@/share/${FLAVOR}/site-lisp/${el} ]; then + LPATH="${LPATH}:@PREFIX@/share/${FLAVOR}/site-lisp/${el}" + elif [ -d @PREFIX@/share/emacs/site-lisp/${el} ]; then + LPATH="${LPATH}:@PREFIX@/share/emacs/site-lisp/${el}" + fi +done +if [ ${FLAVOR} = mule2 ]; then + LPATH="${LPATH}":@PREFIX@/share/mule2/site-lisp/custom-mule + cp @PREFIX@/share/doc/emacs-w3m/attic/regexp-opt.el ${ELCDIR}/regexp-opt.el +fi + +FLAGS="${SITEFLAG} -q -batch -l path.el -l w3mhack.el ${LPATH}" + +# Install-info-altdir does not actually exist. +# Maybe somebody will write it. +# if test -x @PREFIX@/sbin/install-info-altdir; then +# echo install/${PACKAGE}: install Info links for ${FLAVOR} +# install-info-altdir --quiet --section "" "" --dirname=${FLAVOR} @PREFIX@/info/${PACKAGE}.info.gz +# fi + +(cd ${ELDIR}; FILES=`echo *.el`; cp ${FILES} ${ELCDIR}) +(cd ${ELDIR}/shimbun; FILES=`echo *.el`; cp ${FILES} ${ELCDIR}/shimbun) +cd ${ELCDIR} +rm -f *.elc shimbun/*.elc +if [ ${FLAVOR} = mule2 ]; then + ${FLAVOR} -q -no-site-file -batch -f batch-byte-compile regexp-opt.el +fi +cat << EOF > path.el +(setq load-path (cons "." load-path) byte-compile-warnings nil) +EOF +if [ "$(${FLAVOR} ${FLAGS} -f w3mhack-locate-library xml.el)" = "" ]; then + cp @PREFIX@/share/doc/emacs-w3m/attic/xml.el ${ELCDIR}/xml.el +fi + +${FLAVOR} ${FLAGS} -f w3mhack-compile 2>&1 | gzip -9 > CompilationLog.gz +rm -f `ls -1 *.el | grep -v 'w3m-\(kwds\|load\).el'` path.el shimbun/*.el path.elc + +echo " done." + +# force to recopmile wl for shimbun module +# fix "Cannot open load file: elmo-shimbun" +if test -d @PREFIX@/share/${FLAVOR}/site-lisp/wl; then + for pkg in wl wl-beta + do + if test -f @PREFIX@/lib/emacsen-common/packages/install/${pkg}; then + @PREFIX@/lib/emacsen-common/packages/install/${pkg} ${FLAVOR} + fi + done +fi +exit 0 diff -Naur emacs-w3m-1.4.4.orig/fink/emacs-w3m-remove emacs-w3m-1.4.4/fink/emacs-w3m-remove --- emacs-w3m-1.4.4.orig/fink/emacs-w3m-remove Thu Jan 1 09:00:00 1970 +++ emacs-w3m-1.4.4/fink/emacs-w3m-remove Sat Apr 9 15:02:17 2005 @@ -0,0 +1,26 @@ +#!/bin/sh -e +# @PREFIX@/lib/emacsen-common/packages/remove/emacs-w3m + +FLAVOR=$1 +PACKAGE=w3m + +if [ ${FLAVOR} != emacs ]; then + # if test -x @PREFIX@/sbin/install-info-altdir; then + # echo remove/${PACKAGE}: removing Info links for ${FLAVOR} + # install-info-altdir --quiet --remove --dirname=${FLAVOR} @PREFIX@/info/emacs-w3m.info.gz + # fi + + /bin/echo "remove/${PACKAGE}: purging byte-compiled files for ${FLAVOR} ...\c" + rm -rf @PREFIX@/share/${FLAVOR}/site-lisp/${PACKAGE} + echo " done." + + # force to recopmile wl for shimbun module + if test -d @PREFIX@/share/${FLAVOR}/site-lisp/wl; then + for pkg in wl wl-beta + do + if test -f @PREFIX@/lib/emacsen-common/packages/install/${pkg}; then + @PREFIX@/lib/emacsen-common/packages/install/${pkg} ${FLAVOR} + fi + done + fi +fi diff -Naur emacs-w3m-1.4.4.orig/fink/emacs-w3m-startup emacs-w3m-1.4.4/fink/emacs-w3m-startup --- emacs-w3m-1.4.4.orig/fink/emacs-w3m-startup Thu Jan 1 09:00:00 1970 +++ emacs-w3m-1.4.4/fink/emacs-w3m-startup Sat Apr 9 15:04:55 2005 @@ -0,0 +1,29 @@ +;; -*-emacs-lisp-*- +;; +;; Emacs startup file for Fink emacs-w3m package +;; +;; Originally contributed by Nils Naumann +;; Modified by Dirk Eddelbuettel +;; Adapted for dh-make by Jim Van Zandt + +;; The emacs-w3m 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 ((elc-dir (concat "@PREFIX@/share/" + (symbol-name fink-emacs-flavor) "/site-lisp/w3m"))) + (if (not (file-directory-p elc-dir)) + () + (if (and nil (fboundp 'fink-pkg-add-load-path-item)) + (progn + (fink-pkg-add-load-path-item (concat elc-dir "/shimbun")) + (fink-pkg-add-load-path-item elc-dir)) + (setq load-path (cons (concat elc-dir "/shimbun") load-path)) + (setq load-path (cons elc-dir load-path))) + (setq w3m-icon-directory "@PREFIX@/share/pixmaps/emacs-w3m") + ;; (setq w3m-icon-directory "@PREFIX@/share/pixmaps/emacs-w3m/small") + (if (file-exists-p (concat elc-dir "/w3m-load.el")) + (require 'w3m-load)) + ;; + ))