Date: Thu, 15 Jul 2004 15:49:51 +0400 (MSD) From: Konstantin Oznobihin <bork@rsu.ru> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/69093: [patch] devel/pkgconfig does not search for .pc files in libdir/pkgconfig Message-ID: <200407151149.i6FBnpPe091778@rocky.cc.rsu.ru> Resent-Message-ID: <200407151200.i6FC0p3b039239@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 69093 >Category: ports >Synopsis: [patch] devel/pkgconfig does not search for .pc files in libdir/pkgconfig >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Jul 15 12:00:50 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Konstantin Oznobihin >Release: FreeBSD 5.2.1-RELEASE-p9 i386 >Organization: Rostov State University >Environment: System: FreeBSD *.cc.rsu.ru 5.2.1-RELEASE-p9 FreeBSD 5.2.1-RELEASE-p9 #0: Fri Jul 2 20:10:08 MSD 2004 /usr/obj/usr/src/sys/athlon-xp.HEAD.2004-06-08 i386 >Description: In pkg-config(1) it is said that the default directory to search for .pc files is libdir/pkgconfig (which I think is ${PREFIX}/lib/pkgconfig) and some ports (e.g. openssl, omniORB) install their .pc files in this directory, but pkg-config searches them in libdata/pkgconfig. >How-To-Repeat: pkg-config --cflags openssl >Fix: Dirty hack based on existing patches for pkgconfig. Added LLIBPKGLIBDIR to Makefile.in and scan_dir (LLIBPKGLIBDIR, (void *)1); to pkg.c --- patch-Makefile.in begins here --- --- Makefile.in Thu Jul 15 15:13:13 2004 +++ Makefile.in Thu Jul 15 15:18:48 2004 @@ -35,7 +35,7 @@ DESTDIR = pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ +pkglibdir = $(prefix)/libdata/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = . @@ -90,7 +90,7 @@ bin_PROGRAMS = pkg-config -INCLUDES = -DPKGLIBDIR="\"$(pkglibdir)\"" $(included_glib_includes) +INCLUDES = -DPKGLIBDIR="\"$(pkglibdir)\"" -DXPKGLIBDIR="\"$(X11BASE)/libdata/@PACKAGE@\"" -DLPKGLIBDIR="\"$(LOCALBASE)/libdata/@PACKAGE@\"" -DLLIBPKGLIBDIR="\"$(prefix)/lib/@PACKAGE@\"" $(included_glib_includes) pkg_config_SOURCES = \ pkg.h \ --- patch-Makefile.in ends here --- --- patch-pkg.c begins here --- --- pkg.c Thu Jul 15 15:17:21 2004 +++ pkg.c Thu Jul 15 15:23:00 2004 @@ -113,7 +113,7 @@ * locations, ignoring duplicates */ static void -scan_dir (const char *dirname) +scan_dir (const char *dirname, void *quiet) { DIR *dir; struct dirent *dent; @@ -133,7 +133,8 @@ free (dirname_copy); if (!dir) { - debug_spew ("Cannot open directory '%s' in package search path: %s\n", + if (!quiet) + debug_spew ("Cannot open directory '%s' in package search path: %s\n", dirname, g_strerror (errno)); return; } @@ -202,7 +203,10 @@ path_positions = g_hash_table_new (g_str_hash, g_str_equal); g_slist_foreach (search_dirs, (GFunc)scan_dir, NULL); - scan_dir (pkglibdir); + scan_dir (pkglibdir, (void *)0); + scan_dir (XPKGLIBDIR, (void *)1); + scan_dir (LPKGLIBDIR, (void *)1); + scan_dir (LLIBPKGLIBDIR, (void *)1); } } --- patch-pkg.c ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200407151149.i6FBnpPe091778>