pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk Don't bother using environment variables to pass in...
details: https://anonhg.NetBSD.org/pkgsrc/rev/ebae4f904995
branches: trunk
changeset: 531596:ebae4f904995
user: jlam <jlam%pkgsrc.org@localhost>
date: Thu Aug 02 16:00:33 2007 +0000
description:
Don't bother using environment variables to pass info the shlib-type
shell script. Just specify everything on the command line. Also,
since shlib-type is a plain-old shell script with no bells and whistles,
we can safely run it with "sh" and not "${SH}", which is necessary
because "${SH}" isn't defined at this point.
diffstat:
mk/pkginstall/bsd.pkginstall.mk | 6 +++---
mk/scripts/shlib-type | 23 +++++++++++------------
2 files changed, 14 insertions(+), 15 deletions(-)
diffs (68 lines):
diff -r 87a899e77625 -r ebae4f904995 mk/pkginstall/bsd.pkginstall.mk
--- a/mk/pkginstall/bsd.pkginstall.mk Thu Aug 02 15:49:23 2007 +0000
+++ b/mk/pkginstall/bsd.pkginstall.mk Thu Aug 02 16:00:33 2007 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkginstall.mk,v 1.29 2007/07/27 18:37:35 jlam Exp $
+# $NetBSD: bsd.pkginstall.mk,v 1.30 2007/08/02 16:00:33 jlam Exp $
#
# This Makefile fragment is included by bsd.pkg.mk and implements the
# common INSTALL/DEINSTALL scripts framework. To use the pkginstall
@@ -700,8 +700,8 @@
#
SHLIB_TYPE= ${_SHLIB_TYPE_cmd:sh}
_SHLIB_TYPE_cmd= \
- ${SETENV} PKG_INFO_CMD=${PKG_INFO_CMD:Q} \
- ${SH} ${.CURDIR}/../../mk/scripts/shlib-type ${_OPSYS_SHLIB_TYPE:Q}
+ sh ${.CURDIR}/../../mk/scripts/shlib-type \
+ ${_OPSYS_SHLIB_TYPE:Q} ${PKG_INFO_CMD:Q}
LDCONFIG_ADD_CMD?= ${_LDCONFIG_ADD_CMD.${OPSYS}}
LDCONFIG_REMOVE_CMD?= ${_LDCONFIG_REMOVE_CMD.${OPSYS}}
diff -r 87a899e77625 -r ebae4f904995 mk/scripts/shlib-type
--- a/mk/scripts/shlib-type Thu Aug 02 15:49:23 2007 +0000
+++ b/mk/scripts/shlib-type Thu Aug 02 16:00:33 2007 +0000
@@ -1,33 +1,32 @@
# /bin/sh
#
-# $NetBSD: shlib-type,v 1.2 2007/08/02 15:46:33 jlam Exp $
+# $NetBSD: shlib-type,v 1.3 2007/08/02 16:00:33 jlam Exp $
#
# This code is derived from software contributed to The NetBSD Foundation
# by Alistair Crooks.
#
# This script returns the the library format for the platform. If
-# the library format is "ELF/a.out", then we inspect "pkg_info" (which
-# should exist on a pkgsrc system) to determine the correct object
-# format (either ELF or a.out).
+# the library format is "ELF/a.out", then we inspect the specified
+# path to determine the correct object format (either ELF or a.out).
#
if [ -z "${FILE_CMD}" ]; then
FILE_CMD=file
fi
-if [ -z "${PKG_INFO_CMD}" ]; then
- PKG_INFO_CMD=/usr/sbin/pkg_info
+
+if [ $# -lt 2 ]; then
+ echo 1>&2 "usage: shlib-type libformat binpath"
+ exit 1
fi
-if [ $# -eq 0 ]; then
- echo 1>&2 "usage: shlib-type libformat"
- exit 1
-fi
+libformat="$1"
+binpath="$2"
sotype=none
case "$1" in
ELF/a.out)
- if [ -f "${PKG_INFO_CMD}" ]; then
- output=`${FILE_CMD} ${PKG_INFO_CMD} 2>/dev/null`
+ if [ -f "$binpath" ]; then
+ output=`${FILE_CMD} $binpath 2>/dev/null`
else
output=
fi
Home |
Main Index |
Thread Index |
Old Index