Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 2 Jan 2006 03:41:31 -0800 (PST)
From:      Eric Anholt <anholt@FreeBSD.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/91213: pkg-config ignores autotools normal .pc directories
Message-ID:  <200601021141.k02BfVef020914@leguin.anholt.net>
Resent-Message-ID: <200601021150.k02Bo34P044145@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         91213
>Category:       ports
>Synopsis:       pkg-config ignores autotools normal .pc directories
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jan 02 11:50:02 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Eric Anholt
>Release:        FreeBSD 7.0-CURRENT amd64
>Organization:
>Environment:
System: FreeBSD leguin.anholt.net 7.0-CURRENT FreeBSD 7.0-CURRENT #26: Mon Dec 26 02:08:57 PST 2005 anholt@leguin.anholt.net:/usr/obj/usr/src/current/sys/MYKERNEL amd64


	
>Description:
	Dealing with FreeBSD's autotools and pkgconfig environment is a pain
	when working on 3rd-party software.  One of the issues is that our
	pkgconfig from ports doesn't look in the default place to which 3rd
	party software (built using autotools, at least) installs .pc files
	(${prefix}/lib/pkgconfig).  While FreeBSD's hier(7) may specify that
	they should go in libdata, it's hard to expect upstream to do that for
	just us (and it seems like it's not the norm for upstreams).  So, I
	propose that we apply the following change, which will look in
	${prefix}/lib/pkgconfig after each ${prefix}/libdata/pkgconfig.
	
	The only issue I see with it is getting .pc files out of sync between
	software versions in ports vs. not, but that already happens with
	3rd-party software where the default may be to install in /usr/local/
	though the ports system has decided on /usr/X11R6.

	Oh, and I cleaned up a couple of very minor portlint warnings.

>How-To-Repeat:
	
>Fix:

--- pkgconfig-locations.diff begins here ---
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/devel/pkgconfig/Makefile,v
retrieving revision 1.41
diff -u -r1.41 Makefile
--- Makefile	14 Nov 2005 13:01:26 -0000	1.41
+++ Makefile	2 Jan 2006 08:00:39 -0000
@@ -8,6 +8,7 @@
 
 PORTNAME=	pkgconfig
 PORTVERSION=	0.20
+PORTREVISION=	1
 CATEGORIES=	devel
 MASTER_SITES=	http://pkgconfig.freedesktop.org/releases/
 DISTNAME=	pkg-config-${PORTVERSION}
@@ -25,12 +26,15 @@
 .include <bsd.port.pre.mk>
 
 PC_PATH=${PREFIX}/libdata/pkgconfig
+PC_PATH=${PREFIX}/lib/pkgconfig
 .if ${LOCALBASE} != ${PREFIX}
 PC_PATH:=	${PC_PATH}:${LOCALBASE}/libdata/pkgconfig
-.endif 
+PC_PATH:=	${PC_PATH}:${LOCALBASE}/lib/pkgconfig
+.endif
 .if ${X11BASE} != ${PREFIX}
 PC_PATH:=	${PC_PATH}:${X11BASE}/libdata/pkgconfig
-.endif 
+PC_PATH:=	${PC_PATH}:${X11BASE}/lib/pkgconfig
+.endif
 
 CONFIGURE_ARGS=	--disable-threads \
 		--with-pc-path="${PC_PATH}"
Index: pkg-descr
===================================================================
RCS file: /home/ncvs/ports/devel/pkgconfig/pkg-descr,v
retrieving revision 1.5
diff -u -r1.5 pkg-descr
--- pkg-descr	5 Nov 2005 04:53:19 -0000	1.5
+++ pkg-descr	2 Jan 2006 08:00:12 -0000
@@ -6,8 +6,10 @@
 pkg-config retrieves information about packages from special metadata files.
 These files are named after the package, with the extension .pc. By default,
 pkg-config looks for these files in the following directories:
-${PREFIX}/libdata/pkgconfig, ${LOCALBASE}/libdata/pkgconfig and
-${X11BASE}/libdata/pkgconfig; it will also look in the list of directories
-specified by the PKG_CONFIG_PATH environment variable.
+${PREFIX}/libdata/pkgconfig, ${PREFIX}/lib/pkgconfig,
+${LOCALBASE}/libdata/pkgconfig, ${LOCALBASE}/lib/pkgconfig,
+${X11BASE}/libdata/pkgconfig, and ${X11BASE}/lib/pkgconfig; it will also look in
+in the list of directories specified by the PKG_CONFIG_PATH environment
+variable.  It alo
 
 WWW: http://pkgconfig.freedesktop.org/wiki/
--- pkgconfig-locations.diff ends here ---


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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200601021141.k02BfVef020914>