ports/110825: Update audio/pd to 0.40.2 (with some fixes)

Rasmus Kaj kaj at kth.se
Sun Mar 25 20:50:14 UTC 2007


>Number:         110825
>Category:       ports
>Synopsis:       Update audio/pd to 0.40.2 (with some fixes)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Sun Mar 25 20:50:13 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator:     Rasmus Kaj
>Release:        6.2
>Organization:
Stacken Computer Club, KTH
>Environment:
FreeBSD zoink 6.2-STABLE FreeBSD 6.2-STABLE #0: Thu Mar  8 20:37:38 UTC 2007     root at zoink.stacken.kth.se:/usr/obj/usr/src/sys/GENERIC  i386

>Description:
The port audio/pd has PORTVERSION= 0.39 but actually installed pd-0.37-1test1.  The attached patch updates the port to 0.40.2.  I also fixed some other annoyances:

 * The port no longer USE_X_PREFIX.
 * The installed program can find its own installed documentation.
 * The Tcl/Tk dependency is now done in (I hope) the standard way.
 * Externals (plugin blocks) can now be loaded.

>How-To-Repeat:
portinstall pd

>Fix:
Apply the enclosed patch.

Patch attached with submission follows:

diff -ruN pd.orig/Makefile pd/Makefile
--- pd.orig/Makefile	Sat Mar 24 22:32:02 2007
+++ pd/Makefile	Sun Mar 25 22:28:31 2007
@@ -6,28 +6,28 @@
 #
 
 PORTNAME=	pd
-PORTVERSION=	0.39
+DISTVERSION=	0.40-2
+DISTVERSIONSUFFIX=	.src
 CATEGORIES=	audio
 MASTER_SITES=	http://www-crca.ucsd.edu/~msp/Software/
-DISTNAME=	pd-0.37-1test1.src
 
 MAINTAINER=	ports at FreeBSD.org
 COMMENT=	Pure Data, a MIDI-capable real-time audio processor/synthesizer
 
-LIB_DEPENDS=	tcl84:${PORTSDIR}/lang/tcl84 \
-		tk84:${PORTSDIR}/x11-toolkits/tk84
-
+WRKSRC=		${WRKDIR}/${DISTNAME:S;.src;/src;}
 GNU_CONFIGURE=	yes
-CONFIGURE_ENV=	CFLAGS="${CFLAGS} ${PTHREAD_CFLAGS}" \
-		LIBS="${PTHREAD_LIBS} -L${LOCALBASE}/lib -ltk84 -ltcl84"
+CONFIGURE_ENV=	CFLAGS="${CFLAGS} ${PTHREAD_CFLAGS} -I${X11BASE}/include -I${TCL_INCLUDEDIR} -I${TK_INCLUDEDIR}" \
+		LIBS="${PTHREAD_LIBS} -L${LOCALBASE}/lib"
 MAKEFILE=	makefile
 MAN1=		pd.1 pdreceive.1 pdsend.1
 PATCH_WRKSRC=	${WRKSRC}/..
 PLIST=		${WRKDIR}/pkg-plist
 USE_GMAKE=	yes
-USE_X_PREFIX=	yes
 USE_AUTOTOOLS=	autoconf:259
-WRKSRC=		${WRKDIR}/pd-0.37-1test1/src
+USE_TCL=	yes
+USE_TK=		yes
+USE_TCL_BUILD=	yes
+USE_TK_BUILD=	yes
 
 .include <bsd.port.pre.mk>
 
@@ -40,12 +40,9 @@
 
 post-configure:
 	${MV} ${WRKSRC}/makefile ${WRKSRC}/makefile.orig
-	${SED} -e "s:^INCLUDE = :INCLUDE = -I${LOCALBASE}/include/tk8.4 \
-		-I${LOCALBASE}/include/tcl8.4 -I${X11BASE}/include :g; \
-		s:^LIB =:LIB =${PTHREAD_LIBS}:g; \
-		s:GFLAGS = :GFLAGS = -DUSEAPI_OSS :g; \
-		s:x_midi.c ::g; s:s_midi.c ::g; \
-		s:^CFLAGS =:CFLAGS+=${PTHREAD_CFLAGS}:g" \
+	${SED} -e "s:^LIB =:LIB =${PTHREAD_LIBS}:g; \
+		s:^pddocdir = .*:pddocdir = ${PREFIX}/share/doc/pd:g; \
+		s:x_midi.c ::g; s:s_midi.c ::g;" \
 		< ${WRKSRC}/makefile.orig > ${WRKSRC}/makefile
 
 pre-install:
diff -ruN pd.orig/distinfo pd/distinfo
--- pd.orig/distinfo	Sat Mar 24 22:32:02 2007
+++ pd/distinfo	Sun Mar 25 00:07:51 2007
@@ -1,3 +1,3 @@
-MD5 (pd-0.37-1test1.src.tar.gz) = 6f1f24d17b32bdd566fd5090a09c77f4
-SHA256 (pd-0.37-1test1.src.tar.gz) = d653a7c0be72cb7cc1c82887dd8e6c5a3c3251581ed0e25c90b315ad29f90bfe
-SIZE (pd-0.37-1test1.src.tar.gz) = 1895995
+MD5 (pd-0.40-2.src.tar.gz) = 2622e12b6fa0bd69db9732972e953afb
+SHA256 (pd-0.40-2.src.tar.gz) = a9e0bf841c6411cd301888e0afdb6f50aafcf6868a3f7b8a369f7ae744666c95
+SIZE (pd-0.40-2.src.tar.gz) = 2158886
diff -ruN pd.orig/files/patch-extra_sigmund_sigmundtilde.c pd/files/patch-extra_sigmund_sigmundtilde.c
--- pd.orig/files/patch-extra_sigmund_sigmundtilde.c	Thu Jan  1 01:00:00 1970
+++ pd/files/patch-extra_sigmund_sigmundtilde.c	Sun Mar 25 12:23:29 2007
@@ -0,0 +1,11 @@
+--- extra/sigmund~/sigmund~.c.orig	Sun Mar 25 12:22:47 2007
++++ extra/sigmund~/sigmund~.c	Sun Mar 25 12:22:50 2007
+@@ -16,7 +16,7 @@
+ #ifdef MSW
+ #include <malloc.h>
+ #else
+-#include <alloca.h>
++//#include <alloca.h>
+ #endif
+ #include <stdlib.h>
+ #ifdef NT
diff -ruN pd.orig/files/patch-src_configure.in pd/files/patch-src_configure.in
--- pd.orig/files/patch-src_configure.in	Sat Mar 24 22:32:02 2007
+++ pd/files/patch-src_configure.in	Sun Mar 25 13:29:58 2007
@@ -1,21 +1,121 @@
-$FreeBSD: ports/audio/pd/files/patch-src_configure.in,v 1.1 2003/11/12 00:55:19 trevor Exp $
-
---- src/configure.in.orig	Fri Sep 26 21:40:18 2003
-+++ src/configure.in	Tue Nov 11 23:53:26 2003
-@@ -136,6 +136,38 @@
-         		AC_CHECK_LIB(tk8.0, main,,echo no tk library found || exit 1)))))))
+--- src/configure.in.orig	Sat Oct 28 21:13:24 2006
++++ src/configure.in	Sun Mar 25 13:28:57 2007
+@@ -22,6 +22,9 @@
+ AC_SUBST(EXTERNTARGET)
  
+ dnl other defaults
++dnl respect upstream CFLAGS
++GUIFLAGS="$CFLAGS $GUIFLAGS"
++echo Base GUIFLAGS=$GUIFLAGS
  
+ dnl check for features
+ 
+@@ -83,7 +86,7 @@
+          echo "pthreads required" || exit 1)
+ 
+ dnl Check for fftw package
+-if test x$fftw == "xyes";
++if test x$fftw = "xyes";
+ then
+ AC_CHECK_LIB(fftw, fftw_one,PDLIB="$PDLIB -lfftw",
+     echo "fftw package not found - using built-in FFT"; fftw=no)
+@@ -92,62 +95,96 @@
+ dnl look for tcl 8.x... do I really have to go through all this!?
+ 
+ foundit=no
+-if test $foundit == "no";
++if test x$foundit = "xno";
+ then
+     AC_CHECK_HEADER(tcl.h,foundit=yes,)
+ fi
+-if test $foundit == "no";
++if test x$foundit = "xno";
+ then
+     AC_CHECK_HEADER(tcl8.7/tcl.h,
+     	GUIFLAGS="$GUIFLAGS -I/usr/include/tcl8.7";foundit=yes,)
+ fi
+-if test $foundit == "no";
++if test x$foundit = "xno";
+ then
+     AC_CHECK_HEADER(tcl8.6/tcl.h,
+     	GUIFLAGS="$GUIFLAGS -I/usr/include/tcl8.6";foundit=yes,)
+ fi
+-if test $foundit == "no";
++if test x$foundit = "xno";
+ then
+     AC_CHECK_HEADER(tcl8.5/tcl.h,
+     	GUIFLAGS="$GUIFLAGS -I/usr/include/tcl8.5";foundit=yes,)
+ fi
+-if test $foundit == "no";
++if test x$foundit = "xno";
+ then
+     AC_CHECK_HEADER(tcl8.4/tcl.h,
+     	GUIFLAGS="$GUIFLAGS -I/usr/include/tcl8.4";foundit=yes,)
+ fi
+-if test $foundit == "no";
++if test x$foundit = "xno";
+ then
+     AC_CHECK_HEADER(tcl8.3/tcl.h,
+     	GUIFLAGS="$GUIFLAGS -I/usr/include/tcl8.3";foundit=yes,)
+ fi
+-if test $foundit == "no";
++if test x$foundit = "xno";
+ then
+     AC_CHECK_HEADER(tcl8.2/tcl.h,
+     	GUIFLAGS="$GUIFLAGS -I/usr/include/tcl8.2";foundit=yes,)
+ fi
+-if test $foundit == "no";
++if test x$foundit = "xno";
+ then
+     echo no tcl header found
+     exit -1
+ fi
+ 
+-AC_CHECK_LIB(tcl8.7, main,,
+-    AC_CHECK_LIB(tcl8.6, main,,
+-	AC_CHECK_LIB(tcl8.5, 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(tk8.7, main,,
+-    AC_CHECK_LIB(tk8.6, main,,
+-	AC_CHECK_LIB(tk8.5, 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(tcl87, main,,
++    AC_CHECK_LIB(tcl86, main,,
++	AC_CHECK_LIB(tcl85, main,,
++	    AC_CHECK_LIB(tcl84, main,,
++		AC_CHECK_LIB(tcl83, main,,
++		    AC_CHECK_LIB(tcl82, main,,
++        		AC_CHECK_LIB(tcl80, main,,echo no tcl library found || exit 1)))))))
++
++AC_CHECK_LIB(tk87, main,,
++    AC_CHECK_LIB(tk86, main,,
++	AC_CHECK_LIB(tk85, main,,
++	    AC_CHECK_LIB(tk84, main,,
++		AC_CHECK_LIB(tk83, main,,
++		    AC_CHECK_LIB(tk82, main,,
++        		AC_CHECK_LIB(tk80, main,,echo no tk library found || exit 1)))))))
++
++
 +if test `uname -s` = FreeBSD;
 +then
 +    EXT=pd_freebsd
-+    MORECFLAGS="-DPA_USE_OSS -DPA_LITTLE_ENDIAN \
-+    	 -DUSEAPI_OSS \
-+        -I../portaudio/pa_common \
-+        -I../portaudio/pablio -I../portaudio/portmidi-macosx \
++    CPPFLAGS="-DDL_OPEN -DPA_USE_OSS -DUNIX -DUNISTD\
++    	-DUSEAPI_OSS \
++        -I../portaudio/pa_common -I../portaudio/pablio \
++        -I../portmidi/pm_common \
++        -I../portmidi/pm_linux \
 +	-Werror -fno-strict-aliasing"
++    LDFLAGS="-Wl,-export-dynamic"
 +    SYSSRC="s_audio_oss.c"
-+    if test x$portaudio == "xyes";
++    if test x$portaudio = "xyes";
 +    then
 +    	MORECFLAGS="-DUSEAPI_PORTAUDIO "$MORECFLAGS
 +	SYSSRC="s_audio_pa.c \
@@ -37,7 +137,6 @@
 +    GUINAME="pd-gui"
 +    OSNUMBER=0
 +fi
-+
+ 
  if test `uname -s` = Linux;
  then
-     dnl Ckecking for ALSA
diff -ruN pd.orig/files/patch-src_m_conf.c pd/files/patch-src_m_conf.c
--- pd.orig/files/patch-src_m_conf.c	Sat Mar 24 22:32:02 2007
+++ pd/files/patch-src_m_conf.c	Sun Mar 25 00:35:33 2007
@@ -11,7 +11,7 @@
  void x_misc_setup(void);
  void x_net_setup(void);
  void x_qlist_setup(void);
-@@ -78,7 +78,7 @@ void conf_init(void)
+@@ -79,7 +79,7 @@ void conf_init(void)
      x_connective_setup();
      x_time_setup();
      x_arithmetic_setup();
diff -ruN pd.orig/files/patch-src_m_glob.c pd/files/patch-src_m_glob.c
--- pd.orig/files/patch-src_m_glob.c	Sat Mar 24 22:32:02 2007
+++ pd/files/patch-src_m_glob.c	Sun Mar 25 00:41:15 2007
@@ -1,30 +1,36 @@
-$FreeBSD: ports/audio/pd/files/patch-src_m_glob.c,v 1.1 2003/11/12 00:55:19 trevor Exp $
+$FreeBSD$
 
---- src/m_glob.c.orig	Thu Jul 31 20:48:15 2003
-+++ src/m_glob.c	Tue Nov 11 22:43:27 2003
-@@ -21,8 +21,8 @@ void glob_finderror(t_pd *dummy);
+--- src/m_glob.c.orig	Sun Mar 25 00:37:25 2007
++++ src/m_glob.c	Sun Mar 25 00:38:40 2007
+@@ -21,9 +21,9 @@
  void glob_audio_properties(t_pd *dummy, t_floatarg flongform);
  void glob_audio_dialog(t_pd *dummy, t_symbol *s, int argc, t_atom *argv);
  void glob_audio_setapi(t_pd *dummy, t_floatarg f);
 -void glob_midi_properties(t_pd *dummy, t_floatarg flongform);
 -void glob_midi_dialog(t_pd *dummy, t_symbol *s, int argc, t_atom *argv);
+-void glob_midi_setapi(t_pd *dummy, t_floatarg f);
 +//void glob_midi_properties(t_pd *dummy, t_floatarg flongform);
 +//void glob_midi_dialog(t_pd *dummy, t_symbol *s, int argc, t_atom *argv);
++//void glob_midi_setapi(t_pd *dummy, t_floatarg f);
  void glob_start_path_dialog(t_pd *dummy, t_floatarg flongform);
  void glob_path_dialog(t_pd *dummy, t_symbol *s, int argc, t_atom *argv);
- void glob_ping(t_pd *dummy);
-@@ -89,10 +89,10 @@ void glob_init(void)
-     	gensym("audio-dialog"), A_GIMME, 0);
+ void glob_start_startup_dialog(t_pd *dummy, t_floatarg flongform);
+@@ -96,12 +96,12 @@
+         gensym("audio-dialog"), A_GIMME, 0);
      class_addmethod(glob_pdobject, (t_method)glob_audio_setapi,
-     	gensym("audio-setapi"), A_FLOAT, 0);
+         gensym("audio-setapi"), A_FLOAT, 0);
+-    class_addmethod(glob_pdobject, (t_method)glob_midi_setapi,
+-        gensym("midi-setapi"), A_FLOAT, 0);
 -    class_addmethod(glob_pdobject, (t_method)glob_midi_properties,
--    	gensym("midi-properties"), A_DEFFLOAT, 0);
+-        gensym("midi-properties"), A_DEFFLOAT, 0);
 -    class_addmethod(glob_pdobject, (t_method)glob_midi_dialog,
--    	gensym("midi-dialog"), A_GIMME, 0);
-+//    class_addmethod(glob_pdobject, (t_method)glob_midi_properties,
-+//    	gensym("midi-properties"), A_DEFFLOAT, 0);
-+//    class_addmethod(glob_pdobject, (t_method)glob_midi_dialog,
-+//    	gensym("midi-dialog"), A_GIMME, 0);
+-        gensym("midi-dialog"), A_GIMME, 0);
++    //    class_addmethod(glob_pdobject, (t_method)glob_midi_setapi,
++    //        gensym("midi-setapi"), A_FLOAT, 0);
++    //    class_addmethod(glob_pdobject, (t_method)glob_midi_properties,
++    //        gensym("midi-properties"), A_DEFFLOAT, 0);
++    //    class_addmethod(glob_pdobject, (t_method)glob_midi_dialog,
++    //        gensym("midi-dialog"), A_GIMME, 0);
      class_addmethod(glob_pdobject, (t_method)glob_start_path_dialog,
-     	gensym("start-path-dialog"), A_DEFFLOAT, 0);
+         gensym("start-path-dialog"), 0);
      class_addmethod(glob_pdobject, (t_method)glob_path_dialog,
diff -ruN pd.orig/files/patch-src_m_sched.c pd/files/patch-src_m_sched.c
--- pd.orig/files/patch-src_m_sched.c	Sat Mar 24 22:32:02 2007
+++ pd/files/patch-src_m_sched.c	Sun Mar 25 00:51:28 2007
@@ -1,8 +1,8 @@
 $FreeBSD: ports/audio/pd/files/patch-src_m_sched.c,v 1.1 2003/11/12 00:55:19 trevor Exp $
 
---- src/m_sched.c.orig	Wed Aug 27 18:02:19 2003
-+++ src/m_sched.c	Tue Nov 11 22:45:18 2003
-@@ -377,8 +377,8 @@ call.  This call returns true if samples
+--- src/m_sched.c.orig	Wed May 18 04:49:44 2005
++++ src/m_sched.c	Sun Mar 25 00:50:04 2007
+@@ -377,8 +377,8 @@
  the audio I/O system is still busy with previous transfers.
  */
  
@@ -11,32 +11,32 @@
 +//void sys_pollmidiqueue( void);
 +//void sys_initmidiqueue( void);
  
- int m_scheduler( void)
- {
-@@ -398,7 +398,7 @@ int m_scheduler( void)
-     	sys_sleepgrain = 100;
+  /* sys_idlehook is a hook the user can fill in to grab idle time.  Return
+ nonzero if you actually used the time; otherwise we're really really idle and
+@@ -402,7 +402,7 @@
+         sys_sleepgrain = 100;
      else if (sys_sleepgrain > 5000)
-     	sys_sleepgrain = 5000;
+         sys_sleepgrain = 5000;
 -    sys_initmidiqueue();
 +//    sys_initmidiqueue();
-     while (1)
+     while (!sys_quit)
      {
-     	int didsomething = 0;
-@@ -440,7 +440,7 @@ int m_scheduler( void)
-             	    timeforward = SENDDACS_YES;
-     	    else timeforward = SENDDACS_NO;
-     	}
--    	sys_setmiditimediff(0, 1e-6 * sys_schedadvance);
-+//    	sys_setmiditimediff(0, 1e-6 * sys_schedadvance);
-     	sys_addhist(1);
-     	if (timeforward != SENDDACS_NO)
- 	    sched_tick(sys_time + sys_time_per_dsp_tick);
-@@ -448,7 +448,7 @@ int m_scheduler( void)
- 	    didsomething = 1;
+         int didsomething = 0;
+@@ -454,7 +454,7 @@
+                     timeforward = SENDDACS_YES;
+             else timeforward = SENDDACS_NO;
+         }
+-        sys_setmiditimediff(0, 1e-6 * sys_schedadvance);
++//        sys_setmiditimediff(0, 1e-6 * sys_schedadvance);
+         sys_addhist(1);
+         if (timeforward != SENDDACS_NO)
+             sched_tick(sys_time + sys_time_per_dsp_tick);
+@@ -462,7 +462,7 @@
+             didsomething = 1;
  
-     	sys_addhist(2);
--    	sys_pollmidiqueue();
-+//    	sys_pollmidiqueue();
-     	if (sys_pollgui())
- 	{
- 	    if (!didsomething)
+         sys_addhist(2);
+-        sys_pollmidiqueue();
++//        sys_pollmidiqueue();
+         if (sys_pollgui())
+         {
+             if (!didsomething)
diff -ruN pd.orig/files/patch-src_s_file.c pd/files/patch-src_s_file.c
--- pd.orig/files/patch-src_s_file.c	Thu Jan  1 01:00:00 1970
+++ pd/files/patch-src_s_file.c	Sun Mar 25 01:48:23 2007
@@ -0,0 +1,39 @@
+--- src/s_file.c.orig	Sat Dec 31 21:08:37 2005
++++ src/s_file.c	Sun Mar 25 01:47:57 2007
+@@ -339,7 +339,7 @@
+             break;
+         nmidioutdev++;
+     }
+-    sys_open_midi(nmidiindev, midiindev, nmidioutdev, midioutdev, 0);
++//    sys_open_midi(nmidiindev, midiindev, nmidioutdev, midioutdev, 0);
+ 
+         /* search path */
+     if (sys_getpreference("npath", prefbuf, MAXPDSTRING))
+@@ -397,8 +397,8 @@
+     int naudiooutdev, audiooutdev[MAXAUDIOOUTDEV], choutdev[MAXAUDIOOUTDEV];
+     int i, rate, advance;
+     char buf1[MAXPDSTRING], buf2[MAXPDSTRING];
+-    int nmidiindev, midiindev[MAXMIDIINDEV];
+-    int nmidioutdev, midioutdev[MAXMIDIOUTDEV];
++//    int nmidiindev, midiindev[MAXMIDIINDEV];
++//    int nmidioutdev, midioutdev[MAXMIDIOUTDEV];
+ 
+     sys_initsavepreferences();
+ 
+@@ -431,7 +431,7 @@
+     sprintf(buf1, "%d", rate);
+     sys_putpreference("rate", buf1);
+ 
+-        /* MIDI settings */
++        /* MIDI settings
+     sys_get_midi_params(&nmidiindev, midiindev, &nmidioutdev, midioutdev);
+     sys_putpreference("nomidiin", (nmidiindev <= 0 ? "True" : "False"));
+     for (i = 0; i < nmidiindev; i++)
+@@ -447,6 +447,7 @@
+         sprintf(buf2, "%d", midioutdev[i]);
+         sys_putpreference(buf1, buf2);
+     }
++    */
+         /* file search path */
+ 
+     for (i = 0; 1; i++)
diff -ruN pd.orig/files/patch-src_s_inter.c pd/files/patch-src_s_inter.c
--- pd.orig/files/patch-src_s_inter.c	Sat Mar 24 22:32:02 2007
+++ pd/files/patch-src_s_inter.c	Sun Mar 25 13:03:47 2007
@@ -1,15 +1,32 @@
-$FreeBSD: ports/audio/pd/files/patch-src_s_inter.c,v 1.1 2003/11/12 00:55:19 trevor Exp $
-
---- src/s_inter.c.orig	Mon Jul 28 16:49:04 2003
-+++ src/s_inter.c	Tue Nov 11 22:46:26 2003
-@@ -893,8 +893,8 @@ void sys_bail(int n)
- #ifndef __linux  /* sys_close_audio() hangs if you're in a signal? */
- 	fprintf(stderr, "closing audio...\n");
-     	sys_close_audio();
--	fprintf(stderr, "closing MIDI...\n");
--	sys_close_midi();
-+//	fprintf(stderr, "closing MIDI...\n");
-+//	sys_close_midi();
- 	fprintf(stderr, "... done.\n");
+--- src/s_inter.c.orig	Tue Aug 15 07:03:09 2006
++++ src/s_inter.c	Sun Mar 25 13:03:16 2007
+@@ -831,7 +831,7 @@
+ 
+ static int sys_watchfd;
+ 
+-#ifdef __linux__
++#if defined(__linux__) || defined(__FreeBSD__)
+ void glob_watchdog(t_pd *dummy)
+ {
+     if (write(sys_watchfd, "\n", 1) < 1)
+@@ -1247,7 +1247,8 @@
+              sys_gui("pdtk_watchdog\n");
  #endif
- 	exit(1);
+          sys_get_audio_apis(buf);
+-         sys_get_midi_apis(buf2);
++//         sys_get_midi_apis(buf2);
++	 strcpy(buf2, "{}");
+          sys_vgui("pdtk_pd_startup {%s} %s %s {%s}\n", pd_version, buf, buf2,
+                                   sys_font); 
+     }
+@@ -1269,8 +1270,8 @@
+ #ifndef __linux__  /* sys_close_audio() hangs if you're in a signal? */
+         fprintf(stderr, "closing audio...\n");
+         sys_close_audio();
+-        fprintf(stderr, "closing MIDI...\n");
+-        sys_close_midi();
++//      fprintf(stderr, "closing MIDI...\n");
++//      sys_close_midi();
+         fprintf(stderr, "... done.\n");
+ #endif
+         exit(n);
diff -ruN pd.orig/files/patch-src_s_main.c pd/files/patch-src_s_main.c
--- pd.orig/files/patch-src_s_main.c	Sat Mar 24 22:32:02 2007
+++ pd/files/patch-src_s_main.c	Sun Mar 25 19:47:48 2007
@@ -1,15 +1,47 @@
-$FreeBSD: ports/audio/pd/files/patch-src_s_main.c,v 1.1 2003/11/12 00:55:19 trevor Exp $
-
---- src/s_main.c.orig	Wed Oct 29 20:38:54 2003
-+++ src/s_main.c	Tue Nov 11 22:45:46 2003
-@@ -253,8 +253,8 @@ int sys_main(int argc, char **argv)
-     if (sys_startgui(sys_guidir->s_name))	/* start the gui */
-     	return(1);
-     	    /* open audio and MIDI */
--    sys_open_midi(sys_nmidiin, sys_midiindevlist,
--    	sys_nmidiout, sys_midioutdevlist);
-+//    sys_open_midi(sys_nmidiin, sys_midiindevlist,
-+//    	sys_nmidiout, sys_midioutdevlist);
-     sys_open_audio(sys_nsoundin, sys_soundindevlist, sys_nchin, sys_chinlist,
-     	sys_nsoundout, sys_soundoutdevlist, sys_nchout, sys_choutlist,
- 	    sys_main_srate, sys_main_advance, 1);
+--- src/s_main.c.orig	Wed Sep 27 19:22:35 2006
++++ src/s_main.c	Sun Mar 25 19:47:12 2007
+@@ -310,7 +310,7 @@
+     else
+     {
+             /* open audio and MIDI */
+-        sys_reopen_midi();
++//      sys_reopen_midi();
+         sys_reopen_audio();
+             /* run scheduler until it quits */
+         return (m_scheduler());
+@@ -635,7 +635,7 @@
+         }
+         else if (!strcmp(*argv, "-alsamidi"))
+         {
+-          sys_set_midi_api(API_ALSA);
++//          sys_set_midi_api(API_ALSA);
+             argc--; argv++;
+         }
+ #endif
+@@ -904,7 +904,7 @@
+             /* add "doc/5.reference" library to helppath */
+     strncpy(sbuf, sys_libdir->s_name, MAXPDSTRING-30);
+     sbuf[MAXPDSTRING-30] = 0;
+-    strcat(sbuf, "/doc/5.reference");
++    strcat(sbuf, "/share/doc/pd/5.reference");
+     sys_helppath = namelist_append_files(sys_helppath, sbuf);
+         /* correct to make audio and MIDI device lists zero based.  On
+         MMIO, however, "1" really means the second device (the first one
+@@ -957,7 +957,7 @@
+         for (i = 0; i < naudiooutdev; i++)
+             audiooutdev[i] = sys_soundoutdevlist[i];
+     }
+-    sys_get_midi_params(&nmidiindev, midiindev, &nmidioutdev, midioutdev);
++//    sys_get_midi_params(&nmidiindev, midiindev, &nmidioutdev, midioutdev);
+     if (sys_nmidiin >= 0)
+     {
+         post("sys_nmidiin %d, nmidiindev %d", sys_nmidiin, nmidiindev);
+@@ -977,7 +977,7 @@
+         rate = sys_main_srate;
+     sys_open_audio(naudioindev, audioindev, nchindev, chindev,
+         naudiooutdev, audiooutdev, nchoutdev, choutdev, rate, advance, 0);
+-    sys_open_midi(nmidiindev, midiindev, nmidioutdev, midioutdev, 0);
++//    sys_open_midi(nmidiindev, midiindev, nmidioutdev, midioutdev, 0);
+ }
+ 
+ static void sys_addreferencepath(void)
diff -ruN pd.orig/files/patch-src_t_main.c pd/files/patch-src_t_main.c
--- pd.orig/files/patch-src_t_main.c	Sat Mar 24 22:32:02 2007
+++ pd/files/patch-src_t_main.c	Thu Jan  1 01:00:00 1970
@@ -1,17 +0,0 @@
---- src/t_main.c.orig	Sun Feb 13 00:32:01 2005
-+++ src/t_main.c	Sun Feb 13 00:32:11 2005
-@@ -19,14 +19,6 @@
- #include <stdlib.h>
- 
- /*
-- * The following variable is a special hack that is needed in order for
-- * Sun shared libraries to be used for Tcl.
-- */
--
--extern int matherr(void);
--int *tclDummyMathPtr = (int *) matherr;
--
--/*
-  *----------------------------------------------------------------------
-  *
-  * main --
diff -ruN pd.orig/files/patch-src_t_tkcmd.c pd/files/patch-src_t_tkcmd.c
--- pd.orig/files/patch-src_t_tkcmd.c	Thu Jan  1 01:00:00 1970
+++ pd/files/patch-src_t_tkcmd.c	Sun Mar 25 12:13:06 2007
@@ -0,0 +1,13 @@
+--- src/t_tkcmd.c.orig	Sat Dec 31 21:08:37 2005
++++ src/t_tkcmd.c	Sun Mar 25 12:12:15 2007
+@@ -50,6 +50,10 @@
+ #define STARTGUI
+ #endif
+ 
++#ifdef __FreeBSD__
++#define STARTGUI
++#endif
++
+ #define FIRSTPORTNUM 5600
+ 
+ void tcl_mess(char *s);
diff -ruN pd.orig/files/patch-src_u_main.tk pd/files/patch-src_u_main.tk
--- pd.orig/files/patch-src_u_main.tk	Thu Jan  1 01:00:00 1970
+++ pd/files/patch-src_u_main.tk	Sun Mar 25 22:15:51 2007
@@ -0,0 +1,45 @@
+--- src/u_main.tk.orig	Sun Oct  8 20:04:07 2006
++++ src/u_main.tk	Sun Mar 25 22:15:29 2007
+@@ -91,7 +91,7 @@
+ 
+ set pd_deffont {courier 12 bold}
+ 
+-set help_top_directory $pd_guidir/doc
++set help_top_directory $pd_guidir/share/doc/pd
+ 
+ # 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
+@@ -513,9 +513,9 @@
+          }
+          
+     $mbar.audio add command -label {Test Audio and MIDI} \
+-        -command {menu_doc_open doc/7.stuff/tools testtone.pd} 
++        -command {menu_doc_open share/doc/pd/7.stuff/tools testtone.pd} 
+     $mbar.audio add command -label {Load Meter} \
+-        -command {menu_doc_open doc/7.stuff/tools load-meter.pd} 
++        -command {menu_doc_open share/doc/pd/7.stuff/tools load-meter.pd} 
+ 
+ #       the MacOS X app menu
+ 
+@@ -526,7 +526,7 @@
+ # See SPECIAL MENUS IN MENUBARS http://www.tcl.tk/man/tcl8.4/TkCmd/menu.htm
+          if {$pd_nt == 2} {
+                   $mbar.apple add command -label "About Pd..." -command \
+-                                {menu_doc_open doc/1.manual 1.introduction.txt} 
++                                {menu_doc_open share/doc/pd/1.manual 1.introduction.txt} 
+                   menu $mbar.apple.preferences -tearoff 0
+                   $mbar.apple add cascade -label "Preferences" -menu $mbar.apple.preferences
+                   $mbar.apple.preferences add command -label "Path..." \
+@@ -543,10 +543,10 @@
+         # the "Help" menu
+     if {$pd_nt != 2} {
+         $mbar.help add command -label {About Pd} \
+-            -command {menu_doc_open doc/1.manual 1.introduction.txt} 
++            -command {menu_doc_open share/doc/pd/1.manual 1.introduction.txt} 
+     }
+     $mbar.help add command -label {Html ...} \
+-        -command {menu_doc_open doc/1.manual index.htm} 
++        -command {menu_doc_open share/doc/pd/1.manual index.htm} 
+     $mbar.help add command -label {Browser ...} \
+         -command {menu_doc_browser $help_top_directory} 
+ }
diff -ruN pd.orig/files/patch-src_x_list.c pd/files/patch-src_x_list.c
--- pd.orig/files/patch-src_x_list.c	Thu Jan  1 01:00:00 1970
+++ pd/files/patch-src_x_list.c	Sun Mar 25 01:35:07 2007
@@ -0,0 +1,12 @@
+--- src/x_list.c.orig	Fri Nov  3 05:22:20 2006
++++ src/x_list.c	Sun Mar 25 01:34:15 2007
+@@ -7,7 +7,8 @@
+ #ifdef MSW
+ #include <malloc.h>
+ #else
+-#include <alloca.h>
++#include <stdlib.h>
++/*#include <alloca.h>*/
+ #endif
+ 
+ extern t_pd *newest;

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list