Index: postinstall =================================================================== RCS file: /home/apb/netbsd/REPO/cvsmirror/cvsroot/src/usr.sbin/postinstall/postinstall,v retrieving revision 1.158 diff -d -p -u -r1.158 postinstall --- postinstall 9 Sep 2013 15:04:12 -0000 1.158 +++ postinstall 3 Nov 2013 08:44:52 -0000 @@ -646,7 +646,13 @@ get_makevar() detect_x11() { if $SOURCEMODE; then - get_makevar MKX11 X11ROOTDIR X11SRCDIR + if [ -n "${XSRC_DIR}" ]; then + MKX11=yes + X11SRCDIR="${XSRC_DIR}" + get_makevar X11ROOTDIR + else + get_makevar MKX11 X11ROOTDIR X11SRCDIR + fi else if [ -f "${SRC_DIR}/etc/mtree/set.xetc" ]; then MKX11=yes @@ -832,7 +838,7 @@ do_fontconfig() if ! $SOURCEMODE; then FONTCONFIG_DIR="${SRC_DIR}/etc/fonts/conf.avail" else - FONTCONFIG_DIR="${XSRC_DIR}/external/mit/fontconfig/dist/conf.d" + FONTCONFIG_DIR="${X11SRCDIR}/external/mit/fontconfig/dist/conf.d" fi populate_dir "$op" false "${FONTCONFIG_DIR}" "${DEST_DIR}/etc/fonts/conf.avail" 444 \ @@ -1890,7 +1896,7 @@ Usage: ${PROGNAME} [-s srcdir] [-x xsrcd [${SRC_DIR:-/usr/src}] -x xsrcdir Location of the X11 source files. This must be a directory that contains a NetBSD xsrc tree. - [${XSRC_DIR:-/usr/src/../xsrc}] + [${XSRC_DIR}] -d destdir Destination directory to check. [${DEST_DIR:-/}] -m mach MACHINE. [${MACHINE}] -a arch MACHINE_ARCH. [${MACHINE_ARCH}] @@ -1933,7 +1939,7 @@ main() TGZLIST= # quoted list list of tgz files SRC_ARGLIST= # quoted list of one or more "-s" args SRC_DIR="${SRC_ARG}" # set default value for early usage() - XSRC_DIR="${SRC_ARG}/../xsrc" + XSRC_DIR="" N_SRC_ARGS=0 # number of "-s" args TGZMODE=false # true if "-s" specifies a tgz file DIRMODE=false # true if "-s" specified a directory