[PATCH] Fix output when there are no --cflags or --libs to report

Anthony G. Basile basile at opensource.dyc.edu
Sat Oct 13 21:59:26 PDT 2012


Please ignore, this is the wrong list.

On 10/14/2012 12:31 AM, Anthony G. Basile wrote:
> From: "Anthony G. Basile"<basile at opensource.dyc.edu>
>
> When pkgconf parses a package for its --cflags or --libs and finds
> none, it returns nothing.  In contrast, pkg-config [1] returns a
> single blank char.  Packages, like rrdtool [2], assume this latter
> behavior and fail to configure with pkgconf.
>
> Refs.
> [1] http://pkgconfig.freedesktop.org/wiki/
> [2] http://oss.oetiker.ch/rrdtool/
>
> X-Gentoo-Bug: 431170
> X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=431170
> Signed-of-by: Anthony G. Basile<blueness at gentoo.org>
> ---
>   main.c |    2 ++
>   1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/main.c b/main.c
> index 441e10b..19d21d0 100644
> --- a/main.c
> +++ b/main.c
> @@ -309,6 +309,7 @@ apply_cflags(pkg_t *world, void *list_head, int maxdepth, unsigned int flags)
>   	pkg_fragment_t *list;
>   	unsigned int eflags = PKG_ERRF_OK;
>
> +	printf(" ");
>   	list = pkg_cflags(world, head, maxdepth, flags | PKGF_SEARCH_PRIVATE,&eflags);
>   	if (list == NULL)
>   		return eflags == PKG_ERRF_OK ? true : false;
> @@ -326,6 +327,7 @@ apply_libs(pkg_t *world, void *list_head, int maxdepth, unsigned int flags)
>   	pkg_fragment_t *list;
>   	unsigned int eflags = PKG_ERRF_OK;
>
> +	printf(" ");
>   	list = pkg_libs(world, head, maxdepth, flags,&eflags);
>   	if (list == NULL)
>   		return eflags == PKG_ERRF_OK ? true : false;


-- 
Anthony G. Basile, Ph. D.
Chair of Information Technology
D'Youville College
Buffalo, NY 14201
(716) 829-8197


More information about the pkg-config mailing list