Package: coolmail Severity: important Tags: patch Hi,
currently your package FTBFS on GNU/kFreeBSD with the following error: > make[1]: Entering directory `/build/buildd/coolmail-1.3' > cc -O2 -g -DAUDIO -DSUPPORT_MAILDIR -I/usr/X11R6/include coolmail.c -c > cc -O2 -g -DAUDIO -DSUPPORT_MAILDIR -I/usr/X11R6/include > system/X11/display_list.c -c > cc -O2 -g -DAUDIO -DSUPPORT_MAILDIR -I/usr/X11R6/include render1.c -c > cc -O2 -g -DAUDIO -DSUPPORT_MAILDIR -I/usr/X11R6/include system/X11/colors.c > -c > cc -O2 -g -DAUDIO -DSUPPORT_MAILDIR -I/usr/X11R6/include audio.c -c > audio.c:95:25: error: sun/audioio.h: No such file or directory > audio.c: In function 'audio_beep': > audio.c:124: error: 'audio_info_t' undeclared (first use in this function) > audio.c:124: error: (Each undeclared identifier is reported only once > audio.c:124: error: for each function it appears in.) > audio.c:124: error: expected ';' before 'ais' > audio.c:159: error: 'AUDIO_GETINFO' undeclared (first use in this function) > audio.c:159: error: 'ais' undeclared (first use in this function) > audio.c:166: error: 'AUDIO_SETINFO' undeclared (first use in this function) > make[1]: *** [audio.o] Error 1 > make[1]: Leaving directory `/build/buildd/coolmail-1.3' > make: *** [build-stamp] Error 2 Full build logs are available at <http://experimental.ftbfs.de/build.php?arch=kfreebsd-i386&pkg=coolmail>. Please find attached a patch to fix this, by adding a test case (at several locations) for GNU/kFreeBSD, so that the job is done in a similar way as for GNU/Linux, except for the included header. Cheers, -- Cyril Brulebois
--- coolmail-1.3/audio.c 2007-03-11 02:16:34.288633000 +0100 +++ coolmail-1.3/audio.c 2007-03-11 02:22:57.000000000 +0100 @@ -63,8 +63,13 @@ u_32 channels; /* number of interleaved channels */ } Audio_filehdr; -#ifdef linux +#if defined(linux) || defined(__FreeBSD_kernel__) + +#if defined(linux) #include <linux/soundcard.h> +#else +#include <sys/soundcard.h> +#endif #define DEV_MIXER "/dev/mixer" #define MAX_VOLUME 100 @@ -101,7 +106,7 @@ #define CLOSE_FD(afd) { if (afd > -1) close(afd); afd = -1; } -#ifdef linux +#if defined(linux) || defined(__FreeBSD_kernel__) #define INIT_FD { audiofd = filefd = mixer_fd = -1; } #define END_FD { CLOSE_FD(audiofd); CLOSE_FD(filefd); CLOSE_FD(mixer_fd); return; } #else @@ -117,7 +122,7 @@ unsigned char buf[256]; Audio_filehdr *au_hdr; -#ifdef linux +#if defined(linux) || defined(__FreeBSD_kernel__) StereoVolume origVol, volume; int mixer_fd; #else @@ -136,7 +141,7 @@ "Coolmail"); END_FD; } -#ifdef linux +#if defined(linux) || defined(__FreeBSD_kernel__) if ( (mixer_fd=open(DEV_MIXER, O_RDWR, 0)) < 0 ) { fprintf(stderr, "Can't open %s: ", DEV_MIXER); END_FD; @@ -189,7 +194,7 @@ /* Strip the header */ au_hdr = (Audio_filehdr *)buf; -#ifdef linux +#if defined(linux) || defined(__FreeBSD_kernel__) rn = ntohl(au_hdr->hdr_size) - sizeof(Audio_filehdr); #else rn = au_hdr->hdr_size - sizeof(Audio_filehdr); @@ -221,7 +226,7 @@ usleep(1000); } } -#ifdef linux +#if defined(linux) || defined(__FreeBSD_kernel__) CLOSE_FD(audiofd); if ( ioctl(mixer_fd, MIXER_WRITE(SOUND_MIXER_VOLUME), &origVol) < 0 ) {