pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk/pkginstall Relative $infodir is allowed, so if it's...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/212ecbd2c616
branches:  trunk
changeset: 522894:212ecbd2c616
user:      obache <obache%pkgsrc.org@localhost>
date:      Fri Dec 29 07:06:31 2006 +0000

description:
Relative $infodir is allowed, so if it's relative, add ${PREFIX}.

diffstat:

 mk/pkginstall/info-files |  12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diffs (33 lines):

diff -r e8f31a7ffb77 -r 212ecbd2c616 mk/pkginstall/info-files
--- a/mk/pkginstall/info-files  Fri Dec 29 06:44:42 2006 +0000
+++ b/mk/pkginstall/info-files  Fri Dec 29 07:06:31 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: info-files,v 1.2 2006/07/19 22:26:26 jlam Exp $
+# $NetBSD: info-files,v 1.3 2006/12/29 07:06:31 obache Exp $
 #
 # Generate an +INFO_FILES script that handles info file registration for
 # the package.
@@ -70,7 +70,10 @@
                                ;;
                        esac
 
-                       ${TEST} -n "$infodir" || infodir="${file%/*}"
+                       case $infodir in
+                       "")     infodir="${file%/*}" ;;
+                       [!/]*)  infodir="${PKG_PREFIX}/$infodir" ;;
+                       esac
                        infoindex="$infodir/dir"
                        nentries="`${GREP} -c '^\*' $infoindex 2>/dev/null`"
                        case "$nentries" in
@@ -109,7 +112,10 @@
                                ;;
                        esac
 
-                       ${TEST} -n "$infodir" || infodir="${file%/*}"
+                       case $infodir in
+                       "")     infodir="${file%/*}" ;;
+                       [!/]*)  infodir="${PKG_PREFIX}/$infodir" ;;
+                       esac
                        infoindex="$infodir/dir"
                        ${ECHO} "       $file"
                        ${INSTALL_INFO} --info-dir="$infodir" --delete $file >/dev/null 2>&1



Home | Main Index | Thread Index | Old Index