kill old check-libs script, after checking the new one handles a.out

just fine.

Kill old subst that's not used anymore as well.
This commit is contained in:
espie 2004-09-18 13:48:43 +00:00
parent 0046b33eec
commit 784afb2649
4 changed files with 2 additions and 106 deletions

View File

@ -1,85 +0,0 @@
#!/usr/bin/perl -w
# $OpenBSD: check-libs,v 1.5 2003/04/18 20:27:59 sturm Exp $
# Copyright (c) 2001 Marc Espie
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
# Check that all libraries are mentioned in lib depends.
# For now, we do a summary check, without taking version numbers into
# account.
use strict;
sub find_library
{
my $libname = shift;
my $LIBDIR=$ENV{'PKG_DBDIR'};
my @list = `fgrep -l lib$libname.so $LIBDIR/*/+CONTENTS`;
local $_;
if (@list != 1) {
return '???';
}
my $pkgname = $list[0];
chomp $pkgname;
open(FILE, $pkgname);
while (<FILE>) {
chomp;
if (m/^\@comment subdir\=(\S+)/) {
close FILE;
return $1;
}
}
$pkgname =~ s|$LIBDIR/(.*?)/\+CONTENTS|$1|;
return $pkgname;
}
my $error = 0;
my %registered = map { s/.*\///; s/\.$//; s/(?:\.\d+){1,2}$//; ($_, 1); }
split(/[ ,\n]+/, $ENV{'LIB_DEPENDS'});
open(LIBS, '<', shift);
open(BUILDS, '<', shift);
while (<BUILDS>) {
chomp;
s/^.*\/lib(.*?)\.so(?:\.\d+)+$/$1/;
$registered{$_} = 1;
}
close(BUILDS);
while (<LIBS>) {
chomp;
if (m/^\tlibrary: (\S+)\s(\d+)\s(\-?\d+)$/) {
my ($name, $major, $minor) = ($1, $2, $3);
$_ = $name;
} else {
s/^\t\-l(.*?)(\.\d+){0,2}(?: \=\> .*)?$/$1/;
}
unless (defined $registered{$_}) {
print "lib-depends-check: no mention of $_ (".find_library($_).")\n";
$error = 1;
}
}
close(LIBS);
exit($error);

View File

@ -1,10 +0,0 @@
# $OpenBSD: ldconfig-new.sed,v 1.3 2000/12/16 23:25:36 espie Exp $
#
s,^DYNLIBDIR(\(.*\))$,@exec /sbin/ldconfig -m \1\
@unexec /sbin/ldconfig -R,
#
# This needs an ldconfig with -U support
s,^NEWDYNLIBDIR(\(.*\))$,@exec /sbin/ldconfig -m \1\
@exec echo "Remember to add \1 to shlib_dirs in /etc/rc.conf"\
@unexec /sbin/ldconfig -U \1\
@unexec echo "Remember to remove \1 from shlib_dirs in /etc/rc.conf",

View File

@ -1,7 +0,0 @@
# $OpenBSD: ldconfig.sed,v 1.2 2000/07/01 17:16:48 form Exp $
#
s,^DYNLIBDIR(\(.*\))$,@exec /sbin/ldconfig -m \1\
@unexec /sbin/ldconfig -R,
s,^NEWDYNLIBDIR(\(.*\))$,@exec /sbin/ldconfig -m \1\
@unexec /sbin/ldconfig -R,

View File

@ -1,6 +1,6 @@
#-*- mode: Makefile; tab-width: 4; -*-
# ex:ts=4 sw=4 filetype=make:
# $OpenBSD: bsd.port.mk,v 1.647 2004/09/18 13:45:23 espie Exp $
# $OpenBSD: bsd.port.mk,v 1.648 2004/09/18 13:48:43 espie Exp $
# $FreeBSD: bsd.port.mk,v 1.264 1996/12/25 02:27:44 imp Exp $
# $NetBSD: bsd.port.mk,v 1.62 1998/04/09 12:47:02 hubertf Exp $
#
@ -1318,7 +1318,6 @@ _internal-${_DEP}-depends: ${_DEP${_DEP}_COOKIES}
# Do a brute-force ldd/objdump on all files under WRKINST.
.if ${ELF_TOOLCHAIN:L} == "no"
_CHECK_LIBS_SCRIPT=${PORTSDIR}/infrastructure/install/check-libs
${_LIBLIST}: ${_FAKE_COOKIE}
@${SUDO} mkdir -p ${WRKINST}/usr/libexec
@-${SUDO} cp -f /usr/libexec/ld.so ${WRKINST}/usr/libexec
@ -1330,7 +1329,6 @@ ${_LIBLIST}: ${_FAKE_COOKIE}
grep '^ '|\
sort -u >$@
.else
_CHECK_LIBS_SCRIPT=${PORTSDIR}/infrastructure/install/check-libs-elf
${_LIBLIST}: ${_FAKE_COOKIE}
@cd ${WRKINST} && ${SUDO} find . -type f|\
xargs objdump -p 2>/dev/null |\
@ -1373,7 +1371,7 @@ _internal-lib-depends-check: ${_LIBLIST} ${_BUILDLIBLIST}
@${_depfile_fragment}; \
LIB_DEPENDS="`${MAKE} _recurse-lib-depends-check`" \
PKG_DBDIR='${PKG_DBDIR}' \
perl ${_CHECK_LIBS_SCRIPT} \
perl ${PORTSDIR}/infrastructure/install/check-libs-elf \
${_LIBLIST} ${_BUILDLIBLIST}
_internal-manpages-check: ${_FAKE_COOKIE}