/*------- gettext-0.10.35 for OS/2 Sat, 24 Feb 2001 21:19:26 +0900 -------*/ Jun Sawataishi, YOKOHAMA, JAPAN SAWATAISHI JUN, YOKOHAMA JAPAN http://www2s.biglobe.ne.jp/~vtgf3mpr/indxos2.htm Table of contents ================= General Instruction @gen History of OS/2 Port @his Required Executables @req Setup Language @lan Usage @usa Compile and Make @com General Instruction =================== A lot of Linux distributions follow the Filesystem Hierarchy Standard (FHS), a collaborative document that defines the names and locations of many files and directories. I have decided to make zip archive for which end users can install files in FHS like way. File Structure of ZIP archive ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From Feb-17-2001, newly uploaded zip archive will contain four files. = gettext-0.10.35.zip README_gettext-0.10.35.os2 -- instruction OS2tree.zip -- binary and library treee filelist.dat -- list of `OS2tree.zip' - OS2tree.zip /usr/bin/ -- executables /usr/dll/ -- DLLs /usr/lib/ -- C library files /usr/include/ -- C include files /usr/share/doc/gettext-0.10.35 -- documents /usr/share/man/ -- manpages /usr/share/info/ -- Info manuals /usr/share/locale/ -- message files for gettext compliant programs and other locale related files /usr/share/emacs/site-lisp/ -- emacs lisp files /usr/src/redhat/SOURCES/gettext-0.10.35-OS2-patch.zip -- patch kit to build from scratch /usr/src/redhat/SPECS/gettext-0.10.35-os2.spec : spec file for rpm - gettext-0.10.35-OS2-patch.zip BUILD_gettext-0.10.35.os2 -- instruction os2config.cmd -- modify source using `os2unix' and apply diff files followed by running configure os2/C_Source.diff -- patch for C source os2/In-make.diff for Makefile.in's and scripts os2/Other.diff for other files +--- os2unix utility -------------------------------+ | os2/os2_convert_configure.sed | | os2/os2_convert_Makefile_in.sed | | os2/os2_convert_Makefile_in_in.sed | | os2/os2_convert_Makefile_in_lib_prog.sed | | os2/os2_convert_mk.sed | | os2/os2_convert_Makefile_in.grep | | os2/os2_mkinstalldirs | | os2/os2_missing | | os2unix.cmd | +---------------------------------------------------+ UNIXROOT environment variable ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ I recommend you to set UNIXROOT env. var., where OS/2 ported free software are to be installed. You will be able to install ZIP archives easily, and will be able to run programs with minimun efforts. Without UNIXROOT env. var., message from a program will be always in English. Installation is simple: when UNIXROOT is equal to "e:" x:\foo\tmp> unzip -o gettext-0.10.35.zip x:\foo\tmp> unzip -o OS2tree -d e:/ or x:\foo\tmp> e: e:\> unzip -o x:/foo/tmp/OS2tree Confirm these variables are properly set. UNIXROOT e: PATH e:\usr\bin;..... LIBPATH e:\usr\dll;.... INFOPATH e:/usr/share/info;... MANPATH e:/usr/share/man;.... or INFOPATH %UNIXROOT%/usr/share/info;... MANPATH %UNIXROOT%/usr/share/man;.... If UNIXROOT env. var. is not set or empty and HOME env. var. is set, drive name part of HOME is assumed as UNIXROOT. e.g. HOME=g:\emx programs treat `g:/usr/share/locale' as locale directory History of OS/2 Port @his ==================== * Thu Mar 1 2001 Jun Sawataishi - New feature when UNIXROOT env. var. is absent, drive name portion of HOME env. var. is treated as UNIXROOT. e.g. HOME=g:\emx programs treat `g:/usr/share/locale' as locale directory * Sun Feb 25 2001 Jun Sawataishi - The first release of rpm package for OS/2 * gettext requires UNIXROOT env. var. ; when the var is "x:", "x:/usr/share/locale" is supposed to be a locale directory. - Japanese SJIS coded PO file added by me. Required Executables @req ==================== HOBBES=ftp://hobbes.nmsu.edu/pub/os2 LEO=ftp://ftp.leo.org/pub/comp/os/os2/leo JSAWA=http://www2s.biglobe.ne.jp/~vtgf3mpr emx runtime version 0.9d (or later): Not included HOBBES/dev/emx/v0.9d/emxrt.zip LEO/dev/emx/v0.9d/emxrt.zip `man' (requires GNU groff) HOBBES/dev/help/gnuman.zip ; v1.0 LEO/gnu/doc/man11a.zip ; v1.1a JSAWA/linux/man.htm ; v1.5g GNU texinfo v4.0 (strongly modified version) to read Info manuals - This can be run both in VIO mode and in XFree86 terminals - Support 7 kind of language including Japanese for message - Support Info manual written in 8-bit code including Japanese JSAWA/gnu/texinfo.htm [English] JSAWA/jpinfo.htm [Japanese] ( GNU texinfo v3.11 LEO/gnu/doc/gnuinfo.zip HOBBES/apps/wp/tex/util/gnuinfo.zip ) GNU groff -- to read manpages Groff v1.10 HOBBES/apps/wp/gnugroff.zip LEO/gnu/doc/gnugroff.zip GNU groff v1.15 (with Japanization patch) JSAWA/manpage/manpage-e.htm [English] JSAWA/manpage/manpage.htm [Japanese] GNU grep (grep.exe) HOBBES/util/file/gnugrep.zip ; v2.0 LEO/gnu/systools/gnugrep.zip ; v2.0 JSAWA/gnu/grep.htm ; v2.3h or later Pager : I strongly recommend you to install `less' less 332 with Japanese patch: http://hp.vector.co.jp/authors/VA000199/os2/ You can use this in virtual terminal (xterm etc) of XFree86 for OS/2. You should get this one if you'd like to see manpages in XFree86. less 329 without XFree86 capability LEO/unix/gnu/less329-2.zip HOBBES/unix/util/util/file/less329-2.zip `gzip.exe' and `bzip2.exe' [gzip] HOBBES/util/archiver/gz124_32.zip LEO/gnu/archiver/gz124-32.zip [bzip2] HOBBES/util/archiver/bzip090b.zip LEO/archiver/bzip090b.zip http://www.muraroa.demon.co.uk/ JSAWA/rpm/bzip2.htm ; v0.9.5d --- this version preserve time stamp http://netpassport-wc.netpassport.or.jp/~wmakoto/CLUB-bzip2.html GNU Awk (gawk.exe) [English version] HOBBES/dev/awk/gnuawk.zip ; v3.0.3 [Japanized version] JSAWA/gnu/awk.htm ; v3.0.4 GNU find (find.exe) LEO/gnu/systools/gnufind.zip ; v4.1 HOBBES/util/disk/gnufind.zip ; v4.1 GNU sed LEO/gnu/systools/gnused.zip ; v2.05 HOBBES/apps/editors/gnused.zip ; v3.0 JSAWA/gnu/sed.htm ; v3.02.80 `tr.exe' and `cat.exe' included in GNU text utilities LEO/gnu/systools/gnututil.zip ; v1.19 HOBBES/util/file/gnututil.zip ; v1.19 JSAWA/gnu/text-util.htm ; v1.22f or later `sh.exe' included in KSH package LEO/shells/pdksh-5.2.13-emx.zip HOBBES/util/shell/ksh527rt.zip `chmod.exe' included in GNU file utilities LEO/gnu/systools/gnufutil.zip ; v3.13 HOBBES/util/file/gnufutil.zip ; v3.13 JSAWA/gnu/fileutils.htm ; v3.16 Setup Language @lan ============== In your `config.sys', batch file, or rc files (e. g. ~/.bashrc ...), you should set LANG and LANGUAGE environment variable. set LANG=YOUR_CHOICE ; optional e.g. ja_JP.SJIS, deutsch, sjis, euc-jp set LANGUAGE=xx ; optional, two letter for you country Chinese `zh', Czech `cs', Danish `da', Dutch `nl', Esperanto `eo', Finnish `fi', French `fr', Irish `ga', German `de', Greek `el', Italian `it', Japanese `ja', Indonesian `in', Norwegian `no', Polish `pl', Portuguese `pt', Russian `ru', Spanish `es', Swedish `sv' and Turkish `tr'. Replae xx by the two-letter ISO 639 code for your language. Read Info manual of gettext. LANGUAGE env. var. overrides LANG. When LANG=deutsch and LANGUAGE=ja, Japanese message will shown by programs. Usage @usa ===== How to Link Gettext with Other Softwares ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Be sure that gettext has been installed e.g. c:/usr/include/libintl.h c:/usr/lib/libintl.{a,lib} c:/usr/dll/intl35x0.dll c:/usr/share/locale/??/LC_MESSAGE/*.mo c:/usr/share/locale/locale.alias c:/usr/bin/gettext.exe gettextize msgcmp.exe msgcomm.exe msgfmt.exe msgmerge.exe msgunfmt.exe xgettext.exe - Be sure that sources are prepared for gettext - If you do _not_ want to use UNIXROOT env. var Programs main source should contain a line: bindtextdomain (PACKAGE, LOCALEDIR); Define LOCALEDIR as your directory to be installed If you like to install "x:/foo", > make prefix=x:/foo -- this makes LOCALEDIR ="x:/foo/share/locale" and > make prefix=x:/foo install or > sh configure --with-included-gettext --prefix=x:/foo > make install Files will be intalled this way x:/foo/bin/*.exe x:/foo/share/locale/??/LC_MESSAGE/*.mo __Important notice__ When UNIXROOT env. var. exists, search path may vary e.g. UNIXROOT=y: LOCALEDIR is assumed as "y:/usr/share/locale" When UNIXROOT env. var. is not set or is empty and HOME env. var. is "x:/foo", `x:/usr/share/locale' is assumed as LOCALEDIR. - If you want to FIX LOCALEDIR in the way of XFree86 __Important notice__ If compile time LOCALEDIR definition is equal to "/XFree86/lib/locale/X11" or "__XOS2RedirRoot(/XFree86/lib/X11/locale)" programs will _not_ read UNIXROOT env. var. This implementation is intended to keep upper compatibility with conventional way of XFree86 OS/2 programs (gtk related ones). Here I assume X11ROOT env. var. is "n:" Method-1: > sh configure --with-included-gettext \ (line is not break) --prefix=n:/XFree86 --datadir=n:/XFree86/lib/X11 > make install Method-2: > make prefix=n:/XFree86 datadir=n:/XFree86/lib/X11 > make install prefix=n:/XFree86 datadir=n:/XFree86/lib/X11 Method-3: require modification of source codes Change bindtextdomain (PACKAGE, LOCALEDIR); to bindtextdomain (PACKAGE, __XOS2RedirRoot("/XFree86/lib/X11/locale")); or bindtextdomain (PACKAGE,"/XFree86/lib/X11/locale"; > make (prefix is meaningless for LOCALEDIR) > make install prefix=n:/XFree86 datadir=n:/XFree86/lib/X11 Method-1, 2, 3 will intall files this way n:/XFree86/bin/*.exe n:/XFree86/lib/X11/locale/??/LC_MESSAGE/*.mo n:/XFree86/lib/charset.alias __Important notice__ If UNIXROOT is set, search path for `charset.alias' will change e.g. UNIXROOT=e: charset.alias is assumed to be in "e:/usr/lib" (LOCALEDIR is ommited by programs) You shoud copy `n:/XFree86/lib/charset.alias' in `e:/usr/lib' When UNIXROOT env. var. is not set or is empty and HOME env. var. is "x:/foo", `x:/usr/lib/charset.alias' will be searched for. - Summary compile time env. var. LOCALEDIR for running LOCALEDIR UNIXROOT HOME programs ======================================================================== __XOS2RedirRoot(XLOCALEDIR) x: y:/foo __XOS2RedirRoot(XLOCALEDIR) __XOS2RedirRoot(XLOCALEDIR) x: - __XOS2RedirRoot(XLOCALEDIR) __XOS2RedirRoot(XLOCALEDIR) - y:/foo __XOS2RedirRoot(XLOCALEDIR) __XOS2RedirRoot(XLOCALEDIR) - - __XOS2RedirRoot(XLOCALEDIR) XLOCALEDIR x: y:/foo __XOS2RedirRoot(XLOCALEDIR) XLOCALEDIR x: - __XOS2RedirRoot(XLOCALEDIR) XLOCALEDIR - y:/foo __XOS2RedirRoot(XLOCALEDIR) XLOCALEDIR - - __XOS2RedirRoot(XLOCALEDIR) c:/DIR/share/locale x: y:/foo x:/usr/share/locale c:/DIR/share/locale x: - x:/usr/share/locale c:/DIR/share/locale - y:/foo y:/usr/share/locale c:/DIR/share/locale - - c:/DIR/share/locale /DIR/share/locale x: y:/foo x:/usr/share/locale /DIR/share/locale x: - x:/usr/share/locale /DIR/share/locale - y:/foo y:/usr/share/locale /DIR/share/locale - - /DIR/share/locale Note: XLOCALEDIR = "/XFree86/lib/X11/locale" - About `gettextize' This script read UNIXROOT env. var. By default, line 89-95 read: # Directory where the sources are stored. prefix=/usr if [ -n $UNIXROOT ] ; then gettext_dir=$UNIXROOT/usr/share/gettext else gettext_dir=${prefix}/share/gettext fi About PO file written in SJIS Japanese ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ When the first two letter of PO file name is equal to "ja", `msgfmt' treat the PO file as SJIS coded file. If you'd like to process SJIS coded PO file, name the file as `ja.po'. Compile and Make @com ================ Source - ftp://ftp.gnu.org/gnu/gettext/gettext-0.10.35.tar.gz OS/2 patch kit - gettext-0.10.35-OS2-patch.zip If a patch kit is not included in full package, you will be able to get one from my web page (see the top of this document). /*----- end of document -----------------------------------------------------*/