mkfontdir 1.0.4

This commit is contained in:
matthieu 2008-04-12 17:49:58 +00:00
parent ac0cfb4ed8
commit b8c22531e6
7 changed files with 647 additions and 225 deletions

View File

@ -1,12 +1,45 @@
This is a stub file. This package has not yet had its complete licensing
information compiled. Please see the individual source files for details on
your rights to use and modify this software.
Copyright 1993, 1994, 1998 The Open Group
Please submit updated COPYING files to the Xorg bugzilla:
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting
documentation.
https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
All licensing questions regarding this software should be directed at the
Xorg mailing list:
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
http://lists.freedesktop.org/mailman/listinfo/xorg
Except as contained in this notice, the name of The Open Group shall
not be used in advertising or otherwise to promote the sale, use or
other dealings in this Software without prior written authorization
from The Open Group.
-----------------------------------------------------------------------------
Copyright 2005 Red Hat, Inc.
Permission to use, copy, modify, distribute, and sell this software
and its documentation for any purpose is hereby granted without fee,
provided that the above copyright notice appear in all copies and
that both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Red Hat not be used in
advertising or publicity pertaining to distribution of the software
without specific, written prior permission. Red Hat makes no
representations about the suitability of this software for any
purpose. It is provided "as is" without express or implied warranty.
RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
NO EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE
USE OR PERFORMANCE OF THIS SOFTWARE.

View File

@ -1,40 +1,212 @@
2007-03-21 Jeremy C. Reed <reed@reedmedia.net>
commit 24c0bbb24d2bc5aa37f4ef0bc79882d9ed48b94d
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date: Fri Jan 11 12:40:52 2008 -0800
* configure.ac:
Bump version number. (No changes, but source tarball will
use recent util macros.)
Fix formatting of man page so ellipsis are shown with Solaris nroff
2006-04-01 Adam Jackson <ajax@freedesktop.org>
commit e5c6ba63b4848d6d747ef0af51f641d864ab75ea
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date: Fri Jan 11 12:39:00 2008 -0800
* configure.ac:
Bump to 1.0.2.
Fill in COPYING file with copyright/license notices
2006-03-05 Matthieu Herrb <matthieu.herrb@laas.fr>
* Makefile.am:
Let BSD make find mkfontdir.cpp when building in a separate obj dir
commit 4b24431325f37f8c2b1489bf16790fdb2db4872b
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date: Mon Jan 7 14:16:07 2008 -0800
2005-12-20 Kevin E. Martin <kem-at-freedesktop-dot-org>
Add references to mkfontscale to man page
Also convert (1) to (__appmansuffix__)
* configure.ac:
Update package version for X11R7 release.
commit b88571e67d65f0d6b98b49b955cd6750a1ff7c82
Author: James Cloos <cloos@jhcloos.com>
Date: Thu Dec 6 16:37:03 2007 -0500
2005-12-14 Kevin E. Martin <kem-at-freedesktop-dot-org>
Replace static ChangeLog with dist-hook to generate from git log
* configure.ac:
Update package version number for final X11R7 release candidate.
commit 1c77c767024e60aac427c6c70a891f01ba2bcceb
Author: James Cloos <cloos@jhcloos.com>
Date: Mon Sep 3 05:51:05 2007 -0400
2005-12-06 Kevin E. Martin <kem-at-freedesktop-dot-org>
Add *~ to .gitignore to skip patch/emacs droppings
* Makefile.am:
Change *man_SOURCES ==> *man_PRE to fix autotools warnings.
commit fbe9cd99f9d96df07b0a499fefe5129ae8e1f715
Author: James Cloos <cloos@jhcloos.com>
Date: Thu Aug 23 19:24:28 2007 -0400
2005-12-03 Kevin E. Martin <kem-at-freedesktop-dot-org>
Rename .cvsignore to .gitignore
* configure.ac:
Update package version number for X11R7 RC3 release.
commit 980d8223e76c39bce7765cef5a15457b29a1176a
Author: Jeremy C. Reed <reed@glacier.reedmedia.net>
Date: Wed Mar 21 16:06:59 2007 -0500
2005-10-18 Kevin E. Martin <kem-at-freedesktop-dot-org>
Bump version number. (No changes, but source tarball will
use recent util macros.)
* configure.ac:
Update package version number for RC1 release.
commit 8a0dcc73228a7efc59dbcc59401c68deb632c4a0
Author: Adam Jackson <ajax@nwnk.net>
Date: Sun Apr 2 00:38:25 2006 +0000
Bump to 1.0.2.
commit 6c8aba9e4c5211eec5829f2fe4c60103439355dd
Author: Matthieu Herrb <matthieu.herrb@laas.fr>
Date: Sun Mar 5 19:52:51 2006 +0000
Let BSD make find mkfontdir.cpp when building in a separate obj dir
commit 97ea84ce9da0e5aa8f98c008def6fcc20fd0f211
Author: Kevin E Martin <kem@kem.org>
Date: Wed Dec 21 02:29:43 2005 +0000
Update package version for X11R7 release.
commit 907ed17423b86fc13753540e9dcaa59c699163b0
Author: Adam Jackson <ajax@nwnk.net>
Date: Mon Dec 19 16:22:41 2005 +0000
Stub COPYING files
commit 3897b3a8ccd63807f813571175270f977e7de051
Author: Kevin E Martin <kem@kem.org>
Date: Thu Dec 15 00:24:03 2005 +0000
Update package version number for final X11R7 release candidate.
commit bc722dc4035ad4504c78ce80066827021f40724e
Author: Kevin E Martin <kem@kem.org>
Date: Tue Dec 6 22:48:17 2005 +0000
Change *man_SOURCES ==> *man_PRE to fix autotools warnings.
commit bbba337b8317ea3ca7bae517b4fd84d77335e0a4
Author: Kevin E Martin <kem@kem.org>
Date: Sat Dec 3 05:49:16 2005 +0000
Update package version number for X11R7 RC3 release.
commit d3ae95c6b1d87c5842ba011b353da4cadb9fb066
Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
Date: Mon Nov 28 22:01:37 2005 +0000
Change *mandir targets to use new *_MAN_DIR variables set by xorg-macros.m4
update to fix bug #5167 (Linux prefers *.1x man pages in man1 subdir)
commit 60da31432b2994b24a15d4bad6b99a49134e2fa1
Author: Eric Anholt <anholt@freebsd.org>
Date: Mon Nov 21 10:34:56 2005 +0000
Another pass at .cvsignores for apps.
commit b9eb4c859cc3b40a1b3500a759e3a9b4c0c5adf0
Author: Eric Anholt <anholt@freebsd.org>
Date: Sun Nov 20 22:08:49 2005 +0000
Add/improve .cvsignore files for apps.
commit fa50ea85ba0e0fb5cea23f9b9965da091acdf3d0
Author: Kevin E Martin <kem@kem.org>
Date: Wed Oct 19 02:47:49 2005 +0000
Update package version number for RC1 release.
commit 8c7d262a193403bccdebc95abcdca44651d23ce7
Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
Date: Mon Oct 17 23:56:19 2005 +0000
Use @APP_MAN_SUFFIX@ instead of $(APP_MAN_SUFFIX) in macro substitutions to
work better with BSD make
commit 8595ad93606fd05002cdc61638002882b273438d
Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
Date: Fri Oct 14 00:25:41 2005 +0000
Use sed to fill in variables in man page
commit 16391b048755896eec71059f5b410e666f3199fb
Author: Adam Jackson <ajax@nwnk.net>
Date: Tue Aug 2 01:58:09 2005 +0000
Find mkfontscale through @bindir@ rather than AC_PATH_PROG, since the one
in the path could be from an old install that doesn't support all the
needed flags.
commit 77232fd7d2789345182dc8604c3f361d51283fb9
Author: Kevin E Martin <kem@kem.org>
Date: Fri Jul 29 21:22:29 2005 +0000
Various changes preparing packages for RC0:
- Verify and update package version numbers as needed
- Implement versioning scheme
- Change bug address to point to bugzilla bug entry form
- Disable loadable i18n in libX11 by default (use --enable-loadable-i18n to
reenable it)
- Fix makedepend to use pkgconfig and pass distcheck
- Update build script to build macros first
- Update modular Xorg version
commit ec144c204d5a94f13e472af21e3970e68171beae
Author: Matthieu Herrb <matthieu.herrb@laas.fr>
Date: Thu Jul 14 20:59:48 2005 +0000
build fix for non-GNU make
commit c234aba48a96ff7b63841227ba62abb821306231
Author: Kevin E Martin <kem@kem.org>
Date: Sat Jul 2 21:42:05 2005 +0000
Add build system for bdftopcf, mkfontdir and mkfontscale
commit a6969b729206fd626562609348e0bff7c71939e2
Author: Egbert Eich <eich@suse.de>
Date: Fri Apr 23 19:54:36 2004 +0000
Merging XORG-CURRENT into trunk
commit 572109412f1b8c3c835348e995c0de9283fc4d18
Author: Egbert Eich <eich@suse.de>
Date: Sun Mar 14 08:34:54 2004 +0000
Importing vendor version xf86-4_4_99_1 on Sun Mar 14 00:26:39 PST 2004
commit ed58ece79a71af17459bf70954e3902a7e4c624a
Author: Egbert Eich <eich@suse.de>
Date: Wed Mar 3 12:12:53 2004 +0000
Importing vendor version xf86-4_4_0 on Wed Mar 3 04:09:24 PST 2004
commit e5ec1a9dc8d2b70d5411ec7bcaeb4faa498515b0
Author: Egbert Eich <eich@suse.de>
Date: Thu Feb 26 13:36:15 2004 +0000
readding XFree86's cvs IDs
commit 8ce96bf2557fdf043e22efef53a882dd8d6a11e6
Author: Egbert Eich <eich@suse.de>
Date: Thu Feb 26 09:23:56 2004 +0000
Importing vendor version xf86-4_3_99_903 on Wed Feb 26 01:21:00 PST 2004
commit 2a85fa572521b9ec3fb846f20d0fa192f23ba7ec
Author: Kaleb Keithley <kaleb@freedesktop.org>
Date: Tue Nov 25 19:29:02 2003 +0000
XFree86 4.3.99.16 Bring the tree up to date for the Cygwin folks
commit 38106b47a4d9ae68758540e278f094712742467c
Author: Kaleb Keithley <kaleb@freedesktop.org>
Date: Tue Nov 25 19:29:02 2003 +0000
Initial revision
commit 4b54ae25437aaaa8ff02175d23835421bff22030
Author: Kaleb Keithley <kaleb@freedesktop.org>
Date: Fri Nov 14 16:48:57 2003 +0000
XFree86 4.3.0.1
commit 0d023fcb40ca4eea0a466dcb170fc3258dbdcf3c
Author: Kaleb Keithley <kaleb@freedesktop.org>
Date: Fri Nov 14 15:54:53 2003 +0000
R6.6 is the Xorg base-line

View File

@ -59,3 +59,13 @@ SUFFIXES = .$(APP_MAN_SUFFIX) .man .cpp
.man.$(APP_MAN_SUFFIX):
sed $(MAN_SUBSTS) < $< > $@
EXTRA_DIST += ChangeLog
MAINTAINERCLEANFILES = ChangeLog
.PHONY: ChangeLog
ChangeLog:
(GIT_DIR=$(top_srcdir)/.git git-log > .changelog.tmp && mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) || (touch ChangeLog; echo 'git directory not found: installing possibly empty changelog.' >&2)
dist-hook: ChangeLog

View File

@ -21,7 +21,7 @@ dnl
dnl Process this file with autoconf to create configure.
AC_PREREQ([2.57])
AC_INIT(mkfontdir, [1.0.3], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], mkfontdir)
AC_INIT(mkfontdir, [1.0.4], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], mkfontdir)
AM_INIT_AUTOMAKE([dist-bzip2 foreign])
AM_MAINTAINER_MODE

View File

@ -1,7 +1,7 @@
#!/bin/sh
# install - install a program, script, or datafile
scriptversion=2005-05-14.22
scriptversion=2006-12-25.00
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
@ -39,38 +39,68 @@ scriptversion=2005-05-14.22
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
# from scratch. It can only install one file at a time, a restriction
# shared with many OS's install programs.
# from scratch.
nl='
'
IFS=" "" $nl"
# set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit="${DOITPROG-}"
doit=${DOITPROG-}
if test -z "$doit"; then
doit_exec=exec
else
doit_exec=$doit
fi
# put in absolute paths if you don't have them in your path; or use env. vars.
# Put in absolute file names if you don't have them in your path;
# or use environment vars.
mvprog="${MVPROG-mv}"
cpprog="${CPPROG-cp}"
chmodprog="${CHMODPROG-chmod}"
chownprog="${CHOWNPROG-chown}"
chgrpprog="${CHGRPPROG-chgrp}"
stripprog="${STRIPPROG-strip}"
rmprog="${RMPROG-rm}"
mkdirprog="${MKDIRPROG-mkdir}"
chgrpprog=${CHGRPPROG-chgrp}
chmodprog=${CHMODPROG-chmod}
chownprog=${CHOWNPROG-chown}
cmpprog=${CMPPROG-cmp}
cpprog=${CPPROG-cp}
mkdirprog=${MKDIRPROG-mkdir}
mvprog=${MVPROG-mv}
rmprog=${RMPROG-rm}
stripprog=${STRIPPROG-strip}
posix_glob='?'
initialize_posix_glob='
test "$posix_glob" != "?" || {
if (set -f) 2>/dev/null; then
posix_glob=
else
posix_glob=:
fi
}
'
posix_mkdir=
# Desired mode of installed file.
mode=0755
chmodcmd="$chmodprog 0755"
chowncmd=
chgrpcmd=
stripcmd=
chmodcmd=$chmodprog
chowncmd=
mvcmd=$mvprog
rmcmd="$rmprog -f"
mvcmd="$mvprog"
stripcmd=
src=
dst=
dir_arg=
dstarg=
dst_arg=
copy_on_change=false
no_target_directory=
usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
usage="\
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
or: $0 [OPTION]... SRCFILES... DIRECTORY
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
or: $0 [OPTION]... -d DIRECTORIES...
@ -80,81 +110,86 @@ In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
In the 4th, create DIRECTORIES.
Options:
-c (ignored)
-d create directories instead of installing files.
-g GROUP $chgrpprog installed files to GROUP.
-m MODE $chmodprog installed files to MODE.
-o USER $chownprog installed files to USER.
-s $stripprog installed files.
-t DIRECTORY install into DIRECTORY.
-T report an error if DSTFILE is a directory.
--help display this help and exit.
--version display version info and exit.
--help display this help and exit.
--version display version info and exit.
-c (ignored)
-C install only if different (preserve the last data modification time)
-d create directories instead of installing files.
-g GROUP $chgrpprog installed files to GROUP.
-m MODE $chmodprog installed files to MODE.
-o USER $chownprog installed files to USER.
-s $stripprog installed files.
-t DIRECTORY install into DIRECTORY.
-T report an error if DSTFILE is a directory.
Environment variables override the default commands:
CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
RMPROG STRIPPROG
"
while test -n "$1"; do
while test $# -ne 0; do
case $1 in
-c) shift
continue;;
-c) ;;
-d) dir_arg=true
shift
continue;;
-C) copy_on_change=true;;
-d) dir_arg=true;;
-g) chgrpcmd="$chgrpprog $2"
shift
shift
continue;;
shift;;
--help) echo "$usage"; exit $?;;
-m) chmodcmd="$chmodprog $2"
shift
shift
continue;;
-m) mode=$2
case $mode in
*' '* | *' '* | *'
'* | *'*'* | *'?'* | *'['*)
echo "$0: invalid mode: $mode" >&2
exit 1;;
esac
shift;;
-o) chowncmd="$chownprog $2"
shift
shift
continue;;
shift;;
-s) stripcmd=$stripprog
shift
continue;;
-s) stripcmd=$stripprog;;
-t) dstarg=$2
shift
shift
continue;;
-t) dst_arg=$2
shift;;
-T) no_target_directory=true
shift
continue;;
-T) no_target_directory=true;;
--version) echo "$0 $scriptversion"; exit $?;;
*) # When -d is used, all remaining arguments are directories to create.
# When -t is used, the destination is already specified.
test -n "$dir_arg$dstarg" && break
# Otherwise, the last argument is the destination. Remove it from $@.
for arg
do
if test -n "$dstarg"; then
# $@ is not empty: it contains at least $arg.
set fnord "$@" "$dstarg"
shift # fnord
fi
shift # arg
dstarg=$arg
done
--) shift
break;;
-*) echo "$0: invalid option: $1" >&2
exit 1;;
*) break;;
esac
shift
done
if test -z "$1"; then
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
# When -d is used, all remaining arguments are directories to create.
# When -t is used, the destination is already specified.
# Otherwise, the last argument is the destination. Remove it from $@.
for arg
do
if test -n "$dst_arg"; then
# $@ is not empty: it contains at least $arg.
set fnord "$@" "$dst_arg"
shift # fnord
fi
shift # arg
dst_arg=$arg
done
fi
if test $# -eq 0; then
if test -z "$dir_arg"; then
echo "$0: no input file specified." >&2
exit 1
@ -164,24 +199,47 @@ if test -z "$1"; then
exit 0
fi
if test -z "$dir_arg"; then
trap '(exit $?); exit' 1 2 13 15
# Set umask so as not to create temps with too-generous modes.
# However, 'strip' requires both read and write access to temps.
case $mode in
# Optimize common cases.
*644) cp_umask=133;;
*755) cp_umask=22;;
*[0-7])
if test -z "$stripcmd"; then
u_plus_rw=
else
u_plus_rw='% 200'
fi
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
*)
if test -z "$stripcmd"; then
u_plus_rw=
else
u_plus_rw=,u+rw
fi
cp_umask=$mode$u_plus_rw;;
esac
fi
for src
do
# Protect names starting with `-'.
case $src in
-*) src=./$src ;;
-*) src=./$src;;
esac
if test -n "$dir_arg"; then
dst=$src
src=
if test -d "$dst"; then
mkdircmd=:
chmodcmd=
else
mkdircmd=$mkdirprog
fi
dstdir=$dst
test -d "$dstdir"
dstdir_status=$?
else
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
@ -190,71 +248,199 @@ do
exit 1
fi
if test -z "$dstarg"; then
if test -z "$dst_arg"; then
echo "$0: no destination specified." >&2
exit 1
fi
dst=$dstarg
dst=$dst_arg
# Protect names starting with `-'.
case $dst in
-*) dst=./$dst ;;
-*) dst=./$dst;;
esac
# If destination is a directory, append the input filename; won't work
# if double slashes aren't ignored.
if test -d "$dst"; then
if test -n "$no_target_directory"; then
echo "$0: $dstarg: Is a directory" >&2
echo "$0: $dst_arg: Is a directory" >&2
exit 1
fi
dst=$dst/`basename "$src"`
dstdir=$dst
dst=$dstdir/`basename "$src"`
dstdir_status=0
else
# Prefer dirname, but fall back on a substitute if dirname fails.
dstdir=`
(dirname "$dst") 2>/dev/null ||
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$dst" : 'X\(//\)[^/]' \| \
X"$dst" : 'X\(//\)$' \| \
X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
echo X"$dst" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
}
/^X\(\/\/\)[^/].*/{
s//\1/
q
}
/^X\(\/\/\)$/{
s//\1/
q
}
/^X\(\/\).*/{
s//\1/
q
}
s/.*/./; q'
`
test -d "$dstdir"
dstdir_status=$?
fi
fi
# This sed command emulates the dirname command.
dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'`
obsolete_mkdir_used=false
# Make sure that the destination directory exists.
if test $dstdir_status != 0; then
case $posix_mkdir in
'')
# Create intermediate dirs using mode 755 as modified by the umask.
# This is like FreeBSD 'install' as of 1997-10-28.
umask=`umask`
case $stripcmd.$umask in
# Optimize common cases.
*[2367][2367]) mkdir_umask=$umask;;
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
# Skip lots of stat calls in the usual case.
if test ! -d "$dstdir"; then
defaultIFS='
'
IFS="${IFS-$defaultIFS}"
*[0-7])
mkdir_umask=`expr $umask + 22 \
- $umask % 100 % 40 + $umask % 20 \
- $umask % 10 % 4 + $umask % 2
`;;
*) mkdir_umask=$umask,go-w;;
esac
oIFS=$IFS
# Some sh's can't handle IFS=/ for some reason.
IFS='%'
set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
shift
IFS=$oIFS
# With -d, create the new directory with the user-specified mode.
# Otherwise, rely on $mkdir_umask.
if test -n "$dir_arg"; then
mkdir_mode=-m$mode
else
mkdir_mode=
fi
pathcomp=
posix_mkdir=false
case $umask in
*[123567][0-7][0-7])
# POSIX mkdir -p sets u+wx bits regardless of umask, which
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
;;
*)
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
while test $# -ne 0 ; do
pathcomp=$pathcomp$1
if (umask $mkdir_umask &&
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
then
if test -z "$dir_arg" || {
# Check for POSIX incompatibilities with -m.
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
# other-writeable bit of parent directory when it shouldn't.
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
ls_ld_tmpdir=`ls -ld "$tmpdir"`
case $ls_ld_tmpdir in
d????-?r-*) different_mode=700;;
d????-?--*) different_mode=755;;
*) false;;
esac &&
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
}
}
then posix_mkdir=:
fi
rmdir "$tmpdir/d" "$tmpdir"
else
# Remove any dirs left behind by ancient mkdir implementations.
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
fi
trap '' 0;;
esac;;
esac
if
$posix_mkdir && (
umask $mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
)
then :
else
# The umask is ridiculous, or mkdir does not conform to POSIX,
# or it failed possibly due to a race condition. Create the
# directory the slow way, step by step, checking for races as we go.
case $dstdir in
/*) prefix='/';;
-*) prefix='./';;
*) prefix='';;
esac
eval "$initialize_posix_glob"
oIFS=$IFS
IFS=/
$posix_glob set -f
set fnord $dstdir
shift
if test ! -d "$pathcomp"; then
$mkdirprog "$pathcomp"
# mkdir can fail with a `File exist' error in case several
# install-sh are creating the directory concurrently. This
# is OK.
test -d "$pathcomp" || exit
$posix_glob set +f
IFS=$oIFS
prefixes=
for d
do
test -z "$d" && continue
prefix=$prefix$d
if test -d "$prefix"; then
prefixes=
else
if $posix_mkdir; then
(umask=$mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
# Don't fail if two instances are running concurrently.
test -d "$prefix" || exit 1
else
case $prefix in
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
*) qprefix=$prefix;;
esac
prefixes="$prefixes '$qprefix'"
fi
fi
prefix=$prefix/
done
if test -n "$prefixes"; then
# Don't fail if two instances are running concurrently.
(umask $mkdir_umask &&
eval "\$doit_exec \$mkdirprog $prefixes") ||
test -d "$dstdir" || exit 1
obsolete_mkdir_used=true
fi
pathcomp=$pathcomp/
done
fi
fi
if test -n "$dir_arg"; then
$doit $mkdircmd "$dst" \
&& { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \
&& { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \
&& { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \
&& { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; }
{ test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
{ test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
else
dstfile=`basename "$dst"`
# Make a couple of temp file names in the proper directory.
dsttmp=$dstdir/_inst.$$_
@ -262,10 +448,9 @@ do
# Trap to clean up those temp files at exit.
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
trap '(exit $?); exit' 1 2 13 15
# Copy the file name to the temp name.
$doit $cpprog "$src" "$dsttmp" &&
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
# and set any options; do chmod last to preserve setuid bits.
#
@ -273,48 +458,59 @@ do
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $cpprog $src $dsttmp" command.
#
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
&& { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
&& { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
&& { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } &&
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
{ test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
{ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
# Now rename the file to the real destination.
{ $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \
|| {
# The rename failed, perhaps because mv can't rename something else
# to itself, or perhaps because mv is so ancient that it does not
# support -f.
# If -C, don't bother to copy if it wouldn't change the file.
if $copy_on_change &&
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
# Now remove or move aside any old file at destination location.
# We try this two ways since rm can't unlink itself on some
# systems and the destination file might be busy for other
# reasons. In this case, the final cleanup might fail but the new
# file should still install successfully.
{
if test -f "$dstdir/$dstfile"; then
$doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \
|| $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \
|| {
echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
(exit 1); exit 1
}
else
:
fi
} &&
eval "$initialize_posix_glob" &&
$posix_glob set -f &&
set X $old && old=:$2:$4:$5:$6 &&
set X $new && new=:$2:$4:$5:$6 &&
$posix_glob set +f &&
# Now rename the file to the real destination.
$doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
}
}
fi || { (exit 1); exit 1; }
test "$old" = "$new" &&
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
then
rm -f "$dsttmp"
else
# Rename the file to the real destination.
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
# The rename failed, perhaps because mv can't rename something else
# to itself, or perhaps because mv is so ancient that it does not
# support -f.
{
# Now remove or move aside any old file at destination location.
# We try this two ways since rm can't unlink itself on some
# systems and the destination file might be busy for other
# reasons. In this case, the final cleanup might fail but the new
# file should still install successfully.
{
test ! -f "$dst" ||
$doit $rmcmd -f "$dst" 2>/dev/null ||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
} ||
{ echo "$0: cannot unlink or rename $dst" >&2
(exit 1); exit 1
}
} &&
# Now rename the file to the real destination.
$doit $mvcmd "$dsttmp" "$dst"
}
fi || exit 1
trap '' 0
fi
done
# The final little trick to "correctly" pass the exit status to the exit trap.
{
(exit 0); exit 0
}
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="

View File

@ -1,9 +1,9 @@
#! /bin/sh
# Common stub for a few missing GNU programs while installing.
scriptversion=2005-06-08.21
scriptversion=2006-05-10.23
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006
# Free Software Foundation, Inc.
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
@ -33,6 +33,8 @@ if test $# -eq 0; then
fi
run=:
sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
# In the cases where this matters, `missing' is being run in the
# srcdir already.
@ -44,7 +46,7 @@ fi
msg="missing on your system"
case "$1" in
case $1 in
--run)
# Try to run requested program, and just exit if it succeeds.
run=
@ -77,6 +79,7 @@ Supported PROGRAM values:
aclocal touch file \`aclocal.m4'
autoconf touch file \`configure'
autoheader touch file \`config.h.in'
autom4te touch the output file, or create a stub one
automake touch all \`Makefile.in' files
bison create \`y.tab.[ch]', if possible, from existing .[ch]
flex create \`lex.yy.c', if possible, from existing .c
@ -106,7 +109,7 @@ esac
# Now exit if we have it, but it failed. Also exit now if we
# don't have it and --version was passed (most likely to detect
# the program).
case "$1" in
case $1 in
lex|yacc)
# Not GNU programs, they don't have --version.
;;
@ -135,7 +138,7 @@ esac
# If it does not exist, or fails to run (possibly an outdated version),
# try to emulate it.
case "$1" in
case $1 in
aclocal*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
@ -164,7 +167,7 @@ WARNING: \`$1' is $msg. You should only need it if
test -z "$files" && files="config.h"
touch_files=
for f in $files; do
case "$f" in
case $f in
*:*) touch_files="$touch_files "`echo "$f" |
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
*) touch_files="$touch_files $f.in";;
@ -192,8 +195,8 @@ WARNING: \`$1' is needed, but is $msg.
You can get \`$1' as part of \`Autoconf' from any GNU
archive site."
file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
file=`echo "$*" | sed -n "$sed_output"`
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
if test -f "$file"; then
touch $file
else
@ -214,25 +217,25 @@ WARNING: \`$1' $msg. You should only need it if
in order for those modifications to take effect. You can get
\`Bison' from any GNU archive site."
rm -f y.tab.c y.tab.h
if [ $# -ne 1 ]; then
if test $# -ne 1; then
eval LASTARG="\${$#}"
case "$LASTARG" in
case $LASTARG in
*.y)
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
if [ -f "$SRCFILE" ]; then
if test -f "$SRCFILE"; then
cp "$SRCFILE" y.tab.c
fi
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
if [ -f "$SRCFILE" ]; then
if test -f "$SRCFILE"; then
cp "$SRCFILE" y.tab.h
fi
;;
esac
fi
if [ ! -f y.tab.h ]; then
if test ! -f y.tab.h; then
echo >y.tab.h
fi
if [ ! -f y.tab.c ]; then
if test ! -f y.tab.c; then
echo 'main() { return 0; }' >y.tab.c
fi
;;
@ -244,18 +247,18 @@ WARNING: \`$1' is $msg. You should only need it if
in order for those modifications to take effect. You can get
\`Flex' from any GNU archive site."
rm -f lex.yy.c
if [ $# -ne 1 ]; then
if test $# -ne 1; then
eval LASTARG="\${$#}"
case "$LASTARG" in
case $LASTARG in
*.l)
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
if [ -f "$SRCFILE" ]; then
if test -f "$SRCFILE"; then
cp "$SRCFILE" lex.yy.c
fi
;;
esac
fi
if [ ! -f lex.yy.c ]; then
if test ! -f lex.yy.c; then
echo 'main() { return 0; }' >lex.yy.c
fi
;;
@ -267,11 +270,9 @@ WARNING: \`$1' is $msg. You should only need it if
\`Help2man' package in order for those modifications to take
effect. You can get \`Help2man' from any GNU archive site."
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
if test -z "$file"; then
file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
fi
if [ -f "$file" ]; then
file=`echo "$*" | sed -n "$sed_output"`
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
if test -f "$file"; then
touch $file
else
test -z "$file" || exec >$file
@ -289,11 +290,17 @@ WARNING: \`$1' is $msg. You should only need it if
DU, IRIX). You might want to install the \`Texinfo' package or
the \`GNU make' package. Grab either from any GNU archive site."
# The file to touch is that specified with -o ...
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
file=`echo "$*" | sed -n "$sed_output"`
test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
if test -z "$file"; then
# ... or it is the one specified with @setfilename ...
infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile`
file=`sed -n '
/^@setfilename/{
s/.* \([^ ]*\) *$/\1/
p
q
}' $infile`
# ... or it is derived from the source name (dir/f.texi becomes f.info)
test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
fi
@ -317,13 +324,13 @@ WARNING: \`$1' is $msg. You should only need it if
fi
firstarg="$1"
if shift; then
case "$firstarg" in
case $firstarg in
*o*)
firstarg=`echo "$firstarg" | sed s/o//`
tar "$firstarg" "$@" && exit 0
;;
esac
case "$firstarg" in
case $firstarg in
*h*)
firstarg=`echo "$firstarg" | sed s/h//`
tar "$firstarg" "$@" && exit 0

View File

@ -25,7 +25,7 @@
.\"
.\" $XFree86: xc/programs/mkfontdir/mkfontdir.man,v 1.14 2001/11/01 23:35:34 dawes Exp $
.\"
.TH MKFONTDIR 1 __xorgversion__
.TH MKFONTDIR __appmansuffix__ __xorgversion__
.SH NAME
mkfontdir \- create an index of X font files in a directory
.SH SYNOPSIS
@ -38,10 +38,10 @@ mkfontdir \- create an index of X font files in a directory
.IR prefix ]
.RB [ \-e
.IR encoding-directory-name ]
\|.\|.\|.
\&\|.\|.\|.
.RB [ \-\- ]
.RI [ directory-name
\|.\|.\|. ]
\&\|.\|.\|. ]
.SH DESCRIPTION
For each directory argument,
.I mkfontdir
@ -71,7 +71,10 @@ file "fonts.scale" can be used to name the scalable fonts in the
directory.
The fonts listed in it are copied to fonts.dir by
.IR mkfontdir .
"fonts.scale" has the same format as the "fonts.dir" file.
"fonts.scale" has the same format as the "fonts.dir" file, and can be
created with the
.IR mkfontscale (__appmansuffix__)
program.
.SH "FONT NAME ALIASES"
The file "fonts.alias", which can be put in any directory of the font-path, is
used to map new names to existing fonts, and should be edited by hand. The
@ -155,20 +158,21 @@ End options.
.B fonts.dir
List of fonts in the directory and the files they are stored in.
Created by \fImkfontdir\fP. Read by the X server and font server each
time the font path is set (see xset(1)).
time the font path is set (see xset(__appmansuffix__)).
.TP 15
.B fonts.scale
List of scalable fonts in the directory. Contents are copied to
fonts.dir by \fImkfontdir\fP.
fonts.dir by \fImkfontdir\fP. Can be created with
.IR mkfontscale (__appmansuffix__).
.TP 15
.B fonts.alias
List of font name aliases.
Read by the X server and font server each
time the font path is set (see xset(1)).
time the font path is set (see xset(__appmansuffix__)).
.TP 15
.B encodings.dir
List of known encodings and the files they are stored in.
Created by \fImkfontdir\fP. Read by the X server and font server each
time a font with an unknown charset is opened.
.SH "SEE ALSO"
X(__miscmansuffix__), Xserver(1), xfs(1), xset(1)
X(__miscmansuffix__), Xserver(__appmansuffix__), mkfontscale(__appmansuffix__), xfs(__appmansuffix__), xset(__appmansuffix__)