Re: How to find where is header file

Roland Illig <[email protected]> Tue, 28 Jan 2025 19:23:56 +0100
Newsgroups gmane.os.netbsd.devel.toolchain
Message-ID <[email protected]>
Am 28.01.2025 um 18:35 schrieb Peter Skvarka:
> Hello,
> I have two questions:
> 1. Like I found, command: "pkgin pkg-content <package_name>" displays
> it's content. What is the most easy way how to find which package
> contains some header file ?
> 2. Which package contains headers file libutil.h ?

If you have the source code of pkgsrc available, you can run:

    grep '/libutil\.h' $PKGSRCDIR/*/*/PLIST*

This command works for all packages that have a fixed list of files they
install. For the other packages, this command doesn't work.

If you have the binary package already installed, you can run:

    pkg_info -Fe /usr/pkg/include/libutil.h

Roland