Subject: Re: .pc files and pkgviews
To: Min Sik Kim <minskim@NetBSD.org>
From: Johnny C. Lam <jlam@NetBSD.org>
List: tech-pkg
Date: 04/24/2004 19:45:28
On Sat, Apr 24, 2004 at 01:45:34AM -0500, Min Sik Kim wrote:
> 
> In buildlink3, links to *.h, *.idl, *.pc, lib* files are created in
> BUILDLINK_DIR for overwrite packages.  However, only links to lib*.la
> files are created when pkgviews is enabled.  Because of that, packages
> using pkg-config cannot find *.pc files and thus fail to build.  So
> I'd like to apply the patch below to make *.pc files available at
> build time.
> 
> Is there any reason for not creating links to *.pc files?
> 
> Index: bsd.buildlink3.mk
> ===================================================================
> RCS file: /cvsroot/pkgsrc/mk/buildlink3/bsd.buildlink3.mk,v
> retrieving revision 1.140
> diff -u -r1.140 bsd.buildlink3.mk
> --- bsd.buildlink3.mk	18 Apr 2004 22:33:06 -0000	1.140
> +++ bsd.buildlink3.mk	24 Apr 2004 06:23:27 -0000
> @@ -574,7 +574,7 @@
>  .  if (${PKG_INSTALLATION_TYPE} == "pkgviews") &&			\
>        !empty(BUILDLINK_IS_DEPOT.${_pkg_}:M[yY][eE][sS])
>  BUILDLINK_CONTENTS_FILTER.${_pkg_}?=					\
> -	${GREP} 'lib.*/lib[^/]*\.la$$'
> +	${EGREP} 'lib(/pkgconfig/.*\.pc$$|.*/lib[^/]*\.la$$)'
>  .  else
>  BUILDLINK_CONTENTS_FILTER.${_pkg_}?=					\
>  	${EGREP} '(include.*/|\.h$$|\.idl$$|\.pc$$|/lib[^/]*\.[^/]*$$)'

This patch looks fine.  Julio and I had discussed changing the way that
buildlink3 deals with pkg-config and *.pc files, but I forgot about
pkgviews when we were originally making those changes.

	Cheers,

	-- Johnny Lam <jlam@NetBSD.org>