From 681c2c2c456da466f3bb0b86641bd990344ac848 Mon Sep 17 00:00:00 2001 From: pancake Date: Wed, 19 Aug 2015 11:18:39 +0200 Subject: [PATCH] Set PKG_CONFIG_PATH if #!c and #!vala --- libr/lang/p/c.c | 7 +++---- libr/lang/p/vala.c | 1 + 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libr/lang/p/c.c b/libr/lang/p/c.c index 89b9ed30f3..484c1dd954 100644 --- a/libr/lang/p/c.c +++ b/libr/lang/p/c.c @@ -8,7 +8,7 @@ static int lang_c_file(RLang *lang, const char *file) { void *lib; - char *cc, *p, name[512], buf[512]; + char *a, *cc, *p, name[512], buf[512]; const char *libpath, *libname; if (strlen (file) > (sizeof(name)-10)) @@ -21,8 +21,7 @@ static int lang_c_file(RLang *lang, const char *file) { return R_FALSE; } -{ - char *a = (char*)r_str_lchr (name, '/'); + a = (char*)r_str_lchr (name, '/'); if (a) { *a = 0; libpath = name; @@ -31,7 +30,7 @@ static int lang_c_file(RLang *lang, const char *file) { libpath = "."; libname = name; } -} + r_sys_setenv ("PKG_CONFIG_PATH", R2_LIBDIR"/pkgconfig"); p = strstr (name, ".c"); if (p) *p=0; cc = r_sys_getenv ("CC"); if (!cc || !*cc) diff --git a/libr/lang/p/vala.c b/libr/lang/p/vala.c index 7c28591c36..ad5528fef6 100644 --- a/libr/lang/p/vala.c +++ b/libr/lang/p/vala.c @@ -33,6 +33,7 @@ static int lang_vala_file(RLang *lang, const char *file) { libname = strdup (file); strcpy (srcdir, "."); } + r_sys_setenv ("PKG_CONFIG_PATH", R2_LIBDIR"/pkgconfig"); vapidir = r_sys_getenv ("VAPIDIR"); if (vapidir) { if (*vapidir) {