Print +REQUIRED_BY as tree?

Doug Barton dougb at FreeBSD.org
Mon Sep 12 20:05:27 UTC 2011


On 09/12/2011 12:58, Lev Serebryakov wrote:
>  How could I determine which ports are directly lined with libgcc from
> gcc44? ldd? 

Yes, that's really the only answer. I have the following function which
would work:

old_libs ()
{
    local file nf;
    [ -e ~/old-lib-list ] && unlink ~/old-lib-list;
    cd /usr/local/ || {
        echo 'cd to /usr/local/ failed';
        return 1
    };
    for file in `find GNUstep bin lib* sbin -type f 2>/dev/null`;
    do
        case "$file" in
            lib\/firefox* | lib\/linux-* | lib\/thunderbird*)
                continue
            ;;
        esac;
        if nf=`ldd -a $file 2>/dev/null | egrep "(not
found|${1:-asjklssafjklasdfjkl})"`; then
            echo $file;
            echo $nf;
            echo '';
        fi;
    done > ~/old-lib-list;
    cd -;
    if [ ! -s ~/old-lib-list ]; then
        echo 'Nothing found';
        unlink ~/old-lib-list;
    fi
}

You could run old_libs <name of libgcc> and it would tell you which
things are linked against it.

Alternatively you could do the following with portmaster:

portmaster -o lang/gcc45 gcc-4.4
portmaster -R -r gcc-4.5


hth,

Doug

-- 

	Nothin' ever doesn't change, but nothin' changes much.
			-- OK Go

	Breadth of IT experience, and depth of knowledge in the DNS.
	Yours for the right price.  :)  http://SupersetSolutions.com/



More information about the freebsd-ports mailing list