summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mk/plist/plist.mk7
-rwxr-xr-xmk/plist/shlib-type41
-rw-r--r--pkgtools/x11-links/Makefile4
3 files changed, 24 insertions, 28 deletions
diff --git a/mk/plist/plist.mk b/mk/plist/plist.mk
index 131e57a6d5b..3b0e3101140 100644
--- a/mk/plist/plist.mk
+++ b/mk/plist/plist.mk
@@ -1,4 +1,4 @@
-# $NetBSD: plist.mk,v 1.14 2006/07/15 23:58:52 rillig Exp $
+# $NetBSD: plist.mk,v 1.15 2006/07/21 13:40:27 jlam Exp $
#
# This Makefile fragment handles the creation of PLISTs for use by
# pkg_create(8).
@@ -163,9 +163,8 @@ _SHLIB_AWKFILE.none= ${.CURDIR}/../../mk/plist/shlib-none.awk
# SHLIB_TYPE is the type of shared library supported by the platform.
SHLIB_TYPE= ${_SHLIB_TYPE_cmd:sh}
_SHLIB_TYPE_cmd= \
- ${SETENV} CC=${CC:Q} ECHO=${TOOLS_ECHO:Q} \
- FILE_CMD=${TOOLS_FILE_CMD:Q} MKDIR=${TOOLS_MKDIR:Q} \
- RM=${TOOLS_RM:Q} TEST=${TOOLS_TEST:Q} \
+ ${SETENV} ECHO=${TOOLS_ECHO:Q} FILE_CMD=${TOOLS_FILE_CMD:Q} \
+ TEST=${TOOLS_TEST:Q} PKG_INFO_CMD=${PKG_INFO_CMD:Q} \
${SH} ${.CURDIR}/../../mk/plist/shlib-type ${_OPSYS_SHLIB_TYPE:Q}
######################################################################
diff --git a/mk/plist/shlib-type b/mk/plist/shlib-type
index a657d4e05f0..56ebb365a0f 100755
--- a/mk/plist/shlib-type
+++ b/mk/plist/shlib-type
@@ -1,22 +1,20 @@
# /bin/sh
#
-# $NetBSD: shlib-type,v 1.2 2006/01/19 17:24:44 jlam Exp $
+# $NetBSD: shlib-type,v 1.3 2006/07/21 13:40:27 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 a small program is compiled to
-# determine the correct object format (either ELF or a.out).
+# 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).
#
-: ${CC=cc}
: ${ECHO=echo}
: ${FILE_CMD=file}
-: ${RM=rm}
-: ${MKDIR=mkdir}
: ${TEST=test}
-: ${TMPDIR=/tmp}
+: ${PKG_INFO_CMD=/usr/sbin/pkg_info}
self="${0##*/}"
@@ -29,20 +27,19 @@ ${TEST} $# -gt 0 || { usage; exit 1; }
sotype=none
case "$1" in
ELF/a.out)
- tmpdir="${TMPDIR}/shlib-type.$$"
- umask 077 && ${MKDIR} "$tmpdir"
- if ${TEST} -d "$tmpdir"; then
- cd $tmpdir
- ${ECHO} "int main() { return(0); }" > a.c
- ${CC} ${CFLAGS} a.c -o a.out >/dev/null 2>&1
- if ${TEST} -f "a.out"; then
- case `${FILE_CMD} a.out` in
- *ELF*dynamically*) sotype="ELF" ;;
- *shared*library*) sotype="a.out" ;;
- *dynamically*) sotype="a.out" ;;
- esac
- fi
- ${RM} -fr "$tmpdir"
+ case "${PKG_INFO_CMD}" in
+ /*) ;;
+ *) PKG_INFO_CMD="/usr/sbin/pkg_info"
+ esac
+ if ${TEST} -f ${PKG_INFO_CMD}; then
+ case `${FILE_CMD} ${PKG_INFO_CMD}` in
+ *ELF*dynamically*) sotype="ELF" ;;
+ *shared*library*) sotype="a.out" ;;
+ *dynamically*) sotype="a.out" ;;
+ esac
+ else
+ # "pkg_info" is missing so just guess "ELF.
+ sotype="ELF"
fi
;;
*)
diff --git a/pkgtools/x11-links/Makefile b/pkgtools/x11-links/Makefile
index d654e9d6018..7f6619dca33 100644
--- a/pkgtools/x11-links/Makefile
+++ b/pkgtools/x11-links/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.80 2006/07/21 13:36:39 jlam Exp $
+# $NetBSD: Makefile,v 1.81 2006/07/21 13:40:27 jlam Exp $
#
# NOTE: If you update this package, then you'll likely need to also update
# the x11-links dependency in buildlink3.mk to the correct version,
@@ -16,7 +16,7 @@ COMMENT= Shadow tree of links to native X11 headers and libraries
PKG_INSTALLATION_TYPES= overwrite pkgviews
WRKSRC= ${WRKDIR}
-USE_LANGUAGES= c
+USE_LANGUAGES= # empty
EXTRACT_ONLY= # empty
NO_CHECKSUM= yes
NO_MTREE= yes