Misc. Tools on MacOS X

Table of Contents

Minimal Japanese Environment
Tcl/Tk and TkDesk
Ghostscript and Ghostview
TeX Family
More Tools: Xv, blt, ncftp, tgif, ...

Minimal Japanese Environment

less

$ cd less-358
$ patch -p1 -s < <somewhere>/less-358-iso249.patch
$ sh configure --prefix=/usr/local
$ make
$ su
# mkdir -p tmp/usr/local
# make install prefix=`pwd`/tmp/usr/local
# tar -zcvf <somewhere>/less-358-bin.tar.gz -C tmp usr
# tar -zxvf <somewhere>/less-358-bin.tar.gz -C /

You may want to add

    export JLESSCHARSET=japanese-iso7

to your ~/.bashrc to browse Japanese documents.
 

nkf

$ cd nkf-1.92
$ mv NKF NKF.P  # remember HFS+ is a case-insensitive file system:-(
$ make
$ su
# mkdir -p tmp/usr/local/bin
# mkdir -pr tmp/usr/local/man/man1
# cp nkf tmp/usr/local/bin
# cp nkf.1 tmp/usr/local/man/man1
# chown -R root:wheel tmp/usr
# tar -zcvf <somewhere>/nkf_1.92_1-bin.tar.gz -C tmp usr
# tar -zxvf <somewhere>/nkf_1.92_1-bin.tar.gz -C /
 

kterm

$ cd kterm-6.2.0
$ patch -p1 -s < ../kterm-6.2.0-noxim.patch
$ vi KTerm.ad
! $XConsortium: XTerm.ad,v 1.32 94/02/09 18:19:21 converse Exp $
! $Id: KTerm.ad,v 6.2 1996/06/23 08:00:09 kagotani Rel $
*VT100*translations: #override \
 Shift<Key>space: begin-conversion(_JAPANESE_CONVERSION)
.....
$ xmkmf -a
$ make
$ su
# mkdir -p tmp/usr/X11R6/bin
# mkdir -p tmp/private/etc/X11/app-defaults
# cp kterm tmp/usr/X11R6/bin
# cp KTerm.ad tmp/private/etc/X11/app-defaults/KTerm
# tar -zcvf <somewhere>/kterm-6.2.0-xf86.tar.gz -C tmp .
# tar -zxvf <somewhere>/kterm-6.2.0-xf86.tar.gz -C /
 

Notes:

Found that termcap entry for kterm is missing:

$ cp /usr/share/misc/termcap ~/.termcap
$ cat <kterm source dir>/termcap.kt >> ~/.termcap
 

For inputting Japanese characters, do

$ vi ~/.inputrc
set convert-meta off
set meta-flag on
set output-meta on
 

Canna

I had to apply a patch to /usr/X11R6/lib/X11/config/MacOSX.rules:

<patch begins>
--- /usr/X11R6/lib/X11/config/MacOSX.rules.ORIG Sat Dec 16 06:37:33 2000
+++ /usr/X11R6/lib/X11/config/MacOSX.rules      Mon Jan 15 21:21:01 2001
@@ -37,7 +37,7 @@
 #define InstallSharedLibrary(libname,rev,dest)                         @@\
 install:: Concat(lib,libname.dylib)                                    @@\
        MakeDir($(DESTDIR)dest)                                         @@\
-       $(INSTALL) $(INSTLIBFLAGS) Concat(lib,libname.dylib) $(DESTDIR)dest
+       $(INSTALL) $(INSTALLFLAGS) $(INSTBINFLAGS) Concat(lib,libname.dylib) $(D
ESTDIR)dest
 @@\

 #endif /* InstallSharedLibrary */
<patch ends>

$ tar -zxvf Canna35b2.tar.gz
$ cd Canna35b2
$ patch -p1 -s < ../Canna-3.5b2.conf.patch
$ patch -p1 -s < ../Canna-3.5b2.Imakefile.patch
$ patch -p0 -s < ../Canna-3.5b2-glibc.patch
$ patch -p1 -s < ../Canna-3.5b2-stdin.patch
$ patch -p1 -s < ../Canna-3.5b2.security.patch
$ patch -p1 -s < ../Canna-3.5b2.macosx.patch
$ export libCannaDir=/usr/local/lib
$ xmkmf
$ make Makefiles
$ make canna
$ su
# mkdir -p tmp/private/var/log
# ln -s private/var tmp/var
# mkdir -p tmp/usr/local
# make install DESTDIR=`pwd`/tmp
# make install.man DESTDIR=`pwd`/tmp
# tar -zcvf <somewhere>/Canna-3.5b2-bin.tar.gz -C tmp .
# tar -zxvf <somewhere>/Canna-3.5b2-bin.tar.gz -C /
 

kinput2

$ tar -zxvf kinput2-v3.tar.gz
$ cd kinput2-v3
$ patch -p1 -s < ../kinput2-v3.macosx.patch
$ xmkmf -a
$ make
$ su
# mkdir -p tmp/usr/X11R6/app-defaults
# mkdir -p tmp/private/etc
# ln -s ../../usr/X11R6 tmp/private/etc/X11
# make install DESTDIR=`pwd`/tmp
# tar -zcvf <somewhere>/kinput2-v3-xf86.tar.gz -C tmp .
# tar -zxvf <somewhere>/kinput2-v3-xf86.tar.gz -C /
 

FVWM2

$ cd fvwm-2.2.4
$ configure --prefix=/usr/local
$ make
$ su
# mkdir -p tmp/usr/local
# make install prefix=`pwd`/tmp/usr/local
# tar -zcvf <somewhere>/fvwm-2.2.4-xf86.tar.gz -C tmp usr
# tar -zxvf <somewhere>/fvwm-2.2.4-xf86.tar.gz -C /
 
 
 

Tcl/Tk and TkDesk

Tcl/Tk

$ for i in *.tar.gz; do tar -zxvf $i; done
$ tcl8.0.5/
$ patch -p2 < ../../tcl8.0.3-glibc21.patch
$ patch -p2 < ../../tcl8.0.5-sigpwr.patch
$ patch -p0 < ../../tcl8.0.5jp1.6.patch
$ patch -p1 < ../../tcl8.0.5-macosx-shared.patch
$ cd ../itcl3.0.1/
$ patch -p5 -s < ../../itcl_fix.diff
$ patch -p1 -s < ../../itcl3.0.1jp-tkpath.patch
$ patch -p1 < ../../tk8.0.5-macosx-shared.patch
$ cd ../tk8.0.5/
$ patch -p0 -s < ../../tk8.0.5jp1.6a.patch
$ patch -p1 -s < ../../tk8.0.5jp1.6a-im.patch
$ patch -p2 -s < ../../tcl8.0.5jp-path.patch
$ patch -p1 < ../../itcl3.0.1-macosx-shared.patch

$ cd ../tcl8.0.5/unix
$ ./configure --enable-shared --enable-gcc --prefix=/usr/local
$ make >& make.log # with libc and libm, I don't need to set LIBS

$ cd ../../tk8.0.5/unix
$ ./configure --enable-shared --enable-gcc --with-tcl=../../tcl8.0.5/unix --prefix=/usr/local
$ make >& make.log # with libc and libm, I don't need to set LIBS

$ cd ../../itcl3.0.1/
$ ./configure  --enable-shared --prefix=/usr/local -enable-gcc --with-tcl=/Users/fujiik/sandbox/mypkg/src/tcltk/build/tcl8.0.5/unix/ --with-tk=/Users/fujiik/sandbox/mypkg/src/tcltk/build/tk8.0.5/unix/
$ make CC='gcc -DKANJI -DKINPUT2 -DXIM_IMPROVE' >& make.log &

$ cd ..
$ su
# mkdir tmp
# cd tcl8.0.5/unix/
# make install INSTALL_ROOT=`pwd`/../../tmp
# cd ../../tk8.0.5/unix/
# make install INSTALL_ROOT=`pwd`/../../tmp
# cd ../../itcl3.0.1/
# make install INSTALL_ROOT=`pwd`/../../tmp exec_prefix=/usr/local
# cd ..
# ln -s tclsh8.0jp tmp/usr/local/bin/tclsh
# ln -s wish8.0jp tmp/usr/local/bin/wish
# ln -s itclsh3.0 tmp/usr/local/bin/itclsh
# ln -s itkwish3.0 tmp/usr/local/bin/itkwish
# ln -s libtcl8.0jp.dylib tmp/usr/local/lib/libtcl8.0.dylib
# ln -s libtk8.0jp.dylib tmp/usr/local/lib/libtk8.0.dylib
# tar -zcvf <somewhere>/tcltk-8.0.5jp-dynamic-xf86.tar.gz -C tmp usr
# tar -zxvf <somewhere>/tcltk-8.0.5jp-dynamic-xf86.tar.gz -C /
 

TkDesk

$ tkdesk-1.2
$ patch -p1 < ../tkdesk-1.2+jp.patch
$ patch -p0 < ../exit-save-dd.diff
$ cd tcldesk/
$ patch -p0 < ../../appbar-dnd.diff
$ patch -p0 < ../../empty-trash.diff
$ patch -p0 < ../../find-dd.diff
$ cd ..
$ ./configure --prefix=/usr/local
$ make CC_OPTS="-O2  -DKANJI -DKINPUT2 -DXIM_IMPROVE"
$ mkdir -p usr/local/{bin,lib,man}
$ su
$ mkdir tmp
# make install INSTALL_ROOT=`pwd`/tmp
# tar -zcvf <somewhere>/tkdesk-1.2jp-dynamic-xf86.tar.gz -C tmp .
# tar -zxvf <somewhere>/tkdesk-1.2jp-dynamic-xf86.tar.gz -C /

In order to use /bin/bash as my default shell, I prepared a shell wrapper for TkDesk:

$ cat ~/bin/tkdesk
#!/bin/bash
source ~/.profile
xmodmap ~/.Xmodmap
export SHELL=/bin/bash
exec /usr/local/bin/tkdesk $*

and start TkDesk from ~/.xinitrc

$ cat ~/.xinitrc
......
$HOME/bin/tkdesk $* &
exec /usr/local/bin/fvwm2
 
 

Ghostscript and Ghostview

Libraries needed to build Ghostscript, GV, etc.

jpeg

$ cd jpeg-6b/
$ ./configure --prefix=/usr/local
$ make >& make.log &
$ su
# mkdir -p tmp/usr/local/{bin,lib,share,man/man1}
# make install prefix=`pwd`/tmp/usr/local
# tar -zcvf <somewhere>/jpeg-6b-bin.tar.gz -C tmp usr
# tar -zxvf <somewhere>/jpeg-6b-bin.tar.gz -C /
# exit

zlib

$ cd zlib-1.1.3
$ ./configure --prefix=/usr/local
$ make
$ su
# make install prefix=`pwd`/tmp/usr/local
# cp zutil.h tmp/usr/local/include/
# mkdir -p tmp/usr/local/man/man3
# cp zlib.3 tmp/usr/local/man/man3/
# tar -zcvf ../../../../tgz/zlib-1.1.3-bin.tar.gz -C tmp usr
# tar -zxvf ../../../../tgz/zlib-1.1.3-bin.tar.gz -C /
# exit

libpng

$ cd libpng-1.0.1
$ cp scripts/makefile.dwn Makefile
$ vi Makefile
 mkdir  ---> mkdir -p
# make install prefix=`pwd`/tmp/usr/local
# ranlib -s tmp/usr/local/lib/libpng.a
# tar -zcvf ../../../tgz/libpng-1.0.1-bin.tar.gz -C tmp usr
# tar -zxpvf ../../../tgz/libpng-1.0.1-bin.tar.gz -C /
# exit

VFlib

$ cd VFlib2-2.24.2
$ patch -p1 -s < <somewhere>/VFlib2-2.24.2-macosx.patch
$ ./configure --prefix=/usr/local --with-x --with-freetype --with-freetype-includedir=/usr/local/include/freetype
$ make
$ su
# make install prefix=`pwd`/tmp/usr/local
make: `install' is up to date.
# vi Makefile
....
install::
....
# make install prefix=`pwd`/tmp/usr/local
# ln -s libVFlib2.a tmp/usr/local/lib/libVFlib.a
# tar -zcvf ../../../../tgz/VFlib-2.24.2-bin.tar.gz -C tmp usr
# tar -zxvf ../../../../tgz/VFlib-2.24.2-bin.tar.gz -C /
# tar -zxvf ../../../../tgz/xtt-truetypefont.tar.gz
# exit
 

Ghostscript

$ tar -zxvf ../gs/gnu-gs-5.50.tar.gz
$ cd gs5.50/
$ tar -zxvf ../../gs/gnu-gs-5.50jpeg.tar.gz
$ tar -zxvf ../../gs/gdevmd2k-0.2a.tar.gz
$ cd ..
$ tar -zxvf ../gs/ghostscript-5.50gnu.tar.gz
$ cd gs5.50/
$ tar -zxvf ../../gs/gs5.50-vflib-1.0.tar.gz
$ tar -zxvf ../../gs/gs550j1.tar.gz
$ ln -s jpeg-6b jpeg
$ patch -s -p1 < gs5.50-vflib-1.0/gs5.50-vflib-1.0.diff
$ patch -s -p1 < ../../gs/ghostscript-5.50-configj.patch
$ patch -s -p1 < gs550j1.diff
$ cat jdevs.add >>contrib.mak
$ patch -s -p1 < ../../gs/gs5.50-rth.patch
$ patch -s -p1 < ../../gs/gs5.50-hp8xx.patch
$ mkdir tmp
$ cd tmp
$ unzip -a -L ../../../gs/hp8xxs13.zip
$ mv *.c *.h ..
$ tar -zxvf ../../../gs/epson740.tgz
$ mv epson740/*.upp ..
$ tar -zxvf ../../../gs/hpdj-2.6.tar.gz
$ tar -xvf hpdj-2.6/hpdj.tar
$ mv *.c *.h *.1 ..
$ cd ..
$ patch -s -p1 < ../../gs/ghostscript-5.50-cdj880.patch
$ cat tmp/contrib.mak-5.50.add  >>contrib.mak
$ patch -s -p1 < ../../gs/gs5.50-hpdj.patch
$ patch -s -p1 < ../../gs/gs5.50-lexmark5700.patch
$ mv gdevmd2k-0.2a/*.[ch] .
$ cat gdevmd2k-0.2a/gdevmd2k.mak-5.50 >>contrib.mak
$ perl -pi -e "s/^DEVICE_DEVS6=/DEVICE_DEVS6=md2k.dev md5k.dev /g" unix-gcc.mak
$ patch -s -p1 < ../../gs/gs5.50-lexmark7000.patch
$ patch -s -p1 < ../../gs/ghostscript-5.50-bmp16m.patch
$ patch -s -p1 < ../../gs/ghostscript-5.50-gcc296.patch
$ patch -s -p0 < ../../gs/ghostscript-5.50-jisb.patch
$ patch -s -p0 < ../../gs/ghostscript-5.50-ps.patch
$ rm -rf tmp/
$ ln -s unix-gcc.mak Makefile
$ mkdir obj
$ make obj
$ make obj/arch.h
$ ln -s obj/arch.h .
$ make gdevcd8.o
$ mv gdevcd8.o obj
$ make prefix=/usr/local >& make.log &
$ tail -f make.log
.....
cat ./obj/ld.tr >>./obj/ldt.tr
./obj/echogs -a ./obj/ldt.tr -s -  -lm
LD_RUN_PATH=; export LD_RUN_PATH; \
XCFLAGS= XINCLUDE= XLDFLAGS= XLIBDIRS= XLIBS= \
FEATURE_DEVS= DEVICE_DEVS= DEVICE_DEVS1= DEVICE_DEVS2= DEVICE_DEVS3= \
DEVICE_DEVS4= DEVICE_DEVS5= DEVICE_DEVS6= DEVICE_DEVS7= DEVICE_DEVS8= \
DEVICE_DEVS9= DEVICE_DEVS10= DEVICE_DEVS11= DEVICE_DEVS12= \
DEVICE_DEVS13= DEVICE_DEVS14= DEVICE_DEVS15= \
/bin/sh <./obj/ldt.tr
/usr/bin/ld: Undefined symbols:
_crc32
make: *** [obj/gs] Error 1
$ vi obj/ld.tr
.....
-lz \   # -lz should come last
$ su
# mkdir -p tmp/usr/local/{bin,doc,man}
# make install prefix=`pwd`/tmp/usr/local mandir=`pwd`/tmp/usr/local
# tar -zxvf ../../../gs/gnu-gs-fonts-std-5.50.tar.gz
# tar -zxvf ../../../gs/gnu-gs-fonts-other-5.50.tar.gz
# chown -R root:wheel fonts/
# mv fonts tmp/usr/local/share/ghostscript/
# tar -zcvf ../../../../tgz/gs-5.50jp-bin.tar.gz -C tmp/ usr
# tar -zxvf ../../../../tgz/gs-5.50jp-bin.tar.gz -C /
# exit
 

Ghostview

$ cd gv-3.5.8
$ patch -p1 -s < ../../gv/gv-3.5.8-config.patch
$ patch -p1 -s < ../../gv/gv-3.5.8-alias.patch
$ patch -p1 -s < ../../gv/gv-3.5.8-macosx.patch
$ xmkmf
$ make Makefiles
$ make
$ su
# mkdir -p tmp/private/etc
# ln -s private/etc tmp/etc
# make install DESTDIR=`pwd`/tmp
# tar -zcvf ../../../../tgz/gv-3.5.8-bin.tar.gz -C tmp/ .
# tar -zxvf ../../../../tgz/gv-3.5.8-bin.tar.gz -C /
# exit
 
 
 
 

TeX Family

$ tar -zxvf ../ptex/web-7.2.tar.gz
$ tar -zxvf ../ptex/web2c-7.2.tar.gz
$ mkdir -p tmp/usr/local/share
$ tar -zxvf ../ptex/texmflib-7.3.tar.gz -C tmp/usr/local/share/
$ patch -p1 -s < ../ptex/mktexpk.patch
$ patch -p1 -s < ../ptex/mktexlsr.patch
$ pushd tmp/usr/local/share/texmf/tex/latex/base/
$ mv latex.ltx ../../../../../../../../tmp/latex.ltx.save
$ head -558 ../../../../../../../../tmp/latex.ltx.save > latex.ltx
$ tail +575 ../../../../../../../../tmp/latex.ltx.save >> latex.ltx
$ popd
$ export LD_LIBRARY_PATH=/Users/fujiik/sandbox/mypkg/src/ptex/build/tmp/usr/local/lib
$ su
# ln -s /Users/fujiik/sandbox/mypkg/src/ptex/build/tmp/usr/local/share/texmf /usr/local/share/.
# exit
$ cd web2c-7.2/
$ mv config.guess config.guess.ORIG
$ mv config.sub config.sub.ORIG
$ cp ../../../vflib/build/VFlib2/config.guess .
$ cp ../../../vflib/build/VFlib2/config.sub .
$ CFLAGS='-O' ./configure --prefix=/usr/local --datadir=/usr/local/share --with-x --with-x-toolkit=yes
$ TEXMF=`pwd`/../tmp/usr/local/share/texmf
$ make fmts=""
$ make prefix=`pwd`/../../../tmp/usr/local texmf="$TEXMF" fmts="" install
$ tar -zxvf ../../ptex/plib-1.4-euc.tar.gz -C `pwd`/../tmp/usr/local/share
$ tar -zxvf ../../ptex/ptex218.tar.gz -C web2c/
$ cd web2c/ptex218/
$ uudecode ../../../../ptex/Makefile.in.patch.txt
$ patch < Makefile.in.patch
$ ./configure EUC
$ make texmf="$TEXMF"
$ make prefix=`pwd`/../tmp/usr/local texmf="$TEXMF" install
$ cd ../..
$ mv ../tmp/usr/local/share/texmf/plib-1.4-euc.txt ..
$ mv web2c/ptex218/Changes.txt ..
$ mv web2c/ptex218/README.euc ..
$ pushd $TEXMF/web2c
$ cat ../../../../../../../ptex/texmf.cnf.patch | patch
$ popd
$ echo "ascgrp ascgrp" >> $TEXMF/fontname/special.map
$ echo "ascii  ascgrp" >> $TEXMF/fontname/special.map
$ mkdir -p ../tmp/private/var/tmp/texfonts
$ chmod -R 1777 ../tmp/private/var/tmp
$ ln -s private/var ../tmp/var
$ ln -s mktexlsr ../tmp/usr/local/bin/MakeTeXls-R
$ su
# cd tmp
# tar -zcvf ../../../../tgz/pTeX-2.1.8-bin.tar.gz .
# tar -zxvf ../../../../tgz/pTeX-2.1.8-bin.tar.gz -C /
 

# cd ..
# mkdir -p tmp/usr/local/share/texmf/tex/{latex,platex,platex209}
# tar -zxvf ../platex/base-9906.tar.gz -C $TEXMF/tex/latex
# tar -zxvf ../platex/pl19990809e.tar.gz -C $TEXMF/tex/platex
# mv $TEXMF/tex/platex/19990809 $TEXMF/tex/platex/base
# tar -zxvf ../platex/ec.tar.gz
# tar -zxvf ../platex/ams-tfm.tgz
# tar -zxvf ../platex/ams-sources.tgz
# tar -zxvf ../platex/platex209.tar.gz
# mkdir -p $TEXMF/fonts/tfm/public/ec
# mkdir -p $TEXMF/fonts/tfm/source/ec
# cp -pPR ec/tfm/* $TEXMF/fonts/tfm/public/ec
# cp -pPR ec/ready-mf $TEXMF/fonts/source/ec
# rm -rf ec
# mkdir -p $TEXMF/fonts/tfm/ams
# mkdir -p $TEXMF/fonts/tfm/source/ams
# cp -pPR tfm/* $TEXMF/fonts/tfm/ams
# cp -pPR sources/* $TEXMF/fonts/source/ams
# rm -rf sources tfm
# mkdir -p $TEXMF/tex/platex209/base
# cp -pPR platex209/* $TEXMF/tex/platex209/base
# rm -rf platex209/

# TEXBIN=/usr/local/bin
# TEXMF=/usr/local/share/texmf
# BUILD_TEXBIN=`pwd`/tmp/usr/local/bin
# BUILD_TEXMF=`pwd`/tmp/usr/local/share/texmf
# TEXINPUTS=.:$BUILD_TEXMF/tex//
# TEXFORMATS=.:$BUILD_TEXMF/web2c:$TEXMF/web2c
# TEXPOOL=.:$BUILD_TEXMF/web2c:$TEXMF/web2c
# export TEXMF TEXINPUTS TEXFORMATS TEXPOOL

(cd $BUILD_TEXMF/tex/latex/base;$TEXBIN/tex -ini ./unpack.ins)
# (cd $BUILD_TEXMF/tex/latex/base;$TEXBIN/tex -ini ./latex.ltx)
# mv -f $BUILD_TEXMF/tex/latex/base/latex.fmt $BUILD_TEXMF/web2c
# (cd $BUILD_TEXBIN; ln -fs virtex latex)

# (cd $BUILD_TEXMF/tex/platex/base;$TEXBIN/ptex -ini ./plcore.ins)
# (cd $BUILD_TEXMF/tex/platex/base;$TEXBIN/ptex -ini ./platex.ltx)
# mv -f $BUILD_TEXMF/tex/platex/base/platex.fmt $BUILD_TEXMF/web2c
# (cd $BUILD_TEXBIN; ln -fs virptex platex)

# (cd $BUILD_TEXMF/tex/platex209/base;$TEXBIN/ptex -ini './jlplain.tex \dump')
# mv $BUILD_TEXMF/tex/platex209/base/jlplain.fmt $BUILD_TEXMF/web2c/jlatex.fmt
# (cd $BUILD_TEXBIN; ln -fs virptex jlatex)

# (cd $BUILD_TEXMF/tex/platex209/base;$TEXBIN/ptex -ini './plplain.tex \dump')
# mv $BUILD_TEXMF/tex/platex209/base/plplain.fmt $BUILD_TEXMF/web2c/platex209.fm
# (cd $BUILD_TEXBIN; ln -fs virptex platex209)

# tar  -zxvf ../latex/packages.tar.gz
# cd tmp
# mkdir -p usr/local/share/texmf/tex/latex/packages/amslatex
# mkdir -p usr/local/share/texmf/tex/latex/packages/babel
# mkdir -p usr/local/share/texmf/tex/latex/packages/expl3
# mkdir -p usr/local/share/texmf/tex/latex/packages/mfnfss
# mkdir -p usr/local/share/texmf/tex/latex/packages/psnfss
# mkdir -p usr/local/share/texmf/tex/latex/packages/graphics
# mkdir -p usr/local/share/texmf/tex/latex/packages/tools
# cd ../packages
# (cd amslatex/classes; ${TEXBIN}/latex ./amsclass.ins)
# (cd amslatex/math; ${TEXBIN}/latex ./amslatex.ins)
# (cd babel; ${TEXBIN}/latex ./babel.ins)
# (cd graphics; ${TEXBIN}/latex ./graphics.ins)
# (cd tools; ${TEXBIN}/latex ./tools.ins)
# TEXMF=$BUILD_TEXMF
# (cd amslatex/classes; install -c -m 644 * ${TEXMF}/tex/latex/packages/amslatex)
# (cd amslatex/math; install -c -m 644 * ${TEXMF}/tex/latex/packages/amslatex)
# (cd babel; install -c -m 644 * ${TEXMF}/tex/latex/packages/babel)
# (cd graphics; install -c -m 644 * ${TEXMF}/tex/latex/packages/graphics)
# echo "\ExecuteOptions{dvips}" > ${TEXMF}/tex/latex/packages/graphics/color.cfg
# echo "\ExecuteOptions{dvips}" > ${TEXMF}/tex/latex/packages/graphics/graphics.cfg
# (cd tools; install -c -m 644 * ${TEXMF}/tex/latex/packages/tools)
# cd ..
# rm -rf packages

# cd tmp
# mv -f latex.ltx.save ../tmp/usr/local/share/texmf/tex/latex/base/latex.ltx
# tar -zcvf ../../../../tgz/pTeX-2.1.8-bin.tar.gz .
# tar -zxvf ../../../../tgz/pTeX-2.1.8-bin.tar.gz -C /
# exit

$ tar -zxvf ../dvipsk/dvipsk-5.78a.tar.gz
$ cd dvipsk-5.78a/
$ tar -zxvf ../../dvipsk/dvipsk-jpatch-p1.4c.tar.gz
$ cd dvipsk
$ patch -p1 -s < ../dvipsk.patch
$ cd ..
$ mv config.guess config.guess.ORIG
$ mv config.sub config.sub.ORIG
$ cp ../../../vflib/build/VFlib2/config.guess .
$ cp ../../../vflib/build/VFlib2/config.sub .
$ ./configure --prefix=/usr/local
$ make CFLAGS='-O' >& make.log &
$ su
# make -C dvipsk prefix=`pwd`/../tmp/usr/local texmf=`pwd`/../tmp/usr/local/share/texmf install
# cp dvipsk/contrib/config.proto ../tmp/usr/local/share/texmf/dvips/config.ps
# cp dvipsk/psfonts.map ../tmp/usr/local/share/texmf/dvips/base/
# cd ../tmp
# tar -zxvf ../../../../tgz/jvf-1.0.tar.gz
# exit

$ cd ..
$ tar -zxvf ../xdvi/xdvik-20c.tar.gz
$ gzip -dc ../../xdvi/xdvik20c-j1.0p0c.patch.gz | patch -s -p1
$ patch -p1 -s < ../../xdvi/xdvik-20c-shrink.patch
$ patch -p1 -s < ../../xdvi/xdvik-20c-xaw3d.patch
$ mv config.guess config.guess.ORIG
$ mv config.sub config.sub.ORIG
$ cp ../../../vflib/build/VFlib2/config.guess .
$ cp ../../../vflib/build/VFlib2/config.sub .
$ ./configure --prefix=/usr/local --with-dvifilter=dvips --with-x-toolkit=yes
make VFLIB="-L/usr/local/lib -lVFlib2 -lttf" XDEFS="-DA4 -DNOTEXXET -DVI_KEY -DPTEX -DCOLOR -DBDPI=300 -DSHRINK=\\\"5\\\" -DSMALL_PANEL" x_ext_lib=-lXext >& make.log &
$ su
# mkdir -p ../tmp/usr/local/share/texmf/xdvi
# make prefix=`pwd`/../tmp/usr/local texmf=`pwd`/../tmp/usr/local/share/texmf install > & install.log &
# cp xdvik/xdvipaper.dvi2ps-j ../tmp/usr/local/share/texmf/xdvi/
# cp xdvik/xdvipaper.dvips  ../tmp/usr/local/share/texmf/xdvi/
# cp xdvik/xdvipaper.jdvi2kps  ../tmp/usr/local/share/texmf/xdvi/
# cat > ../tmp/usr/local/share/texmf/xdvi/vfontmap << EOF
 -> min     min     # for ASCII
 -> nmin    min     # for ASCII
 -> goth    goth    # for ASCII
 -> ngoth   goth    # for ASCII
 -> EOF
#exit

$ cd ..
$ tar -zxvf ../seetex/SeeTeX-2.19.tar.gz
$ gzip -dc ../../seetex/SeeTeX-2.19-2.19J.gz | patch -p1 -s
$ patch -p1 -s < ../../seetex/SeeTeX-2.19-glibc.patch
$ xmkmf
$ make Makefiles
$ make STD_DEFINES='-D_BSD_SOURCE' COMMON_SUBDIRS="libtex Dviselect Dviconcat" TEX_BINDIR=/usr/local/bin TEX_MANDIR=/usr/local/man/man1 FontDesc=/usr/local/share/texmf/dvi2ps/fontdesc
$ su
#  make COMMON_SUBDIRS="Dviselect Dviconcat" TEX_BINDIR=`pwd`/../tmp/usr/local/bin TEX_MANDIR=`pwd`/../tmp/usr/local/man/man1 MANSUFFIX=1 install install.man

# cd ../tmp
# chmod -R 1777 private/var/tmp
# tar -zcvf ../../../../tgz/pTeX-2.1.8-bin.tar.gz .
# tar -zxvf ../../../../tgz/pTeX-2.1.8-bin.tar.gz -C /
# exit
 
 

More Tools: Xv, blt, ncftp, tgif, ...

Xv

$ cd xv-3.10a-Darwin
$ vi Makefile
....
JPEGDIR = /usr/local
JPEGINC = -I$(JPEGDIR)/include
JPEGLIB = $(JPEGDIR)/lib/libjpeg.a
....
DESTDIR =
BINDIR = $(DESTDIR)/usr/local/bin
MANDIR = $(DESTDIR)/usr/local/man/man1
MANSUF = 1
LIBDIR = $(DESTDIR)/usr/local/lib
$ make
$ su
# mkdir -p tmp/usr/local/{bin,lib,man/man1}
# make install DESTDIR=`pwd`/tmp
# tar -zcvf ../../../../tgz/xv-3.10a-xf86.tar.gz -C tmp usr
# tar -zxvf ../../../../tgz/xv-3.10a-xf86.tar.gz -C /
# exit
 

Blt

$ cd blt2.4m
$ cd cf
$ patch -p1 -s < ../../blt/blt2.4m_destdir.patch
$ patch -p1 -s < ../../blt/blt2.4m_demos.patch
$ patch -p1 -s < ../../blt/blt2.4m_jp.patch
$ mv config.guess config.guess.ORIG
$ mv config.sub config.sub.ORIG
$ cp ../../../vflib/build/VFlib2/config.guess .
$ cp ../../../vflib/build/VFlib2/config.sub .
$ ./configure --prefix=/usr/local
$ make >& make.log &
$ su
# mkdir -p tmp/usr/local
# make install instroot=`pwd`/tmp
# pushd tmp/usr/local/lib
# ln -s blt2.4 blt
# ln -s libBLT.so.2.4 libBLT.dylib
# popd
# tar -zcvf ../../../../tgz/blt2.4m-bin.tar.gz -C tmp usr
# tar -zxvf ../../../../tgz/blt2.4m-bin.tar.gz -C /
# exit
 

Ncftp

$ cd ncftp-3.0.2
$ patch -p1 -s < ../../ncftp/ncftp-3.0beta21-y2k.patch
$ patch -p0 -s < ../../ncftp/ncftp-3.0.1-pref.patch
$ su
# cd /usr/local/include
# ln -s ncurses/ncurses.h .
# exit
$ ./configure --prefix=/usr/local --enable-signals
$ make STRIPFLAG=""
$ su
# mkdir -p tmp/usr/local/{bin,man/man1}
# make install prefix=`pwd`/tmp/usr/local
# tar -zcvf ../../../../tgz/ncftp-3.0.2-bin.tar.gz -C tmp/ usr
# tar -zxvf ../../../../tgz/ncftp-3.0.2-bin.tar.gz -C /
 

Note:
Found that termcap entry for kterm is missing:

$ cp /usr/share/misc/termcap ~/.termcap
$ cat <kterm source dir>/termcap.kt >> ~/.termcap

This must fix strange behavior of ncftp in hosts menu.
 

Tgif

$ cd tgif-4.1.40
$ cp Tgif.tmpl-linux Tgif.tmpl
$ vi Tgif.tmpl
.....
EXTDEFINES      = -DEPSF_FILE_EXT=\"eps\" -DPS_FILE_EXT=\"ps\" \@@\
                  -DXBM_FILE_EXT=\"xbm\" -DXPM_FILE_EXT=\"xpm\" \@@\
                  -DOBJ_FILE_EXT=\"obj\" -DSYM_FILE_EXT=\"sym\" \@@\
                  -DTEXT_FILE_EXT=\"txt\" -DPIN_FILE_EXT=\"pin\" \@@\
                  -D_NO_RAND48 \@@\
                  -DNETLIST_FILE_EXT=\"net\" -DCOMP_FILE_EXT=\"cmp\"
.....
SYS_LIBRARIES   = -lXt -lX11 -lSM -lICE -ldl -lm
$ xmkmf
$ make
$ su
# mkdir tmp
# make DESTDIR=`pwd`/tmp TGIFDIR=/usr/X11R6/lib/X11/tgif install
# make DESTDIR=`pwd`/tmp install.man
# tar -zcvf ../../../../tgz/tgif-4.1.40-xf86.tar.gz -C tmp usr
# tar -zxvf ../../../../tgz/tgif-4.1.40-xf86.tar.gz -C /
# exit
 
 
 
 
 
 


Back to Keisuke Fujii's HEP on X Page
fujiik@jlcuxf.kek.jp March 18, 2001