mirror of
https://github.com/radareorg/radare2.git
synced 2024-11-24 22:00:18 +00:00
Set PKG_CONFIG_PATH if #!c and #!vala
This commit is contained in:
parent
56fec2ddfc
commit
681c2c2c45
@ -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)
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user