From owner-freebsd-ports Tue Mar 12 14:20:12 2002 Delivered-To: freebsd-ports@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 4F0A437B404 for ; Tue, 12 Mar 2002 14:20:01 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g2CMK1W98556; Tue, 12 Mar 2002 14:20:01 -0800 (PST) (envelope-from gnats) Received: from shumai.marcuscom.com (rdu57-28-046.nc.rr.com [66.57.28.46]) by hub.freebsd.org (Postfix) with ESMTP id 88FA537B404 for ; Tue, 12 Mar 2002 14:19:30 -0800 (PST) Received: (from marcus@localhost) by shumai.marcuscom.com (8.11.6/8.11.6) id g2CMJiO00919; Tue, 12 Mar 2002 17:19:44 -0500 (EST) (envelope-from marcus) Message-Id: <200203122219.g2CMJiO00919@shumai.marcuscom.com> Date: Tue, 12 Mar 2002 17:19:44 -0500 (EST) From: Joe Marcus Clarke Reply-To: Joe Marcus Clarke To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 Subject: ports/35831: [PATCH] Fix problem getting pthread libs and cflags from pkgconfig Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 35831 >Category: ports >Synopsis: [PATCH] Fix problem getting pthread libs and cflags from pkgconfig >Confidential: no >Severity: critical >Priority: high >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Mar 12 14:20:01 PST 2002 >Closed-Date: >Last-Modified: >Originator: Joe Marcus Clarke >Release: FreeBSD 4.5-STABLE i386 >Organization: MarcusCom, Inc. >Environment: System: FreeBSD shumai.marcuscom.com 4.5-STABLE FreeBSD 4.5-STABLE #0: Mon Mar 4 23:37:10 EST 2002 marcus@shumai.marcuscom.com:/usr/obj/usr/src/sys/SHUMAI i386 >Description: On -stable anyway, there is a problem getting "other" libs and cflags from dependency packages (for example, from gthread-2.0). This prevents ports like ORbit2 from compiling. It seems to be a pretty serious oversight on the pkgconfig folks, so I'm going to submit this patch to them. Basically, this patch adds recursive scanning capabilities to the other_cflags and other_libs functions. I included a new copy of files/patch-pkg.c since there have been some issues submitting patches of patches. >How-To-Repeat: >Fix: --- patch-pkg.c begins here --- --- pkg.c.orig Thu Feb 7 14:32:13 2002 +++ pkg.c Tue Mar 12 16:54:50 2002 @@ -93,7 +93,7 @@ * locations, ignoring duplicates */ static void -scan_dir (const char *dirname) +scan_dir (const char *dirname, void *quiet) { DIR *dir; struct dirent *dent; @@ -113,7 +113,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; } @@ -177,7 +178,9 @@ 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); } } @@ -901,6 +904,13 @@ while (tmp != NULL) { Package *pkg = tmp->data; + GSList *reqs = pkg->requires; + + if (reqs) + { + g_string_append (str, packages_get_other_libs(reqs)); + g_string_append (str, " "); + } if (pkg->other_libs) { @@ -924,10 +934,13 @@ char *L_libs; char *other_libs; GString *str; + GSList *tmp; char *retval; str = g_string_new (""); + tmp = pkgs; + other_libs = packages_get_other_libs (pkgs); L_libs = packages_get_L_libs (pkgs); l_libs = packages_get_l_libs (pkgs); @@ -986,6 +999,13 @@ while (tmp != NULL) { Package *pkg = tmp->data; + GSList *reqs = pkg->requires; + + if (reqs) + { + g_string_append (str, packages_get_other_cflags(reqs)); + g_string_append (str, " "); + } if (pkg->other_cflags) { --- patch-pkg.c ends here --- >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message