xfonts-encodings: Changes to 'debian-unstable'
.gitignore | 12
COPYING | 28
ChangeLog | 11
Makefile.am | 25
Makefile.in | 50 -
aclocal.m4 | 53 +
ansi-1251.enc | 229 -----
ascii-0.enc | 97 --
autogen.sh | 12
configure | 133 ++
configure.ac | 32
debian/changelog | 17
debian/patches/01_encodings_dir_absolute_paths.diff | 23
debian/rules | 2
debian/xsfbs/xsfbs-autoreconf.mk | 150 +++
debian/xsfbs/xsfbs.mk | 379 ++++++++
debian/xsfbs/xsfbs.sh | 907 ++++++++++++++++++++
install-sh | 477 +++++-----
iso8859-6.16.enc | 2
iso8859-6.8x.enc | 2
large/.gitignore | 4
large/Makefile.am | 14
large/Makefile.in | 17
large/cns11643-1.enc | 2
large/cns11643-2.enc | 2
large/cns11643-3.enc | 2
missing | 142 +--
mkinstalldirs | 89 +
suneu-greek.enc | 96 --
29 files changed, 2194 insertions(+), 815 deletions(-)
New commits:
commit af5fa2096f0cf58cdf547a92b8adb0b1119f6f56
Author: Julien Cristau <jcristau@debian.org>
Date: Thu May 31 05:20:04 2007 +0200
Update for new upstream release.
Fix patch and autoreconf.
diff --git a/Makefile.in b/Makefile.in
index 1b0d874..a4a51c2 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -34,10 +34,11 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
+@GZIP_SMALL_TRUE@am__append_1 = $(COMPRESSED)
subdir = .
DIST_COMMON = $(am__configure_deps) $(srcdir)/Makefile.am \
- $(srcdir)/Makefile.in $(top_srcdir)/configure ChangeLog \
- install-sh missing mkinstalldirs
+ $(srcdir)/Makefile.in $(top_srcdir)/configure COPYING \
+ ChangeLog install-sh missing mkinstalldirs
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@@ -90,6 +91,10 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
ENCODINGSDIR = @ENCODINGSDIR@
GZIP = @GZIP@
+GZIP_LARGE_FALSE = @GZIP_LARGE_FALSE@
+GZIP_LARGE_TRUE = @GZIP_LARGE_TRUE@
+GZIP_SMALL_FALSE = @GZIP_SMALL_FALSE@
+GZIP_SMALL_TRUE = @GZIP_SMALL_TRUE@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
@@ -146,7 +151,6 @@ ENCODING_FILES = \
adobe-dingbats.enc \
adobe-standard.enc \
adobe-symbol.enc \
- ansi-1251.enc \
armscii-8.enc \
ascii-0.enc \
dec-special.enc \
@@ -178,11 +182,14 @@ ENCODING_FILES = \
tis620-2.enc \
viscii1.1-1.enc
-EXTRA_DIST = $(ENCODING_FILES)
+EXTRA_DIST = $(ENCODING_FILES) ChangeLog
COMPRESSED = $(ENCODING_FILES:%=%.gz)
+CLEANFILES = encodings.dir $(am__append_1)
+@GZIP_SMALL_FALSE@DATA_FILES = $(ENCODING_FILES) encodings.dir
+@GZIP_SMALL_TRUE@DATA_FILES = $(COMPRESSED)
SUFFIXES = .enc .enc.gz
-encodings_DATA = $(COMPRESSED) encodings.dir
-CLEANFILES = $(COMPRESSED) encodings.dir
+encodings_DATA = $(DATA_FILES) encodings.dir
+MAINTAINERCLEANFILES = ChangeLog
all: all-recursive
.SUFFIXES:
@@ -415,6 +422,9 @@ distdir: $(DISTFILES)
|| exit 1; \
fi; \
done
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$(top_distdir)" distdir="$(distdir)" \
+ dist-hook
-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
@@ -545,6 +555,7 @@ distclean-generic:
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
+ -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
clean: clean-recursive
clean-am: clean-generic mostlyclean-am
@@ -598,15 +609,15 @@ uninstall-info: uninstall-info-recursive
.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \
check-am clean clean-generic clean-recursive ctags \
- ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-shar \
- dist-tarZ dist-zip distcheck distclean distclean-generic \
- distclean-recursive distclean-tags distcleancheck distdir \
- distuninstallcheck dvi dvi-am html html-am info info-am \
- install install-am install-data install-data-am \
- install-encodingsDATA install-exec install-exec-am \
- install-info install-info-am install-man install-strip \
- installcheck installcheck-am installdirs installdirs-am \
- maintainer-clean maintainer-clean-generic \
+ ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-hook \
+ dist-shar dist-tarZ dist-zip distcheck distclean \
+ distclean-generic distclean-recursive distclean-tags \
+ distcleancheck distdir distuninstallcheck dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-encodingsDATA install-exec \
+ install-exec-am install-info install-info-am install-man \
+ install-strip installcheck installcheck-am installdirs \
+ installdirs-am maintainer-clean maintainer-clean-generic \
maintainer-clean-recursive mostlyclean mostlyclean-generic \
mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
uninstall uninstall-am uninstall-encodingsDATA \
@@ -616,8 +627,13 @@ uninstall-info: uninstall-info-recursive
.enc.enc.gz:
@GZIP@ -c < $< > $@
-encodings.dir:
- @MKFONTSCALE@ -b -s -l -n -r -p $(encodingsdir) -e . -e large .
+encodings.dir: $(DATA_FILES)
+ @MKFONTSCALE@ -b -s -l -n -p $(encodingsdir) -e . -e large .
+
+ChangeLog:
+ git-log > ChangeLog
+
+dist-hook: ChangeLog
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff --git a/aclocal.m4 b/aclocal.m4
index c089ec3..77e8743 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -40,7 +40,8 @@ dnl
# --------------------
# Adds --with/without-release-string and changes the PACKAGE and
# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If
-# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged.
+# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. Also
+# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
AC_DEFUN([XORG_RELEASE_VERSION],[
AC_ARG_WITH(release-version,
@@ -53,6 +54,23 @@ AC_DEFUN([XORG_RELEASE_VERSION],[
PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
AC_MSG_NOTICE([Building with package name set to $PACKAGE])
fi
+ AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
+ [`echo $PACKAGE_VERSION | cut -d . -f 1`],
+ [Major version of this package])
+ PVM=`echo $PACKAGE_VERSION | cut -d . -f 2`
+ if test "x$PVM" = "x"; then
+ PVM="0"
+ fi
+ AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
+ [$PVM],
+ [Minor version of this package])
+ PVP=`echo $PACKAGE_VERSION | cut -d . -f 3`
+ if test "x$PVP" = "x"; then
+ PVP="0"
+ fi
+ AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
+ [$PVP],
+ [Patch version of this package])
])
# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
@@ -127,6 +145,39 @@ AC_PREREQ([2.50])dnl
am_aux_dir=`cd $ac_aux_dir && pwd`
])
+# AM_CONDITIONAL -*- Autoconf -*-
+
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 7
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[AC_PREREQ(2.52)dnl
+ ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
+ [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])
+AC_SUBST([$1_FALSE])
+if $2; then
+ $1_TRUE=
+ $1_FALSE='#'
+else
+ $1_TRUE='#'
+ $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+ AC_MSG_ERROR([[conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.]])
+fi])])
+
# Do all the work for Automake. -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
diff --git a/configure b/configure
index 49b5f46..3c02486 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61 for encodings 1.0.0.
+# Generated by GNU Autoconf 2.61 for encodings 1.0.2.
#
# Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>.
#
@@ -574,8 +574,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='encodings'
PACKAGE_TARNAME='encodings'
-PACKAGE_VERSION='1.0.0'
-PACKAGE_STRING='encodings 1.0.0'
+PACKAGE_VERSION='1.0.2'
+PACKAGE_STRING='encodings 1.0.2'
PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg'
ac_subst_vars='SHELL
@@ -637,6 +637,10 @@ AMTAR
am__tar
am__untar
MKFONTSCALE
+GZIP_SMALL_TRUE
+GZIP_SMALL_FALSE
+GZIP_LARGE_TRUE
+GZIP_LARGE_FALSE
GZIP
ENCODINGSDIR
LIBOBJS
@@ -1147,7 +1151,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures encodings 1.0.0 to adapt to many kinds of systems.
+\`configure' configures encodings 1.0.2 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1213,10 +1217,18 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of encodings 1.0.0:";;
+ short | recursive ) echo "Configuration of encodings 1.0.2:";;
esac
cat <<\_ACEOF
+Optional Features:
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --disable-gzip-small-encodings
+ Disable compression of small encoding files
+ --disable-gzip-large-encodings
+ Disable compression of large encoding files
+
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
@@ -1286,7 +1298,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-encodings configure 1.0.0
+encodings configure 1.0.2
generated by GNU Autoconf 2.61
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1300,7 +1312,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by encodings $as_me 1.0.0, which was
+It was created by encodings $as_me 1.0.2, which was
generated by GNU Autoconf 2.61. Invocation command line was
$ $0 $@
@@ -1970,7 +1982,7 @@ fi
# Define the identity of the package.
PACKAGE='encodings'
- VERSION='1.0.0'
+ VERSION='1.0.2'
cat >>confdefs.h <<_ACEOF
@@ -2117,6 +2129,8 @@ am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
+
+
# mkfontscale
# Extract the first word of "mkfontscale", so it can be a program name with args.
@@ -2160,18 +2174,53 @@ fi
if [ -z $MKFONTSCALE ]; then
- { { echo "$as_me:$LINENO: error: mkfontscale is needed to build fontenc. FIXME: when we
- know where it is going to live, put a more informative
- comment here" >&5
-echo "$as_me: error: mkfontscale is needed to build fontenc. FIXME: when we
- know where it is going to live, put a more informative
- comment here" >&2;}
+ { { echo "$as_me:$LINENO: error: mkfontscale is needed to build fontenc. Please install the app/mkfontscale package from X.Org." >&5
+echo "$as_me: error: mkfontscale is needed to build fontenc. Please install the app/mkfontscale package from X.Org." >&2;}
{ (exit 1); exit 1; }; }
fi
+# Choose whether or not to compress encodings - default is to compress all
+
+# Check whether --enable-gzip-small-encodings was given.
+if test "${enable_gzip_small_encodings+set}" = set; then
+ enableval=$enable_gzip_small_encodings; GZIP_SMALL="$enableval"
+else
+ GZIP_SMALL="yes"
+fi
+
+
+
+if test x$GZIP_SMALL = xyes; then
+ GZIP_SMALL_TRUE=
+ GZIP_SMALL_FALSE='#'
+else
+ GZIP_SMALL_TRUE='#'
+ GZIP_SMALL_FALSE=
+fi
+
+
+# Check whether --enable-gzip-large-encodings was given.
+if test "${enable_gzip_large_encodings+set}" = set; then
+ enableval=$enable_gzip_large_encodings; GZIP_LARGE="$enableval"
+else
+ GZIP_LARGE="yes"
+fi
+
+
+
+if test x$GZIP_LARGE = xyes; then
+ GZIP_LARGE_TRUE=
+ GZIP_LARGE_FALSE='#'
+else
+ GZIP_LARGE_TRUE='#'
+ GZIP_LARGE_FALSE=
+fi
+
+
# gzip
-# Extract the first word of "gzip", so it can be a program name with args.
+if test x$GZIP_SMALL = xyes -o x$GZIP_LARGE = xyes ; then
+ # Extract the first word of "gzip", so it can be a program name with args.
set dummy gzip; ac_word=$2
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
@@ -2211,14 +2260,13 @@ echo "${ECHO_T}no" >&6; }
fi
-if [ -z $GZIP ]; then
- { { echo "$as_me:$LINENO: error: gzip is needed to compress font encodings" >&5
+ if [ -z $GZIP ]; then
+ { { echo "$as_me:$LINENO: error: gzip is needed to compress font encodings" >&5
echo "$as_me: error: gzip is needed to compress font encodings" >&2;}
{ (exit 1); exit 1; }; }
+ fi
fi
-
-
DEFAULT_ENCODINGSDIR=${libdir}/X11/fonts/encodings
# Check whether --with-encodingsdir was given.
@@ -2246,6 +2294,29 @@ fi
echo "$as_me: Building with package name set to $PACKAGE" >&6;}
fi
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION_MAJOR `echo $PACKAGE_VERSION | cut -d . -f 1`
+_ACEOF
+
+ PVM=`echo $PACKAGE_VERSION | cut -d . -f 2`
+ if test "x$PVM" = "x"; then
+ PVM="0"
+ fi
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION_MINOR $PVM
+_ACEOF
+
+ PVP=`echo $PACKAGE_VERSION | cut -d . -f 3`
+ if test "x$PVP" = "x"; then
+ PVP="0"
+ fi
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION_PATCHLEVEL $PVP
+_ACEOF
+
+
ac_config_files="$ac_config_files Makefile large/Makefile"
@@ -2375,6 +2446,20 @@ LIBOBJS=$ac_libobjs
LTLIBOBJS=$ac_ltlibobjs
+if test -z "${GZIP_SMALL_TRUE}" && test -z "${GZIP_SMALL_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"GZIP_SMALL\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"GZIP_SMALL\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+if test -z "${GZIP_LARGE_TRUE}" && test -z "${GZIP_LARGE_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"GZIP_LARGE\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"GZIP_LARGE\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
: ${CONFIG_STATUS=./config.status}
ac_clean_files_save=$ac_clean_files
@@ -2675,7 +2760,7 @@ exec 6>&1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by encodings $as_me 1.0.0, which was
+This file was extended by encodings $as_me 1.0.2, which was
generated by GNU Autoconf 2.61. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -2718,7 +2803,7 @@ Report bugs to <bug-autoconf@gnu.org>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-encodings config.status 1.0.0
+encodings config.status 1.0.2
configured by $0, generated by GNU Autoconf 2.61,
with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
@@ -2938,13 +3023,17 @@ AMTAR!$AMTAR$ac_delim
am__tar!$am__tar$ac_delim
am__untar!$am__untar$ac_delim
MKFONTSCALE!$MKFONTSCALE$ac_delim
+GZIP_SMALL_TRUE!$GZIP_SMALL_TRUE$ac_delim
+GZIP_SMALL_FALSE!$GZIP_SMALL_FALSE$ac_delim
+GZIP_LARGE_TRUE!$GZIP_LARGE_TRUE$ac_delim
+GZIP_LARGE_FALSE!$GZIP_LARGE_FALSE$ac_delim
GZIP!$GZIP$ac_delim
ENCODINGSDIR!$ENCODINGSDIR$ac_delim
LIBOBJS!$LIBOBJS$ac_delim
LTLIBOBJS!$LTLIBOBJS$ac_delim
_ACEOF
- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 63; then
+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 67; then
break
elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
diff --git a/debian/changelog b/debian/changelog
index ce805cd..447899b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+xfonts-encodings (1:1.0.2-1) UNRELEASED; urgency=low
+
+ * New upstream release.
+
+ -- Julien Cristau <jcristau@debian.org> Thu, 31 May 2007 05:07:51 +0200
+
xfonts-encodings (1:1.0.0-6) unstable; urgency=low
[ Andres Salomon ]
diff --git a/debian/patches/01_encodings_dir_absolute_paths.diff b/debian/patches/01_encodings_dir_absolute_paths.diff
index cbbe5d1..49078dc 100644
--- a/debian/patches/01_encodings_dir_absolute_paths.diff
+++ b/debian/patches/01_encodings_dir_absolute_paths.diff
@@ -1,32 +1,31 @@
Index: xfonts-encodings/Makefile.am
===================================================================
---- xfonts-encodings.orig/Makefile.am
-+++ xfonts-encodings/Makefile.am
-@@ -48,7 +48,7 @@
+--- xfonts-encodings.orig/Makefile.am 2007-05-31 05:07:44.000000000 +0200
++++ xfonts-encodings/Makefile.am 2007-05-31 05:12:04.000000000 +0200
+@@ -56,7 +56,7 @@
@GZIP@ -c < $< > $@
- encodings.dir:
+ encodings.dir: $(DATA_FILES)
- @MKFONTSCALE@ -b -s -l -n -r -p $(encodingsdir) -e . -e large .
+ @MKFONTSCALE@ -b -s -l -n -p $(encodingsdir) -e . -e large .
- encodings_DATA = $(COMPRESSED) encodings.dir
- CLEANFILES = $(COMPRESSED) encodings.dir
+ encodings_DATA = $(DATA_FILES) encodings.dir
+
Index: xfonts-encodings/large/Makefile.am
===================================================================
---- xfonts-encodings.orig/large/Makefile.am
-+++ xfonts-encodings/large/Makefile.am
+--- xfonts-encodings.orig/large/Makefile.am 2007-05-31 05:07:44.000000000 +0200
++++ xfonts-encodings/large/Makefile.am 2007-05-31 05:12:04.000000000 +0200
@@ -1,4 +1,4 @@
-encodingsdir = @ENCODINGSDIR@/large
+encodingsdir = @ENCODINGSDIR@/large/
ENCODING_FILES = \
big5.eten-0.enc \
-@@ -28,7 +28,7 @@
+@@ -37,6 +37,6 @@
@GZIP@ -c < $< > $@
- encodings.dir:
+ encodings.dir: $(DATA_FILES)
- @MKFONTSCALE@ -b -s -l -n -r -p $(encodingsdir) -e . .
+ @MKFONTSCALE@ -b -s -l -n -p $(encodingsdir) -e . .
- encodings_DATA = $(COMPRESSED) encodings.dir
- CLEANFILES = $(COMPRESSED) encodings.dir
+ encodings_DATA = $(DATA_FILES) encodings.dir
diff --git a/install-sh b/install-sh
index 6ce63b9..4d4a951 100755
--- a/install-sh
+++ b/install-sh
@@ -1,7 +1,8 @@
#!/bin/sh
-#
# install - install a program, script, or datafile
-#
+
+scriptversion=2005-05-14.22
+
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
# following copyright and license.
@@ -41,13 +42,11 @@
# from scratch. It can only install one file at a time, a restriction
# shared with many OS's install programs.
-
# set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit="${DOITPROG-}"
-
# put in absolute paths if you don't have them in your path; or use env. vars.
mvprog="${MVPROG-mv}"
@@ -59,236 +58,266 @@ stripprog="${STRIPPROG-strip}"
rmprog="${RMPROG-rm}"
mkdirprog="${MKDIRPROG-mkdir}"
-transformbasename=""
-transform_arg=""
-instcmd="$mvprog"
chmodcmd="$chmodprog 0755"
-chowncmd=""
-chgrpcmd=""
-stripcmd=""
+chowncmd=
+chgrpcmd=
+stripcmd=
rmcmd="$rmprog -f"
mvcmd="$mvprog"
-src=""
-dst=""
-dir_arg=""
-
-while [ x"$1" != x ]; do
- case $1 in
- -c) instcmd=$cpprog
- shift
- continue;;
-
- -d) dir_arg=true
- shift
- continue;;
-
- -m) chmodcmd="$chmodprog $2"
- shift
- shift
- continue;;
-
- -o) chowncmd="$chownprog $2"
- shift
- shift
- continue;;
-
- -g) chgrpcmd="$chgrpprog $2"
- shift
- shift
- continue;;
-
- -s) stripcmd=$stripprog
- shift
- continue;;
-
- -t=*) transformarg=`echo $1 | sed 's/-t=//'`
- shift
- continue;;
-
- -b=*) transformbasename=`echo $1 | sed 's/-b=//'`
- shift
- continue;;
-
- *) if [ x"$src" = x ]
- then
- src=$1
- else
- # this colon is to work around a 386BSD /bin/sh bug
- :
- dst=$1
- fi
- shift
- continue;;
- esac
-done
-
-if [ x"$src" = x ]
-then
- echo "$0: no input file specified" >&2
- exit 1
-else
- :
-fi
-
-if [ x"$dir_arg" != x ]; then
- dst=$src
- src=""
-
- if [ -d "$dst" ]; then
- instcmd=:
- chmodcmd=""
- else
- instcmd=$mkdirprog
- fi
-else
-
-# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
-# might cause directories to be created, which would be especially bad
-# if $src (and thus $dsttmp) contains '*'.
-
- if [ -f "$src" ] || [ -d "$src" ]
- then
- :
- else
- echo "$0: $src does not exist" >&2
- exit 1
- fi
-
- if [ x"$dst" = x ]
- then
- echo "$0: no destination specified" >&2
- exit 1
- else
- :
- fi
-
-# If destination is a directory, append the input filename; if your system
-# does not like double slashes in filenames, you may need to add some logic
-
- if [ -d "$dst" ]
- then
- dst=$dst/`basename "$src"`
- else
- :
- fi
-fi
-
-## this sed command emulates the dirname command
-dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
-
-# Make sure that the destination directory exists.
-# this part is taken from Noah Friedman's mkinstalldirs script
-
-# Skip lots of stat calls in the usual case.
-if [ ! -d "$dstdir" ]; then
-defaultIFS='
- '
-IFS="${IFS-$defaultIFS}"
-
-oIFS=$IFS
-# Some sh's can't handle IFS=/ for some reason.
-IFS='%'
-set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
-IFS=$oIFS
-
-pathcomp=''
-
-while [ $# -ne 0 ] ; do
- pathcomp=$pathcomp$1
+src=
+dst=
+dir_arg=
+dstarg=
+no_target_directory=
+
+usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+ or: $0 [OPTION]... SRCFILES... DIRECTORY
+ or: $0 [OPTION]... -t DIRECTORY SRCFILES...
+ or: $0 [OPTION]... -d DIRECTORIES...
+
+In the 1st form, copy SRCFILE to DSTFILE.
+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.
+
+Environment variables override the default commands:
+ CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
+"
+
+while test -n "$1"; do
+ case $1 in
+ -c) shift
+ continue;;
+
+ -d) dir_arg=true
+ shift
+ continue;;
+
+ -g) chgrpcmd="$chgrpprog $2"
+ shift
+ shift
+ continue;;
+
+ --help) echo "$usage"; exit $?;;
+
+ -m) chmodcmd="$chmodprog $2"
+ shift
+ shift
+ continue;;
+
+ -o) chowncmd="$chownprog $2"
+ shift
+ shift
+ continue;;
+
+ -s) stripcmd=$stripprog
+ shift
+ continue;;
+
+ -t) dstarg=$2
shift
+ shift
+ continue;;
- if [ ! -d "$pathcomp" ] ;
- then
- $mkdirprog "$pathcomp"
- else
- :
- fi
-
- pathcomp=$pathcomp/
+ -T) no_target_directory=true
+ shift
+ continue;;
+
+ --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
+ break;;
+ esac
done
-fi
-
-if [ x"$dir_arg" != x ]
-then
- $doit $instcmd "$dst" &&
- if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dst"; else : ; fi &&
- if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dst"; else : ; fi &&
- if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dst"; else : ; fi &&
- if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dst"; else : ; fi
-else
-
-# If we're going to rename the final executable, determine the name now.
-
- if [ x"$transformarg" = x ]
- then
- dstfile=`basename "$dst"`
- else
- dstfile=`basename "$dst" $transformbasename |
- sed $transformarg`$transformbasename
- fi
-
-# don't allow the sed command to completely eliminate the filename
-
- if [ x"$dstfile" = x ]
- then
- dstfile=`basename "$dst"`
- else
- :
- fi
-
-# Make a couple of temp file names in the proper directory.
-
- dsttmp=$dstdir/_inst.$$_
- rmtmp=$dstdir/_rm.$$_
-
-# Trap to clean up temp files at exit.
-
- trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0
- trap '(exit $?); exit' 1 2 13 15
-
-# Move or copy the file name to the temp name
-
- $doit $instcmd "$src" "$dsttmp" &&
-
-# and set any options; do chmod last to preserve setuid bits
-
-# If any of these fail, we abort the whole thing. If we want to
-# ignore errors from any of these, just make sure not to ignore
-# errors from the above "$doit $instcmd $src $dsttmp" command.
-
- if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; else :;fi &&
- if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; else :;fi &&
- if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dsttmp"; else :;fi &&
- if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; else :;fi &&
-
-# 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 [ -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
- }
- else
- :
- fi
-} &&
-
-# Now rename the file to the real destination.
+if test -z "$1"; then
+ if test -z "$dir_arg"; then
+ echo "$0: no input file specified." >&2
+ exit 1
+ fi
+ # It's OK to call `install-sh -d' without argument.
+ # This can happen when creating conditional directories.
+ exit 0
+fi
- $doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
+for src
+do
+ # Protect names starting with `-'.
+ case $src in
+ -*) src=./$src ;;
+ esac
+
+ if test -n "$dir_arg"; then
+ dst=$src
+ src=
+
+ if test -d "$dst"; then
+ mkdircmd=:
+ chmodcmd=
+ else
+ mkdircmd=$mkdirprog
+ fi
+ 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 '*'.
+ if test ! -f "$src" && test ! -d "$src"; then
+ echo "$0: $src does not exist." >&2
+ exit 1
+ fi
+
+ if test -z "$dstarg"; then
+ echo "$0: no destination specified." >&2
+ exit 1
+ fi
+
+ dst=$dstarg
+ # Protect names starting with `-'.
+ case $dst in
+ -*) dst=./$dst ;;
+ esac
-fi &&
+ # 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
+ exit 1
+ fi
+ dst=$dst/`basename "$src"`
+ fi
+ fi
+
+ # This sed command emulates the dirname command.
+ dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'`
+
+ # Make sure that the destination directory exists.
+
+ # Skip lots of stat calls in the usual case.
+ if test ! -d "$dstdir"; then
+ defaultIFS='
+ '
+ IFS="${IFS-$defaultIFS}"
+
+ 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
+
+ pathcomp=
+
+ while test $# -ne 0 ; do
+ pathcomp=$pathcomp$1
+ 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
+ fi
+ pathcomp=$pathcomp/
+ done
+ fi
+
+ if test -n "$dir_arg"; then
Reply to: