Commit fd9599ab authored by IOhannes m zmölnig's avatar IOhannes m zmölnig

New upstream version 1.11

parent a8519fc9
# Makefile.pdlibbuilder dated 2016-11-02
version = 0.4.3
# Makefile.pdlibbuilder dated 2016-11-22
version = 0.4.4
# Helper makefile for Pure Data external libraries.
# Written by Katja Vetter March-June 2015 for the public domain. No warranties.
......@@ -462,27 +462,30 @@ endif
# The following systems are defined: Linux, Darwin, Windows. GNU and
# GNU/kFreeBSD are treated as Linux to get the same options. System-specific
# multiline defines (optionally set in library makefile) are conditionally
# evaluated here.
# GNU/kFreeBSD are treated as Linux to get the same options.
uname := $(shell uname)
ifeq ($(findstring $(uname), Linux GNU GNU/kFreeBSD), $(uname))
system = Linux
$(eval $(forLinux))
endif
ifeq ($(uname), Darwin)
system = Darwin
$(eval $(forDarwin))
endif
ifeq ($(findstring MSYS, $(uname)), MSYS)
system = Windows
endif
ifeq ($(findstring MINGW, $(uname)), MINGW)
system = Windows
$(eval $(forWindows))
endif
# evaluate possible system-specific multiline defines from library makefile
$(eval $(for$(system)))
# TODO: Cygwin, Android
......
......@@ -2,6 +2,6 @@
#N canvas 25 49 420 300 META 1;
#X text 10 10 NAME libdir;
#X text 10 30 AUTHOR hans@eds.org;
#X text 10 50 VERSION 1.10;
#X text 10 50 VERSION 1.11;
#X text 10 70 LICENSE BSD;
#X restore 10 10 pd META;
......@@ -51,6 +51,34 @@ static void libdir_get_fullname(char*dest, size_t size, const char*classname) {
snprintf(dest, size-1, "%s/%s-meta", classname, classname);
dest[size-1]=0;
}
#if PD_MAJOR_VERSION>0 || PD_MINOR_VERSION>47
/* gone from the headers, but still present for binary compat */
extern t_namelist *sys_searchpath;
#endif
static int libdir_add_to_globalpath(const char*path) {
int major, minor, bugfix;
sys_getversion(&major, &minor, &bugfix);
if((major==0 && minor < 48)) {
sys_searchpath = namelist_append(sys_searchpath, path, 0);
} else {
const char *inptr = path;
char encoded[MAXPDSTRING];
char *outptr = encoded;
t_atom ap[2];
*outptr++='+';
while(inptr && ((outptr+2) < (encoded+MAXPDSTRING))) {
*outptr++ = *inptr++;
if ('+'==inptr[-1])
*outptr++='+';
}
*outptr=0;
SETSYMBOL(ap+0, gensym(encoded));
SETFLOAT(ap+1, 0.f);
pd_typedmess(gensym("pd")->s_thing, gensym("add-to-path"), 2, ap);
}
return 1;
}
static int libdir_add_to_path(const char*dirbuf, t_canvas*canvas) {
if(sys_isabsolutepath(dirbuf)) { // only include actual full paths
if (canvas) {
......@@ -58,7 +86,7 @@ static int libdir_add_to_path(const char*dirbuf, t_canvas*canvas) {
canvasenvironment->ce_path = namelist_append(canvasenvironment->ce_path,
dirbuf, 0);
} else {
sys_searchpath = namelist_append(sys_searchpath, dirbuf, 0);
return libdir_add_to_globalpath(dirbuf);
}
return 1;
}
......@@ -149,9 +177,9 @@ void libdir_setup(void)
int major, minor, bugfix;
sys_getversion(&major, &minor, &bugfix);
if (major>0 || minor >=47) {
sys_register_loader(libdir_loader_pathwise);
sys_register_loader((void*)libdir_loader_pathwise);
} else {
sys_register_loader(libdir_loader_legacy);
sys_register_loader((void*)libdir_loader_legacy);
}
logpost(NULL, 3, "libdir loader %s",version);
logpost(NULL, 3, "\tcompiled on "__DATE__" at "__TIME__ " ");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment