pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/misc/libcdio uodate to 0.70
details: https://anonhg.NetBSD.org/pkgsrc/rev/be512c442832
branches: trunk
changeset: 481473:be512c442832
user: drochner <drochner%pkgsrc.org@localhost>
date: Tue Oct 05 14:23:18 2004 +0000
description:
uodate to 0.70
changes:
- SCSI MMC interface routine (all except Darwin)
- CD-Text support (all except Darwin)
- Distinguish DVD's from CD's
- Code clean-ups and reduced code duplication
- Better CUE parsing
- Reporting drive capability is more accurate
- add constant driver_id for kind of hardware driver in build
- new drive scanning routines which pass back driver as well
as drive string. Speeds up subsequent opens.
diffstat:
misc/libcdio/Makefile | 7 +--
misc/libcdio/PLIST | 6 +++-
misc/libcdio/distinfo | 7 +--
misc/libcdio/files/_cdio_netbsd.c | 63 +++++++++++++++++++++++++++++++++++++-
misc/libcdio/patches/patch-ab | 22 -------------
5 files changed, 72 insertions(+), 33 deletions(-)
diffs (209 lines):
diff -r 088f0581c7d0 -r be512c442832 misc/libcdio/Makefile
--- a/misc/libcdio/Makefile Tue Oct 05 14:18:10 2004 +0000
+++ b/misc/libcdio/Makefile Tue Oct 05 14:23:18 2004 +0000
@@ -1,8 +1,7 @@
-# $NetBSD: Makefile,v 1.13 2004/10/03 00:13:00 tv Exp $
+# $NetBSD: Makefile,v 1.14 2004/10/05 14:23:18 drochner Exp $
#
-DISTNAME= libcdio-0.68
-PKGREVISION= 1
+DISTNAME= libcdio-0.70
CATEGORIES= misc
MASTER_SITES= ${MASTER_SITE_GNU:=libcdio/}
@@ -27,7 +26,7 @@
.if ${OPSYS} == "NetBSD"
# XXX we just replace the freebsd module so save patches
pre-patch:
- ${CP} ${FILESDIR}/_cdio_netbsd.c ${WRKSRC}/lib/_cdio_freebsd.c
+ ${CP} ${FILESDIR}/_cdio_netbsd.c ${WRKSRC}/lib/FreeBSD/freebsd.c
.endif
.include "../../devel/pkgconfig/buildlink3.mk"
diff -r 088f0581c7d0 -r be512c442832 misc/libcdio/PLIST
--- a/misc/libcdio/PLIST Tue Oct 05 14:18:10 2004 +0000
+++ b/misc/libcdio/PLIST Tue Oct 05 14:23:18 2004 +0000
@@ -1,12 +1,16 @@
-@comment $NetBSD: PLIST,v 1.5 2004/09/22 08:09:44 jlam Exp $
+@comment $NetBSD: PLIST,v 1.6 2004/10/05 14:23:18 drochner Exp $
+bin/cd-drive
bin/cd-info
bin/cd-read
bin/iso-info
bin/iso-read
include/cdio/cd_types.h
include/cdio/cdio.h
+include/cdio/cdtext.h
+include/cdio/dvd.h
include/cdio/iso9660.h
include/cdio/logging.h
+include/cdio/scsi_mmc.h
include/cdio/sector.h
include/cdio/types.h
include/cdio/util.h
diff -r 088f0581c7d0 -r be512c442832 misc/libcdio/distinfo
--- a/misc/libcdio/distinfo Tue Oct 05 14:18:10 2004 +0000
+++ b/misc/libcdio/distinfo Tue Oct 05 14:23:18 2004 +0000
@@ -1,6 +1,5 @@
-$NetBSD: distinfo,v 1.3 2004/04/19 18:08:27 drochner Exp $
+$NetBSD: distinfo,v 1.4 2004/10/05 14:23:18 drochner Exp $
-SHA1 (libcdio-0.68.tar.gz) = c3935f6fd66d6f6fe1451862d5281fd292eabb89
-Size (libcdio-0.68.tar.gz) = 1253630 bytes
+SHA1 (libcdio-0.70.tar.gz) = 57d45525fc5dc8de8c0dc9fd574d90cb534b36df
+Size (libcdio-0.70.tar.gz) = 1474322 bytes
SHA1 (patch-aa) = ebda7a5453404e6adf4755f768a5293ca9871878
-SHA1 (patch-ab) = 2d937aa72b392264777c24fdc454d7863b5e8544
diff -r 088f0581c7d0 -r be512c442832 misc/libcdio/files/_cdio_netbsd.c
--- a/misc/libcdio/files/_cdio_netbsd.c Tue Oct 05 14:18:10 2004 +0000
+++ b/misc/libcdio/files/_cdio_netbsd.c Tue Oct 05 14:23:18 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: _cdio_netbsd.c,v 1.1 2004/04/08 17:40:06 drochner Exp $ */
+/* $NetBSD: _cdio_netbsd.c,v 1.2 2004/10/05 14:23:18 drochner Exp $ */
/*
* Copyright (c) 2003
@@ -73,6 +73,35 @@
} _img_private_t;
static int
+run_scsi_cmd_freebsd(const void *p_user_data, unsigned int i_timeout_ms,
+ unsigned int i_cdb, const scsi_mmc_cdb_t *p_cdb,
+ scsi_mmc_direction_t e_direction,
+ unsigned int i_buf, void *p_buf )
+{
+ const _img_private_t *_obj = p_user_data;
+ scsireq_t req;
+
+ memset(&req, 0, sizeof(req));
+ memcpy(&req.cmd[0], p_cdb, i_cdb);
+ req.cmdlen = i_cdb;
+ req.datalen = i_buf;
+ req.databuf = p_buf;
+ req.timeout = i_timeout_ms;
+ req.flags = e_direction == SCSI_MMC_DATA_READ ? SCCMD_READ : SCCMD_WRITE;
+
+ if (ioctl(_obj->gen.fd, SCIOCCOMMAND, &req) < 0) {
+ perror("SCIOCCOMMAND");
+ return -1;
+ }
+ if (req.retsts != SCCMD_OK) {
+ fprintf(stderr, "SCIOCCOMMAND sts %d\n", req.retsts);
+ return -1;
+ }
+
+ return 0;
+}
+
+static int
_cdio_read_audio_sectors(void *user_data, void *data, lsn_t lsn,
unsigned int nblocks)
{
@@ -241,6 +270,13 @@
return true;
}
+static bool
+read_toc_freebsd (void *p_user_data)
+{
+
+ return _cdio_read_toc(p_user_data);
+}
+
static int
_cdio_read_discinfo(_img_private_t *_obj)
{
@@ -437,9 +473,17 @@
return true;
}
+char **
+cdio_get_devices_freebsd (void)
+{
+
+ return 0;
+}
+
char *
cdio_get_default_device_freebsd()
{
+
return strdup(DEFAULT_CDIO_DEVICE);
}
@@ -447,8 +491,13 @@
.eject_media = _cdio_eject_media,
.free = cdio_generic_free,
.get_arg = _cdio_get_arg,
+ .get_cdtext = get_cdtext_generic,
.get_default_device = cdio_get_default_device_freebsd,
+ .get_devices = cdio_get_devices_freebsd,
+ .get_discmode = get_discmode_generic,
+ .get_drive_cap = scsi_mmc_get_drive_cap_generic,
.get_first_track_num= _cdio_get_first_track_num,
+ .get_mcn = scsi_mmc_get_mcn_generic,
.get_num_tracks = _cdio_get_num_tracks,
.get_track_format = _cdio_get_track_format,
.get_track_green = _cdio_get_track_green,
@@ -459,6 +508,8 @@
.read_audio_sectors = _cdio_read_audio_sectors,
.read_mode2_sector = _cdio_read_mode2_sector,
.read_mode2_sectors = _cdio_read_mode2_sectors,
+ .read_toc = read_toc_freebsd,
+ .run_scsi_mmc_cmd = run_scsi_cmd_freebsd,
.set_arg = _cdio_set_arg,
.stat_size = _cdio_stat_size
};
@@ -478,7 +529,7 @@
_cdio_set_arg(_data, "source",
(source_name ? source_name : DEFAULT_CDIO_DEVICE));
- ret = cdio_new(_data, &_funcs);
+ ret = cdio_new(&_data->gen, &_funcs);
if (!ret)
return NULL;
@@ -490,8 +541,16 @@
}
}
+CdIo *
+cdio_open_am_freebsd(const char *source_name, const char *am)
+{
+
+ return (cdio_open_freebsd(source_name));
+}
+
bool
cdio_have_freebsd(void)
{
+
return true;
}
diff -r 088f0581c7d0 -r be512c442832 misc/libcdio/patches/patch-ab
--- a/misc/libcdio/patches/patch-ab Tue Oct 05 14:18:10 2004 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-$NetBSD: patch-ab,v 1.1 2004/04/19 18:08:27 drochner Exp $
-
---- src/cd-info.c.orig 2004-03-20 22:46:57.000000000 +0000
-+++ src/cd-info.c 2004-04-18 17:50:54.000000000 +0000
-@@ -123,7 +123,7 @@
- int opt;
-
- struct poptOption optionsTable[] = {
-- {"access-mode", 'a', POPT_ARG_STRING, &opts.access_mode, 0,
-+ {"access-mode", 'm', POPT_ARG_STRING, &opts.access_mode, 0,
- "Set CD access methed"},
-
- {"debug", 'd', POPT_ARG_INT, &opts.debug_level, 0,
-@@ -426,7 +426,7 @@
- matches = cddb_query(conn, disc);
-
- if (-1 == matches)
-- printf("%s: %s\n", program_name, cddb_error_str(errno));
-+ printf("%s: %s\n", program_name, cddb_error_str(cddb_errno(conn)));
- else {
- printf("%s: Found %d matches in CDDB\n", program_name, matches);
- for (i=1; i<=matches; i++) {
Home |
Main Index |
Thread Index |
Old Index