diff options
author | jlam <jlam> | 2000-07-30 08:08:13 +0000 |
---|---|---|
committer | jlam <jlam> | 2000-07-30 08:08:13 +0000 |
commit | 7bdeaca2927946d67a12eb32dd8bd2bbdbd600cc (patch) | |
tree | c8935a12d14ac02fc740c414ea503a413d37a2f0 /x11/gnome-applets | |
parent | 6c902baf8500814a229ddeb51c91339e66e9537e (diff) | |
download | pkgsrc-7bdeaca2927946d67a12eb32dd8bd2bbdbd600cc.tar.gz |
Rework how NetBSD APM is detected; get cdplayer to build; and get
battery working again. Addresses the following PRs by Jasper Wallace
<jasper@pointless.net>: 10420, 10421, 10422.
Diffstat (limited to 'x11/gnome-applets')
-rw-r--r-- | x11/gnome-applets/Makefile | 38 | ||||
-rw-r--r-- | x11/gnome-applets/files/patch-sum | 13 | ||||
-rw-r--r-- | x11/gnome-applets/patches/patch-aa | 85 | ||||
-rw-r--r-- | x11/gnome-applets/patches/patch-ab | 27 | ||||
-rw-r--r-- | x11/gnome-applets/patches/patch-ac | 407 | ||||
-rw-r--r-- | x11/gnome-applets/patches/patch-ad | 14 | ||||
-rw-r--r-- | x11/gnome-applets/patches/patch-ae | 12 | ||||
-rw-r--r-- | x11/gnome-applets/patches/patch-af | 38 | ||||
-rw-r--r-- | x11/gnome-applets/patches/patch-ag | 11 | ||||
-rw-r--r-- | x11/gnome-applets/patches/patch-ah | 13 | ||||
-rw-r--r-- | x11/gnome-applets/patches/patch-ai | 32 |
11 files changed, 626 insertions, 64 deletions
diff --git a/x11/gnome-applets/Makefile b/x11/gnome-applets/Makefile index eb97331eefd..af75c13af20 100644 --- a/x11/gnome-applets/Makefile +++ b/x11/gnome-applets/Makefile @@ -1,23 +1,31 @@ -# $NetBSD: Makefile,v 1.5 2000/06/25 17:25:03 rh Exp $ +# $NetBSD: Makefile,v 1.6 2000/07/30 08:08:13 jlam Exp $ # -DISTNAME= gnome-applets-1.2.1 -CATEGORIES= x11 gnome -MASTER_SITES= ${MASTER_SITE_GNOME:=stable/sources/gnome-applets/} +DISTNAME= gnome-applets-1.2.1 +CATEGORIES= x11 gnome +MASTER_SITES= ${MASTER_SITE_GNOME:=stable/sources/gnome-applets/} -MAINTAINER= packages@netbsd.org -HOMEPAGE= http://www.gnome.org/ +MAINTAINER= packages@netbsd.org +HOMEPAGE= http://www.gnome.org/ -DEPENDS+= gnome-core>=1.2.1:../../x11/gnome-core -DEPENDS+= libgtop-*:../../devel/libgtop +BUILD_DEPENDS+= autoreconf:../../devel/autoconf +BUILD_DEPENDS+= automake:../../devel/automake +DEPENDS+= gnome-core>=1.2.1:../../x11/gnome-core +DEPENDS+= libgtop-*:../../devel/libgtop -USE_GMAKE= yes -USE_X11BASE= yes -GNU_CONFIGURE= yes -CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS} -I${LOCALBASE}/include" +USE_GMAKE= yes +USE_X11BASE= yes +USE_LIBTOOL= yes -.if exists(/usr/include/machine/apmvar.h) -CPPFLAGS+= -D__NetBSD_APM__ -.endif +GNU_CONFIGURE= yes +CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS}" +CPPFLAGS+= -I${LOCALBASE}/include + +AUTOGEN_ENV= NOCONFIGURE=1 +AUTOGEN_ENV+= srcdir=${WRKSRC} + +pre-configure: + cd ${WRKSRC} && ${MV} -f aclocal.m4 acinclude.m4 + cd ${WRKSRC} && ${SETENV} ${AUTOGEN_ENV} ${SH} macros/autogen.sh .include "../../mk/bsd.pkg.mk" diff --git a/x11/gnome-applets/files/patch-sum b/x11/gnome-applets/files/patch-sum index 3000f3e92ea..ee80b34b5b2 100644 --- a/x11/gnome-applets/files/patch-sum +++ b/x11/gnome-applets/files/patch-sum @@ -1,4 +1,11 @@ -$NetBSD: patch-sum,v 1.2 2000/06/25 17:25:04 rh Exp $ +$NetBSD: patch-sum,v 1.3 2000/07/30 08:08:13 jlam Exp $ -MD5 (patch-aa) = ad9774f21571791db06470faf68dc460 -MD5 (patch-ab) = f727434e404bf2e4c1a2de43896f72b6 +MD5 (patch-aa) = cbf4338bdde2e13561e1b132a6f4dc7b +MD5 (patch-ab) = 011401cb97b5e2bea36b52eacf19432f +MD5 (patch-ac) = f28fdffa59d4c44b7a48d7dab04be55c +MD5 (patch-ad) = 67a2ffa1adf0d13c56507f151d9e7153 +MD5 (patch-ae) = 9e3f524e53270cbb09e0bdbbf3b67eb5 +MD5 (patch-af) = f970c3911301d71d33a956fac8b4e8b0 +MD5 (patch-ag) = f98c10784d7d4ad314f2375ba6eeff27 +MD5 (patch-ah) = a381107e641dd12e47620b0a01e3e3be +MD5 (patch-ai) = 0ca175e7d8d975fe1df1f291bc9eeddc diff --git a/x11/gnome-applets/patches/patch-aa b/x11/gnome-applets/patches/patch-aa index 3286ccd8d01..701dec662f0 100644 --- a/x11/gnome-applets/patches/patch-aa +++ b/x11/gnome-applets/patches/patch-aa @@ -1,38 +1,55 @@ -$NetBSD: patch-aa,v 1.1.1.1 2000/06/02 13:08:31 drochner Exp $ +$NetBSD: patch-aa,v 1.2 2000/07/30 08:08:13 jlam Exp $ ---- ./modemlights/modemlights.c.orig Thu Jun 1 10:20:10 2000 -+++ ./modemlights/modemlights.c Thu Jun 1 10:23:24 2000 -@@ -32,7 +32,7 @@ - #include <ctype.h> - #include <sys/stat.h> +--- battery/read-battery.c.orig Fri Feb 11 11:27:56 2000 ++++ battery/read-battery.c Sun Jul 30 02:24:50 2000 +@@ -190,7 +190,41 @@ + close(fd); + return TRUE; --#ifdef __OpenBSD__ -+#if defined(__OpenBSD__) || defined(__NetBSD__) - #include <net/if_ppp.h> - #endif +-#else /* ! ( __linux__ || __FreeBSD__) */ ++#elif defined(__NetBSD__) && defined(NETBSD_APM) ++ ++ struct apm_power_info aip; ++ int fd; ++ u_int mins; ++ ++ fd = open(APMDEV, O_RDONLY); ++ if (fd == -1) ++ { ++ g_error (_("Cannot open /dev/apm; can't get data.")); ++ return FALSE; ++ } ++ ++ if (ioctl(fd, APM_IOC_GETPOWER, &aip) == -1) { ++ g_error(_("ioctl failed on /dev/apm.")); ++ return FALSE; ++ } ++ ++ /* We can read these under NetBSD. */ ++ mins = aip.minutes_left; ++ *hours_remaining = mins / 60; ++ *minutes_remaining = mins % 60; ++ ++ if (aip.ac_state == APM_AC_ON) { ++ *ac_online = 1; ++ } else { ++ *ac_online = 0; ++ } ++ ++ *percentage = aip.battery_life; ++ ++ close(fd); ++ return TRUE; ++ ++#else /* ! ( __linux__ || __FreeBSD__ || (__NetBSD__ && NETBSD_APM) ) */ -@@ -271,13 +271,13 @@ - struct ppp_stats stats; + /* Assume always connected to power. */ + *ac_online = 1; +@@ -198,6 +232,6 @@ + *hours_remaining = -1; + *minutes_remaining = 1; - memset(&ifreq, 0, sizeof(ifreq)); --#if defined(__FreeBSD__) || defined(__OpenBSD__) -+#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) - strncpy(ifreq.ifr_name, device_name, IFNAMSIZ); - #else - strncpy(ifreq.ifr_ifrn.ifrn_name, device_name, IFNAMSIZ); - #endif /* FreeBSD or OpenBSD */ - ifreq.ifr_ifru.ifru_data = (caddr_t)&stats; --#if defined(__FreeBSD__) || defined(__OpenBSD__) -+#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) - if ((ioctl(ip_socket,SIOCGPPPSTATS,(caddr_t)&ifreq) < 0)) - #else - #ifdef SIOCDEVPRIVATE -@@ -286,7 +286,7 @@ - *in = *out = 0; - return FALSE; - #endif --#endif /* FreeBSD or OpenBSD */ -+#endif /* FreeBSD or OpenBSD or NetBSD */ - { - /* failure means ppp is not up */ - *in = *out = 0; +-#endif /* __linux__ || __FreeBSD__ */ ++#endif /* __linux__ || __FreeBSD__ || __NetBSD__ */ + + } /* battery_read_charge */ diff --git a/x11/gnome-applets/patches/patch-ab b/x11/gnome-applets/patches/patch-ab index 242f300127f..01834021d3e 100644 --- a/x11/gnome-applets/patches/patch-ab +++ b/x11/gnome-applets/patches/patch-ab @@ -1,13 +1,16 @@ -$NetBSD: patch-ab,v 1.1 2000/06/25 17:25:05 rh Exp $ +$NetBSD: patch-ab,v 1.2 2000/07/30 08:08:13 jlam Exp $ ---- configure.orig Wed May 31 06:02:43 2000 -+++ configure Sun Jun 25 18:52:51 2000 -@@ -5688,7 +5688,7 @@ - cat conftest.$ac_ext >&5 - rm -rf conftest* - CATOBJEXT=.mo -- DATADIRNAME=lib -+ DATADIRNAME=share - fi - rm -f conftest* - INSTOBJEXT=.mo +--- battery/read-battery.h.orig Fri Feb 11 11:27:56 2000 ++++ battery/read-battery.h Sun Jul 30 02:24:50 2000 +@@ -18,6 +18,11 @@ + #include <fcntl.h> + #include <machine/apm_bios.h> + #define APMDEV "/dev/apm" ++#elif __NetBSD__ && defined(NETBSD_APM) ++#include <fcntl.h> ++#include <sys/ioctl.h> ++#include <machine/apmvar.h> ++#define APMDEV "/dev/apm" + #endif + + /* Prototypes */ diff --git a/x11/gnome-applets/patches/patch-ac b/x11/gnome-applets/patches/patch-ac new file mode 100644 index 00000000000..8a5079e5785 --- /dev/null +++ b/x11/gnome-applets/patches/patch-ac @@ -0,0 +1,407 @@ +$NetBSD: patch-ac,v 1.1 2000/07/30 08:08:13 jlam Exp $ + +--- /dev/null Sat Jun 10 06:33:35 2000 ++++ cdplayer/cdrom-netbsd.c Fri Jun 23 00:37:07 2000 +@@ -0,0 +1,402 @@ ++ ++/* ++ * Hacked up from cdrom-solaris.c ++ * ++ * jgw 24/02/2000 ++ * ++ */ ++ ++ ++#include <stdlib.h> ++#include <string.h> ++#include <fcntl.h> ++#include <glib.h> ++ ++#include <unistd.h> ++#include <stdio.h> ++#include <sys/types.h> ++#include <sys/ioctl.h> ++#include <sys/cdio.h> ++#include "cdrom-interface.h" ++ ++ ++#define ASSIGN_MSF(dest, src) \ ++{ \ ++ (dest).minute = (src).minute; \ ++ (dest).second = (src).second; \ ++ (dest).frame = (src).frame; \ ++} ++ ++ ++int ++cdrom_play(cdrom_device_t cdp, int start, int stop) ++{ ++ struct ioc_play_track ipt; ++ ++ ipt.start_track = start; ++ ipt.start_index = 1; ++ ipt.end_track = stop; ++ ipt.end_index = 1; ++ if (ioctl(cdp->device, CDIOCPLAYTRACKS, &ipt) == -1) { ++ cdp->my_errno = errno; ++ return DISC_IO_ERROR; ++ } ++ return DISC_NO_ERROR; ++} ++ ++int ++cdrom_play_msf(cdrom_device_t cdp, cdrom_msf_t * start) ++{ ++ struct ioc_play_msf msf; ++ ++ if (cdrom_read_track_info(cdp) == DISC_IO_ERROR) ++ return DISC_IO_ERROR; ++ msf.start_m = start->minute; ++ msf.start_s = start->second; ++ msf.start_f = start->frame; ++ ++ msf.end_m = cdp->track_info[cdp->nr_track].address.minute; ++ msf.end_s = cdp->track_info[cdp->nr_track].address.second; ++ msf.end_f = cdp->track_info[cdp->nr_track].address.frame; ++ ++ if (ioctl(cdp->device, CDIOCPLAYMSF, &msf) == -1) { ++ cdp->my_errno = errno; ++ return DISC_IO_ERROR; ++ } ++ return DISC_NO_ERROR; ++} ++ ++int ++cdrom_pause(cdrom_device_t cdp) ++{ ++ if (ioctl(cdp->device, CDIOCPAUSE, 0) == -1) { ++ return DISC_IO_ERROR; ++ cdp->my_errno = errno; ++ } ++ return DISC_IO_ERROR; ++} ++ ++int ++cdrom_resume(cdrom_device_t cdp) ++{ ++ if (ioctl(cdp->device, CDIOCRESUME, 0) == -1) { ++ cdp->my_errno = errno; ++ return DISC_IO_ERROR; ++ } ++ return DISC_NO_ERROR; ++} ++ ++ ++int ++cdrom_stop(cdrom_device_t cdp) ++{ ++ if (ioctl(cdp->device, CDIOCSTOP, 0) == -1) { ++ cdp->my_errno = errno; ++ return DISC_IO_ERROR; ++ } ++ return DISC_NO_ERROR; ++} ++ ++int ++cdrom_read_track_info(cdrom_device_t cdp) ++{ ++ struct ioc_toc_header toc; ++ struct ioc_read_toc_entry tocentry; ++ ++ int i, j, nr_track; ++ ++ if (ioctl(cdp->device, CDIOREADTOCHEADER, &toc) == -1) { ++ cdp->my_errno = errno; ++ return DISC_IO_ERROR; ++ } ++ cdp->track0 = toc.starting_track; ++ cdp->track1 = toc.ending_track; ++ nr_track = toc.ending_track - toc.starting_track + 1; ++ if (nr_track <= 0) ++ return DISC_IO_ERROR; ++ ++ if (nr_track != cdp->nr_track) { ++ if (cdp->track_info) ++ g_free(cdp->track_info); ++ cdp->nr_track = nr_track; ++ cdp->track_info = g_malloc((cdp->nr_track + 1) * sizeof(track_info_t)); ++ } ++ for (i = 0, j = cdp->track0; i < cdp->nr_track; i++, j++) { ++ tocentry.starting_track = j; ++ tocentry.address_format = CD_MSF_FORMAT; ++ tocentry.data_len = sizeof(struct cd_toc_entry); ++ tocentry.data = malloc(sizeof(struct cd_toc_entry)); ++ ++ if (ioctl(cdp->device, CDIOREADTOCENTRIES, &tocentry) == -1) { ++ cdp->my_errno = errno; ++ free(tocentry.data); ++ return DISC_IO_ERROR; ++ } ++ /* fill the trackinfo field */ ++ cdp->track_info[i].track = j; ++ ++ /* XXX these should also be in <sys/cdio.h> */ ++#define CD_TYPE_AUDIO 1 /* Audio track */ ++#define CD_TYPE_DATA 2 /* Data track */ ++ ++ cdp->track_info[i].audio_track = tocentry.data->control != CD_TYPE_DATA ? 1 : 0; ++ cdp->track_info[i].audio_track = 0; ++ ASSIGN_MSF(cdp->track_info[i].address, tocentry.data->addr.msf); ++ free(tocentry.data); ++ } ++#define CD_LEADOUT 0xaa /* XXX this should be in <sys/cdio.h> (?) */ ++ ++ tocentry.starting_track = CD_LEADOUT; ++ tocentry.address_format = CD_MSF_FORMAT; ++ if (ioctl(cdp->device, CDIOREADTOCENTRIES, &tocentry) == -1) { ++ cdp->my_errno = errno; ++ return DISC_IO_ERROR; ++ } ++ cdp->track_info[i].track = j; ++ cdp->track_info[i].audio_track = 0; ++ ASSIGN_MSF(cdp->track_info[i].address, tocentry.data->addr.msf); ++ ++ return DISC_NO_ERROR; ++} ++ ++int ++cdrom_reset(cdrom_device_t cdp) ++{ ++ if (ioctl(cdp->device, CDIOCRESET, 0) == -1) { ++ cdp->my_errno = errno; ++ /* perror("cdrom_reset"); */ /* XXX don't spam the user with errors. */ ++ return DISC_IO_ERROR; ++ } ++ return DISC_NO_ERROR; ++} ++ ++int ++cdrom_get_status(cdrom_device_t cdp, cdrom_device_status_t * stat) ++{ ++ struct ioc_read_subchannel subchnl; ++ int errcode; ++ ++ memset(&subchnl, 0, sizeof(struct ioc_read_subchannel)); ++ ++ subchnl.address_format = CD_MSF_FORMAT; ++ subchnl.data_format = CD_CURRENT_POSITION; ++ ++ subchnl.data_len = sizeof(struct cd_sub_channel_info); ++ subchnl.data = malloc(sizeof(struct cd_sub_channel_info)); ++ ++ if (ioctl(cdp->device, CDIOCREADSUBCHANNEL, &subchnl) == -1) { ++ cdp->my_errno = errno; ++ free(subchnl.data); ++ if (cdrom_reset(cdp) == DISC_NO_ERROR) ++ { ++ /* XXX ICK, if the user has ejected a cdrom, and then loaded new one, ++ we need to close/open the device before we can play cd's again. ++ ++ Unfortunalty we gets loads of errors spammed to syslog as we wait for the drive to ++ spin up. ++ ++ we need a CDIOCDRIVESTATUS ioctl which will tell us: ++ ++ drive empty ++ drive open ++ drive becoming ready ++ drive ready ++ ++ */ ++ cdrom_close(cdp); ++ errcode = 0; ++ cdp = cdrom_open(NULL,&errcode); ++ if (errcode == 0) ++ return(cdrom_get_status(cdp, stat)); ++ } ++ /* unfortunatly we spam the user with errors here */ ++ perror("You may ignore these errors if your in the process of changing a cd : "); ++ printf("\n"); ++ return DISC_IO_ERROR; ++ } ++ switch (subchnl.data->header.audio_status) { ++ case CD_AS_PLAY_IN_PROGRESS: ++ stat->audio_status = DISC_PLAY; ++ break; ++ case CD_AS_PLAY_PAUSED: ++ stat->audio_status = DISC_PAUSED; ++ break; ++ case CD_AS_PLAY_COMPLETED: ++ stat->audio_status = DISC_COMPLETED; ++ break; ++ case CD_AS_AUDIO_INVALID: ++ case CD_AS_NO_STATUS: ++ case CD_AS_PLAY_ERROR: ++ stat->audio_status = DISC_STOP; ++ break; ++ default: ++ stat->audio_status = DISC_ERROR; ++ } ++ stat->track = subchnl.data->what.position.track_number; ++ ASSIGN_MSF(stat->relative_address, subchnl.data->what.position.reladdr.msf); ++ ASSIGN_MSF(stat->absolute_address, subchnl.data->what.position.absaddr.msf); ++ free(subchnl.data); ++ return DISC_NO_ERROR; ++} ++ ++cdrom_device_t ++cdrom_open(char *device, int *errcode) ++{ ++ cdrom_device_t cdp; ++ static char * cddev = NULL; ++ ++ if (cddev == NULL && device != NULL) ++ { ++ cddev = device; ++ } ++ ++ cdp = g_malloc(sizeof(struct cdrom_device)); ++ ++ if (device == NULL) ++ device = cddev; /* remember which device to use */ ++ ++ cdp->device = open(device, O_RDONLY); ++ if (cdp->device == -1) { ++ *errcode = errno; ++ perror("cdrom_open"); ++ g_free(cdp); ++ return NULL; ++ } ++ cdp->nr_track = 0; ++ cdp->track_info = NULL; ++ return cdp; ++} ++ ++void ++cdrom_close(cdrom_device_t cdp) ++{ ++ if (cdp->nr_track) ++ g_free(cdp->track_info); ++ close(cdp->device); ++ g_free(cdp); ++} ++ ++int ++cdrom_load(cdrom_device_t cdp) ++{ ++ if (ioctl(cdp->device, CDIOCCLOSE, 0) == -1) { ++ cdp->my_errno = errno; ++ return DISC_IO_ERROR; ++ } ++ return DISC_NO_ERROR; ++} ++ ++int ++cdrom_eject(cdrom_device_t cdp) ++{ ++ cdrom_device_status_t stat; ++ ++ printf("cdrom_eject: %d", cdrom_get_status(cdp, &stat)); ++ ++ if (stat.audio_status == DISC_PLAY) ++ { ++ /* stop before we eject */ ++ cdrom_stop(cdp); ++ } ++ ++ if (ioctl(cdp->device, CDIOCALLOW, 0) == -1) { ++ cdp->my_errno = errno; ++ perror("cdrom_eject: allow"); ++ } ++ ++ if (ioctl(cdp->device, CDIOCEJECT, 0) == -1) { ++ cdp->my_errno = errno; ++ perror("cdrom_eject"); ++ return DISC_IO_ERROR; ++ } ++ return DISC_NO_ERROR; ++} ++ ++ ++int ++cdrom_next(cdrom_device_t cdp) ++{ ++ cdrom_device_status_t stat; ++ int track; ++ ++ if ((cdrom_read_track_info(cdp) == DISC_IO_ERROR) || ++ (cdrom_get_status(cdp, &stat) == DISC_IO_ERROR)) ++ return DISC_IO_ERROR; ++ track = stat.track + 1; ++ return cdrom_play(cdp, stat.track + 1, cdp->track1); ++} ++ ++int ++cdrom_prev(cdrom_device_t cdp) ++{ ++ cdrom_device_status_t stat; ++ int track; ++ ++ if ((cdrom_read_track_info(cdp) == DISC_IO_ERROR) || ++ (cdrom_get_status(cdp, &stat) == DISC_IO_ERROR)) ++ return DISC_IO_ERROR; ++ track = stat.track - 1; ++ return cdrom_play(cdp, stat.track - 1, cdp->track1); ++} ++ ++int ++cdrom_rewind(cdrom_device_t cdp) ++{ ++ cdrom_device_status_t stat; ++ int track; ++ ++ if ((cdrom_read_track_info(cdp) == DISC_IO_ERROR) || ++ (cdrom_get_status(cdp, &stat) == DISC_IO_ERROR)) ++ return DISC_IO_ERROR; ++ if (stat.absolute_address.second != 0) ++ stat.absolute_address.second--; ++ else { ++ stat.absolute_address.second = 0; ++ if (stat.absolute_address.minute > 0) ++ stat.absolute_address.minute--; ++ } ++ stat.absolute_address.frame = 0; ++ return cdrom_play_msf(cdp, &stat.absolute_address); ++} ++ ++int ++cdrom_ff(cdrom_device_t cdp) ++{ ++ cdrom_device_status_t stat; ++ int track; ++ ++ if ((cdrom_read_track_info(cdp) == DISC_IO_ERROR) || ++ (cdrom_get_status(cdp, &stat) == DISC_IO_ERROR)) ++ return DISC_IO_ERROR; ++ stat.absolute_address.second++; ++ if (stat.absolute_address.second >= 60) { ++ stat.absolute_address.minute++; ++ stat.absolute_address.second = 0; ++ } ++ stat.absolute_address.frame = 0; ++ return cdrom_play_msf(cdp, &stat.absolute_address); ++} ++ ++int ++cdrom_track_length(cdrom_device_t cdp, int track, cdrom_msf_t * length) ++{ ++ int index, s1, s2, i; ++ ++ if ((track < cdp->track0) || (track > cdp->track1)) ++ return DISC_INDEX_OUT_OF_RANGE; ++ index = track - cdp->track0; ++ ++ s1 = cdp->track_info[index + 1].address.second; ++ s2 = cdp->track_info[index].address.second; ++ length->second = s1 = s1 - s2; ++ if (s1 < 0) { ++ i = 1; ++ length->second = s1 + 60; ++ } else ++ i = 0; ++ ++ length->minute = cdp->track_info[index + 1].address.minute - ++ cdp->track_info[index].address.minute - i; ++ ++ return 0; ++} diff --git a/x11/gnome-applets/patches/patch-ad b/x11/gnome-applets/patches/patch-ad new file mode 100644 index 00000000000..bb610f01b0e --- /dev/null +++ b/x11/gnome-applets/patches/patch-ad @@ -0,0 +1,14 @@ +$NetBSD: patch-ad,v 1.1 2000/07/30 08:08:14 jlam Exp $ + +--- mixer/mixer.c.orig Thu May 4 08:24:00 2000 ++++ mixer/mixer.c Sun Jul 30 02:29:41 2000 +@@ -47,6 +47,9 @@ + #elif HAVE_SYS_SOUNDCARD_H + #include <sys/soundcard.h> + #define OSS_API ++#elif HAVE_SOUNDCARD_H ++#include <soundcard.h> ++#define OSS_API + #elif HAVE_SYS_AUDIOIO_H + #include <sys/audioio.h> + #define SUN_API diff --git a/x11/gnome-applets/patches/patch-ae b/x11/gnome-applets/patches/patch-ae new file mode 100644 index 00000000000..8189806f0ff --- /dev/null +++ b/x11/gnome-applets/patches/patch-ae @@ -0,0 +1,12 @@ +$NetBSD: patch-ae,v 1.1 2000/07/30 08:08:14 jlam Exp $ + +--- mixer/Makefile.am.orig Mon Apr 3 19:18:08 2000 ++++ mixer/Makefile.am Sun Jul 30 02:33:42 2000 +@@ -17,6 +17,7 @@ + lamp-small-red.xpm + + mixer_applet_LDADD = \ ++ $(MIXER_LIBS) \ + $(GNOME_LIBDIR) \ + $(GNOME_APPLETS_LIBS) $(INTLLIBS) + diff --git a/x11/gnome-applets/patches/patch-af b/x11/gnome-applets/patches/patch-af new file mode 100644 index 00000000000..153b7c6e470 --- /dev/null +++ b/x11/gnome-applets/patches/patch-af @@ -0,0 +1,38 @@ +$NetBSD: patch-af,v 1.1 2000/07/30 08:08:14 jlam Exp $ + +--- modemlights/modemlights.c.orig Thu May 4 08:24:02 2000 ++++ modemlights/modemlights.c Sun Jul 30 02:24:50 2000 +@@ -32,7 +32,7 @@ + #include <ctype.h> + #include <sys/stat.h> + +-#ifdef __OpenBSD__ ++#if defined(__OpenBSD__) || defined(__NetBSD__) + #include <net/if_ppp.h> + #endif + +@@ -271,13 +271,13 @@ + struct ppp_stats stats; + + memset(&ifreq, 0, sizeof(ifreq)); +-#if defined(__FreeBSD__) || defined(__OpenBSD__) ++#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) + strncpy(ifreq.ifr_name, device_name, IFNAMSIZ); + #else + strncpy(ifreq.ifr_ifrn.ifrn_name, device_name, IFNAMSIZ); + #endif /* FreeBSD or OpenBSD */ + ifreq.ifr_ifru.ifru_data = (caddr_t)&stats; +-#if defined(__FreeBSD__) || defined(__OpenBSD__) ++#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) + if ((ioctl(ip_socket,SIOCGPPPSTATS,(caddr_t)&ifreq) < 0)) + #else + #ifdef SIOCDEVPRIVATE +@@ -286,7 +286,7 @@ + *in = *out = 0; + return FALSE; + #endif +-#endif /* FreeBSD or OpenBSD */ ++#endif /* FreeBSD or OpenBSD or NetBSD */ + { + /* failure means ppp is not up */ + *in = *out = 0; diff --git a/x11/gnome-applets/patches/patch-ag b/x11/gnome-applets/patches/patch-ag new file mode 100644 index 00000000000..dd0b14c1ff3 --- /dev/null +++ b/x11/gnome-applets/patches/patch-ag @@ -0,0 +1,11 @@ +$NetBSD: patch-ag,v 1.1 2000/07/30 08:08:14 jlam Exp $ + +--- acconfig.h.orig Thu May 4 08:23:51 2000 ++++ acconfig.h Sun Jul 30 02:24:50 2000 +@@ -39,3 +39,6 @@ + #undef LIBGTOP_SERVER_VERSION + + #undef GNOME_ICONDIR ++ ++/* Define if this NetBSD platform supports APM. */ ++#undef NETBSD_APM diff --git a/x11/gnome-applets/patches/patch-ah b/x11/gnome-applets/patches/patch-ah new file mode 100644 index 00000000000..5e5363e0ccf --- /dev/null +++ b/x11/gnome-applets/patches/patch-ah @@ -0,0 +1,13 @@ +$NetBSD: patch-ah,v 1.1 2000/07/30 08:08:14 jlam Exp $ + +--- aclocal.m4.orig Wed May 31 00:02:35 2000 ++++ aclocal.m4 Sun Jul 30 02:24:51 2000 +@@ -1695,7 +1695,7 @@ + [CATOBJEXT=.gmo + DATADIRNAME=share], + [CATOBJEXT=.mo +- DATADIRNAME=lib]) ++ DATADIRNAME=share]) + INSTOBJEXT=.mo + fi + fi diff --git a/x11/gnome-applets/patches/patch-ai b/x11/gnome-applets/patches/patch-ai new file mode 100644 index 00000000000..4c024154782 --- /dev/null +++ b/x11/gnome-applets/patches/patch-ai @@ -0,0 +1,32 @@ +$NetBSD: patch-ai,v 1.1 2000/07/30 08:08:14 jlam Exp $ + +--- configure.in.orig Wed May 31 00:02:31 2000 ++++ configure.in Sun Jul 30 02:33:10 2000 +@@ -97,14 +97,24 @@ + AC_MSG_WARN([*** \`cdplayer' applet will not be built ***]) + fi + ++dnl battery ++case "$host_os" in ++netbsd*) ++ AC_CHECK_HEADERS(machine/apmvar.h, AC_DEFINE(NETBSD_APM)) ++ ;; ++esac ++ + dnl mixer + P_MIXER= ++MIXER_LIBS= + AC_CHECK_HEADERS(linux/soundcard.h,[P_MIXER=mixer],[ + AC_CHECK_HEADERS(machine/soundcard.h, [P_MIXER=mixer],[ + AC_CHECK_HEADERS(sys/soundcard.h, [P_MIXER=mixer],[ +- AC_CHECK_HEADERS(sys/audioio.h, [P_MIXER=mixer],[ +- AC_CHECK_HEADERS(sys/audio.io.h, [P_MIXER=mixer],[ +- AC_CHECK_HEADERS(sun/audioio.h, [P_MIXER=mixer]) ]) ]) ]) ]) ]) ++ AC_CHECK_HEADERS(soundcard.h, [P_MIXER=mixer; MIXER_LIBS="-lossaudio"],[ ++ AC_CHECK_HEADERS(sys/audioio.h, [P_MIXER=mixer],[ ++ AC_CHECK_HEADERS(sys/audio.io.h, [P_MIXER=mixer],[ ++ AC_CHECK_HEADERS(sun/audioio.h, [P_MIXER=mixer]) ]) ]) ]) ]) ]) ]) ++AC_SUBST(MIXER_LIBS) + + AM_CONDITIONAL(APPLET_MIXER, test "$P_MIXER" = "mixer") + if test "$P_MIXER" != "mixer"; then |