Subject: pkg/22492: check-shlibs is incomplete on Darwin
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <mezis@free.fr>
List: netbsd-bugs
Date: 08/15/2003 12:01:28
>Number:         22492
>Category:       pkg
>Synopsis:       check-shlibs is incomplete on Darwin
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Fri Aug 15 12:02:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Julien T. Letessier
>Release:        pkgsrc/Darwin
>Organization:
Solarpack project
>Environment:
Darwin trottinet.lan 6.6 Darwin Kernel Version 6.6: Thu May  1 21:48:54 PDT 2003; root:xnu/xnu-344.34.obj~1/RELEASE_PPC  Power Macintosh powerpc
>Description:
The check-shlibs target doesn't check dependancies on Darwin: "ldd" doesn't exist, and the shlib list is incorrectly generated.
>How-To-Repeat:
Hem. Build and install some kind of broken package?
>Fix:
Index: defs.Darwin.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/defs.Darwin.mk,v
retrieving revision 1.50
diff -u -B -b -w -r1.50 defs.Darwin.mk
--- defs.Darwin.mk      2003/04/15 05:29:46     1.50
+++ defs.Darwin.mk      2003/08/15 11:58:42
@@ -32,6 +32,7 @@
 HOSTNAME_CMD?= /bin/hostname
 ID?=           /usr/bin/id
 LDCONFIG?=     /sbin/ldconfig
+LDD?=          /usr/bin/otool -L
 LN?=           /bin/ln
 LS?=           /bin/ls
 M4?=           /usr/bin/m4 

Index: bsd.pkg.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/bsd.pkg.mk,v
retrieving revision 1.1238
diff -u -B -b -w -r1.1238 bsd.pkg.mk
--- bsd.pkg.mk  2003/08/12 15:55:21     1.1238
+++ bsd.pkg.mk  2003/08/15 11:58:42
@@ -2730,10 +2730,12 @@
        bins=`${PKG_INFO} -qL ${PKGNAME} | { ${EGREP} -h '/(bin|sbin|libexec)/' || ${TRUE}; }`; \
        if [ "${OBJECT_FMT}" = "ELF" ]; then                            \
                shlibs=`${PKG_INFO} -qL ${PKGNAME} | { ${EGREP} -h '/lib/lib.*.so' || ${TRUE}; }`; \
+       elif [ "${OBJECT_FMT}" = "Mach-O" ]; then                               \
+               shlibs=`${PKG_INFO} -qL ${PKGNAME} | { ${EGREP} -h '/lib/lib.*.dylib' || ${TRUE}; }`; \
        else                                                            \
                shlibs="";                                              \
        fi;                                                             \
-       if [ X${LDD} = X ]; then                                        \
+       if [ "X${LDD}" = "X" ]; then                                    \
                ldd=`${TYPE} ldd | ${AWK} '{ print $$NF }'`;            \
        else                                                            \
                ldd="${LDD}";                                           \

>Release-Note:
>Audit-Trail:
>Unformatted: