[SCM] pd-libdir/master: New upstream version 1.11
umlaeute at users.alioth.debian.org
umlaeute at users.alioth.debian.org
Tue Aug 22 17:17:04 UTC 2017
The following commit has been merged in the master branch:
commit fd9599aba34ded11448841ec2deae5e6d2789c61
Author: IOhannes m zmölnig <zmoelnig at umlautQ.umlaeute.mur.at>
Date: Tue Aug 22 17:56:31 2017 +0200
New upstream version 1.11
diff --git a/Makefile.pdlibbuilder b/Makefile.pdlibbuilder
index fe9a076..130f9f2 100644
--- a/Makefile.pdlibbuilder
+++ b/Makefile.pdlibbuilder
@@ -1,5 +1,5 @@
-# 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
diff --git a/libdir-meta.pd b/libdir-meta.pd
index 2d991a7..744e4a5 100644
--- a/libdir-meta.pd
+++ b/libdir-meta.pd
@@ -2,6 +2,6 @@
#N canvas 25 49 420 300 META 1;
#X text 10 10 NAME libdir;
#X text 10 30 AUTHOR hans at 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;
diff --git a/libdir.c b/libdir.c
index 01aab85..a30f169 100644
--- a/libdir.c
+++ b/libdir.c
@@ -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__ " ");
--
pd-libdir packaging
More information about the pkg-multimedia-commits
mailing list