Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 25 Jun 2011 19:20:52 -0500
From:      Dan Nelson <dnelson@allantgroup.com>
To:        Matthias Apitz <guru@unixarea.de>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: pkg-config --cflags glib-2.0 gives wrong -I dir
Message-ID:  <20110626002051.GA44024@dan.emsphone.com>
In-Reply-To: <20110625045740.GA3383@tinyCurrent>
References:  <20110625045740.GA3383@tinyCurrent>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help

--UHN/qo2QbUvPLonB
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

In the last episode (Jun 25), Matthias Apitz said:
> Why gives 
> 
> $ pkg-config --cflags glib-2.0
> -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include  
>
> $ ls -ld /usr/local/include/glib-2.0 /usr/local/lib/glib-2.0/include
> ls: /usr/local/lib/glib-2.0/include: No such file or directory
> drwxr-xr-x  5 root  wheel  512 May 28 19:01 /usr/local/include/glib-2.0
> 
> a non existing -I directory? This concrete example is with a 9-CURRENT
> and glib-2.0 from the ports as glib-2.26.1_1, but I see this as well in
> some older 8.x systems;

Checking Solaris and SUSE Linux, I see a similar pair of directories:

solaris$ pkg-config --cflags glib-2.0
-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include

linux$ pkg-config --cflags glib-2.0 
-I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include

The /usr/lib* directory on each system contains a single file: glibconfig.h. 
On FreeBSD, this file is in /usr/local/include/glib-2.0/ along with all the
other headers (headers don't belong in /lib/ anyway).

Try putting the attached patch into the files directory of the glib20 port.

-- 
	Dan Nelson
	dnelson@allantgroup.com

--UHN/qo2QbUvPLonB
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="patch-glib-2.0.pc.in"

No headers are installed into ${libdir}/glib-2.0/include, so remove it from
CFLAGS

--- glib-2.26.1/glib-2.0.pc.in	2009-03-31 18:04:20.000000000 -0500
+++ glib-2.26.1/glib-2.0.pc.in	2011-06-25 19:14:23.580424986 -0500
@@ -12,4 +12,4 @@
 Version: @VERSION@
 Libs: -L${libdir} -lglib-2.0 @INTLLIBS@
 Libs.private: @ICONV_LIBS@
-Cflags: -I${includedir}/glib-2.0 -I${libdir}/glib-2.0/include @GLIB_EXTRA_CFLAGS@
+Cflags: -I${includedir}/glib-2.0 @GLIB_EXTRA_CFLAGS@

--UHN/qo2QbUvPLonB--



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?20110626002051.GA44024>