diff options
author | marcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059> | 2004-09-01 11:43:49 +0800 |
---|---|---|
committer | marcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059> | 2004-09-01 11:43:49 +0800 |
commit | ee32cd33da3469252db7db10b82ba59214cf1955 (patch) | |
tree | 297f4a1211c3d4880f2cad6cbb55cdbc58d319a1 /audio/gnome-media | |
parent | 322a9d0fa1d47ebabbbe1d4e44bd50ca22923c3b (diff) | |
download | marcuscom-ports-ee32cd33da3469252db7db10b82ba59214cf1955.tar marcuscom-ports-ee32cd33da3469252db7db10b82ba59214cf1955.tar.gz marcuscom-ports-ee32cd33da3469252db7db10b82ba59214cf1955.tar.bz2 marcuscom-ports-ee32cd33da3469252db7db10b82ba59214cf1955.tar.lz marcuscom-ports-ee32cd33da3469252db7db10b82ba59214cf1955.tar.xz marcuscom-ports-ee32cd33da3469252db7db10b82ba59214cf1955.tar.zst marcuscom-ports-ee32cd33da3469252db7db10b82ba59214cf1955.zip |
Update to 2.7.92. This port earns the first place for biggest pain in the ass
upgrade since 2.6 (second place went to gnomenetstatus).
git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@2751 df743ca5-7f9a-e211-a948-0013205c9059
Diffstat (limited to 'audio/gnome-media')
-rw-r--r-- | audio/gnome-media/Makefile | 7 | ||||
-rw-r--r-- | audio/gnome-media/distinfo | 4 | ||||
-rw-r--r-- | audio/gnome-media/files/patch-cddb-slave2_gnet-private.h | 11 | ||||
-rw-r--r-- | audio/gnome-media/files/patch-gnome-cd_gst-cdparanoia-cdrom.c | 481 | ||||
-rw-r--r-- | audio/gnome-media/pkg-plist | 2 |
5 files changed, 499 insertions, 6 deletions
diff --git a/audio/gnome-media/Makefile b/audio/gnome-media/Makefile index d400015df..8c7f9547e 100644 --- a/audio/gnome-media/Makefile +++ b/audio/gnome-media/Makefile @@ -6,8 +6,7 @@ # PORTNAME= gnomemedia2 -PORTVERSION= 2.7.1 -PORTREVISION= 5 +PORTVERSION= 2.7.92 CATEGORIES= audio gnome MASTER_SITES= ${MASTER_SITE_GNOME} MASTER_SITE_SUBDIR= sources/gnome-media/2.7 @@ -20,11 +19,11 @@ COMMENT= Multimedia applications for the GNOME 2 desktop USE_BZIP2= yes USE_X_PREFIX= yes USE_GMAKE= yes -USE_INC_LIBTOOL_VER=13 +USE_LIBTOOL_VER=15 INSTALLS_SHLIB= yes USE_REINPLACE= yes GNOME_DESKTOP_VERSION=2 -USE_GNOME= gnomeprefix gnomehack intlhack lthack gnomehier gnomedesktop \ +USE_GNOME= gnomeprefix gnomehack intlhack gnomehier gnomedesktop \ gail gstreamerplugins CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \ LDFLAGS="-L${LOCALBASE}/lib" diff --git a/audio/gnome-media/distinfo b/audio/gnome-media/distinfo index 7a57ff814..7097438fe 100644 --- a/audio/gnome-media/distinfo +++ b/audio/gnome-media/distinfo @@ -1,2 +1,2 @@ -MD5 (gnome2/gnome-media-2.7.1.tar.bz2) = 2bc7afd97189ee010621a2fe4360fdf8 -SIZE (gnome2/gnome-media-2.7.1.tar.bz2) = 3014822 +MD5 (gnome2/gnome-media-2.7.92.tar.bz2) = 6c0419a22f395e8655511d190422cb3e +SIZE (gnome2/gnome-media-2.7.92.tar.bz2) = 3170310 diff --git a/audio/gnome-media/files/patch-cddb-slave2_gnet-private.h b/audio/gnome-media/files/patch-cddb-slave2_gnet-private.h new file mode 100644 index 000000000..1ec1fc50f --- /dev/null +++ b/audio/gnome-media/files/patch-cddb-slave2_gnet-private.h @@ -0,0 +1,11 @@ +--- cddb-slave2/gnet-private.h.orig Tue Aug 31 19:58:18 2004 ++++ cddb-slave2/gnet-private.h Tue Aug 31 20:02:23 2004 +@@ -68,7 +68,7 @@ + #include <resolv.h> + #include <netdb.h> + +-#ifndef __socklen_t_defined ++#if !defined(__socklen_t_defined) && !defined(__FreeBSD__) + typedef guint32 socklen_t; + #endif + diff --git a/audio/gnome-media/files/patch-gnome-cd_gst-cdparanoia-cdrom.c b/audio/gnome-media/files/patch-gnome-cd_gst-cdparanoia-cdrom.c new file mode 100644 index 000000000..aa98a1e7e --- /dev/null +++ b/audio/gnome-media/files/patch-gnome-cd_gst-cdparanoia-cdrom.c @@ -0,0 +1,481 @@ +--- gnome-cd/gst-cdparanoia-cdrom.c.orig Tue Aug 31 23:36:17 2004 ++++ gnome-cd/gst-cdparanoia-cdrom.c Tue Aug 31 23:36:19 2004 +@@ -25,7 +25,16 @@ + + #include <gconf/gconf-client.h> + #include <gst/gst.h> ++#ifdef __linux__ + #include <linux/cdrom.h> ++#elif defined(__FreeBSD__) ++#include <sys/cdio.h> ++#include <sys/cdrio.h> ++#define CD_FRAMES 75 ++#define CD_MSF_OFFSET 150 ++#define CDROM_DATA_TRACK 0x04 ++#define CDROM_LEADOUT 0xAA ++#endif + + static GnomeCDRomClass *parent_class = NULL; + +@@ -40,7 +49,11 @@ + struct _GstCdparanoiaCDRomPrivate { + GnomeCDRomUpdate update; + ++#ifdef __FreeBSD__ ++ struct ioc_toc_header *tochdr; ++#else + struct cdrom_tochdr *tochdr; ++#endif + int number_tracks; + unsigned char track0, track1; + char *cd_device; +@@ -89,6 +102,23 @@ + + static GnomeCDRomMSF blank_msf = { 0, 0, 0 }; + ++#ifdef __FreeBSD__ ++static guint64 ++msf_struct_to_frames (struct ioc_play_msf *msf, int entry) ++{ ++ guint64 frames; ++ if (entry == 0) { ++ frames = ++ (msf->start_m * 60 * CD_FRAMES) + ++ (msf->start_s * CD_FRAMES) + msf->start_f; ++ } else { ++ frames = ++ (msf->end_m * 60 * CD_FRAMES) + ++ (msf->end_s * CD_FRAMES) + msf->end_f; ++ } ++ return (frames - CD_MSF_OFFSET); ++} ++#else + static guint64 + msf_struct_to_frames (struct cdrom_msf *msf, int entry) + { +@@ -104,6 +134,7 @@ + } + return (frames - CD_MSF_OFFSET); + } ++#endif + + static int + msf_to_frames (GnomeCDRomMSF * msf) +@@ -124,6 +155,19 @@ + msf->frame = frames; + } + ++#ifdef __FreeBSD__ ++static void ++frames_to_msf_struct (union msf_lba *msflba, int frames) ++{ ++ /* Now convert the difference in frame lengths back into MSF ++ format */ ++ msflba->msf.minute = frames / (60 * CD_FRAMES); ++ frames -= (msflba->msf.minute * 60 * CD_FRAMES); ++ msflba->msf.second = frames / CD_FRAMES; ++ frames -= (msflba->msf.second * CD_FRAMES); ++ msflba->msf.frame = frames; ++} ++#else + static void + frames_to_msf_struct (struct cdrom_msf0 *msf, int frames) + { +@@ -135,6 +179,7 @@ + frames -= (msf->second * CD_FRAMES); + msf->frame = frames; + } ++#endif + + static void + add_msf (GnomeCDRomMSF * msf1, GnomeCDRomMSF * msf2, GnomeCDRomMSF * dest) +@@ -311,7 +356,11 @@ + { + GstCdparanoiaCDRom *lcd = GST_CDPARANOIA_CDROM (cdrom); + GstCdparanoiaCDRomPrivate *priv; ++#ifdef __FreeBSD__ ++ struct ioc_read_toc_single_entry tocentry; ++#else + struct cdrom_tocentry tocentry; ++#endif + int i, j; + GError *error; + +@@ -322,15 +371,24 @@ + return; + } + ++#ifdef __FreeBSD__ ++ if (ioctl (cdrom->fd, CDIOREADTOCHEADER, priv->tochdr) < 0) { ++#else + if (ioctl (cdrom->fd, CDROMREADTOCHDR, priv->tochdr) < 0) { ++#endif + g_warning ("Error reading CD header"); + gst_cdparanoia_cdrom_close (lcd); + + return; + } + ++#ifdef __FreeBSD__ ++ priv->track0 = priv->tochdr->starting_track; ++ priv->track1 = priv->tochdr->ending_track; ++#else + priv->track0 = priv->tochdr->cdth_trk0; + priv->track1 = priv->tochdr->cdth_trk1; ++#endif + priv->number_tracks = priv->track1 - priv->track0 + 1; + + gst_cdparanoia_cdrom_invalidate (lcd); +@@ -338,6 +396,21 @@ + g_malloc ((priv->number_tracks + + 1) * sizeof (GstCdparanoiaCDRomTrackInfo)); + for (i = 0, j = priv->track0; i < priv->number_tracks; i++, j++) { ++#ifdef __FreeBSD__ ++ tocentry.track = j; ++ tocentry.address_format = CD_MSF_FORMAT; ++ ++ if (ioctl (cdrom->fd, CDIOREADTOCENTRY, &tocentry) < 0) { ++ g_warning ("IOCtl failed"); ++ continue; ++ } ++ ++ priv->track_info[i].track = j; ++ priv->track_info[i].audio_track = ++ tocentry.entry.control != CDROM_DATA_TRACK ? 1 : 0; ++ ASSIGN_MSF (priv->track_info[i].address, ++ tocentry.entry.addr.msf); ++#else + tocentry.cdte_track = j; + tocentry.cdte_format = CDROM_MSF; + +@@ -351,7 +424,19 @@ + tocentry.cdte_ctrl != CDROM_DATA_TRACK ? 1 : 0; + ASSIGN_MSF (priv->track_info[i].address, + tocentry.cdte_addr.msf); ++#endif + } ++#ifdef __FreeBSD__ ++ tocentry.track = CDROM_LEADOUT; ++ tocentry.address_format = CD_MSF_FORMAT; ++ if (ioctl (cdrom->fd, CDIOREADTOCENTRY, &tocentry) < 0) { ++ g_warning ("Error getting leadout"); ++ gst_cdparanoia_cdrom_invalidate (lcd); ++ return; ++ } ++ ASSIGN_MSF (priv->track_info[priv->number_tracks].address, ++ tocentry.entry.addr.msf); ++#else + + tocentry.cdte_track = CDROM_LEADOUT; + tocentry.cdte_format = CDROM_MSF; +@@ -362,6 +447,7 @@ + } + ASSIGN_MSF (priv->track_info[priv->number_tracks].address, + tocentry.cdte_addr.msf); ++#endif + calculate_track_lengths (lcd); + + gst_cdparanoia_cdrom_close (lcd); +@@ -387,7 +473,11 @@ + } + + if (status->cd != GNOME_CDROM_STATUS_TRAY_OPEN) { ++#ifdef __FreeBSD__ ++ if (ioctl (cdrom->fd, CDIOCEJECT, 0) < 0) { ++#else + if (ioctl (cdrom->fd, CDROMEJECT, 0) < 0) { ++#endif + if (error) { + *error = g_error_new (GNOME_CDROM_ERROR, + GNOME_CDROM_ERROR_SYSTEM_ERROR, +@@ -555,7 +645,11 @@ + GstCdparanoiaCDRom *lcd; + GstCdparanoiaCDRomPrivate *priv; + GnomeCDRomStatus *status; ++#ifdef __FreeBSD__ ++ struct ioc_play_msf msf; ++#else + struct cdrom_msf msf; ++#endif + gboolean ret; + guint64 frames; + +@@ -630,9 +724,15 @@ + default: + /* Start playing */ + if (start == NULL) { ++#ifdef __FreeBSD__ ++ msf.start_m = status->absolute.minute; ++ msf.start_s = status->absolute.second; ++ msf.start_f = status->absolute.frame; ++#else + msf.cdmsf_min0 = status->absolute.minute; + msf.cdmsf_sec0 = status->absolute.second; + msf.cdmsf_frame0 = status->absolute.frame; ++#endif + } else { + if (start_track > 0 && + priv && priv->track_info && +@@ -642,19 +742,43 @@ + track_info[start_track - + 1].address, start, + &tmpmsf); ++#ifdef __FreeBSD__ ++ ++ msf.start_m = tmpmsf.minute; ++ msf.start_s = tmpmsf.second; ++ msf.start_f = tmpmsf.frame; ++#else + msf.cdmsf_min0 = tmpmsf.minute; + msf.cdmsf_sec0 = tmpmsf.second; + msf.cdmsf_frame0 = tmpmsf.frame; ++#endif + } else { ++#ifdef __FreeBSD__ ++ msf.start_m = start->minute; ++ msf.start_s = start->second; ++ msf.start_f = start->frame; ++#else + msf.cdmsf_min0 = start->minute; + msf.cdmsf_sec0 = start->second; + msf.cdmsf_frame0 = start->frame; ++#endif + } + } + + if (finish == NULL) { + if (priv && priv->track_info && + priv->number_tracks > 0) { ++#ifdef __FreeBSD__ ++ msf.end_m = ++ priv->track_info[priv->number_tracks]. ++ address.minute; ++ msf.end_s = ++ priv->track_info[priv->number_tracks]. ++ address.second; ++ msf.end_f = ++ priv->track_info[priv->number_tracks]. ++ address.frame; ++#else + msf.cdmsf_min1 = + priv->track_info[priv->number_tracks]. + address.minute; +@@ -664,10 +788,17 @@ + msf.cdmsf_frame1 = + priv->track_info[priv->number_tracks]. + address.frame; ++#endif + } else { ++#ifdef __FreeBSD__ ++ msf.end_m = 0; ++ msf.end_s = 0; ++ msf.end_f = 0; ++#else + msf.cdmsf_min1 = 0; + msf.cdmsf_sec1 = 0; + msf.cdmsf_frame1 = 0; ++#endif + } + } else { + if (finish_track > 0 && +@@ -679,13 +810,25 @@ + track_info[finish_track - + 1].address, finish, + &tmpmsf); ++#ifdef __FreeBSD__ ++ msf.end_m = tmpmsf.minute; ++ msf.end_s = tmpmsf.second; ++ msf.end_f = tmpmsf.frame; ++#else + msf.cdmsf_min1 = tmpmsf.minute; + msf.cdmsf_sec1 = tmpmsf.second; + msf.cdmsf_frame1 = tmpmsf.frame; ++#endif + } else { ++#ifdef __FreeBSD__ ++ msf.end_m = finish->minute; ++ msf.end_s = finish->second; ++ msf.end_f = finish->frame; ++#else + msf.cdmsf_min1 = finish->minute; + msf.cdmsf_sec1 = finish->second; + msf.cdmsf_frame1 = finish->frame; ++#endif + } + } + +@@ -944,7 +1087,11 @@ + GstCdparanoiaCDRom *lcd; + GstCdparanoiaCDRomPrivate *priv; + GnomeCDRomStatus *realstatus; ++#ifdef __FreeBSD__ ++ struct cd_sub_channel_position_data subchnl; ++#else + struct cdrom_subchnl subchnl; ++#endif + int cur_gst_status; + int cd_status; + guint64 value = 0; +@@ -966,6 +1113,7 @@ + return FALSE; + } + ++#ifndef __FreeBSD__ + cd_status = ioctl (cdrom->fd, CDROM_DRIVE_STATUS, CDSL_CURRENT); + if (cd_status != -1) { + switch (cd_status) { +@@ -1019,6 +1167,7 @@ + *status = NULL; + return FALSE; + } ++#endif + + /* Get the volume */ + /* TODO: get the mixer volume */ +@@ -1058,21 +1207,37 @@ + msf_to_frames (&priv->track_info[priv->cur_track - 1]. + address) + CD_MSF_OFFSET; + } ++#ifdef __FreeBSD__ ++ subchnl.track_number = priv->cur_track; ++ frames_to_msf_struct (&subchnl.reladdr, ++ priv->cur_rel_frame); ++ frames_to_msf_struct (&subchnl.absaddr, ++ priv->cur_abs_frame); ++#else + subchnl.cdsc_trk = priv->cur_track; + frames_to_msf_struct (&subchnl.cdsc_reladdr.msf, + priv->cur_rel_frame); + frames_to_msf_struct (&subchnl.cdsc_absaddr.msf, + priv->cur_abs_frame); ++#endif + + realstatus->track = 1; + switch (cur_gst_status) { + case GST_STATE_PLAYING: + realstatus->audio = GNOME_CDROM_AUDIO_PLAY; ++#ifdef __FreeBSD__ ++ ASSIGN_MSF (realstatus->relative, ++ subchnl.reladdr.msf); ++ ASSIGN_MSF (realstatus->absolute, ++ subchnl.absaddr.msf); ++ realstatus->track = subchnl.track_number; ++#else + ASSIGN_MSF (realstatus->relative, + subchnl.cdsc_reladdr.msf); + ASSIGN_MSF (realstatus->absolute, + subchnl.cdsc_absaddr.msf); + realstatus->track = subchnl.cdsc_trk; ++#endif + if (priv && realstatus->track > 0 && + realstatus->track <= priv->number_tracks) { + /* track_info may not be initialized */ +@@ -1084,11 +1249,19 @@ + + case GST_STATE_PAUSED: + realstatus->audio = GNOME_CDROM_AUDIO_PAUSE; ++#ifdef __FreeBSD__ ++ ASSIGN_MSF (realstatus->relative, ++ subchnl.reladdr.msf); ++ ASSIGN_MSF (realstatus->absolute, ++ subchnl.absaddr.msf); ++ realstatus->track = subchnl.track_number; ++#else + ASSIGN_MSF (realstatus->relative, + subchnl.cdsc_reladdr.msf); + ASSIGN_MSF (realstatus->absolute, + subchnl.cdsc_absaddr.msf); + realstatus->track = subchnl.cdsc_trk; ++#endif + if (priv && realstatus->track > 0 && + realstatus->track <= priv->number_tracks) { + /* track_info may not be initialized */ +@@ -1101,11 +1274,20 @@ + case GST_STATE_NULL: + case GST_STATE_READY: + realstatus->audio = GNOME_CDROM_AUDIO_COMPLETE; ++#ifdef __FreeBSD__ ++ ASSIGN_MSF (realstatus->relative, ++ subchnl.reladdr.msf); ++ ++ ASSIGN_MSF (realstatus->absolute, ++ subchnl.absaddr.msf); ++ realstatus->track = subchnl.track_number; ++#else + ASSIGN_MSF (realstatus->relative, + subchnl.cdsc_reladdr.msf); + ASSIGN_MSF (realstatus->absolute, + subchnl.cdsc_absaddr.msf); + realstatus->track = subchnl.cdsc_trk; ++#endif + if (priv && realstatus->track > 0 && + realstatus->track <= priv->number_tracks) { + /* track_info may not be initialized */ +@@ -1133,7 +1315,11 @@ + return FALSE; + } + ++#ifdef __FreeBSD__ ++ if (ioctl (cdrom->fd, CDIOCCLOSE) < 0) { ++#else + if (ioctl (cdrom->fd, CDROMCLOSETRAY) < 0) { ++#endif + if (error) { + *error = g_error_new (GNOME_CDROM_ERROR, + GNOME_CDROM_ERROR_SYSTEM_ERROR, +@@ -1155,7 +1341,11 @@ + { + GstCdparanoiaCDRom *lcd; + GstCdparanoiaCDRomPrivate *priv; ++#ifdef __FreeBSD__ ++ struct ioc_vol vol; ++#else + struct cdrom_volctrl vol; ++#endif + + lcd = GST_CDPARANOIA_CDROM (cdrom); + priv = lcd->priv; +@@ -1164,10 +1354,19 @@ + return FALSE; + } + ++#ifdef __FreeBSD__ ++ vol.vol[0] = volume; ++ vol.vol[1] = vol.vol[2] = vol.vol[3] = volume; ++#else + vol.channel0 = volume; + vol.channel1 = vol.channel2 = vol.channel3 = volume; ++#endif + ++#ifdef __FreeBSD__ ++ if (ioctl (cdrom->fd, CDIOCSETVOL, &vol) < 0) { ++#else + if (ioctl (cdrom->fd, CDROMVOLCTRL, &vol) < 0) { ++#endif + if (error) { + *error = g_error_new (GNOME_CDROM_ERROR, + GNOME_CDROM_ERROR_SYSTEM_ERROR, +@@ -1204,7 +1403,11 @@ + } + + /* Fire a harmless ioctl at the device. */ ++#ifdef __FreeBSD__ ++ if (ioctl (fd, CDIOCCAPABILITY, 0) < 0) { ++#else + if (ioctl (fd, CDROM_GET_CAPABILITY, 0) < 0) { ++#endif + /* Failed, it's not a CDROM drive */ + close (fd); + +@@ -1302,7 +1505,11 @@ + gst_cdparanoia_cdrom_init (GstCdparanoiaCDRom * cdrom) + { + cdrom->priv = g_new0 (GstCdparanoiaCDRomPrivate, 1); ++#ifdef __FreeBSD__ ++ cdrom->priv->tochdr = g_new0 (struct ioc_toc_header, 1); ++#else + cdrom->priv->tochdr = g_new0 (struct cdrom_tochdr, 1); ++#endif + cdrom->priv->track_info = NULL; + cdrom->priv->cd_device = NULL; + cdrom->priv->cur_track = 1; diff --git a/audio/gnome-media/pkg-plist b/audio/gnome-media/pkg-plist index cfc20d4d6..df50a2c38 100644 --- a/audio/gnome-media/pkg-plist +++ b/audio/gnome-media/pkg-plist @@ -423,6 +423,7 @@ share/locale/az/LC_MESSAGES/gnome-media-2.0.mo share/locale/be/LC_MESSAGES/gnome-media-2.0.mo share/locale/bg/LC_MESSAGES/gnome-media-2.0.mo share/locale/bn/LC_MESSAGES/gnome-media-2.0.mo +share/locale/bs/LC_MESSAGES/gnome-media-2.0.mo share/locale/ca/LC_MESSAGES/gnome-media-2.0.mo share/locale/cs/LC_MESSAGES/gnome-media-2.0.mo share/locale/cy/LC_MESSAGES/gnome-media-2.0.mo @@ -454,6 +455,7 @@ share/locale/mk/LC_MESSAGES/gnome-media-2.0.mo share/locale/ml/LC_MESSAGES/gnome-media-2.0.mo share/locale/mn/LC_MESSAGES/gnome-media-2.0.mo share/locale/ms/LC_MESSAGES/gnome-media-2.0.mo +share/locale/nb/LC_MESSAGES/gnome-media-2.0.mo share/locale/nl/LC_MESSAGES/gnome-media-2.0.mo share/locale/nn/LC_MESSAGES/gnome-media-2.0.mo share/locale/no/LC_MESSAGES/gnome-media-2.0.mo |