aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/TODO23
-rw-r--r--packages/patches/alsa_adddev_proto_with_alsa_only-0.40-pre.patch17
-rw-r--r--packages/patches/array_overflow_fix-0.39.2.patch36
-rw-r--r--packages/patches/bang_method_for_clip-0.40.pre.patch47
-rw-r--r--packages/patches/build_vars_4_makefile.in.patch132
-rw-r--r--packages/patches/complete_version_defines-0.39.2.patch55
-rw-r--r--packages/patches/darwin/darwin_dlopen.patch44
-rw-r--r--packages/patches/darwin/darwin_jack_weak_linking-0.39.2.patch37
-rw-r--r--packages/patches/disable-fat_option-0.40-1.patch40
-rw-r--r--packages/patches/expose_sys_register_loader-0.41.0-test03.patch35
-rw-r--r--packages/patches/help_browser-0.39.2.patch158
-rw-r--r--packages/patches/libdir-0.38-4.patch122
-rw-r--r--packages/patches/loaderHEX-0.39-1.patch208
-rw-r--r--packages/patches/macintel-0.39.2.patch50
-rw-r--r--packages/patches/macosx_deployment_target-0.40-1.patch16
-rw-r--r--packages/patches/mingw_fixes-0.39-2.patch574
-rw-r--r--packages/patches/mingw_fixes-0.40-1.patch196
-rw-r--r--packages/patches/number_bug_list_bug-0.39.2.patch35
-rw-r--r--packages/patches/pd_window_close_save_prompt-0.39.2.diff12
-rw-r--r--packages/patches/put_version_into_aboutpd_page-0.40-pre.patch113
-rw-r--r--packages/patches/remove_doubleclick_as_rightclick-0.39.2.patch32
-rw-r--r--packages/patches/remove_x11_fontspecs_0.40-1.patch (renamed from packages/patches/remove_x11_fontspecs_0.39.2.patch)87
22 files changed, 325 insertions, 1744 deletions
diff --git a/packages/TODO b/packages/TODO
index e59e4a1f..f253a31c 100644
--- a/packages/TODO
+++ b/packages/TODO
@@ -1,11 +1,6 @@
-- output the compilation flags to the resulting package so that different
- builds with the same name can be distinguished
-
-- for release branch, remove class_sethelpsymbol() from iemlib and zexy
-
-- make a web page that has stuff that can't be included due to license and patent issues:
- (percolate, mp3, mpeg2, mpeg4, etc)
+- make a web page that has stuff that can't be included due to license and
+ patent issues: (percolate, mp3, mpeg2, mpeg4, etc)
- make all of pd/src/x_*.c into a standalone library that is optionally loaded
by Pd. Then these objects can be placed into the namespace.
@@ -14,22 +9,14 @@
- allow DESTDIR to be a relative path
-- fiddle~, bonk~, etc. didn't get installed
-
-
-- try out FFTW patch from patch tracker (it applies fine, but the build system
- needs to set the define to enable it).
-
-
- document generate-libdir-metafile.sh
-- move darwin_app_perms to here and make generic prerelease_clean target which
- is called separately
-
+- rm "configure" on distclean
-- test for "configure" before running autoconf, also rm "configure" on distclean
+- output the compilation flags to the resulting package so that different
+ builds with the same name can be distinguished
- global optimization flags
ideally, you would use a version of Pd that is fully optimized for your
diff --git a/packages/patches/alsa_adddev_proto_with_alsa_only-0.40-pre.patch b/packages/patches/alsa_adddev_proto_with_alsa_only-0.40-pre.patch
deleted file mode 100644
index 34016b35..00000000
--- a/packages/patches/alsa_adddev_proto_with_alsa_only-0.40-pre.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Index: s_main.c
-===================================================================
-RCS file: /cvsroot/pure-data/pd/src/s_main.c,v
-retrieving revision 1.22
-diff -u -w -r1.22 s_main.c
---- s_main.c 31 Dec 2005 20:55:25 -0000 1.22
-+++ s_main.c 27 Feb 2006 17:04:49 -0000
-@@ -33,7 +33,9 @@
- int sys_rcfile(void);
- int m_scheduler(void);
- void sys_addhelppath(char *p);
-+#ifdef USEAPI_ALSA
- void alsa_adddev(char *name);
-+#endif
-
- int sys_debuglevel;
- int sys_verbose;
diff --git a/packages/patches/array_overflow_fix-0.39.2.patch b/packages/patches/array_overflow_fix-0.39.2.patch
deleted file mode 100644
index d7178dde..00000000
--- a/packages/patches/array_overflow_fix-0.39.2.patch
+++ /dev/null
@@ -1,36 +0,0 @@
---- s_inter.c.orig 2006-09-19 11:44:05.000000000 -0400
-+++ s_inter.c 2006-09-19 16:44:21.000000000 -0400
-@@ -844,7 +844,8 @@
-
- #define FIRSTPORTNUM 5400
-
--static int defaultfontshit[] = {
-+#define MAXFONTS 21
-+static int defaultfontshit[MAXFONTS] = {
- 8, 5, 9, 10, 6, 10, 12, 7, 13, 14, 9, 17, 16, 10, 19, 24, 15, 28,
- 24, 15, 28};
-
-@@ -894,7 +895,7 @@
- {
- /* fake the GUI's message giving cwd and font sizes; then
- skip starting the GUI up. */
-- t_atom zz[19];
-+ t_atom zz[MAXFONTS+2];
- int i;
- #ifdef _WIN32
- if (GetCurrentDirectory(MAXPDSTRING, cmdbuf) == 0)
-@@ -906,10 +907,10 @@
-
- #endif
- SETSYMBOL(zz, gensym(cmdbuf));
-- for (i = 1; i < 22; i++)
-- SETFLOAT(zz + i, defaultfontshit[i-1]);
-- SETFLOAT(zz+22,0);
-- glob_initfromgui(0, 0, 23, zz);
-+ for (i = 0; i < MAXFONTS; i++)
-+ SETFLOAT(zz+i+1, defaultfontshit[i]);
-+ SETFLOAT(zz+i+1,0);
-+ glob_initfromgui(0, 0, MAXFONTS+2, zz);
- }
- else if (sys_guisetportnumber) /* GUI exists and sent us a port number */
- {
diff --git a/packages/patches/bang_method_for_clip-0.40.pre.patch b/packages/patches/bang_method_for_clip-0.40.pre.patch
deleted file mode 100644
index d97b2e11..00000000
--- a/packages/patches/bang_method_for_clip-0.40.pre.patch
+++ /dev/null
@@ -1,47 +0,0 @@
---- x_arithmetic.c Sat Jan 28 10:06:59 2006
-+++ x_arithmetic.c Tue Feb 7 17:04:27 2006
-@@ -672,23 +677,31 @@
- t_object x_ob;
- float x_f1;
- float x_f2;
-+ float x_f3;
- } t_clip;
-
- static void *clip_new(t_floatarg f1, t_floatarg f2)
- {
- t_clip *x = (t_clip *)pd_new(clip_class);
-- floatinlet_new(&x->x_ob, &x->x_f1);
- floatinlet_new(&x->x_ob, &x->x_f2);
-+ floatinlet_new(&x->x_ob, &x->x_f3);
- outlet_new(&x->x_ob, &s_float);
-- x->x_f1 = f1;
-- x->x_f2 = f2;
-+ x->x_f2 = f1;
-+ x->x_f3 = f2;
- return (x);
- }
-
-+static void clip_bang(t_clip *x)
-+{
-+ outlet_float(x->x_ob.ob_outlet, (x->x_f1 < x->x_f2 ? x->x_f2 : (
-+ x->x_f1 > x->x_f3 ? x->x_f3 : x->x_f1)));
-+}
-+
- static void clip_float(t_clip *x, t_float f)
- {
-- outlet_float(x->x_ob.ob_outlet, (f < x->x_f1 ? x->x_f1 : (
-- f > x->x_f2 ? x->x_f2 : f)));
-+ x->x_f1 = f;
-+ outlet_float(x->x_ob.ob_outlet, (x->x_f1 < x->x_f2 ? x->x_f2 : (
-+ x->x_f1 > x->x_f3 ? x->x_f3 : x->x_f1)));
- }
-
- static void clip_setup(void)
-@@ -696,6 +709,7 @@
- clip_class = class_new(gensym("clip"), (t_newmethod)clip_new, 0,
- sizeof(t_clip), 0, A_DEFFLOAT, A_DEFFLOAT, 0);
- class_addfloat(clip_class, clip_float);
-+ class_addbang(clip_class, clip_bang);
- }
-
- void x_arithmetic_setup(void)
diff --git a/packages/patches/build_vars_4_makefile.in.patch b/packages/patches/build_vars_4_makefile.in.patch
deleted file mode 100644
index 6e66e74b..00000000
--- a/packages/patches/build_vars_4_makefile.in.patch
+++ /dev/null
@@ -1,132 +0,0 @@
-Index: makefile.in
-===================================================================
-RCS file: /cvsroot/pure-data/pd/src/makefile.in,v
-retrieving revision 1.5
-diff -u -w -r1.5 makefile.in
---- makefile.in 6 Nov 2004 16:07:33 -0000 1.5
-+++ makefile.in 4 Dec 2005 19:45:18 -0000
-@@ -5,10 +5,20 @@
- EXT= @EXT@
- GUINAME= @GUINAME@
-
--INSTALL_PREFIX = @prefix@
--GFLAGS = -DINSTALL_PREFIX=\"$(INSTALL_PREFIX)\"
--
--MANDIR = @mandir@
-+prefix = @prefix@
-+exec_prefix = @exec_prefix@
-+bindir = @bindir@
-+includedir = @includedir@
-+libdir = @libdir@
-+mandir = @mandir@
-+
-+GFLAGS = -DINSTALL_PREFIX=\"$(prefix)\"
-+
-+# varibles to match packages/Makefile.buildlayout so that they can be easily
-+# overridden when building Pd-extended builds. <hans@at.or.at>
-+libpddir = $(libdir)/pd
-+pddocdir = $(libpddir)/doc
-+libpdbindir = $(libpddir)/bin
-
- MORECFLAGS = @MORECFLAGS@
-
-@@ -112,30 +122,39 @@
- cd ../extra/lrshift~;make @EXTERNTARGET@
- cd ../extra/pique;make @EXTERNTARGET@
-
--INSTDIR = $(DESTDIR)/$(INSTALL_PREFIX)
--MANINSTDIR = $(DESTDIR)/$(INSTALL_PREFIX)/$(MANDIR)
- BINARYMODE=@binarymode@
-
- install: all
-- install -d $(INSTDIR)/lib/pd/bin
-- install $(BIN_DIR)/$(GUINAME) $(INSTDIR)/lib/pd/bin/$(GUINAME)
-- install $(BIN_DIR)/pd-watchdog $(INSTDIR)/lib/pd/bin/pd-watchdog
-- install -m644 $(BIN_DIR)/pd.tk $(INSTDIR)/lib/pd/bin/pd.tk
-- install -d $(INSTDIR)/bin
-- install $(BINARYMODE) $(PDEXEC) $(INSTDIR)/bin/pd
-- install -m755 $(BIN_DIR)/pdsend $(INSTDIR)/bin/pdsend
-- install -m755 $(BIN_DIR)/pdreceive $(INSTDIR)/bin/pdreceive
-- cp -pr ../doc ../extra $(INSTDIR)/lib/pd/
-- rm -f $(INSTDIR)/extra/*/*.o
-- install -d $(INSTDIR)/include
-- install -m644 m_pd.h $(INSTDIR)/include/m_pd.h
-- install -d $(MANINSTDIR)/man1
-- gzip < ../man/pd.1 > $(MANINSTDIR)/man1/pd.1.gz
-- chmod 644 $(MANINSTDIR)/man1/pd.1.gz
-- gzip < ../man/pdsend.1 > $(MANINSTDIR)/man1/pdsend.1.gz
-- chmod 644 $(MANINSTDIR)/man1/pdsend.1.gz
-- gzip < ../man/pdreceive.1 > $(MANINSTDIR)/man1/pdreceive.1.gz
-- chmod 644 $(MANINSTDIR)/man1/pdreceive.1.gz
-+ install -d $(libpdbindir)
-+ install $(BIN_DIR)/$(GUINAME) $(libpdbindir)/$(GUINAME)
-+ install $(BIN_DIR)/pd-watchdog $(libpdbindir)/pd-watchdog
-+ install -m644 $(BIN_DIR)/pd.tk $(libpdbindir)/pd.tk
-+ install -d $(DESTDIR)$(bindir)
-+ install $(BINARYMODE) $(PDEXEC) $(DESTDIR)$(bindir)/pd
-+ install -m755 $(BIN_DIR)/pdsend $(DESTDIR)$(bindir)/pdsend
-+ install -m755 $(BIN_DIR)/pdreceive $(DESTDIR)$(bindir)/pdreceive
-+ for dir in $(shell ls -1 ../doc | grep -v CVS); do \
-+ echo "installing $$dir"; \
-+ install -d $(pddocdir)/$$dir ; \
-+ install -p ../doc/$$dir/*.* $(pddocdir)/$$dir ; \
-+ done
-+ for dir in $(shell ls -1 ../doc/7.stuff | grep -v CVS); do \
-+ echo "installing 7.stuff/$$dir"; \
-+ install -d $(pddocdir)/7.stuff/$$dir ; \
-+ install -p ../doc/7.stuff/$$dir/*.* $(pddocdir)/7.stuff/$$dir ; \
-+ done
-+ cp -pr ../extra $(libpddir)/
-+ rm -f $(libpddir)/extra/*/*.o
-+ install -d $(DESTDIR)$(includedir)
-+ install -m644 m_pd.h $(DESTDIR)$(includedir)/m_pd.h
-+ install -d $(DESTDIR)$(mandir)/man1
-+ gzip < ../man/pd.1 > $(DESTDIR)$(mandir)/man1/pd.1.gz
-+ chmod 644 $(DESTDIR)$(mandir)/man1/pd.1.gz
-+ gzip < ../man/pdsend.1 > $(DESTDIR)$(mandir)/man1/pdsend.1.gz
-+ chmod 644 $(DESTDIR)$(mandir)/man1/pdsend.1.gz
-+ gzip < ../man/pdreceive.1 > $(DESTDIR)$(mandir)/man1/pdreceive.1.gz
-+ chmod 644 $(DESTDIR)$(mandir)/man1/pdreceive.1.gz
-+ @echo "Pd install succeeded."
-
- local-clean:
- -rm -f ../obj/* $(BIN_DIR)/pd $(BIN_DIR)/$(GUINAME) $(BIN_DIR)/pdsend \
-@@ -154,11 +173,10 @@
- clean: extra-clean local-clean
-
- distclean: clean
-- rm -rf config.cache config.log config.status makefile tags \
-- autom4te-*.cache
-- echo all: > makefile
-- echo -e "\t./configure" >> makefile
-- echo -e "\tmake" >> makefile
-+ -rm -f config.cache config.log config.status makefile configure tags \
-+ autom4te.cache/output.* autom4te.cache/traces.* autom4te.cache/requests
-+ -rmdir autom4te.cache
-+ -rm -rf autom4te-*.cache
-
- tags: $(SRC) $(GSRC); ctags *.[ch]
-
-@@ -166,14 +184,14 @@
- $(CC) $(INCLUDE) $(CFLAGS) -M $(SRC) > makefile.dependencies
-
- uninstall:
-- rm -f -r $(INSTDIR)/lib/pd
-- rm -f $(INSTDIR)/bin/pd
-- rm -f $(INSTDIR)/bin/pdsend
-- rm -f $(INSTDIR)/bin/pdreceive
-- rm -f $(INSTDIR)/include/m_pd.h
-- rm -f $(MANINSTDIR)/man1/pd.1.gz
-- rm -f $(MANINSTDIR)/man1/pdsend.1.gz
-- rm -f $(MANINSTDIR)/man1/pdreceive.1.gz
-+ rm -f -r $(libpddir)
-+ rm -f $(DESTDIR)$(bindir)/pd
-+ rm -f $(DESTDIR)$(bindir)/pdsend
-+ rm -f $(DESTDIR)$(bindir)/pdreceive
-+ rm -f $(DESTDIR)$(includedir)/m_pd.h
-+ rm -f $(DESTDIR)$(mandir)/man1/pd.1.gz
-+ rm -f $(DESTDIR)$(mandir)/man1/pdsend.1.gz
-+ rm -f $(DESTDIR)$(mandir)/man1/pdreceive.1.gz
-
- include makefile.dependencies
-
diff --git a/packages/patches/complete_version_defines-0.39.2.patch b/packages/patches/complete_version_defines-0.39.2.patch
deleted file mode 100644
index 605ba3ba..00000000
--- a/packages/patches/complete_version_defines-0.39.2.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-Index: m_pd.h
-===================================================================
-RCS file: /cvsroot/pure-data/pd/src/m_pd.h,v
-retrieving revision 1.8
-diff -u -w -r1.8 m_pd.h
---- m_pd.h 19 Aug 2005 23:28:03 -0000 1.8
-+++ m_pd.h 19 Mar 2006 04:13:32 -0000
-@@ -10,6 +10,8 @@
-
- #define PD_MAJOR_VERSION 0
- #define PD_MINOR_VERSION 39
-+#define PD_BUGFIX_VERSION 2
-+#define PD_TEST_VERSION ""
-
- /* old name for "MSW" flag -- we have to take it for the sake of many old
- "nmakefiles" for externs, which will define NT and not MSW */
-Index: s_main.c
-===================================================================
-RCS file: /cvsroot/pure-data/pd/src/s_main.c,v
-retrieving revision 1.20
-diff -u -w -r1.20 s_main.c
---- s_main.c 2 Dec 2005 04:58:24 -0000 1.20
-+++ s_main.c 19 Mar 2006 04:13:32 -0000
-@@ -2,10 +2,6 @@
- * For information on usage and redistribution, and for a DISCLAIMER OF ALL
- * WARRANTIES, see the file, "LICENSE.txt," in this distribution. */
-
--char pd_version[] = "Pd version 0.39-2\n";
--char pd_compiletime[] = __TIME__;
--char pd_compiledate[] = __DATE__;
--
- #include "m_pd.h"
- #include "m_imp.h"
- #include "s_stuff.h"
-@@ -26,6 +22,10 @@
- #include <winbase.h>
- #endif
-
-+char pd_version[256];
-+char pd_compiletime[] = __TIME__;
-+char pd_compiledate[] = __DATE__;
-+
- void pd_init(void);
- int sys_argparse(int argc, char **argv);
- void sys_findprogdir(char *progname);
-@@ -254,6 +254,9 @@
- if (sys_argparse(argc-1, argv+1)) /* parse cmd line */
- return (1);
- sys_afterargparse(); /* post-argparse settings */
-+ /* build version string from defines in m_pd.h */
-+ sprintf(pd_version, "Pd version %d.%d-%d%s\n",PD_MAJOR_VERSION,
-+ PD_MINOR_VERSION,PD_BUGFIX_VERSION,PD_TEST_VERSION);
- if (sys_verbose || sys_version) fprintf(stderr, "%scompiled %s %s\n",
- pd_version, pd_compiletime, pd_compiledate);
- if (sys_version) /* if we were just asked our version, exit here. */
diff --git a/packages/patches/darwin/darwin_dlopen.patch b/packages/patches/darwin/darwin_dlopen.patch
deleted file mode 100644
index 971ad391..00000000
--- a/packages/patches/darwin/darwin_dlopen.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-Index: s_loader.c
-===================================================================
-RCS file: /cvsroot/pure-data/pd/src/s_loader.c,v
-retrieving revision 1.4
-diff -u -w -r1.4 s_loader.c
---- s_loader.c 6 Sep 2004 20:20:35 -0000 1.4
-+++ s_loader.c 26 Nov 2005 00:27:11 -0000
-@@ -2,6 +2,9 @@
- * For information on usage and redistribution, and for a DISCLAIMER OF ALL
- * WARRANTIES, see the file, "LICENSE.txt," in this distribution. */
-
-+#ifdef __APPLE__
-+#define DL_OPEN
-+#endif
- #ifdef DL_OPEN
- #include <dlfcn.h>
- #endif
-@@ -13,7 +16,7 @@
- #include <io.h>
- #include <windows.h>
- #endif
--#ifdef MACOSX
-+#ifdef MACOSX10.2
- #include <mach-o/dyld.h>
- #endif
- #include <string.h>
-@@ -90,7 +93,7 @@
- if (lastdot = strrchr(nameptr, '.'))
- *lastdot = 0;
-
--#ifdef MACOSX
-+#ifdef MACOSX10.2
- strcpy(symname, "_");
- strcat(symname, nameptr);
- #else
-@@ -122,7 +125,7 @@
- }
- makeout = (t_xxx)GetProcAddress(ntdll, symname);
- #endif
--#ifdef MACOSX
-+#ifdef MACOSX10.2
- {
- NSObjectFileImage image;
- void *ret;
diff --git a/packages/patches/darwin/darwin_jack_weak_linking-0.39.2.patch b/packages/patches/darwin/darwin_jack_weak_linking-0.39.2.patch
deleted file mode 100644
index aa5b7e69..00000000
--- a/packages/patches/darwin/darwin_jack_weak_linking-0.39.2.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-Index: configure.in
-===================================================================
-RCS file: /cvsroot/pure-data/pd/src/configure.in,v
-retrieving revision 1.15
-diff -u -w -r1.15 configure.in
---- configure.in 16 Aug 2005 04:06:28 -0000 1.15
-+++ configure.in 22 Feb 2006 05:19:42 -0000
-@@ -316,11 +316,11 @@
- EXTERNTARGET=pd_darwin
- if test x$jack == "xyes";
- then
-- LDFLAGS=$LDFLAGS" -framework Jack"
-+ LDFLAGS=$LDFLAGS" -weak_framework Jack"
- fi
- if test x$jack == "xrun";
- then
-- LDFLAGS=$LDFLAGS" -framework Jack"
-+ LDFLAGS=$LDFLAGS" -weak_framework Jack"
- fi
- fi
-
-Index: makefile.in
-===================================================================
-RCS file: /cvsroot/pure-data/pd/src/makefile.in,v
-retrieving revision 1.8
-diff -u -w -r1.8 makefile.in
---- makefile.in 24 Jul 2005 19:41:14 -0000 1.8
-+++ makefile.in 22 Feb 2006 05:19:42 -0000
-@@ -1,3 +1,8 @@
-+# On Mac OS X, this needs to be defined to enable dlopen and weak linking
-+# support. Its safe on other platforms since gcc only checks this env var on
-+# Apple's gcc. <hans@at.or.at>
-+export MACOSX_DEPLOYMENT_TARGET = 10.3
-+
- VPATH = ../obj:./
- OBJ_DIR = ../obj
- BIN_DIR = ../bin
diff --git a/packages/patches/disable-fat_option-0.40-1.patch b/packages/patches/disable-fat_option-0.40-1.patch
new file mode 100644
index 00000000..4e8f6b51
--- /dev/null
+++ b/packages/patches/disable-fat_option-0.40-1.patch
@@ -0,0 +1,40 @@
+Index: configure.in
+===================================================================
+RCS file: /cvsroot/pure-data/pd/src/configure.in,v
+retrieving revision 1.21.2.1
+diff -u -w -r1.21.2.1 configure.in
+--- configure.in 28 Oct 2006 19:16:41 -0000 1.21.2.1
++++ configure.in 23 Dec 2006 07:44:30 -0000
+@@ -41,6 +42,8 @@
+ setuid=$enableval)
+ AC_ARG_ENABLE(fftw, [ --enable-fftw use FFTW package],
+ fftw=$enableval)
++AC_ARG_ENABLE(fat, [ --disable-fat build fat binary on Mac OS X],
++ fat=$enableval, fat="yes")
+
+ dnl Checks for programs.
+ AC_PROG_CC
+@@ -249,15 +263,20 @@
+ -I../portmidi/pm_common -I../portmidi/pm_mac \
+ -I../portmidi/porttime \
+ -DUSEAPI_PORTAUDIO -DPA19 -DPA_USE_COREAUDIO"
++dnl for Mac OS X 10.3 (i.e. < 10.4)
+ if test `uname -r` = 7.9.0;
+ then
+- MORECFLAGS="-DMACOSX3 -DPA_BIG_ENDIAN -Wno-error"
+- EXTERNTARGET=d_ppc
+- else
++ fat="no"
++ fi
++ if test "x$fat" == "xyes";
++ then
+ MORECFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk \
+ -arch i386 -arch ppc -Wno-error"
+ EXTERNTARGET=d_fat
+ LDFLAGS=$LDFLAGS" -arch i386 -arch ppc"
++ else
++ MORECFLAGS="-DMACOSX3 -Wno-error"
++ EXTERNTARGET=d_ppc
+ fi
+ SYSSRC="s_midi_pm.c s_audio_pa.c \
+ s_audio_pablio.c \
diff --git a/packages/patches/expose_sys_register_loader-0.41.0-test03.patch b/packages/patches/expose_sys_register_loader-0.41.0-test03.patch
new file mode 100644
index 00000000..4bc134ab
--- /dev/null
+++ b/packages/patches/expose_sys_register_loader-0.41.0-test03.patch
@@ -0,0 +1,35 @@
+Index: s_loader.c
+===================================================================
+RCS file: /cvsroot/pure-data/pd/src/s_loader.c,v
+retrieving revision 1.13
+diff -u -w -r1.13 s_loader.c
+--- s_loader.c 9 Oct 2006 04:36:12 -0000 1.13
++++ s_loader.c 26 Nov 2006 04:46:57 -0000
+@@ -198,9 +198,6 @@
+ return (1);
+ }
+
+-/* callback type definition */
+-typedef int (*loader_t)(t_canvas *canvas, char *classname);
+-
+ /* linked list of loaders */
+ typedef struct loader_queue {
+ loader_t loader;
+Index: s_stuff.h
+===================================================================
+RCS file: /cvsroot/pure-data/pd/src/s_stuff.h,v
+retrieving revision 1.10
+diff -u -w -r1.10 s_stuff.h
+--- s_stuff.h 15 Aug 2006 04:54:15 -0000 1.10
++++ s_stuff.h 26 Nov 2006 04:46:57 -0000
+@@ -52,6 +52,8 @@
+
+ /* s_loader.c */
+ int sys_load_lib(t_canvas *canvas, char *filename);
++typedef int (*loader_t)(t_canvas *canvas, char *classname);
++EXTERN void sys_register_loader(loader_t loader);
+
+ /* s_audio.c */
+
+
+
diff --git a/packages/patches/help_browser-0.39.2.patch b/packages/patches/help_browser-0.39.2.patch
deleted file mode 100644
index e7de403a..00000000
--- a/packages/patches/help_browser-0.39.2.patch
+++ /dev/null
@@ -1,158 +0,0 @@
-Index: u_main.tk
-===================================================================
-RCS file: /cvsroot/pure-data/pd/src/u_main.tk,v
-retrieving revision 1.17
-diff -u -w -r1.17 u_main.tk
---- u_main.tk 15 Oct 2005 23:14:28 -0000 1.17
-+++ u_main.tk 20 Sep 2006 15:41:10 -0000
-@@ -89,6 +89,8 @@
- }
- }
-
-+set help_top_directory $pd_guidir/doc
-+
- # it's unfortunate but we seem to have to turn off global bindings
- # for Text objects to get control-s and control-t to do what we want for
- # "text" dialogs below. Also we have to get rid of tab's changing the focus.
-@@ -389,41 +391,6 @@
- }
- }
-
--set help_directory $pd_guidir/doc
--set help_top_directory $pd_guidir/doc
--
--proc menu_documentation {} {
-- global help_directory
-- global pd_nt
-- global pd_guidir
--
-- if {$pd_nt == 2} {
-- exec rm -rf /tmp/pd-documentation
-- exec cp -pr $pd_guidir/doc /tmp/pd-documentation
-- set filename [tk_getOpenFile -defaultextension .pd \
-- -filetypes { {{documentation} {.pd .txt .htm}} } \
-- -initialdir /tmp/pd-documentation]
-- } else {
-- set filename [tk_getOpenFile -defaultextension .pd \
-- -filetypes { {{documentation} {.pd .txt .htm}} } \
-- -initialdir $help_directory]
-- }
-- if {$filename != ""} {
-- if {[string first .txt $filename] >= 0} {
-- menu_opentext $filename
-- } elseif {[string first .htm $filename] >= 0} {
-- menu_openhtml $filename
-- } else {
-- set help_directory [string range $filename 0 \
-- [expr [string last / $filename ] - 1]]
-- set basename [string range $filename \
-- [expr [string last / $filename ] + 1] end]
-- pd [concat pd open [pdtk_enquote $basename] \
-- [pdtk_enquote $help_directory] \;]
-- }
-- }
--}
--
- proc menu_doc_open {subdir basename} {
- global pd_guidir
-
-@@ -439,26 +406,74 @@
- }
- }
-
--proc doc_submenu {helpmenu subdir} {
-- global help_top_directory pd_tearoff
-
-- set menudir $help_top_directory/$subdir
-+################## help browser and support functions #########################
-+proc menu_doc_browser {dir} {
-+ global .mbar
-+ if {![file isdirectory $dir]} {
-+ puts stderr "menu_doc_browser non-directory $dir\n"
-+ }
-+ if { [winfo exists .help_browser.frame] } {
-+ raise .help_browser
-+ } else {
-+ toplevel .help_browser -menu .mbar
-+ wm title .help_browser "Pd Documentation Browser"
-+ frame .help_browser.frame
-+ pack .help_browser.frame -side top -fill both
-+ doc_make_listbox .help_browser.frame $dir 0
-+ }
-+ }
-
-- regsub -all "\\\." $subdir "" submenu
-+proc doc_make_listbox {base dir count} {
-+ # check for [file readable]?
-+ if { [info tclversion] >= 8.5 } {
-+ # requires Tcl 8.5 but probably deals with special chars better
-+# destroy {expand}[lrange [winfo children $base] [expr {2 * $count}] end]
-+ } else {
-+ if { [catch { eval destroy [lrange [winfo children $base] \
-+ [expr { 2 * $count }] end] } \
-+ errorMessage] } {
-+ puts stderr "doc_make_listbox: error listing $dir\n"
-+ }
-+ }
-+ # exportselection 0 looks good, but selection gets easily out-of-sync
-+ set current_listbox [listbox "[set b "$base.listbox$count"]-list" -yscrollcommand \
-+ [list "$b-scroll" set] -height 20 -exportselection 0]
-+ pack $current_listbox [scrollbar "$b-scroll" -command [list $current_listbox yview]] \
-+ -side left -expand 1 -fill y -anchor w
-+ foreach item [concat [lsort -dictionary [glob -directory $dir -nocomplain -types {d} -- *]] \
-+ [lsort -dictionary [glob -directory $dir -nocomplain -types {f} -- *]]] {
-+ $current_listbox insert end "[file tail $item][expr {[file isdirectory $item] ? {/} : {}}]"
-+ }
-+ bind $current_listbox <Button-1> [list doc_navigate $dir $count %W %x %y]
-+ bind $current_listbox <Double-Button-1> [list doc_double_button $dir $count %W %x %y]
-+}
-
-- menu $helpmenu.$submenu -tearoff $pd_tearoff
-- regsub -all "\\\." $subdir " " submenuname
-- $helpmenu add cascade -label $submenuname \
-- -menu $helpmenu.$submenu
-- catch {
--# use this glob pattern to exclude the supporting files
--# foreach file [ lsort [ glob -dir $menudir {*[0-9][0-9]*} ] ]
-- foreach file [ lsort [ glob -dir $menudir * ] ] {
-- set filename ""
-- regsub {.*/(.*\..+$)} $file {\1} filename
-- $helpmenu.$submenu add command -label $filename \
-- -command "menu_doc_open doc/$subdir $filename"
-+proc doc_navigate {dir count width x y} {
-+ if {[set newdir [$width get [$width index "@$x,$y"]]] eq {}} {
-+ return
-+ }
-+ set dir_to_open [file join $dir $newdir]
-+ if {[file isdirectory $dir_to_open]} {
-+ doc_make_listbox [winfo parent $width] $dir_to_open [incr count]
-+ }
-+}
-+
-+proc doc_double_button {dir count width x y} {
-+ global pd_guidir
-+ if {[set newdir [$width get [$width index "@$x,$y"]]] eq {}} {
-+ return
-+ }
-+ set dir_to_open [file join $dir $newdir]
-+ if {[file isdirectory $dir_to_open]} {
-+ doc_navigate $dir $count $width $x $y
-+ } else {
-+ regsub -- $pd_guidir [file dirname $dir_to_open] "" subdir
-+ set file [file tail $dir_to_open]
-+ if { [catch {menu_doc_open $subdir $file} fid] } {
-+ puts stderr "Could not open $pd_guidir/$subdir/$file\n"
- }
-+ return;
- }
- }
-
-@@ -526,7 +541,7 @@
- $mbar.help add command -label {Html ...} \
- -command {menu_doc_open doc/1.manual index.htm}
- $mbar.help add command -label {Browser ...} \
-- -command {menu_documentation}
-+ -command {menu_doc_browser $help_top_directory}
- }
-
- #################### the "File" menu for the Pd window ##############
diff --git a/packages/patches/libdir-0.38-4.patch b/packages/patches/libdir-0.38-4.patch
deleted file mode 100644
index f3f85347..00000000
--- a/packages/patches/libdir-0.38-4.patch
+++ /dev/null
@@ -1,122 +0,0 @@
-Index: s_loader.c
-===================================================================
-RCS file: /cvsroot/pure-data/pd/src/s_loader.c,v
-retrieving revision 1.6
-diff -u -w -r1.6 s_loader.c
---- s_loader.c 30 May 2005 03:04:19 -0000 1.6
-+++ s_loader.c 28 Nov 2006 03:59:50 -0000
-@@ -172,3 +175,83 @@
-
-
-
-+/* <hans@at.or.at> { */
-+
-+/*
-+ * This function opens a directory as a library. In the long run, the idea is
-+ * that one folder will have all of objects files, all of the related
-+ * *-help.pd files, a file with meta data for the help system, etc. Then to
-+ * install the lib, it would just be dropped into extra, or the path anywhere.
-+ * <hans@at.or.at>
-+ */
-+
-+int sys_load_lib_dir(char *dirname, char *classname)
-+{
-+ int fd = -1;
-+ char searchpathname[MAXPDSTRING], helppathname[MAXPDSTRING],
-+ fullclassname[MAXPDSTRING], dirbuf[MAXPDSTRING], *nameptr;
-+
-+#if 0
-+ fprintf(stderr, "sys_load_lib_directory %s %s\n", dirname, classname);
-+#endif
-+
-+/* look for meta file (classname)/(classname)-meta.pd */
-+ strncpy(fullclassname, classname, MAXPDSTRING - 6);
-+ strcat(fullclassname, "/");
-+ strncat(fullclassname, classname, MAXPDSTRING - strlen(fullclassname) - 6);
-+ strcat(fullclassname, "-meta");
-+ if ((fd = open_via_path(dirname, fullclassname, ".pd",
-+ dirbuf, &nameptr, MAXPDSTRING, 1)) < 0)
-+ {
-+ return (0);
-+ }
-+ close(fd);
-+
-+ /* Ultimately, the meta file will be read for meta data, specifically for
-+ * the auto-generated Help system, but for other things too. Right now,
-+ * its just used as a marker that a directory is meant to be a library.
-+ * Plus its much easier to implement it this way, I can use
-+ * open_via_path() instead of writing a new function. The grand plan is
-+ * to have one directory hold the objects, help files, manuals,
-+ * etc. making it a self-contained library. <hans@at.or.at>
-+ */
-+
-+#if 0
-+ fprintf(stderr, "sys_load_lib_directory %s %s\n", dirname, classname);
-+#endif
-+ /* create full path to libdir for adding to the paths */
-+ strcpy(searchpathname,dirbuf);
-+// strcat(searchpathname,"/");
-+// strncat(searchpathname,classname, MAXPDSTRING-strlen(searchpathname));
-+
-+ strncpy(helppathname, sys_libdir->s_name, MAXPDSTRING-30);
-+ helppathname[MAXPDSTRING-30] = 0;
-+ strcat(helppathname, "/doc/5.reference/");
-+ strcat(helppathname, classname);
-+
-+ sys_searchpath = namelist_append_files(sys_searchpath, searchpathname);
-+ /* this help path supports having the help files in a complete library
-+ * directory format, where everything is in one folder. The help meta
-+ * system needs to be implemented for this to work with the new Help
-+ * menu/browser system. Ultimately, /path/to/extra will have to be added
-+ * to sys_helppath in order for this to work properly.<hans@at.or.at> */
-+ sys_helppath = namelist_append_files(sys_helppath, searchpathname);
-+ /* this supports having the help files in a distinct dir
-+ * (i.e. doc/5.reference), but having the help files in subdirs named with
-+ * the same name as the library directory. <hans@at.or.at>*/
-+ sys_helppath = namelist_append_files(sys_helppath, helppathname);
-+
-+ /* this should be changed to use sys_debuglevel */
-+ if (sys_verbose)
-+ {
-+ post("Added to search path: %s", searchpathname);
-+ post("Added to help path: %s", searchpathname);
-+ post("Added to help path: %s", helppathname);
-+ }
-+ if (sys_verbose)
-+ post("Loaded libdir %s from %s", classname, dirbuf);
-+
-+ return (1);
-+}
-+
-+/* } <hans@at.or.at> */
-Index: s_main.c
-===================================================================
-RCS file: /cvsroot/pure-data/pd/src/s_main.c,v
-retrieving revision 1.9.2.5
-diff -u -w -r1.9.2.5 s_main.c
---- s_main.c 24 Feb 2005 01:37:20 -0000 1.9.2.5
-+++ s_main.c 20 Nov 2005 03:47:04 -0000
-@@ -233,6 +233,7 @@
- /* load dynamic libraries specified with "-lib" args */
- for (nl = sys_externlist; nl; nl = nl->nl_next)
- if (!sys_load_lib(cwd, nl->nl_string))
-+ if (!sys_load_lib_dir(cwd, nl->nl_string))
- post("%s: can't load library", nl->nl_string);
- /* open patches specifies with "-open" args */
- for (nl = sys_openlist; nl; nl = nl->nl_next)
-Index: s_stuff.h
-===================================================================
-RCS file: /cvsroot/pure-data/pd/src/s_stuff.h,v
-retrieving revision 1.5
-diff -u -w -r1.5 s_stuff.h
---- s_stuff.h 6 Sep 2004 20:20:36 -0000 1.5
-+++ s_stuff.h 20 Nov 2005 03:47:04 -0000
-@@ -48,6 +48,8 @@
- /* s_loader.c */
- int sys_load_lib(char *dirname, char *filename);
-
-+int sys_load_lib_dir(char *dirname, char *filename);
-+
- /* s_audio.c */
-
- #define SENDDACS_NO 0 /* return values for sys_send_dacs() */
diff --git a/packages/patches/loaderHEX-0.39-1.patch b/packages/patches/loaderHEX-0.39-1.patch
deleted file mode 100644
index d9ebee4d..00000000
--- a/packages/patches/loaderHEX-0.39-1.patch
+++ /dev/null
@@ -1,208 +0,0 @@
-Index: m_class.c
-===================================================================
-RCS file: /cvsroot/pure-data/pd/src/m_class.c,v
-retrieving revision 1.4
-diff -u -w -r1.4 m_class.c
---- m_class.c 28 Nov 2004 21:20:42 -0000 1.4
-+++ m_class.c 17 Nov 2005 23:33:06 -0000
-@@ -16,6 +16,7 @@
-
- #include <stdarg.h>
- #include <string.h>
-+#include <stdio.h>
-
- static t_symbol *class_loadsym; /* name under which an extern is invoked */
- static void pd_defaultfloat(t_pd *x, t_float f);
-@@ -513,6 +514,42 @@
- t_symbol* pathsearch(t_symbol *s,char* ext);
- int pd_setloadingabstraction(t_symbol *sym);
-
-+
-+/* replace everything but [a-zA-Z0-9_] by "0x%x" */
-+static char*alternative_classname(char*classname)
-+{
-+ char *altname=(char*)getbytes(sizeof(char)*MAXPDSTRING);
-+ int count=0;
-+ int i=0;
-+ for(i=0; i<MAXPDSTRING; i++)
-+ altname[i]=0;
-+ i=0;
-+ while(*classname)
-+ {
-+ char c=*classname;
-+ if((c>=48 && c<=57)|| /* [0-9] */
-+ (c>=65 && c<=90)|| /* [A-Z] */
-+ (c>=97 && c<=122)||/* [a-z] */
-+ (c==95)) /* [_] */
-+ {
-+ altname[i]=c;
-+ i++;
-+ }
-+ else /* a "bad" character */
-+ {
-+ sprintf(altname+i, "0x%02x", c);
-+ i+=4;
-+ count++;
-+ }
-+ classname++;
-+ }
-+ if(count>0)return altname;
-+ /* seems like the given classname is fine as can be */
-+ freebytes(altname, sizeof(char)*MAXPDSTRING);
-+ return 0;
-+}
-+
-+
- /* this routine is called when a new "object" is requested whose class Pd
- doesn't know. Pd tries to load it as an extern, then as an abstraction. */
- void new_anything(void *dummy, t_symbol *s, int argc, t_atom *argv)
-@@ -521,10 +558,11 @@
- t_symbol *dir = canvas_getcurrentdir();
- int fd;
- char dirbuf[MAXPDSTRING], *nameptr;
-+ char *altname=alternative_classname(s->s_name);
- if (tryingalready) return;
- newest = 0;
- class_loadsym = s;
-- if (sys_load_lib(dir->s_name, s->s_name))
-+ if (sys_load_lib_alt(dir->s_name, s->s_name,altname))
- {
- tryingalready = 1;
- typedmess(dummy, s, argc, argv);
-@@ -535,6 +573,8 @@
- current = s__X.s_thing;
- if ((fd = open_via_path(dir->s_name, s->s_name, ".pd",
- dirbuf, &nameptr, MAXPDSTRING, 0)) >= 0 ||
-+ (altname && (fd = open_via_path(dir->s_name, altname, ".pd",
-+ dirbuf, &nameptr, MAXPDSTRING, 0)) >= 0) ||
- (fd = open_via_path(dir->s_name, s->s_name, ".pat",
- dirbuf, &nameptr, MAXPDSTRING, 0)) >= 0)
- {
-Index: s_loader.c
-===================================================================
-RCS file: /cvsroot/pure-data/pd/src/s_loader.c,v
-retrieving revision 1.6
-diff -u -w -r1.6 s_loader.c
---- s_loader.c 30 May 2005 03:04:19 -0000 1.6
-+++ s_loader.c 17 Nov 2005 23:33:07 -0000
-@@ -46,10 +46,11 @@
-
- void class_set_extern_dir(t_symbol *s);
-
--int sys_load_lib(char *dirname, char *classname)
-+int sys_load_lib_alt(char *dirname, char *classname, char*altname)
- {
- char symname[MAXPDSTRING], filename[MAXPDSTRING], dirbuf[MAXPDSTRING],
-- classname2[MAXPDSTRING], *nameptr, *lastdot;
-+ classname2[MAXPDSTRING], *nameptr, *lastdot,
-+ altsymname[MAXPDSTRING];
- void *dlobj;
- t_xxx makeout = NULL;
- int fd;
-@@ -72,6 +73,25 @@
- if ((fd = open_via_path(dirname, classname2, sys_dllextent,
- dirbuf, &nameptr, MAXPDSTRING, 1)) < 0)
- {
-+ /* next try (alternative_classname).(sys_dllextent) */
-+ if(altname)
-+ {
-+ if ((fd = open_via_path(dirname, altname, sys_dllextent,
-+ dirbuf, &nameptr, MAXPDSTRING, 1)) < 0) {
-+
-+ /* next try (alternative_classname)/(alternative_classname).(sys_dllextent) ... */
-+ strncpy(classname2, altname, MAXPDSTRING);
-+ filename[MAXPDSTRING-2] = 0;
-+ strcat(classname2, "/");
-+ strncat(classname2, altname, MAXPDSTRING-strlen(classname2));
-+ filename[MAXPDSTRING-1] = 0;
-+ if ((fd = open_via_path(dirname, classname2, sys_dllextent,
-+ dirbuf, &nameptr, MAXPDSTRING, 1)) < 0)
-+ {
-+ return 0;
-+ } }
-+ }
-+ else
- return (0);
- }
- }
-@@ -93,9 +113,20 @@
- #ifdef MACOSX
- strcpy(symname, "_");
- strcat(symname, nameptr);
-+ if(altname)
-+ {
-+ strcpy(altsymname, "_setup_");
-+ strcat(symname, altname);
-+ }
- #else
- strcpy(symname, nameptr);
-+ if(altname)
-+ {
-+ strcpy(altsymname, "setup_");
-+ strcat(altsymname, altname);
-+ }
- #endif
-+
- /* if the last character is a tilde, replace with "_tilde" */
- if (symname[strlen(symname) - 1] == '~')
- strcpy(symname + (strlen(symname) - 1), "_tilde");
-@@ -110,6 +141,7 @@
- return (0);
- }
- makeout = (t_xxx)dlsym(dlobj, symname);
-+ if(!makeout)makeout = (t_xxx)dlsym(dlobj, altsymname);
- #endif
- #ifdef MSW
- sys_bashfilename(filename, filename);
-@@ -121,6 +153,7 @@
- return (0);
- }
- makeout = (t_xxx)GetProcAddress(ntdll, symname);
-+ if(!makeout)makeout = (t_xxx)GetProcAddress(ntdll, altsymname);
- #endif
- #ifdef MACOSX
- {
-@@ -147,6 +180,8 @@
- }
- s = NSLookupSymbolInModule(ret, symname);
-
-+ if(!s)s=NSLookupSymbolInModule(ret, altsymname);
-+
- if (s)
- makeout = (t_xxx)NSAddressOfSymbol( s);
- else makeout = 0;
-@@ -156,6 +191,8 @@
- if (!makeout)
- {
- post("load_object: Symbol \"%s\" not found", symname);
-+ if(altname)
-+ post("load_object: Symbol \"%s\" not found", altsymname);
- class_set_extern_dir(&s_);
- return 0;
- }
-@@ -164,6 +201,10 @@
- return (1);
- }
-
-+int sys_load_lib(char *dirname, char *filename)
-+{
-+ return sys_load_lib_alt(dirname, filename, 0);
-+}
-
-
-
-Index: s_stuff.h
-===================================================================
-RCS file: /cvsroot/pure-data/pd/src/s_stuff.h,v
-retrieving revision 1.7
-diff -u -w -r1.7 s_stuff.h
---- s_stuff.h 16 Jul 2005 01:43:18 -0000 1.7
-+++ s_stuff.h 17 Nov 2005 23:33:07 -0000
-@@ -47,6 +47,7 @@
-
- /* s_loader.c */
- int sys_load_lib(char *dirname, char *filename);
-+int sys_load_lib_alt(char *dirname, char *filename, char* altname);
-
- /* s_audio.c */
-
diff --git a/packages/patches/macintel-0.39.2.patch b/packages/patches/macintel-0.39.2.patch
deleted file mode 100644
index 226de8e3..00000000
--- a/packages/patches/macintel-0.39.2.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-Index: configure.in
-===================================================================
-RCS file: /cvsroot/pure-data/pd/src/configure.in,v
-retrieving revision 1.15
-diff -u -w -r1.15 configure.in
---- configure.in 16 Aug 2005 04:06:28 -0000 1.15
-+++ configure.in 16 Sep 2006 17:19:16 -0000
-@@ -265,7 +265,13 @@
- -I../portmidi/pm_common -I../portmidi/pm_mac \
- -I../portmidi/porttime \
- -Wno-error \
-- -DUSEAPI_PORTAUDIO -DPA_BIG_ENDIAN -DPA19 -DPA_USE_COREAUDIO"
-+ -DUSEAPI_PORTAUDIO -DPA19 -DPA_USE_COREAUDIO"
-+ if test `uname -p` == powerpc;
-+ then
-+ MORECFLAGS="$MORECFLAGS -DPA_BIG_ENDIAN"
-+ else
-+ MORECFLAGS="$MORECFLAGS -DPA_LITTLE_ENDIAN"
-+ fi
- SYSSRC="s_midi_pm.c s_audio_pa.c \
- s_audio_pablio.c \
- s_audio_paring.c \
-Index: d_array.c
-===================================================================
-RCS file: /cvsroot/pure-data/pd/src/d_array.c,v
-retrieving revision 1.5
-diff -u -w -r1.5 d_array.c
---- d_array.c 11 Nov 2004 04:58:21 -0000 1.5
-+++ d_array.c 16 Sep 2006 18:11:29 -0000
-@@ -540,12 +540,16 @@
- #define int32 int32_t
-
- #else
--#ifdef MACOSX
-+#ifdef __APPLE__
-+#define int32 int /* a data type that has 32 bits */
-+# ifdef __BIG_ENDIAN__
- #define HIOFFSET 0 /* word offset to find MSB */
- #define LOWOFFSET 1 /* word offset to find LSB */
--#define int32 int /* a data type that has 32 bits */
--
--#endif /* MACOSX */
-+# else
-+# define HIOFFSET 1 /* word offset to find MSB */
-+# define LOWOFFSET 0 /* word offset to find LSB */
-+#endif /* __BIG_ENDIAN__ */
-+#endif /* __APPLE__ */
- #endif /* __linux__ */
- #endif /* MSW */
- #endif /* SGI */
diff --git a/packages/patches/macosx_deployment_target-0.40-1.patch b/packages/patches/macosx_deployment_target-0.40-1.patch
new file mode 100644
index 00000000..d938b6fe
--- /dev/null
+++ b/packages/patches/macosx_deployment_target-0.40-1.patch
@@ -0,0 +1,16 @@
+Index: makefile.in
+===================================================================
+RCS file: /cvsroot/pure-data/pd/src/makefile.in,v
+retrieving revision 1.8
+diff -u -w -r1.8 makefile.in
+--- makefile.in 24 Jul 2005 19:41:14 -0000 1.8
++++ makefile.in 22 Feb 2006 05:19:42 -0000
+@@ -1,3 +1,8 @@
++# On Mac OS X, this needs to be defined to enable dlopen and weak linking
++# support. Its safe on other platforms since gcc only checks this env var on
++# Apple's gcc. <hans@at.or.at>
++export MACOSX_DEPLOYMENT_TARGET = 10.3
++
+ VPATH = ../obj:./
+ OBJ_DIR = ../obj
+ BIN_DIR = ../bin
diff --git a/packages/patches/mingw_fixes-0.39-2.patch b/packages/patches/mingw_fixes-0.39-2.patch
deleted file mode 100644
index 91516406..00000000
--- a/packages/patches/mingw_fixes-0.39-2.patch
+++ /dev/null
@@ -1,574 +0,0 @@
-Index: configure.in
-===================================================================
-RCS file: /cvsroot/pure-data/pd/src/configure.in,v
-retrieving revision 1.15
-diff -u -w -r1.15 configure.in
---- configure.in 16 Aug 2005 04:06:28 -0000 1.15
-+++ configure.in 22 Feb 2006 05:41:08 -0000
-@@ -19,6 +19,7 @@
- AC_SUBST(GUIFLAGS)
- AC_SUBST(OSNUMBER)
- AC_SUBST(EXTERNTARGET)
-+AC_SUBST(ASIOSRC)
-
- dnl other defaults
-
-@@ -77,7 +78,10 @@
-
- dnl Checking for `pthread_create' function in -pthread
- AC_CHECK_LIB(pthread, pthread_create,PDLIB="$PDLIB -lpthread",
-- echo "pthreads required" || exit 1)
-+ AC_CHECK_LIB(pthreadGC2, pthread_create, PDLIB="$PDLIB -lpthreadGC2",
-+ AC_CHECK_LIB(pthreadGC1, pthread_create, PDLIB="$PDLIB -lpthreadGC1",
-+ AC_CHECK_LIB(pthreadGC, pthread_create, PDLIB="$PDLIB -lpthreadGC",
-+ echo "pthreads required"; exit 1))))
-
- dnl look for tcl 8.x... do I really have to go through all this!?
-
-@@ -108,6 +112,11 @@
- fi
- if test $foundit == "no";
- then
-+ AC_CHECK_HEADER(tcl8.4/tcl.h,
-+ GUIFLAGS="$GUIFLAGS -I/usr/local/include/tcl8.4";foundit=yes,)
-+fi
-+if test $foundit == "no";
-+then
- AC_CHECK_HEADER(tcl8.3/tcl.h,
- GUIFLAGS="$GUIFLAGS -I/usr/include/tcl8.3";foundit=yes,)
- fi
-@@ -119,27 +128,30 @@
- if test $foundit == "no";
- then
- echo no tcl header found
-- exit -1
-+ echo bolding trying without...
-+# exit -1
- fi
-
--AC_CHECK_LIB(tcl8.7, main,,
-- AC_CHECK_LIB(tcl8.6, main,,
-+AC_CHECK_LIB(tcl85, main,,
- AC_CHECK_LIB(tcl8.5, main,,
-+ AC_CHECK_LIB(tcl84, main,,
- AC_CHECK_LIB(tcl8.4, main,,
- AC_CHECK_LIB(tcl8.3, main,,
- AC_CHECK_LIB(tcl8.2, main,,
-- AC_CHECK_LIB(tcl8.0, main,,echo no tcl library found || exit 1)))))))
-+ AC_CHECK_LIB(tcl8.0, main,,
-+ echo no tcl library found; exit 1)))))))
-
--AC_CHECK_LIB(tk8.7, main,,
-- AC_CHECK_LIB(tk8.6, main,,
-+AC_CHECK_LIB(tk85, main,,
- AC_CHECK_LIB(tk8.5, main,,
-+ AC_CHECK_LIB(tk84, main,,
- AC_CHECK_LIB(tk8.4, main,,
- AC_CHECK_LIB(tk8.3, main,,
- AC_CHECK_LIB(tk8.2, main,,
-- AC_CHECK_LIB(tk8.0, main,,echo no tk library found || exit 1)))))))
-+ AC_CHECK_LIB(tk8.0, main,,
-+ echo no tk library found; exit 1)))))))
-
-
--if test `uname -s` = Linux;
-+if test `uname -s` == Linux;
- then
- dnl Ckecking for ALSA
- echo .................... alsa= $alsa
-@@ -254,7 +266,7 @@
- LDFLAGS=$LDFLAGS" -lrt -ljack"
- fi
-
--if test `uname -s` = Darwin;
-+if test `uname -s` == Darwin;
- then
- LDFLAGS="-Wl -framework CoreAudio \
- -framework AudioUnit -framework AudioToolbox \
-@@ -324,6 +336,39 @@
- fi
- fi
-
-+# only Windows uses ASIO, for the rest, set to blank
-+ASIOSRC=
-+
-+if test `uname -s` == MINGW32_NT-5.0;
-+then
-+ EXT=dll
-+ MORECFLAGS="-DUSEAPI_PORTAUDIO -DPA19 -DMSW -DPA_NO_DS -DPD_INTERNAL \
-+ -I../portaudio/pa_common -I../portaudio/pablio \
-+ -mwindows -mms-bitfields "$MORECFLAGS
-+ PDLIB=$PDLIB" -lwsock32 -lwinmm -lole32 -lstdc++"
-+
-+ SYSSRC="s_audio_pa.c s_audio_pablio.c s_audio_paring.c \
-+ s_audio_mmio.c s_midi_mmio.c \
-+ ../portaudio/pa_common/pa_allocation.c \
-+ ../portaudio/pa_common/pa_converters.c \
-+ ../portaudio/pa_common/pa_cpuload.c \
-+ ../portaudio/pa_common/pa_dither.c \
-+ ../portaudio/pa_common/pa_front.c \
-+ ../portaudio/pa_common/pa_process.c \
-+ ../portaudio/pa_common/pa_skeleton.c \
-+ ../portaudio/pa_common/pa_stream.c \
-+ ../portaudio/pa_common/pa_trace.c \
-+ ../portaudio/pa_win/pa_win_util.c \
-+ ../portaudio/pa_win/pa_win_hostapis.c \
-+ ../portaudio/pa_win_wmme/pa_win_wmme.c"
-+ ASIOSRC="../portaudio/pa_asio/iasiothiscallresolver.cpp \
-+ ../portaudio/pa_asio/pa_asio.cpp ../asio/asio.cpp \
-+ ../asio/asiodrivers.cpp ../asio/asiolist.cpp"
-+ STRIPFLAG="--strip-unneeded"
-+ GUINAME="pdtcl.dll"
-+ GUIFLAGS=
-+fi
-+
- # support for jack, on either linux or darwin:
-
- if test x$jack == "xyes";
-Index: d_mayer_fft.c
-===================================================================
-RCS file: /cvsroot/pure-data/pd/src/d_mayer_fft.c,v
-retrieving revision 1.3
-diff -u -w -r1.3 d_mayer_fft.c
---- d_mayer_fft.c 18 May 2005 04:28:50 -0000 1.3
-+++ d_mayer_fft.c 22 Feb 2006 05:41:08 -0000
-@@ -48,7 +48,8 @@
- * of work. -msp
- */
-
--#ifdef MSW
-+/* These pragmas are only used for MSVC, not MinGW or Cygwin <hans@at.or.at> */
-+#ifdef _MSC_VER
- #pragma warning( disable : 4305 ) /* uncast const double to float */
- #pragma warning( disable : 4244 ) /* uncast double to float */
- #pragma warning( disable : 4101 ) /* unused local variables */
-Index: m_pd.h
-===================================================================
-RCS file: /cvsroot/pure-data/pd/src/m_pd.h,v
-retrieving revision 1.8
-diff -u -w -r1.8 m_pd.h
---- m_pd.h 19 Aug 2005 23:28:03 -0000 1.8
-+++ m_pd.h 22 Feb 2006 05:41:08 -0000
-@@ -17,15 +17,16 @@
- #define MSW
- #endif
-
--#ifdef MSW
-+/* These pragmas are only used for MSVC, not MinGW or Cygwin <hans@at.or.at> */
-+#ifdef _MSC_VER
- /* #pragma warning( disable : 4091 ) */
- #pragma warning( disable : 4305 ) /* uncast const double to float */
- #pragma warning( disable : 4244 ) /* uncast float/int conversion etc. */
- #pragma warning( disable : 4101 ) /* unused automatic variables */
--#endif /* MSW */
-+#endif /* _MSC_VER */
-
- /* the external storage class is "extern" in UNIX; in MSW it's ugly. */
--#ifdef MSW
-+#ifdef _WIN32
- #ifdef PD_INTERNAL
- #define EXTERN __declspec(dllexport) extern
- #else
-@@ -33,7 +34,7 @@
- #endif /* PD_INTERNAL */
- #else
- #define EXTERN extern
--#endif /* MSW */
-+#endif /* _WIN32 */
-
- /* and depending on the compiler, hidden data structures are
- declared differently: */
-Index: makefile.in
-===================================================================
-RCS file: /cvsroot/pure-data/pd/src/makefile.in,v
-retrieving revision 1.8
-diff -u -w -r1.8 makefile.in
---- makefile.in 24 Jul 2005 19:41:14 -0000 1.8
-+++ makefile.in 22 Feb 2006 05:41:08 -0000
-@@ -30,6 +30,10 @@
-
- SYSSRC += @SYSSRC@
-
-+ASIOSRC = @ASIOSRC@
-+
-+ASIOOBJ = $(ASIOSRC:.cpp=.o)
-+
- SRC = g_canvas.c g_graph.c g_text.c g_rtext.c g_array.c g_template.c g_io.c \
- g_scalar.c g_traversal.c g_guiconnect.c g_readwrite.c g_editor.c \
- g_all_guis.c g_bang.c g_hdial.c g_hslider.c g_mycanvas.c g_numbox.c \
-@@ -70,6 +74,9 @@
- $(GOBJ) : %.o : %.c
- $(CC) $(CFLAGS) $(GFLAGS) $(GINCLUDE) -c -o $(OBJ_DIR)/$*.o $*.c
-
-+$(ASIOOBJ): %.o : %.cpp
-+ $(CXX) $(CFLAGS) $(INCLUDE) -c -o $(OBJ_DIR)/$*.o $*.cpp
-+
- pd: $(PDEXEC)
-
- gui: $(BIN_DIR)/$(GUINAME)
-@@ -77,16 +84,16 @@
- pd-watchdog: $(BIN_DIR)/pd-watchdog
-
- $(BIN_DIR)/pd-watchdog: s_watchdog.c
-- $(CC) -O2 $(STRIPFLAG) -o $(BIN_DIR)/pd-watchdog s_watchdog.c
-+ $(CC) -O2 $(STRIPFLAG) -o $(BIN_DIR)/pd-watchdog s_watchdog.c $(LIB)
-
- $(BIN_DIR)/pdsend: u_pdsend.c
-- $(CC) $(CFLAGS) $(STRIPFLAG) -o $(BIN_DIR)/pdsend u_pdsend.c
-+ $(CC) $(CFLAGS) $(STRIPFLAG) -o $(BIN_DIR)/pdsend u_pdsend.c $(LIB)
-
- $(BIN_DIR)/pdreceive: u_pdreceive.c
-- $(CC) $(CFLAGS) $(STRIPFLAG) -o $(BIN_DIR)/pdreceive u_pdreceive.c
-+ $(CC) $(CFLAGS) $(STRIPFLAG) -o $(BIN_DIR)/pdreceive u_pdreceive.c $(LIB)
-
--$(PDEXEC): $(OBJ)
-- cd ../obj; $(CC) $(LDFLAGS) $(DBG_CFLAGS) -o $(PDEXEC) $(OBJ) \
-+$(PDEXEC): $(OBJ) $(ASIOOBJ)
-+ cd ../obj; $(CC) $(LDFLAGS) $(DBG_CFLAGS) -o $(PDEXEC) $(ASIOOBJ) $(OBJ) \
- $(LIB)
-
- $(BIN_DIR)/pd-gui: $(GOBJ) $(GSRC)
-@@ -109,6 +116,12 @@
- @executable_path/../Frameworks/Tk.framework/Versions/8.4/Tk \
- ../bin/libPdTcl.dylib
-
-+# this is for Windows/MinGW (only?)
-+$(BIN_DIR)/pdtcl.dll: $(GOBJ)
-+ cd $(BIN_DIR); dllwrap --export-all-symbols --output-def pdtcl.def \
-+ --output-lib=pdtcl.a --dllname=$(GUINAME) $(OBJ_DIR)/t_tkcmd.o $(LIB) $(GLIB)
-+ strip --strip-unneeded $(BIN_DIR)/pdtcl.dll
-+
- externs:
- cd ../extra/bonk~;make @EXTERNTARGET@
- cd ../extra/choice;make @EXTERNTARGET@
-@@ -144,8 +157,9 @@
- chmod 644 $(MANINSTDIR)/man1/pdreceive.1.gz
-
- local-clean:
-- -rm -f ../obj/* $(BIN_DIR)/pd $(BIN_DIR)/$(GUINAME) $(BIN_DIR)/pdsend \
-- $(BIN_DIR)/pdreceive $(BIN_DIR)/pd-watchdog m_stamp.c
-+ -rm -f ../obj/* $(BIN_DIR)/pd $(BIN_DIR)/$(GUINAME) $(BIN_DIR)/pdsend* \
-+ $(BIN_DIR)/pdreceive* $(BIN_DIR)/pd-watchdog* m_stamp.c \
-+ $(BIN_DIR)/pd.exe $(BIN_DIR)/pdtcl.* $(BIN_DIR)/pd.tk
- -rm -f `find ../portaudio ../portaudio_v18 -name "*.o"`
- -rm -f *~
- -(cd ../doc/6.externs; rm -f *.pd_linux)
-Index: s_entry.c
-===================================================================
-RCS file: /cvsroot/pure-data/pd/src/s_entry.c,v
-retrieving revision 1.3
-diff -u -w -r1.3 s_entry.c
---- s_entry.c 11 Nov 2004 04:58:21 -0000 1.3
-+++ s_entry.c 22 Feb 2006 05:41:08 -0000
-@@ -3,7 +3,11 @@
-
- int sys_main(int argc, char **argv);
-
--#ifdef MSW
-+/*
-+ * gcc does not support the __try stuff, only MSVC. Also, MinGW allows you to
-+ * use main() instead of WinMain(). <hans@at.or.at>
-+ */
-+#ifdef _MSC_VER
- #include <windows.h>
- #include <stdio.h>
-
-@@ -21,11 +25,11 @@
- }
- }
-
--#else /* not MSW */
-+#else /* not _MSC_VER */
- int main(int argc, char **argv)
- {
- return (sys_main(argc, argv));
- }
--#endif
-+#endif /* _MSC_VER */
-
-
-Index: s_inter.c
-===================================================================
-RCS file: /cvsroot/pure-data/pd/src/s_inter.c,v
-retrieving revision 1.14
-diff -u -w -r1.14 s_inter.c
---- s_inter.c 15 Oct 2005 23:14:28 -0000 1.14
-+++ s_inter.c 22 Feb 2006 05:41:08 -0000
-@@ -9,7 +9,7 @@
- #include "s_stuff.h"
- #include "m_imp.h"
- #include "g_canvas.h" /* for GUI queueing stuff */
--#ifndef MSW
-+#ifndef _WIN32
- #include <unistd.h>
- #include <sys/socket.h>
- #include <netinet/in.h>
-@@ -23,16 +23,19 @@
- #ifdef HAVE_BSTRING_H
- #include <bstring.h>
- #endif
--#ifdef MSW
-+#ifdef _WIN32
- #include <io.h>
- #include <fcntl.h>
- #include <process.h>
- #include <winsock.h>
- #include <windows.h>
-+# ifdef _MSC_VER
- typedef int pid_t;
-+# endif
- typedef int socklen_t;
- #define EADDRINUSE WSAEADDRINUSE
- #endif
-+
- #include <stdarg.h>
- #include <signal.h>
- #include <fcntl.h>
-@@ -100,7 +103,7 @@
-
- /* ----------- functions for timing, signals, priorities, etc --------- */
-
--#ifdef MSW
-+#ifdef _WIN32
- static LARGE_INTEGER nt_inittime;
- static double nt_freq = 0;
-
-@@ -129,13 +132,13 @@
- return (((double)(dumbass->QuadPart - nt_inittime.QuadPart)) / nt_freq);
- }
- #endif
--#endif /* MSW */
-+#endif /* _WIN32 */
-
- /* get "real time" in seconds; take the
- first time we get called as a reference time of zero. */
- double sys_getrealtime(void)
- {
--#ifndef MSW
-+#ifndef _WIN32
- static struct timeval then;
- struct timeval now;
- gettimeofday(&now, 0);
-@@ -165,11 +168,11 @@
- FD_ZERO(&exceptset);
- for (fp = sys_fdpoll, i = sys_nfdpoll; i--; fp++)
- FD_SET(fp->fdp_fd, &readset);
--#ifdef MSW
-+#ifdef _WIN32
- if (sys_maxfd == 0)
- Sleep(microsec/1000);
- else
--#endif
-+#endif /* _WIN32 */
- select(sys_maxfd+1, &readset, &writeset, &exceptset, &timout);
- for (i = 0; i < sys_nfdpoll; i++)
- if (FD_ISSET(sys_fdpoll[i].fdp_fd, &readset))
-@@ -187,11 +190,11 @@
- }
- else
- {
--#ifdef MSW
-+#ifdef _WIN32
- if (sys_maxfd == 0)
- Sleep(microsec/1000);
- else
--#endif
-+#endif /* _WIN32 */
- select(0, 0, 0, 0, &timout);
- return (0);
- }
-@@ -335,7 +338,7 @@
-
- void sys_sockerror(char *s)
- {
--#ifdef MSW
-+#ifdef _WIN32
- int err = WSAGetLastError();
- if (err == 10054) return;
- else if (err == 10044)
-@@ -346,7 +349,7 @@
- }
- #else
- int err = errno;
--#endif
-+#endif /* _WIN32 */
- fprintf(stderr, "%s: %s (%d)\n", s, strerror(err), err);
- }
-
-@@ -549,9 +552,9 @@
- #ifdef UNISTD
- close(fd);
- #endif
--#ifdef MSW
-+#ifdef _WIN32
- closesocket(fd);
--#endif
-+#endif /* _WIN32 */
- }
-
- /* ---------------------- sending messages to the GUI ------------------ */
-@@ -856,10 +859,10 @@
- int len = sizeof(server);
- int ntry = 0, portno = FIRSTPORTNUM;
- int xsock = -1;
--#ifdef MSW
-+#ifdef _WIN32
- short version = MAKEWORD(2, 0);
- WSADATA nobby;
--#endif
-+#endif /* _WIN32 */
- #ifdef UNISTD
- int stdinpipe[2];
- #endif
-@@ -884,9 +887,9 @@
- signal(SIGSTKFLT, sys_exithandler);
- #endif
- #endif
--#ifdef MSW
-+#ifdef _WIN32
- if (WSAStartup(version, &nobby)) sys_sockerror("WSAstartup");
--#endif
-+#endif /* _WIN32 */
-
- if (sys_nogui)
- {
-@@ -894,10 +897,10 @@
- skip starting the GUI up. */
- t_atom zz[19];
- int i;
--#ifdef MSW
-+#ifdef _WIN32
- if (GetCurrentDirectory(MAXPDSTRING, cmdbuf) == 0)
- strcpy(cmdbuf, ".");
--#endif
-+#endif /* _WIN32 */
- #ifdef UNISTD
- if (!getcwd(cmdbuf, MAXPDSTRING))
- strcpy(cmdbuf, ".");
-@@ -944,16 +947,16 @@
- }
- else /* default behavior: start up the GUI ourselves. */
- {
--#ifdef MSW
-+#ifdef _WIN32
- char scriptbuf[MAXPDSTRING+30], wishbuf[MAXPDSTRING+30], portbuf[80];
- int spawnret;
-
--#endif
--#ifdef MSW
-+#endif /* _WIN32 */
-+#ifdef WIN32
- char intarg;
- #else
- int intarg;
--#endif
-+#endif /* _WIN32 */
-
- /* create a socket */
- xsock = socket(AF_INET, SOCK_STREAM, 0);
-@@ -971,9 +974,9 @@
- intarg = 1;
- if (setsockopt(xsock, IPPROTO_TCP, TCP_NODELAY,
- &intarg, sizeof(intarg)) < 0)
--#ifndef MSW
-+#ifndef _WIN32
- post("setsockopt (TCP_NODELAY) failed\n")
--#endif
-+#endif /* not _WIN32 */
- ;
-
-
-@@ -986,11 +989,11 @@
- /* name the socket */
- while (bind(xsock, (struct sockaddr *)&server, sizeof(server)) < 0)
- {
--#ifdef MSW
-+#ifdef _WIN32
- int err = WSAGetLastError();
- #else
- int err = errno;
--#endif
-+#endif /* _WIN32 */
- if ((ntry++ > 20) || (err != EADDRINUSE))
- {
- perror("bind");
-@@ -1102,8 +1105,8 @@
- }
- #endif /* UNISTD */
-
--#ifdef MSW
-- /* in MSW land "guipath" is unused; we just do everything from
-+#ifdef _WIN32
-+ /* in WIN32 land "guipath" is unused; we just do everything from
- the libdir. */
- /* fprintf(stderr, "%s\n", sys_libdir->s_name); */
-
-@@ -1126,7 +1129,7 @@
- exit(1);
- }
-
--#endif /* MSW */
-+#endif /* _WIN32 */
- }
-
- #if defined(__linux__) || defined(IRIX)
-@@ -1198,10 +1201,10 @@
- seteuid(getuid()); /* lose setuid priveliges */
- #endif /* __linux__ */
-
--#ifdef MSW
-+#ifdef _WIN32
- if (!SetPriorityClass(GetCurrentProcess(), HIGH_PRIORITY_CLASS))
- fprintf(stderr, "pd: couldn't set high priority class\n");
--#endif
-+#endif /* _WIN32 */
- #ifdef MACOSX
- if (sys_hipriority)
- {
-Index: s_watchdog.c
-===================================================================
-RCS file: /cvsroot/pure-data/pd/src/s_watchdog.c,v
-retrieving revision 1.2
-diff -u -w -r1.2 s_watchdog.c
---- s_watchdog.c 6 Sep 2004 20:20:36 -0000 1.2
-+++ s_watchdog.c 22 Feb 2006 05:41:08 -0000
-@@ -8,8 +8,13 @@
-
- #include <sys/time.h>
- #include <sys/types.h>
-+#ifdef _WIN32
-+#include <io.h>
-+#include <winsock.h>
-+#else
- #include <unistd.h>
- #include <signal.h>
-+#endif /* _WIN32 */
- #include <stdio.h>
-
- int main(int argc, char **argv)
-@@ -41,7 +46,9 @@
- else continue;
- }
- happy = 0;
-+#ifndef _WIN32
- kill(getppid(), SIGHUP);
-+#endif /* _WIN32 */
- fprintf(stderr, "watchdog: signaling pd...\n");
- }
- }
-Index: t_tkcmd.c
-===================================================================
-RCS file: /cvsroot/pure-data/pd/src/t_tkcmd.c,v
-retrieving revision 1.6
-diff -u -w -r1.6 t_tkcmd.c
---- t_tkcmd.c 15 Oct 2005 23:14:28 -0000 1.6
-+++ t_tkcmd.c 22 Feb 2006 05:41:08 -0000
-@@ -30,7 +30,7 @@
- #include <winsock.h>
- #include <io.h>
- #endif
--#ifdef MSW
-+#ifdef _MSC_VER
- #pragma warning( disable : 4305 ) /* uncast const double to float */
- #pragma warning( disable : 4244 ) /* uncast double to float */
- #pragma warning( disable : 4101 ) /* unused local variables */
diff --git a/packages/patches/mingw_fixes-0.40-1.patch b/packages/patches/mingw_fixes-0.40-1.patch
new file mode 100644
index 00000000..f5fe84bf
--- /dev/null
+++ b/packages/patches/mingw_fixes-0.40-1.patch
@@ -0,0 +1,196 @@
+Index: configure.in
+===================================================================
+RCS file: /cvsroot/pure-data/pd/src/configure.in,v
+retrieving revision 1.15
+diff -u -w -r1.15 configure.in
+--- configure.in 16 Aug 2005 04:06:28 -0000 1.15
++++ configure.in 22 Feb 2006 05:41:08 -0000
+@@ -19,6 +19,7 @@
+ AC_SUBST(GUIFLAGS)
+ AC_SUBST(OSNUMBER)
+ AC_SUBST(EXTERNTARGET)
++AC_SUBST(ASIOSRC)
+
+ dnl other defaults
+
+@@ -77,7 +78,10 @@
+
+ dnl Checking for `pthread_create' function in -pthread
+ AC_CHECK_LIB(pthread, pthread_create,PDLIB="$PDLIB -lpthread",
+- echo "pthreads required" || exit 1)
++ AC_CHECK_LIB(pthreadGC2, pthread_create, PDLIB="$PDLIB -lpthreadGC2",
++ AC_CHECK_LIB(pthreadGC1, pthread_create, PDLIB="$PDLIB -lpthreadGC1",
++ AC_CHECK_LIB(pthreadGC, pthread_create, PDLIB="$PDLIB -lpthreadGC",
++ echo "pthreads required"; exit 1))))
+
+ dnl look for tcl 8.x... do I really have to go through all this!?
+
+@@ -108,6 +112,11 @@
+ fi
+ if test $foundit == "no";
+ then
++ AC_CHECK_HEADER(tcl8.4/tcl.h,
++ GUIFLAGS="$GUIFLAGS -I/usr/local/include/tcl8.4";foundit=yes,)
++fi
++if test $foundit == "no";
++then
+ AC_CHECK_HEADER(tcl8.3/tcl.h,
+ GUIFLAGS="$GUIFLAGS -I/usr/include/tcl8.3";foundit=yes,)
+ fi
+@@ -119,27 +128,30 @@
+ if test $foundit == "no";
+ then
+ echo no tcl header found
+- exit -1
++ echo bolding trying without...
++# exit -1
+ fi
+
+-AC_CHECK_LIB(tcl8.7, main,,
+- AC_CHECK_LIB(tcl8.6, main,,
++AC_CHECK_LIB(tcl85, main,,
+ AC_CHECK_LIB(tcl8.5, main,,
++ AC_CHECK_LIB(tcl84, main,,
+ AC_CHECK_LIB(tcl8.4, main,,
+ AC_CHECK_LIB(tcl8.3, main,,
+ AC_CHECK_LIB(tcl8.2, main,,
+- AC_CHECK_LIB(tcl8.0, main,,echo no tcl library found || exit 1)))))))
++ AC_CHECK_LIB(tcl8.0, main,,
++ echo no tcl library found; exit 1)))))))
+
+-AC_CHECK_LIB(tk8.7, main,,
+- AC_CHECK_LIB(tk8.6, main,,
++AC_CHECK_LIB(tk85, main,,
+ AC_CHECK_LIB(tk8.5, main,,
++ AC_CHECK_LIB(tk84, main,,
+ AC_CHECK_LIB(tk8.4, main,,
+ AC_CHECK_LIB(tk8.3, main,,
+ AC_CHECK_LIB(tk8.2, main,,
+- AC_CHECK_LIB(tk8.0, main,,echo no tk library found || exit 1)))))))
++ AC_CHECK_LIB(tk8.0, main,,
++ echo no tk library found; exit 1)))))))
+
+
+-if test `uname -s` = Linux;
++if test `uname -s` == Linux;
+ then
+ dnl Ckecking for ALSA
+ echo .................... alsa= $alsa
+@@ -254,7 +266,7 @@
+ LDFLAGS=$LDFLAGS" -lrt -ljack"
+ fi
+
+-if test `uname -s` = Darwin;
++if test `uname -s` == Darwin;
+ then
+ LDFLAGS="-Wl -framework CoreAudio \
+ -framework AudioUnit -framework AudioToolbox \
+@@ -324,6 +336,39 @@
+ fi
+ fi
+
++# only Windows uses ASIO, for the rest, set to blank
++ASIOSRC=
++
++if test `uname -s` == MINGW32_NT-5.0;
++then
++ EXT=dll
++ MORECFLAGS="-DUSEAPI_PORTAUDIO -DPA19 -DMSW -DPA_NO_DS -DPD_INTERNAL \
++ -I../portaudio/pa_common -I../portaudio/pablio \
++ -mwindows -mms-bitfields "$MORECFLAGS
++ PDLIB=$PDLIB" -lwsock32 -lwinmm -lole32 -lstdc++"
++
++ SYSSRC="s_audio_pa.c s_audio_pablio.c s_audio_paring.c \
++ s_audio_mmio.c s_midi_mmio.c \
++ ../portaudio/pa_common/pa_allocation.c \
++ ../portaudio/pa_common/pa_converters.c \
++ ../portaudio/pa_common/pa_cpuload.c \
++ ../portaudio/pa_common/pa_dither.c \
++ ../portaudio/pa_common/pa_front.c \
++ ../portaudio/pa_common/pa_process.c \
++ ../portaudio/pa_common/pa_skeleton.c \
++ ../portaudio/pa_common/pa_stream.c \
++ ../portaudio/pa_common/pa_trace.c \
++ ../portaudio/pa_win/pa_win_util.c \
++ ../portaudio/pa_win/pa_win_hostapis.c \
++ ../portaudio/pa_win_wmme/pa_win_wmme.c"
++ ASIOSRC="../portaudio/pa_asio/iasiothiscallresolver.cpp \
++ ../portaudio/pa_asio/pa_asio.cpp ../asio/asio.cpp \
++ ../asio/asiodrivers.cpp ../asio/asiolist.cpp"
++ STRIPFLAG="--strip-unneeded"
++ GUINAME="pdtcl.dll"
++ GUIFLAGS=
++fi
++
+ # support for jack, on either linux or darwin:
+
+ if test x$jack == "xyes";
+Index: makefile.in
+===================================================================
+RCS file: /cvsroot/pure-data/pd/src/makefile.in,v
+retrieving revision 1.8
+diff -u -w -r1.8 makefile.in
+--- makefile.in 24 Jul 2005 19:41:14 -0000 1.8
++++ makefile.in 22 Feb 2006 05:41:08 -0000
+@@ -30,6 +30,10 @@
+
+ SYSSRC += @SYSSRC@
+
++ASIOSRC = @ASIOSRC@
++
++ASIOOBJ = $(ASIOSRC:.cpp=.o)
++
+ SRC = g_canvas.c g_graph.c g_text.c g_rtext.c g_array.c g_template.c g_io.c \
+ g_scalar.c g_traversal.c g_guiconnect.c g_readwrite.c g_editor.c \
+ g_all_guis.c g_bang.c g_hdial.c g_hslider.c g_mycanvas.c g_numbox.c \
+@@ -70,6 +74,9 @@
+ $(GOBJ) : %.o : %.c
+ $(CC) $(CFLAGS) $(GFLAGS) $(GINCLUDE) -c -o $(OBJ_DIR)/$*.o $*.c
+
++$(ASIOOBJ): %.o : %.cpp
++ $(CXX) $(CFLAGS) $(INCLUDE) -c -o $(OBJ_DIR)/$*.o $*.cpp
++
+ pd: $(PDEXEC)
+
+ gui: $(BIN_DIR)/$(GUINAME)
+@@ -109,6 +116,12 @@
+ @executable_path/../Frameworks/Tk.framework/Versions/8.4/Tk \
+ ../bin/libPdTcl.dylib
+
++# this is for Windows/MinGW (only?)
++$(BIN_DIR)/pdtcl.dll: $(GOBJ)
++ cd $(BIN_DIR); dllwrap --export-all-symbols --output-def pdtcl.def \
++ --output-lib=pdtcl.a --dllname=$(GUINAME) $(OBJ_DIR)/t_tkcmd.o $(LIB) $(GLIB)
++ strip --strip-unneeded $(BIN_DIR)/pdtcl.dll
++
+ externs:
+ cd ../extra/bonk~;make @EXTERNTARGET@
+ cd ../extra/choice;make @EXTERNTARGET@
+Index: s_inter.c
+===================================================================
+RCS file: /cvsroot/pure-data/pd/src/s_inter.c,v
+retrieving revision 1.14
+diff -u -w -r1.14 s_inter.c
+--- s_inter.c 15 Oct 2005 23:14:28 -0000 1.14
++++ s_inter.c 22 Feb 2006 05:41:08 -0000
+@@ -23,16 +23,19 @@
+ #ifdef HAVE_BSTRING_H
+ #include <bstring.h>
+ #endif
+-#ifdef MSW
++#ifdef _WIN32
+ #include <io.h>
+ #include <fcntl.h>
+ #include <process.h>
+ #include <winsock.h>
+ #include <windows.h>
++# ifdef _MSC_VER
+ typedef int pid_t;
++# endif
+ typedef int socklen_t;
+ #define EADDRINUSE WSAEADDRINUSE
+ #endif
++
+ #include <stdarg.h>
+ #include <signal.h>
+ #include <fcntl.h>
diff --git a/packages/patches/number_bug_list_bug-0.39.2.patch b/packages/patches/number_bug_list_bug-0.39.2.patch
deleted file mode 100644
index 9690a067..00000000
--- a/packages/patches/number_bug_list_bug-0.39.2.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-Index: g_text.c
-===================================================================
-RCS file: /cvsroot/pure-data/pd/src/g_text.c,v
-retrieving revision 1.11
-diff -u -w -r1.11 g_text.c
---- g_text.c 15 Sep 2005 03:17:27 -0000 1.11
-+++ g_text.c 14 Jun 2006 14:56:36 -0000
-@@ -566,6 +566,19 @@
- gatom_bang(x);
- }
-
-+ /* We need a list method because, since there's both an "inlet" and a
-+ "nofirstin" flag, the standard list behavior gets confused. */
-+static void gatom_list(t_gatom *x, t_symbol *s, int argc, t_atom *argv)
-+{
-+ if (!argc)
-+ gatom_bang(x);
-+ else if (argv->a_type == A_FLOAT)
-+ gatom_float(x, argv->a_w.w_float);
-+ else if (argv->a_type == A_SYMBOL)
-+ gatom_symbol(x, argv->a_w.w_symbol);
-+ else pd_error(x, "gatom_list: need float or symbol");
-+}
-+
- static void gatom_motion(void *z, t_floatarg dx, t_floatarg dy)
- {
- t_gatom *x = (t_gatom *)z;
-@@ -1349,6 +1362,7 @@
- class_addbang(gatom_class, gatom_bang);
- class_addfloat(gatom_class, gatom_float);
- class_addsymbol(gatom_class, gatom_symbol);
-+ class_addlist(gatom_class, gatom_list);
- class_addmethod(gatom_class, (t_method)gatom_set, gensym("set"),
- A_GIMME, 0);
- class_addmethod(gatom_class, (t_method)gatom_click, gensym("click"),
diff --git a/packages/patches/pd_window_close_save_prompt-0.39.2.diff b/packages/patches/pd_window_close_save_prompt-0.39.2.diff
deleted file mode 100644
index aecc6864..00000000
--- a/packages/patches/pd_window_close_save_prompt-0.39.2.diff
+++ /dev/null
@@ -1,12 +0,0 @@
---- u_main.tk 2006-03-24 06:41:56.000000000 +0100
-+++ u_main.tk 2006-04-20 17:55:49.000000000 +0200
-@@ -201,6 +201,9 @@
- wm title . "Pd"
- . configure -menu .mbar -width 200 -height 150
-
-+# Intercept closing the main pd window: MP 20060413:
-+wm protocol . WM_DELETE_WINDOW menu_quit
-+
- ############### set up global variables ################################
-
- set untitled_number 1
diff --git a/packages/patches/put_version_into_aboutpd_page-0.40-pre.patch b/packages/patches/put_version_into_aboutpd_page-0.40-pre.patch
deleted file mode 100644
index 19b7b082..00000000
--- a/packages/patches/put_version_into_aboutpd_page-0.40-pre.patch
+++ /dev/null
@@ -1,113 +0,0 @@
-? ChangeLog
-? configure
-Index: makefile.in
-===================================================================
-RCS file: /cvsroot/pure-data/pd/src/makefile.in,v
-retrieving revision 1.9
-diff -u -w -r1.9 makefile.in
---- makefile.in 31 Dec 2005 20:55:25 -0000 1.9
-+++ makefile.in 27 Feb 2006 17:24:47 -0000
-@@ -62,6 +62,20 @@
-
- GOBJ = $(GSRC:.c=.o)
-
-+# get version from m_pd.h to use in doc/1.manual/1.introduction.txt
-+PD_MAJOR_VERSION := $(shell grep PD_MAJOR_VERSION m_pd.h | \
-+ sed 's|^.define *PD_MAJOR_VERSION *\([0-9]*\).*|\1|' )
-+PD_MINOR_VERSION := $(shell grep PD_MINOR_VERSION m_pd.h | \
-+ sed 's|^.define *PD_MINOR_VERSION *\([0-9]*\).*|\1|' )
-+PD_BUGFIX_VERSION := $(shell grep PD_BUGFIX_VERSION m_pd.h | \
-+ sed 's|^.define *PD_BUGFIX_VERSION *\([0-9]*\).*|\1|' )
-+PD_TEST_VERSION := $(shell grep PD_TEST_VERSION m_pd.h | \
-+ sed 's|^.define *PD_TEST_VERSION *"\(.*\)".*|\1|' )
-+PD_VERSION := $(PD_MAJOR_VERSION).$(PD_MINOR_VERSION).$(PD_BUGFIX_VERSION)
-+ifneq ($(PD_TEST_VERSION),)
-+ PD_VERSION := $(PD_VERSION)-$(PD_TEST_VERSION)
-+endif
-+
- #
- # ------------------ targets ------------------------------------
- #
-@@ -130,6 +144,7 @@
-
- BINARYMODE=@binarymode@
-
-+ABOUT_FILE=$(pddocdir)/1.manual/1.introduction.txt
- install: all
- install -d $(libpdbindir)
- install $(BIN_DIR)/$(GUINAME) $(libpdbindir)/$(GUINAME)
-@@ -149,6 +164,10 @@
- install -d $(pddocdir)/7.stuff/$$dir ; \
- install -p ../doc/7.stuff/$$dir/*.* $(pddocdir)/7.stuff/$$dir ; \
- done
-+ mv $(ABOUT_FILE) $(ABOUT_FILE).tmp
-+ cat $(ABOUT_FILE).tmp | sed 's|PD_VERSION|Pd version $(PD_VERSION)|' \
-+ > $(ABOUT_FILE)
-+ rm $(ABOUT_FILE).tmp
- cp -pr ../extra $(libpddir)/
- rm -f $(libpddir)/extra/*/*.o
- install -d $(DESTDIR)$(includedir)
-Index: s_inter.c
-===================================================================
-RCS file: /cvsroot/pure-data/pd/src/s_inter.c,v
-retrieving revision 1.15
-diff -u -w -r1.15 s_inter.c
---- s_inter.c 31 Dec 2005 20:55:25 -0000 1.15
-+++ s_inter.c 27 Feb 2006 17:24:47 -0000
-@@ -85,7 +85,6 @@
- t_socketreceivefn sr_socketreceivefn;
- };
-
--extern char pd_version[];
- extern int sys_guisetportnumber;
- extern char sys_font[]; /* tb: typeface */
-
-@@ -1245,8 +1244,7 @@
- #endif
- sys_get_audio_apis(buf);
- sys_get_midi_apis(buf2);
-- sys_vgui("pdtk_pd_startup {%s} %s %s {%s}\n", pd_version, buf, buf2,
-- sys_font);
-+ sys_vgui("pdtk_pd_startup %s %s {%s}\n", buf, buf2, sys_font);
- }
- return (0);
-
-Index: u_main.tk
-===================================================================
-RCS file: /cvsroot/pure-data/pd/src/u_main.tk,v
-retrieving revision 1.18
-diff -u -w -r1.18 u_main.tk
---- u_main.tk 31 Dec 2005 20:55:25 -0000 1.18
-+++ u_main.tk 27 Feb 2006 17:24:48 -0000
-@@ -353,7 +353,6 @@
- proc menu_opentext {filename} {
- global doc_number
- global pd_guidir
-- global pd_myversion
- # global pd_font3
- set name [format ".help%d" $doc_number]
- toplevel $name
-@@ -367,8 +366,7 @@
- while {![eof $f]} {
- set bigstring [read $f 1000]
- regsub -all PD_BASEDIR $bigstring $pd_guidir bigstring2
-- regsub -all PD_VERSION $bigstring2 $pd_myversion bigstring3
-- $name.text insert end $bigstring3
-+ $name.text insert end $bigstring2
- }
- close $f
- set doc_number [expr $doc_number + 1]
-@@ -3229,10 +3227,9 @@
- # font sizes 8, 10, 12, 14, 16, and 24.
-
- # tb: user defined typefaces
--proc pdtk_pd_startup {version apilist midiapilist fontname} {
--# puts stderr [concat $version $apilist $fontname]
-- global pd_myversion pd_apilist pd_midiapilist
-- set pd_myversion $version
-+proc pdtk_pd_startup {apilist midiapilist fontname} {
-+# puts stderr [concat $apilist $midiapilist $fontname]
-+ global pd_apilist pd_midiapilist
- set pd_apilist $apilist
- set pd_midiapilist $midiapilist
- global pd_font1 pd_font2 pd_font3 pd_font4 pd_font5 pd_font6 pd_font7
diff --git a/packages/patches/remove_doubleclick_as_rightclick-0.39.2.patch b/packages/patches/remove_doubleclick_as_rightclick-0.39.2.patch
deleted file mode 100644
index c832a3e3..00000000
--- a/packages/patches/remove_doubleclick_as_rightclick-0.39.2.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-Index: g_editor.c
-===================================================================
-RCS file: /cvsroot/pure-data/pd/src/g_editor.c,v
-retrieving revision 1.13
-diff -u -w -r1.13 g_editor.c
---- g_editor.c 15 Sep 2005 03:17:27 -0000 1.13
-+++ g_editor.c 24 Sep 2006 17:12:48 -0000
-@@ -1027,12 +1027,6 @@
- #define ALTMOD 4
- #define RIGHTCLICK 8
-
--/* on one-button-mouse machines, you can use double click to
-- mean right click (which gets the popup menu.) Do this for Mac. */
--#ifdef MACOSX
--#define SIMULATERIGHTCLICK
--#endif
--
- static double canvas_upclicktime;
- static int canvas_upx, canvas_upy;
- #define DCLICKINTERVAL 0.25
-@@ -1067,11 +1061,7 @@
-
- if (doit && !runmode && xpos == canvas_upx && ypos == canvas_upy &&
- sys_getrealtime() - canvas_upclicktime < DCLICKINTERVAL)
--#ifdef SIMULATERIGHTCLICK
-- rightclick = 1;
--#else
- doublemod = 1;
--#endif
- x->gl_editor->e_lastmoved = 0;
- if (doit)
- {
diff --git a/packages/patches/remove_x11_fontspecs_0.39.2.patch b/packages/patches/remove_x11_fontspecs_0.40-1.patch
index 54e9ee49..1f065276 100644
--- a/packages/patches/remove_x11_fontspecs_0.39.2.patch
+++ b/packages/patches/remove_x11_fontspecs_0.40-1.patch
@@ -1,22 +1,22 @@
-? conf28360.sh
? configure
+? makefile
Index: g_graph.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_graph.c,v
-retrieving revision 1.9
-diff -u -w -r1.9 g_graph.c
---- g_graph.c 15 Sep 2005 03:17:27 -0000 1.9
-+++ g_graph.c 17 Oct 2006 04:52:43 -0000
-@@ -739,7 +739,7 @@
- int ymin = (y1 < y2 ? y1 : y2);
- t_symbol *s = garray_getname((t_garray *)g);
- sys_vgui(".x%lx.c create text %d %d -text {%s} -anchor sw\
+retrieving revision 1.10
+diff -u -w -r1.10 g_graph.c
+--- g_graph.c 3 Jun 2006 19:13:07 -0000 1.10
++++ g_graph.c 23 Dec 2006 07:27:29 -0000
+@@ -741,7 +741,7 @@
+ {
+ i -= sys_fontheight(glist_getfont(x));
+ sys_vgui(".x%lx.c create text %d %d -text {%s} -anchor nw\
- -font -*-courier-bold--normal--%d-* -tags %s\n",
+ -font {courier %d bold} -tags %s\n",
- (long)glist_getcanvas(x), x1, ymin, s->s_name,
+ (long)glist_getcanvas(x), x1, i, arrayname->s_name,
sys_hostfontsize(glist_getfont(x)), tag);
}
-@@ -821,7 +821,7 @@
+@@ -823,7 +823,7 @@
/* draw x labels */
for (i = 0; i < x->gl_nxlabels; i++)
sys_vgui(".x%lx.c create text\
@@ -25,7 +25,7 @@ diff -u -w -r1.9 g_graph.c
glist_getcanvas(x),
(int)glist_xtopixels(x, atof(x->gl_xlabel[i]->s_name)),
(int)glist_ytopixels(x, x->gl_xlabely), x->gl_xlabel[i]->s_name,
-@@ -830,7 +830,7 @@
+@@ -832,7 +832,7 @@
/* draw y labels */
for (i = 0; i < x->gl_nylabels; i++)
sys_vgui(".x%lx.c create text\
@@ -37,11 +37,11 @@ diff -u -w -r1.9 g_graph.c
Index: g_template.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/g_template.c,v
-retrieving revision 1.13
-diff -u -w -r1.13 g_template.c
---- g_template.c 21 Aug 2005 17:46:52 -0000 1.13
-+++ g_template.c 17 Oct 2006 04:52:43 -0000
-@@ -2090,7 +2090,7 @@
+retrieving revision 1.18
+diff -u -w -r1.18 g_template.c
+--- g_template.c 9 Oct 2006 04:36:12 -0000 1.18
++++ g_template.c 23 Dec 2006 07:27:30 -0000
+@@ -2126,7 +2126,7 @@
drawnumber_sprintf(x, buf, &at);
sys_vgui(".x%lx.c create text %d %d -anchor nw -fill %s -text {%s}",
glist_getcanvas(glist), xloc, yloc, colorstring, buf);
@@ -53,11 +53,11 @@ diff -u -w -r1.13 g_template.c
Index: s_main.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/s_main.c,v
-retrieving revision 1.20
-diff -u -w -r1.20 s_main.c
---- s_main.c 2 Dec 2005 04:58:24 -0000 1.20
-+++ s_main.c 17 Oct 2006 04:52:43 -0000
-@@ -155,11 +155,7 @@
+retrieving revision 1.28
+diff -u -w -r1.28 s_main.c
+--- s_main.c 4 Oct 2006 19:35:06 -0000 1.28
++++ s_main.c 23 Dec 2006 07:27:31 -0000
+@@ -158,11 +158,7 @@
}
int sys_defaultfont;
@@ -72,11 +72,11 @@ diff -u -w -r1.20 s_main.c
Index: u_main.tk
===================================================================
RCS file: /cvsroot/pure-data/pd/src/u_main.tk,v
-retrieving revision 1.17
-diff -u -w -r1.17 u_main.tk
---- u_main.tk 15 Oct 2005 23:14:28 -0000 1.17
-+++ u_main.tk 17 Oct 2006 04:52:43 -0000
-@@ -171,7 +171,7 @@
+retrieving revision 1.25
+diff -u -w -r1.25 u_main.tk
+--- u_main.tk 9 Oct 2006 04:36:12 -0000 1.25
++++ u_main.tk 23 Dec 2006 07:27:33 -0000
+@@ -175,7 +175,7 @@
frame .printout
@@ -85,8 +85,8 @@ diff -u -w -r1.17 u_main.tk
-yscrollcommand ".printout.scroll set" -width 80
# .printout.text insert end "\n\n\n\n\n\n\n\n\n\n"
scrollbar .printout.scroll -command ".printout.text yview"
-@@ -355,7 +355,7 @@
- # global pd_font3
+@@ -364,7 +364,7 @@
+ global pd_myversion
set name [format ".help%d" $doc_number]
toplevel $name
- text $name.text -relief raised -bd 2 -font -*-times-regular--normal--14-* \
@@ -94,7 +94,7 @@ diff -u -w -r1.17 u_main.tk
-yscrollcommand "$name.scroll set" -background white
scrollbar $name.scroll -command "$name.text yview"
pack $name.scroll -side right -fill y
-@@ -1252,7 +1252,7 @@
+@@ -1279,7 +1279,7 @@
set $windowName.lb [listbox $windowName.lb -height 20 -width 25\
-selectmode extended \
-relief solid -background white -borderwidth 1 \
@@ -103,7 +103,7 @@ diff -u -w -r1.17 u_main.tk
$font] \
-yscrollcommand "$windowName.lb.sb set"]
set $windowName.lb.sb [scrollbar $windowName.lb.sb \
-@@ -1371,7 +1371,7 @@
+@@ -1398,7 +1398,7 @@
set bbox [$lbName bbox $itemNum]
set y [expr [lindex $bbox 1] - 4]
set $lbName.entry [entry $lbName.entry \
@@ -112,7 +112,7 @@ diff -u -w -r1.17 u_main.tk
$lbName.entry insert 0 []
place configure $lbName.entry -relx 0 -y $y -relwidth 1
lower $lbName.entry
-@@ -3180,8 +3180,8 @@
+@@ -3214,8 +3214,8 @@
############ pdtk_text_new -- create a new text object #2###########
proc pdtk_text_new {canvasname myname x y text font color} {
@@ -121,26 +121,5 @@ diff -u -w -r1.17 u_main.tk
+# if {$font < 13} {set fontname [format {courier %d bold} $font]}
+# if {$font >= 13} {set fontname [format {courier %d normal} $font]}
- global pd_font1 pd_font2 pd_font3 pd_font4 pd_font5 pd_font6 pd_font7
+ global pd_fontlist
switch -- $font {
-@@ -3235,13 +3235,13 @@
- set pd_midiapilist $midiapilist
- global pd_font1 pd_font2 pd_font3 pd_font4 pd_font5 pd_font6 pd_font7
-
-- set pd_font1 [format -*-%s-bold--normal--8-* $fontname]
-- set pd_font2 [format -*-%s-bold--normal--10-* $fontname]
-- set pd_font3 [format -*-%s-bold--normal--12-* $fontname]
-- set pd_font4 [format -*-%s-bold--normal--14-* $fontname]
-- set pd_font5 [format -*-%s-bold--normal--16-* $fontname]
-- set pd_font6 [format -*-%s-bold--normal--24-* $fontname]
-- set pd_font7 [format -*-%s-bold--normal--36-* $fontname]
-+ set pd_font1 [format {%s 8 bold} $fontname]
-+ set pd_font2 [format {%s 10 bold} $fontname]
-+ set pd_font3 [format {%s 12 bold} $fontname]
-+ set pd_font4 [format {%s 14 bold} $fontname]
-+ set pd_font5 [format {%s 16 bold} $fontname]
-+ set pd_font6 [format {%s 24 bold} $fontname]
-+ set pd_font7 [format {%s 36 bold} $fontname]
-
- set width1 [font measure $pd_font1 x]
- set height1 [lindex [font metrics $pd_font1] 5]