diff options
author | kris <kris@FreeBSD.org> | 2002-09-08 18:22:25 +0800 |
---|---|---|
committer | kris <kris@FreeBSD.org> | 2002-09-08 18:22:25 +0800 |
commit | f5d490860d604b7f63137d7a31af6a38c380100b (patch) | |
tree | 169af3309bdafdee8e7dbfd84876b0e8f0541d14 | |
parent | d4ff816c9b3a1f3f811e252e71ca06423e47fa5b (diff) | |
download | freebsd-ports-gnome-f5d490860d604b7f63137d7a31af6a38c380100b.tar.gz freebsd-ports-gnome-f5d490860d604b7f63137d7a31af6a38c380100b.tar.zst freebsd-ports-gnome-f5d490860d604b7f63137d7a31af6a38c380100b.zip |
Fix build on -current (machine/soundcard.h -> sys/soundcard.h)
-rw-r--r-- | audio/xmradio/files/patch-ab | 11 | ||||
-rw-r--r-- | audio/xmradio/files/patch-ac | 11 | ||||
-rw-r--r-- | audio/xmradio/files/patch-ad | 26 | ||||
-rw-r--r-- | emulators/xsystem35/files/patch-src::audio_oss.c | 13 | ||||
-rw-r--r-- | emulators/xsystem35/files/patch-src::midi.rawmidi.c | 13 | ||||
-rw-r--r-- | emulators/xsystem35/files/patch-src::mixer_oss.c | 13 | ||||
-rw-r--r-- | mail/xpbiff-youbin/files/patch-aa | 344 | ||||
-rw-r--r-- | mail/xpbiff/files/patch-ac | 8 |
8 files changed, 434 insertions, 5 deletions
diff --git a/audio/xmradio/files/patch-ab b/audio/xmradio/files/patch-ab new file mode 100644 index 000000000000..d113d268966e --- /dev/null +++ b/audio/xmradio/files/patch-ab @@ -0,0 +1,11 @@ +--- sample.c.orig Sun Sep 8 03:00:57 2002 ++++ sample.c Sun Sep 8 03:01:20 2002 +@@ -43,7 +43,7 @@ + #ifdef __NetBSD__ + #include <soundcard.h> + #else +-#ifdef linux ++#if defined(linux) || defined(__FreeBSD__) + #include <sys/soundcard.h> + #else + #include <machine/soundcard.h> diff --git a/audio/xmradio/files/patch-ac b/audio/xmradio/files/patch-ac new file mode 100644 index 000000000000..bb46481553a8 --- /dev/null +++ b/audio/xmradio/files/patch-ac @@ -0,0 +1,11 @@ +--- analyzer.c.orig Sun Sep 8 03:00:48 2002 ++++ analyzer.c Sun Sep 8 03:01:47 2002 +@@ -37,7 +37,7 @@ + #include <soundcard.h> + #include <sys/ioctl.h> + #else +-#ifdef linux ++#if defined(linux) || defined(__FreeBSD__) + #include <sys/soundcard.h> + #else + #include <machine/soundcard.h> diff --git a/audio/xmradio/files/patch-ad b/audio/xmradio/files/patch-ad new file mode 100644 index 000000000000..52f2c3c2d485 --- /dev/null +++ b/audio/xmradio/files/patch-ad @@ -0,0 +1,26 @@ +--- radio.c.orig Tue Nov 27 13:30:42 2001 ++++ radio.c Sun Sep 8 03:13:58 2002 +@@ -63,17 +63,17 @@ + #ifdef __NetBSD__ + #include <dev/ic/bt8xx.h> + #include <soundcard.h> +-#else +-#ifdef linux ++#elif defined(linux) + #include <linux/bttv.h> + #include <sys/soundcard.h> +-#else ++#elif defined(__FreeBSD__) ++#include <sys/soundcard.h> + #include <machine/ioctl_bt848.h> +-#ifdef JUHA_DRIVER +-#include <machine/ioctl_tuner.h> +-#endif ++#else + #include <machine/soundcard.h> + #endif ++#ifdef JUHA_DRIVER ++#include <machine/ioctl_tuner.h> + #endif + + #include <X11/X.h> diff --git a/emulators/xsystem35/files/patch-src::audio_oss.c b/emulators/xsystem35/files/patch-src::audio_oss.c new file mode 100644 index 000000000000..cc15840892c9 --- /dev/null +++ b/emulators/xsystem35/files/patch-src::audio_oss.c @@ -0,0 +1,13 @@ +--- ./src/audio_oss.c.orig Sun Sep 8 03:18:56 2002 ++++ ./src/audio_oss.c Sun Sep 8 03:19:06 2002 +@@ -33,9 +33,7 @@ + #include <sys/types.h> + #include <sys/stat.h> + #include <sys/ioctl.h> +-#if defined(__FreeBSD__) +-#include <machine/soundcard.h> +-#elif defined(__OpenBSD__) || defined(__NetBSD__) ++#if defined(__OpenBSD__) || defined(__NetBSD__) + #include <soundcard.h> + #else + #include <sys/soundcard.h> diff --git a/emulators/xsystem35/files/patch-src::midi.rawmidi.c b/emulators/xsystem35/files/patch-src::midi.rawmidi.c new file mode 100644 index 000000000000..907e2e820731 --- /dev/null +++ b/emulators/xsystem35/files/patch-src::midi.rawmidi.c @@ -0,0 +1,13 @@ +--- ./src/midi.rawmidi.c.orig Sun Sep 8 03:19:30 2002 ++++ ./src/midi.rawmidi.c Sun Sep 8 03:20:02 2002 +@@ -39,9 +39,7 @@ + #include <fcntl.h> + + #ifdef ENABLE_MIDI_SEQMIDI +-#if defined(__FreeBSD__) +-#include <machine/soundcard.h> +-#elif defined(__OpenBSD__) || defined(__NetBSD__) ++#if defined(__OpenBSD__) || defined(__NetBSD__) + #include <soundcard.h> + #else + #include <sys/soundcard.h> diff --git a/emulators/xsystem35/files/patch-src::mixer_oss.c b/emulators/xsystem35/files/patch-src::mixer_oss.c new file mode 100644 index 000000000000..c17bc77102b0 --- /dev/null +++ b/emulators/xsystem35/files/patch-src::mixer_oss.c @@ -0,0 +1,13 @@ +--- ./src/mixer_oss.c.orig Sun Sep 8 03:19:34 2002 ++++ ./src/mixer_oss.c Sun Sep 8 03:19:40 2002 +@@ -33,9 +33,7 @@ + #include <sys/types.h> + #include <sys/stat.h> + #include <sys/ioctl.h> +-#if defined(__FreeBSD__) +-#include <machine/soundcard.h> +-#elif defined(__OpenBSD__) || defined(__NetBSD__) ++#if defined(__OpenBSD__) || defined(__NetBSD__) + #include <soundcard.h> + #else + #include <sys/soundcard.h> diff --git a/mail/xpbiff-youbin/files/patch-aa b/mail/xpbiff-youbin/files/patch-aa new file mode 100644 index 000000000000..aa4c1ddf0b96 --- /dev/null +++ b/mail/xpbiff-youbin/files/patch-aa @@ -0,0 +1,344 @@ +--- xpbiff.c.orig Wed Oct 26 23:42:52 1994 ++++ xpbiff.c Sun Sep 8 03:16:26 2002 +@@ -74,6 +74,12 @@ + #endif + #endif /* SUN_AUDIO */ + ++#ifdef BSD_AUDIO ++#include <sys/soundcard.h> ++#define MAX_SOUND_VOL 95 ++#define MIN_SOUND_VOL 05 ++#endif ++ + #ifndef X11R3 + #include <X11/Xaw/Box.h> + #include <X11/Xaw/Label.h> +@@ -116,7 +122,11 @@ + #include <sys/types.h> + #include <sys/stat.h> + #include <stdio.h> ++#include <stdlib.h> + #include <math.h> ++#ifdef HAVE_GETPWUID ++#include <pwd.h> ++#endif /* HAVE_GETPWUID */ + + #ifdef YOUBIN + +@@ -149,11 +159,13 @@ + + #ifndef YOUBIN + ++#ifndef SPOOLPATH + #ifdef USG + #define SPOOLPATH "/usr/mail/" + #else + #define SPOOLPATH "/usr/spool/mail/" + #endif ++#endif + + #else /* YOUBIN */ + +@@ -324,7 +336,7 @@ + NULL + }; + +-#ifdef SUN_AUDIO ++#if (defined(SUN_AUDIO) || defined(BSD_AUDIO)) + String mail_sndfile; + int volume; + #endif +@@ -399,7 +411,7 @@ + {"nomailPixmapMask", "NomailPixmapMask", XtRBitmap, sizeof(Pixmap), + (Cardinal)&noPixmapMask, XtRBitmap, None}, + #endif +-#ifdef SUN_AUDIO ++#if (defined(SUN_AUDIO) || defined(BSD_AUDIO)) + {"mailSndFile", "MailSndFile", XtRString, sizeof(String), + (Cardinal)&mail_sndfile, XtRString, None}, + {"volume", "Volume", XtRInt, sizeof(int), +@@ -445,7 +457,7 @@ + {"-server", "*server", XrmoptionSepArg, NULL}, + {"-preserve", "*preserve", XrmoptionNoArg, "true"}, + #endif /* YOUBIN */ +-#ifdef SUN_AUDIO ++#if (defined(SUN_AUDIO) || defined(BSD_AUDIO)) + {"-sndfile", "*mailSndFile", XrmoptionSepArg, NULL}, + {"-volume", "*volume", XrmoptionSepArg, NULL}, + #endif +@@ -485,9 +497,9 @@ + XGCValues values; + XtTranslations newTranslations; + static XtActionsRec redrawActions[] = { +- {"expose", (XtCallbackProc) redraw_callback}, +- {"select", (XtCallbackProc) popup_again}, +- {"quit", (XtCallbackProc) quit}, ++ {"expose", (XtActionProc) redraw_callback}, ++ {"select", (XtActionProc) popup_again}, ++ {"quit", (XtActionProc) quit}, + }; + + static char *overrideTranslations = +@@ -498,6 +510,9 @@ + int dummy; + int i; + ++#ifdef HAVE_GETPWUID ++ struct passwd *pw; ++#endif + #ifdef JCONVERT + char *locale_name; + Locale_ent *p; +@@ -514,28 +529,40 @@ + #endif /* !YOUBIN */ + + #ifdef YOUBIN +- if ((prog_name = strrchr(argv[0], '/')) != NULL) { +- prog_name++; +- } else { +- prog_name = argv[0]; +- } ++ if ((prog_name = strrchr(argv[0], '/')) != NULL) { ++ prog_name++; ++ } else { ++ prog_name = argv[0]; ++ } + #else /* !YOUBIN */ +- if (spoolPath != NULL && spoolPath[0] != '\0') ++ if (spoolPath != NULL && spoolPath[0] != '\0') { + strcpy(spool_path, spoolPath); +- else ++ } else { + strcpy(spool_path, SPOOLPATH); +- if (spool_path[strlen(spool_path) - 1] != '/') ++ } ++ if (spool_path[strlen(spool_path) - 1] != '/') { + strcat(spool_path, "/"); ++ } ++ + #ifdef GETENV_MAIL +- if (getenv("MAIL") != NULL) ++ if (getenv("MAIL") != NULL) { + strcpy(spool_path, getenv("MAIL")); +- else +-#endif +-#ifndef NO_CUSERID +- strcat(spool_path, cuserid(NULL)); +-#else ++ } else { ++#endif /* GETENV_MAIL */ ++ ++#ifdef HAVE_GETPWUID ++ pw = getpwuid(getuid()); ++ strcat(spool_path, pw->pw_name); ++#elif defined(NO_CUSERID) + strcat(spool_path, getenv("USER")); +-#endif ++#else ++ strcat(spool_path, (char *)cuserid(NULL)); ++#endif /* NO_CUSERID && HAVE_GETPWUID */ ++ ++#ifdef GETENV_MAIL ++ } ++#endif /* GETENV_MAIL */ ++ + #endif /* !YOUBIN */ + + #ifdef XI18N +@@ -646,7 +673,7 @@ + fprintf(stderr, " [-server host]\n"); + fprintf(stderr, " [-nopreserve]\n"); + #endif +-#ifdef SUN_AUDIO ++#if (defined(SUN_AUDIO) || defined(BSD_AUDIO)) + fprintf(stderr, " [-sndfile audio_file]\n"); + fprintf(stderr, " [-volume percentage]\n"); + #endif +@@ -775,7 +802,7 @@ + /* Interval timer start */ + #ifndef YOUBIN + polling_id = XtAppAddTimeOut(app_con, +- (unsigned long) polling_time, Polling, NULL); ++ (unsigned long) polling_time, (XtTimerCallbackProc) Polling, NULL); + #else /* YOUBIN */ + if (server == NULL) { + gethostname(serv_name, sizeof(serv_name)); +@@ -931,7 +958,7 @@ + PopupMailHeader(mail_header); + XSync(XtDisplay(toplevel), 0); + if (bell == True) +- beep(XtDisplay(toplevel), 0); ++ beep(XtDisplay(toplevel)); + /* XBell(XtDisplay(toplevel), 0); */ + } + else if (file_stat.st_size > mail_size) { +@@ -955,7 +982,8 @@ + PopupMailHeader(mail_header); + XSync(XtDisplay(toplevel), 0); + if (bell == True) +- XBell(XtDisplay(toplevel), 0); ++ beep(XtDisplay(toplevel)); ++ /* XBell(XtDisplay(toplevel), 0); */ + } + else { + mail_size = file_stat.st_size; +@@ -982,7 +1010,7 @@ + /* No arrive */ + + polling_id = XtAppAddTimeOut(XtWidgetToApplicationContext(toplevel), +- (unsigned long) polling_time, Polling, NULL); ++ (unsigned long) polling_time, (XtTimerCallbackProc) Polling, NULL); + + } + #endif /* !YOUBIN */ +@@ -1071,7 +1099,7 @@ + if (popdown == True) { + popdown_button = XtCreateManagedWidget("popdown_button", commandWidgetClass, info_base, NULL, + ZERO); +- XtAddCallback(popdown_button, XtNcallback, BreakPopup, (XtPointer) NULL); ++ XtAddCallback(popdown_button, XtNcallback, (XtCallbackProc) BreakPopup, (XtPointer) NULL); + } + arg_count = 0; + XtSetArg(args[arg_count], XtNlabel, head); +@@ -1147,7 +1175,8 @@ + PopupMailHeader(mail_header); + XSync(XtDisplay(toplevel), 0); + if (bell == True) +- XBell(XtDisplay(toplevel), 0); ++ beep(XtDisplay(toplevel)); ++ /* XBell(XtDisplay(toplevel), 0); */ + } + else { + mail_size = file_stat.st_size; +@@ -1169,7 +1198,7 @@ + + XtRemoveTimeOut(polling_id); + polling_id = XtAppAddTimeOut(XtWidgetToApplicationContext(toplevel), +- (unsigned long) polling_time, Polling, NULL); ++ (unsigned long) polling_time, (XtTimerCallbackProc) Polling, NULL); + } + #endif /* !YOUBIN */ + +@@ -1749,13 +1778,22 @@ + static void beep (display) + Display *display; + { +-#ifdef SUN_AUDIO ++#if defined(SUN_AUDIO) || defined(BSD_AUDIO) + int audiofd, filefd; +- int rn, wn, len; ++ int rn; ++#ifdef SUN_AUDIO ++ int wn, len; + unsigned char buf[256]; + Audio_filehdr *au_hdr; + audio_info_t ais; +- ++#elif defined(BSD_AUDIO) ++ int mixerfd, mixerid, supported; ++ static int bsize; ++ static char *buf; ++ struct stat sbuf; ++ int level, level_tmp; ++#endif ++ + if (mail_sndfile) { + audiofd = open( "/dev/audio", O_WRONLY | O_NDELAY ); + if (audiofd < 0) +@@ -1766,6 +1804,7 @@ + return; + } + ++#ifdef SUN_AUDIO + if( ioctl( audiofd, AUDIO_GETINFO, &ais ) ) + { + fprintf(stderr, "%s: Problem retrieving /dev/audio info.\n", +@@ -1782,6 +1821,24 @@ + return; + } + ++#elif defined(BSD_AUDIO) ++ /* Open the mixer device */ ++ mixerfd = open ("/dev/mixer", O_RDWR, 0); ++ if (mixerfd > 0) ++ { ++ if (volume > MAX_SOUND_VOL) ++ volume = MAX_SOUND_VOL; ++ else if (volume < MIN_SOUND_VOL) ++ volume = MIN_SOUND_VOL; ++ mixerid = SOUND_MIXER_PCM; ++ /* storing volume level */ ++ ioctl(mixerfd,MIXER_READ(mixerid),&level_tmp); ++ ++ level = (volume << 8) | volume; ++ ioctl(mixerfd,MIXER_WRITE(mixerid),&level); ++ } ++#endif ++ + filefd = open(mail_sndfile, O_RDONLY); + if (filefd < 0) + { +@@ -1791,6 +1848,7 @@ + return; + } + ++#ifdef SUN_AUDIO + /* Read in the audio header */ + rn = read(filefd, buf, sizeof(Audio_filehdr)); + +@@ -1841,12 +1899,28 @@ + usleep(1000); + } + } +- close(audiofd); ++#elif defined(BSD_AUDIO) ++ ioctl(audiofd, SNDCTL_DSP_RESET, 0); ++ fstat(filefd, &sbuf); ++ bsize = sbuf.st_size; ++ buf = malloc((u_int)bsize); ++ if ( (rn = read(filefd, buf, bsize)) > 0) ++ write(audiofd, buf, rn); ++ ioctl(audiofd, SNDCTL_DSP_SYNC, 0); ++ free(buf); ++ if (mixerfd > 0) ++ { ++ /* restoring volume level */ ++ ioctl(mixerfd,MIXER_WRITE(mixerid),&level_tmp); ++ close(mixerfd); ++ } ++#endif ++ close(audiofd); + close(filefd); + } + else +- XBell (display, volume); +-#else /* !SUN_AUDIO */ ++ XBell (display, 0); ++#else /* !SUN_AUDIO && !BSD_AUDIO */ + XBell (display, 0); + #endif /* SUN_AUDIO */ + return; +@@ -1917,12 +1991,12 @@ + + if (popup_time) + XtAppAddTimeOut(XtWidgetToApplicationContext(toplevel), +- (unsigned long) popup_time, BreakPopup, NULL); ++ (unsigned long) popup_time, (XtTimerCallbackProc) BreakPopup, NULL); + } + } + XSync(XtDisplay(toplevel), 0); + if (bell == True) { +- beep(XtDisplay(toplevel), 0); ++ beep(XtDisplay(toplevel)); + } + } else if (mail_size < saved_mail_size){ + /* No mail */ +@@ -2031,7 +2105,7 @@ + } + if (popup_time) + XtAppAddTimeOut(XtWidgetToApplicationContext(toplevel), +- (unsigned long) popup_time, BreakPopup, NULL); ++ (unsigned long) popup_time, (XtTimerCallbackProc) BreakPopup, NULL); + } + if (raise == True) { + XRaiseWindow(XtDisplay(toplevel), XtWindow(toplevel)); diff --git a/mail/xpbiff/files/patch-ac b/mail/xpbiff/files/patch-ac index 6e5e244aa399..aa4c1ddf0b96 100644 --- a/mail/xpbiff/files/patch-ac +++ b/mail/xpbiff/files/patch-ac @@ -1,11 +1,11 @@ ---- xpbiff.c.orig Thu Oct 27 15:42:52 1994 -+++ xpbiff.c Tue Jul 15 13:42:03 1997 +--- xpbiff.c.orig Wed Oct 26 23:42:52 1994 ++++ xpbiff.c Sun Sep 8 03:16:26 2002 @@ -74,6 +74,12 @@ #endif #endif /* SUN_AUDIO */ +#ifdef BSD_AUDIO -+#include <machine/soundcard.h> ++#include <sys/soundcard.h> +#define MAX_SOUND_VOL 95 +#define MIN_SOUND_VOL 05 +#endif @@ -342,5 +342,3 @@ } if (raise == True) { XRaiseWindow(XtDisplay(toplevel), XtWindow(toplevel)); - - |