mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-24 00:45:52 +00:00
Modified for XEmacs
Added a script to byte-compile PR: 13389 Submitted by: maintainer
This commit is contained in:
parent
e8be97f517
commit
cb722e947d
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=21326
@ -13,16 +13,29 @@ MASTER_SITES= ftp://daemon.jp.freebsd.org/pub/FreeBSD-jp/man-jp/ \
|
||||
|
||||
MAINTAINER= kiri@kiri.toba-cmt.ac.jp
|
||||
|
||||
RUN_DEPENDS= jman:${PORTSDIR}/japanese/man
|
||||
# If you use Japanese manuals, install japanese/man as well.
|
||||
|
||||
NO_BUILD= yes
|
||||
WRKSRC= ${WRKDIR}
|
||||
|
||||
ELISPDIR= ${PREFIX}/share/emacs/site-lisp
|
||||
SITEPKGDIR= ${PREFIX}/lib/xemacs/site-packages
|
||||
PKGMODULES= i18n-man-de i18n-man-en i18n-man-ja
|
||||
|
||||
do-install:
|
||||
@${MKDIR} ${ELISPDIR}
|
||||
@${MKDIR} ${ELISPDIR} ${PREFIX}/share/doc/i18n-man
|
||||
@cd ${WRKSRC}; \
|
||||
${INSTALL_DATA} `${TAR} tzf ${DISTDIR}/${DISTFILES}` ${ELISPDIR}
|
||||
# For xemacs package install configuration
|
||||
${MKDIR} ${SITEPKGDIR}/pkginfo
|
||||
.for f in ${PKGMODULES}
|
||||
${MKDIR} ${SITEPKGDIR}/lisp/${f}
|
||||
${LN} -sf ${ELISPDIR}/${f}.el ${SITEPKGDIR}/lisp/${f}/${f}.el
|
||||
${LN} -sf ${ELISPDIR}/i18n-man.el ${SITEPKGDIR}/lisp/${f}/i18n-man.el
|
||||
${ECHO} "pkginfo/MANIFEST.${f}" > ${SITEPKGDIR}/pkginfo/MANIFEST.${f}
|
||||
${ECHO} "lisp/${f}/${f}.el" >> ${SITEPKGDIR}/pkginfo/MANIFEST.${f}
|
||||
${ECHO} "lisp/${f}/i18n-man.el" >> ${SITEPKGDIR}/pkginfo/MANIFEST.${f}
|
||||
.endfor
|
||||
${INSTALL_SCRIPT} ${FILESDIR}/byte-compile ${PREFIX}/share/doc/i18n-man
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
131
misc/man.el/files/byte-compile
Normal file
131
misc/man.el/files/byte-compile
Normal file
@ -0,0 +1,131 @@
|
||||
#!/bin/sh
|
||||
|
||||
PREFIX=${PREFIX:-/usr/local}
|
||||
WRKDIR=${WRKDIR:-`pwd`}
|
||||
|
||||
tmprfx=`basename $0`
|
||||
|
||||
Usage="\
|
||||
byte_compile [options] emacs_name port_name [files]
|
||||
-l load_el : load *.el file when byte-compile
|
||||
-h : show this message
|
||||
emacs_name : should be one of below
|
||||
\"emacs\", \"emacs20\", \"mule\", \"xemacs19\", \"xemacs20\",
|
||||
\"xemacs21\", \"xemacs-mule\"
|
||||
port_name : port name(replaced *.el when files not specified)
|
||||
files : *.el files should be compiled"
|
||||
|
||||
while [ -z "`getopts "l: h" opt > /tmp/${tmprfx}:getopt_err.log`" \
|
||||
-a X"${opt}" != "X?" ]; do
|
||||
case ${opt} in
|
||||
l)
|
||||
load_el=${OPTARG}
|
||||
break
|
||||
;;
|
||||
h)
|
||||
echo "${Usage}"
|
||||
exit 1
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
# echo "opt=${opt},OPTARG=${OPTARG}"
|
||||
done
|
||||
|
||||
if [ -s /tmp/${tmprfx}:getopt_err.log ]; then
|
||||
cat /tmp/${tmprfx}:getopt_err.log
|
||||
rm -f /tmp/${tmprfx}:getopt_err.log
|
||||
exit 1
|
||||
fi
|
||||
rm -f /tmp/${tmprfx}:getopt_err.log
|
||||
|
||||
shift `expr ${OPTIND} - 1`
|
||||
|
||||
if [ -z "$1" -o -z "$2" ]; then
|
||||
echo "${Usage}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
emacs_name=$1
|
||||
shift
|
||||
port_name=$1
|
||||
|
||||
if [ $# -le 1 ]; then
|
||||
files=${port_name}.el
|
||||
else
|
||||
files=`echo $* | sed -e "s/${port_name} *//"`
|
||||
fi
|
||||
|
||||
#echo "emacs_name=${emacs_name}"
|
||||
#echo "port_name=${port_name}"
|
||||
#echo "files=${files}"
|
||||
#echo "load_el=${load_el}"
|
||||
#exit 1
|
||||
|
||||
case ${emacs_name} in
|
||||
emacs)
|
||||
load_path=${PREFIX}/share/emacs/19.34/${load_el}
|
||||
emacscmd=emacs
|
||||
;;
|
||||
emacs20)
|
||||
load_path=${PREFIX}/share/emacs/20.3/${load_el}
|
||||
emacscmd=emacs20
|
||||
;;
|
||||
mule)
|
||||
load_path=${PREFIX}/share/mule/19.34/${load_el}
|
||||
emacscmd=mule
|
||||
;;
|
||||
xemacs19)
|
||||
load_path=${PREFIX}/lib/xemacs-19.16/${load_el}
|
||||
emacscmd=xemacs
|
||||
;;
|
||||
xemacs20)
|
||||
load_path=${PREFIX}/lib/xemacs-20.4/${load_el}
|
||||
emacscmd=xemacs
|
||||
;;
|
||||
xemacs21)
|
||||
load_path=${PREFIX}/lib/xemacs-21.1.4/${load_el}
|
||||
pkg_path=${PREFIX}/lib/xemacs/site-packages
|
||||
emacscmd=xemacs
|
||||
;;
|
||||
xemacs-mule)
|
||||
load_path=${PREFIX}/lib/xemacs/xemacs-packages/lisp/${load_el}
|
||||
pkg_path=${PREFIX}/lib/xemacs/site-packages
|
||||
emacscmd=xemacs
|
||||
;;
|
||||
*)
|
||||
echo "${Usage}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
if [ -n "${load_el}" ]; then
|
||||
echo "(setq load-path (cons \"${load_path}\" load-path))" > /tmp/${tmprfx}:load.el
|
||||
fi
|
||||
cp ${pkg_path}/pkginfo/MANIFEST.${port_name} ${pkg_path}/pkginfo/MANIFEST.${port_name}.bak
|
||||
for f in ${files}; do
|
||||
if [ -f ${WRKDIR}/${f} ]; then
|
||||
if [ -n "${load_el}" ]; then
|
||||
${emacscmd} -batch -l /tmp/${tmprfx}:load.el -q -no-site-file \
|
||||
-f batch-byte-compile ${WRKDIR}/${f}
|
||||
else
|
||||
${emacscmd} -batch -q -no-site-file -f batch-byte-compile ${WRKDIR}/${f}
|
||||
fi
|
||||
if [ $? -eq 0 -a -d ${pkg_path}/lisp/${port_name} ]; then
|
||||
rm -f ${pkg_path}/lisp/${port_name}/${f}.elc
|
||||
ln -s ${WRKDIR}/${f}.elc ${pkg_path}/lisp/${port_name}/${f}.elc
|
||||
cp ${pkg_path}/pkginfo/MANIFEST.${port_name} /tmp/${tmprfx}:tempfile
|
||||
grep -v "${f}.elc" /tmp/${tmprfx}:tempfile \
|
||||
> ${pkg_path}/pkginfo/MANIFEST.${port_name}
|
||||
echo "lisp/${port_name}/${f}.elc" >> ${pkg_path}/pkginfo/MANIFEST.${port_name}
|
||||
else
|
||||
cp ${pkg_path}/pkginfo/MANIFEST.${port_name} /tmp/${tmprfx}:tempfile
|
||||
grep -v "${f}.elc" /tmp/${tmprfx}:tempfile \
|
||||
> ${pkg_path}/pkginfo/MANIFEST.${port_name}
|
||||
rm -f ${pkg_path}/lisp/${port_name}/${f}.elc
|
||||
fi
|
||||
else
|
||||
echo "\"${WRKDIR}/${f}\": file not found!"
|
||||
fi
|
||||
done
|
||||
|
||||
rm -f /tmp/${tmprfx}:load.el ${pkg_path}/pkginfo/MANIFEST.${port_name}.bak
|
@ -1,5 +1,5 @@
|
||||
--- i18n-man-ja.el~ Tue Dec 8 01:48:18 1998
|
||||
+++ i18n-man-ja.el Tue Dec 8 01:48:48 1998
|
||||
--- i18n-man-ja.el~ Tue Dec 8 01:48:18 1998
|
||||
+++ i18n-man-ja.el Tue Dec 8 01:48:48 1998
|
||||
@@ -62,7 +62,6 @@
|
||||
"Hook for the Japanese manpage depend default coding system setting.
|
||||
Also save original values of variable to the local variable temporary."
|
||||
@ -7,4 +7,4 @@
|
||||
- (setenv "MANPATH" (format "/usr/share/man/ja:" (getenv "MANPATH")))
|
||||
(if (featurep 'mule)
|
||||
(case emacs-major-version
|
||||
(20 ;; XEmacs or Emacs-20.x (Mule-2.4, 3.0 or later)
|
||||
(20 ;; XEmacs or Emacs-20.x (Mule-2.4, 3.0 or later)
|
||||
|
@ -1 +1 @@
|
||||
Browse I18N capable UNIX manual pages with Mule, Emacs and XEmacs
|
||||
Browse I18N capable UNIX manual pages with Mule, Emacs and XEmacs.
|
||||
|
@ -5,8 +5,29 @@ The mode also supports hypertext-like following of manual page SEE
|
||||
ALSO references, and other features. See below or do `?' in a
|
||||
manual page buffer for details.
|
||||
|
||||
For working with Japanese, put your dot.emacs file to
|
||||
For working with Japanese, English and German, put your dot.emacs file
|
||||
following:
|
||||
|
||||
(load "i18n-man-ja")
|
||||
(autoload 'jman "i18n-man-ja" nil t)
|
||||
(autoload 'eman "i18n-man-en" nil t)
|
||||
(autoload 'dman "i18n-man-de" nil t)
|
||||
|
||||
Then M-x jman in minibuffer, and specify man page name.
|
||||
then
|
||||
|
||||
M-x jman
|
||||
to get a Japanese manual page thru jman(1) and put it in a buffer.
|
||||
M-x eman
|
||||
to get a English manual page thru man(1) and put it in a buffer.
|
||||
M-x dman
|
||||
to get a German manual page thru man(1) and put it in a buffer.
|
||||
|
||||
If you want byte-compile with your favorite "Emacs", use "byte-comile"
|
||||
script as:
|
||||
|
||||
# cd /usr/local/share/emacs/site-lisp
|
||||
# /usr/local/share/doc/prom-mew/byte-compile xemacs-mule i18n-man-ja i18n-man-ja.el i18n-man.el
|
||||
|
||||
For usage of byte_compile scripts, run byte_compile with -h option.
|
||||
|
||||
-KIRIYAMA Kazuhiko
|
||||
<kiri@kiri.toba-cmt.ac.jp>
|
||||
|
@ -2,3 +2,17 @@ share/emacs/site-lisp/i18n-man-de.el
|
||||
share/emacs/site-lisp/i18n-man-en.el
|
||||
share/emacs/site-lisp/i18n-man-ja.el
|
||||
share/emacs/site-lisp/i18n-man.el
|
||||
lib/xemacs/site-packages/lisp/i18n-man-de/i18n-man.el
|
||||
lib/xemacs/site-packages/lisp/i18n-man-de/i18n-man-de.el
|
||||
lib/xemacs/site-packages/pkginfo/MANIFEST.i18n-man-de
|
||||
lib/xemacs/site-packages/lisp/i18n-man-en/i18n-man.el
|
||||
lib/xemacs/site-packages/lisp/i18n-man-en/i18n-man-en.el
|
||||
lib/xemacs/site-packages/pkginfo/MANIFEST.i18n-man-en
|
||||
lib/xemacs/site-packages/lisp/i18n-man-ja/i18n-man.el
|
||||
lib/xemacs/site-packages/lisp/i18n-man-ja/i18n-man-ja.el
|
||||
lib/xemacs/site-packages/pkginfo/MANIFEST.i18n-man-ja
|
||||
share/doc/i18n-man/byte-compile
|
||||
@dirrm lib/xemacs/site-packages/lisp/i18n-man-de
|
||||
@dirrm lib/xemacs/site-packages/lisp/i18n-man-en
|
||||
@dirrm lib/xemacs/site-packages/lisp/i18n-man-ja
|
||||
@dirrm share/doc/i18n-man
|
||||
|
Loading…
Reference in New Issue
Block a user