pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc Modify the shlib-type script so that it doesn't need t...
details: https://anonhg.NetBSD.org/pkgsrc/rev/5af8cb8bd231
branches: trunk
changeset: 516459:5af8cb8bd231
user: jlam <jlam%pkgsrc.org@localhost>
date: Fri Jul 21 13:40:27 2006 +0000
description:
Modify the shlib-type script so that it doesn't need to compile anything
-- instead, we just check "pkg_info", which should exist on all pkgsrc
platforms.
XXX Note that this may need to change when we later support other package
XXX system flavors.
Back out revision 1.79 of pkgtools/x11-links/Makefile which was only to
work around needing a C compiler for shlib-type to work.
diffstat:
mk/plist/plist.mk | 7 +++----
mk/plist/shlib-type | 41 +++++++++++++++++++----------------------
pkgtools/x11-links/Makefile | 4 ++--
3 files changed, 24 insertions(+), 28 deletions(-)
diffs (105 lines):
diff -r 69c1e080aa3b -r 5af8cb8bd231 mk/plist/plist.mk
--- a/mk/plist/plist.mk Fri Jul 21 13:36:39 2006 +0000
+++ b/mk/plist/plist.mk Fri Jul 21 13:40:27 2006 +0000
@@ -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_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 -r 69c1e080aa3b -r 5af8cb8bd231 mk/plist/shlib-type
--- a/mk/plist/shlib-type Fri Jul 21 13:36:39 2006 +0000
+++ b/mk/plist/shlib-type Fri Jul 21 13:40:27 2006 +0000
@@ -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 @@
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 -r 69c1e080aa3b -r 5af8cb8bd231 pkgtools/x11-links/Makefile
--- a/pkgtools/x11-links/Makefile Fri Jul 21 13:36:39 2006 +0000
+++ b/pkgtools/x11-links/Makefile Fri Jul 21 13:40:27 2006 +0000
@@ -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 @@
PKG_INSTALLATION_TYPES= overwrite pkgviews
WRKSRC= ${WRKDIR}
-USE_LANGUAGES= c
+USE_LANGUAGES= # empty
EXTRACT_ONLY= # empty
NO_CHECKSUM= yes
NO_MTREE= yes
Home |
Main Index |
Thread Index |
Old Index