diff options
author | joerg <joerg> | 2005-10-03 13:30:20 +0000 |
---|---|---|
committer | joerg <joerg> | 2005-10-03 13:30:20 +0000 |
commit | 9bbd51482755531258ab0b3b2ad528c13fe2f7af (patch) | |
tree | 8e478741ecff35f9177d953cbec34485427c92a9 /audio/xwave | |
parent | c5a253039b4d486abda896b07932922facfb2601 (diff) | |
download | pkgsrc-9bbd51482755531258ab0b3b2ad528c13fe2f7af.tar.gz |
Allow this to build on DragonFly. Remove a nested extern for errno, GCC
complains about it anyway.
Diffstat (limited to 'audio/xwave')
-rw-r--r-- | audio/xwave/distinfo | 6 | ||||
-rw-r--r-- | audio/xwave/patches/patch-ad | 78 | ||||
-rw-r--r-- | audio/xwave/patches/patch-as | 13 | ||||
-rw-r--r-- | audio/xwave/patches/patch-at | 12 |
4 files changed, 70 insertions, 39 deletions
diff --git a/audio/xwave/distinfo b/audio/xwave/distinfo index 5bb543ee8f9..74151bb0101 100644 --- a/audio/xwave/distinfo +++ b/audio/xwave/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.7 2005/02/23 20:39:56 agc Exp $ +$NetBSD: distinfo,v 1.8 2005/10/03 13:30:20 joerg Exp $ SHA1 (xwave2.tar.gz) = 7ace9911c9425eab4907a34694cd208d21a6dac2 RMD160 (xwave2.tar.gz) = 71df0bc4640be385c33ea3a2525bc7287741d9ab @@ -6,7 +6,7 @@ Size (xwave2.tar.gz) = 269942 bytes SHA1 (patch-aa) = 934f1818bc09fb8b6ccea1ec921fac95a460098f SHA1 (patch-ab) = 28801c1e4722275b599e9035e65136b9cc25215d SHA1 (patch-ac) = ae802fc9d4f882089496f41cc7b06412ae9ddf62 -SHA1 (patch-ad) = 373a8b9aff67f768e4968c349298f74d0d3deb5f +SHA1 (patch-ad) = 87638e7555fe3d855f0972bef0942a9dcc90f535 SHA1 (patch-ae) = 9b4fed9bb232334f2fcaaf59db152d1b078f3702 SHA1 (patch-af) = 01d5fdad2c7056252ab64c49d9ebb06c7b5fbf6c SHA1 (patch-ag) = f06b4eecf0eafc985077fa2c356cd4c0e88cfe15 @@ -21,3 +21,5 @@ SHA1 (patch-ao) = 3cf9f51939be5f02ad423d79103e7faeab13a3fd SHA1 (patch-ap) = 7a06de821da92a2d388939fdcaf7618a0a7f96ba SHA1 (patch-aq) = 62164a6a788190b5cce231bfadf5d7e0a22ee0d1 SHA1 (patch-ar) = 22874069ef6de212d3f13302e649be06d03760a9 +SHA1 (patch-as) = 71bfcb6ebf047e01d08ba9d9b091e506943aa944 +SHA1 (patch-at) = 91c193a56a9f50620d832aa37b54ae40688cd582 diff --git a/audio/xwave/patches/patch-ad b/audio/xwave/patches/patch-ad index 582516e9ad7..963284a2158 100644 --- a/audio/xwave/patches/patch-ad +++ b/audio/xwave/patches/patch-ad @@ -1,9 +1,13 @@ -$NetBSD: patch-ad,v 1.2 1998/08/07 10:36:23 agc Exp $ +$NetBSD: patch-ad,v 1.3 2005/10/03 13:30:20 joerg Exp $ --- orig/xwave/src/audio.c Tue Nov 26 11:13:44 1996 +++ src/audio.c Fri Feb 20 23:46:06 1998 -@@ -40,6 +40,9 @@ - #elif defined(FreeBSD) +@@ -37,9 +37,12 @@ + #ifdef linux + #include <linux/soundcard.h> + +-#elif defined(FreeBSD) ++#elif defined(FreeBSD) || defined(__DragonFly__) #include <machine/soundcard.h> +#elif defined(__NetBSD__) @@ -17,20 +21,20 @@ $NetBSD: patch-ad,v 1.2 1998/08/07 10:36:23 agc Exp $ #include "audio.h" -#if defined(linux) || defined (FreeBSD) || defined(sun) -+#if defined(linux) || defined (FreeBSD) || defined(sun) || defined(__NetBSD__) ++#if defined(linux) || defined (FreeBSD) || defined(sun) || defined(__NetBSD__) || defined(__DragonFly__) static int set_dsp(int o_mode,int res,int channels,int freq,int *buf_size); #endif -@@ -67,7 +70,7 @@ +@@ -67,7 +70,7 @@ extern AppResources app_resources; static Audio_File af; static int stop_record; -#if defined (linux) || defined (FreeBSD) -+#if defined (linux) || defined (FreeBSD) || defined(__NetBSD__) ++#if defined (linux) || defined (FreeBSD) || defined(__NetBSD__) || defined(__DragonFly__) int set_dsp(int o_mode,int res, int channels, int freq, int *buf_size) { int check; -@@ -274,7 +277,7 @@ +@@ -274,7 +277,7 @@ int get_samples(byte* audio_buffer,int m } #endif @@ -39,7 +43,7 @@ $NetBSD: patch-ad,v 1.2 1998/08/07 10:36:23 agc Exp $ void check_audio(Main_Bool *mb) /* test if there is a play device, and how fast we can play */ { -@@ -307,7 +310,7 @@ +@@ -307,7 +310,7 @@ void check_audio(Main_Bool *mb) case AUDIO_ENCODING_LINEAR: printf("ULAW\n");break; default: @@ -48,16 +52,16 @@ $NetBSD: patch-ad,v 1.2 1998/08/07 10:36:23 agc Exp $ } close(audio); } else { -@@ -370,7 +373,7 @@ +@@ -370,7 +373,7 @@ int get_samples(byte* audio_buffer,int m void play_file(char *fname,Main_Bool *mb) { -#if defined (linux) || defined (FreeBSD) || defined (sun) -+#if defined (linux) || defined (FreeBSD) || defined (sun) || defined(__NetBSD__) ++#if defined (linux) || defined (FreeBSD) || defined (sun) || defined(__NetBSD__) || defined(__DragonFly__) int audio; #elif defined(sgi) ALport port; -@@ -384,7 +387,7 @@ +@@ -384,7 +387,7 @@ void play_file(char *fname,Main_Bool *mb return; } @@ -66,120 +70,120 @@ $NetBSD: patch-ad,v 1.2 1998/08/07 10:36:23 agc Exp $ if ((audio=set_dsp(O_WRONLY,af.bps,af.channels,af.freq,&buf_size))==-1) { fprintf(stderr,"XWave: Error ! Cannot set dsp !\n"); close(af.fd); -@@ -404,7 +407,7 @@ +@@ -404,7 +407,7 @@ void play_file(char *fname,Main_Bool *mb if ((buffer=malloc(buf_size))==NULL) { fprintf(stderr,"XWave: Error ! Cannot alloc mem !\n"); close(af.fd); -#if defined (linux) || defined (FreeBSD) || defined (sun) -+#if defined (linux) || defined (FreeBSD) || defined (sun) || defined(__NetBSD__) ++#if defined (linux) || defined (FreeBSD) || defined (sun) || defined(__NetBSD__) || defined(__DragonFly__) close(audio); #elif defined(sgi) ALcloseport(port); -@@ -413,7 +416,7 @@ +@@ -413,7 +416,7 @@ void play_file(char *fname,Main_Bool *mb return; } -#if defined (linux) || defined (FreeBSD) || defined (sun) -+#if defined (linux) || defined (FreeBSD) || defined (sun) || defined(__NetBSD__) ++#if defined (linux) || defined (FreeBSD) || defined (sun) || defined(__NetBSD__) || defined(__DragonFly__) while ((length=af_read(af,buffer,buf_size))>0) { if (write(audio, buffer, length)==-1) break; } -@@ -440,7 +443,7 @@ +@@ -440,7 +443,7 @@ void play_buffer(Main_Data *md) int offset=0,playlength,length; #ifdef sgi ALport port; -#elif defined(linux) || defined (FreeBSD) || defined (sun) -+#elif defined(linux) || defined (FreeBSD) || defined (sun) || defined(__NetBSD__) ++#elif defined(linux) || defined (FreeBSD) || defined (sun) || defined(__NetBSD__) || defined(__DragonFly__) int audio; if ((audio=set_dsp(O_WRONLY,wd->res,wd->channels,wd->freq,&buf_size))==-1) { -@@ -473,7 +476,7 @@ +@@ -473,7 +476,7 @@ void play_buffer(Main_Data *md) buffer=wd->buffer+offset; while (playlength>0) { if (playlength<buf_size) buf_size=playlength; -#if defined (linux) || defined (FreeBSD) || defined (sun) -+#if defined (linux) || defined (FreeBSD) || defined (sun) || defined(__NetBSD__) ++#if defined (linux) || defined (FreeBSD) || defined (sun) || defined(__NetBSD__) || defined(__DragonFly__) if (write(audio, buffer, buf_size)==-1) { close(audio); kill((pid_t) getppid(),SIGUSR1); -@@ -497,7 +500,7 @@ +@@ -497,7 +500,7 @@ void play_buffer(Main_Data *md) wd2af(wd,&af); af_rewind(af); if (af_seek(af,offset,SEEK_CUR)==AF_ERROR) { -#if defined (linux) || defined (FreeBSD) || defined (sun) -+#if defined (linux) || defined (FreeBSD) || defined (sun) || defined(__NetBSD__) ++#if defined (linux) || defined (FreeBSD) || defined (sun) || defined(__NetBSD__) || defined(__DragonFly__) close(audio); #elif defined(sgi) ALcloseport(port); -@@ -510,7 +513,7 @@ +@@ -510,7 +513,7 @@ void play_buffer(Main_Data *md) while (playlength>0) { if (playlength<buf_size) buf_size=playlength; if ((length=af_read(af,(char*) md->mg->fbuf,buf_size))==-1) { -#if defined (linux) || defined (FreeBSD) || defined (sun) -+#if defined (linux) || defined (FreeBSD) || defined (sun) || defined(__NetBSD__) ++#if defined (linux) || defined (FreeBSD) || defined (sun) || defined(__NetBSD__) || defined(__DragonFly__) close(audio); #elif defined(sgi) ALcloseport(port); -@@ -518,7 +521,7 @@ +@@ -518,7 +521,7 @@ void play_buffer(Main_Data *md) kill((pid_t) getppid(),SIGUSR1); return; } -#if defined (linux) || defined (FreeBSD) || defined (sun) -+#if defined (linux) || defined (FreeBSD) || defined (sun) || defined(__NetBSD__) ++#if defined (linux) || defined (FreeBSD) || defined (sun) || defined(__NetBSD__) || defined(__DragonFly__) if (write(audio,(char*) md->mg->fbuf,length)==-1) { close(audio); kill((pid_t) getppid(),SIGUSR1); -@@ -536,7 +539,7 @@ +@@ -536,7 +539,7 @@ void play_buffer(Main_Data *md) } } -#if defined (linux) || defined (FreeBSD) || defined (sun) -+#if defined (linux) || defined (FreeBSD) || defined (sun) || defined(__NetBSD__) ++#if defined (linux) || defined (FreeBSD) || defined (sun) || defined(__NetBSD__) || defined(__DragonFly__) close(audio); #elif defined(sgi) while (ALgetfilled(port)) sginap(2); -@@ -556,7 +559,7 @@ +@@ -556,7 +559,7 @@ void rec_file(byte res,byte mode,int fre void write_length(); byte *data=NULL; int abuf_size,count; -#if defined (linux) || defined (FreeBSD) || defined (sun) -+#if defined (linux) || defined (FreeBSD) || defined (sun) || defined(__NetBSD__) ++#if defined (linux) || defined (FreeBSD) || defined (sun) || defined(__NetBSD__) || defined(__DragonFly__) int audio; if ((audio=set_dsp(O_RDONLY,res,mode,freq,&abuf_size))==-1) { -@@ -577,7 +580,7 @@ +@@ -577,7 +580,7 @@ void rec_file(byte res,byte mode,int fre if ((data = (byte *) malloc(abuf_size)) == NULL) { fprintf(stderr,"XWave: Error while alloc mem for audio_buffer !\n"); -#if defined (linux) || defined (FreeBSD) || defined (sun) -+#if defined (linux) || defined (FreeBSD) || defined (sun) || defined(__NetBSD__) ++#if defined (linux) || defined (FreeBSD) || defined (sun) || defined(__NetBSD__) || defined(__DragonFly__) close(audio); #elif defined(sgi) ALcloseport(port); -@@ -595,7 +598,7 @@ +@@ -595,7 +598,7 @@ void rec_file(byte res,byte mode,int fre if (af_open(fname,&af,AF_NEW)==AF_ERROR) { free(data); -#if defined (linux) || defined (FreeBSD) || defined (sun) -+#if defined (linux) || defined (FreeBSD) || defined (sun) || defined(__NetBSD__) ++#if defined (linux) || defined (FreeBSD) || defined (sun) || defined(__NetBSD__) || defined(__DragonFly__) close(audio); #elif defined(sgi) ALcloseport(port); -@@ -608,7 +611,7 @@ +@@ -608,7 +611,7 @@ void rec_file(byte res,byte mode,int fre signal(SIGUSR1,write_length); while(1) { -#if defined (linux) || defined (FreeBSD) || defined (sun) -+#if defined (linux) || defined (FreeBSD) || defined (sun) || defined(__NetBSD__) ++#if defined (linux) || defined (FreeBSD) || defined (sun) || defined(__NetBSD__) || defined(__DragonFly__) if ((count=read(audio, data, abuf_size))==-1) { close(audio); af_close(af); -@@ -632,7 +635,7 @@ +@@ -632,7 +635,7 @@ void rec_file(byte res,byte mode,int fre return; } if ((count=af_write(af,(char*)data,count))==AF_ERROR) { -#if defined (linux) || defined (FreeBSD) || defined (sun) -+#if defined (linux) || defined (FreeBSD) || defined (sun) || defined(__NetBSD__) ++#if defined (linux) || defined (FreeBSD) || defined (sun) || defined(__NetBSD__) || defined(__DragonFly__) close(audio); #elif defined(sgi) ALcloseport(port); diff --git a/audio/xwave/patches/patch-as b/audio/xwave/patches/patch-as new file mode 100644 index 00000000000..57845942c8d --- /dev/null +++ b/audio/xwave/patches/patch-as @@ -0,0 +1,13 @@ +$NetBSD: patch-as,v 1.1 2005/10/03 13:30:20 joerg Exp $ + +--- src/types.h.orig 2005-07-22 18:54:48.000000000 +0000 ++++ src/types.h +@@ -27,7 +27,7 @@ + typedef unsigned char byte; + typedef byte bool; + +-#ifdef FreeBSD ++#if defined(FreeBSD) || defined(__DragonFly__) + typedef unsigned long ulong; + #endif + diff --git a/audio/xwave/patches/patch-at b/audio/xwave/patches/patch-at new file mode 100644 index 00000000000..722913de3f3 --- /dev/null +++ b/audio/xwave/patches/patch-at @@ -0,0 +1,12 @@ +$NetBSD: patch-at,v 1.1 2005/10/03 13:30:20 joerg Exp $ + +--- src/misc.c.orig 2005-07-22 18:59:34.000000000 +0000 ++++ src/misc.c +@@ -294,7 +294,6 @@ char *get_wd(void) + { + static char *name; + int i=MAX_NAMELENGTH; +- extern int errno; + + while(True) { + if ((name=calloc(i,1))==NULL) return(NULL); |