summaryrefslogtreecommitdiff
path: root/sysutils/k3b
diff options
context:
space:
mode:
authormarkd <markd@pkgsrc.org>2006-07-20 11:22:25 +0000
committermarkd <markd@pkgsrc.org>2006-07-20 11:22:25 +0000
commita4d7a236a2fa414c84315b158993ce30d0135d8c (patch)
treeee39a33430c14450011149615df441779472992f /sysutils/k3b
parent79967c87b22fa3961daf4ead4e11ba3107b52f4a (diff)
downloadpkgsrc-a4d7a236a2fa414c84315b158993ce30d0135d8c.tar.gz
Update k3b to 0.12.16.
* FreeBSD Compile fixes (thanks to Heiner Eichmann). * NetBSD support (thanks to Mark Davies) * Always force 44.1khz in the Lame MP3 encoder plugin. * Fixed VideoDVD creation on rewritable media. * Fixed Copy of Enhanced Audio CDs with CD-Text. * Changed default boot cataloge name from "boot.cataloge" to "boot.catalog" * Fixed a crash when reusing the same DVD Iso Image writing dialog. * Ignore case when comparing MD5 sums entered by the user. * Make sure that filenames in a data project's folder are unique. * Allow index statements bigger than 99 minutes in cue files. * Properly set the length of SCSI commands (again this fixes some device detection problems).
Diffstat (limited to 'sysutils/k3b')
-rw-r--r--sysutils/k3b/Makefile11
-rw-r--r--sysutils/k3b/PLIST6
-rw-r--r--sysutils/k3b/distinfo22
-rw-r--r--sysutils/k3b/patches/patch-aa64
-rw-r--r--sysutils/k3b/patches/patch-ab150
-rw-r--r--sysutils/k3b/patches/patch-ac12
-rw-r--r--sysutils/k3b/patches/patch-ad131
-rw-r--r--sysutils/k3b/patches/patch-ae14
-rw-r--r--sysutils/k3b/patches/patch-af94
-rw-r--r--sysutils/k3b/patches/patch-ag28
-rw-r--r--sysutils/k3b/patches/patch-ah50
-rw-r--r--sysutils/k3b/patches/patch-ai13
-rw-r--r--sysutils/k3b/patches/patch-aj14
-rw-r--r--sysutils/k3b/patches/patch-ak15
-rw-r--r--sysutils/k3b/patches/patch-al14
15 files changed, 44 insertions, 594 deletions
diff --git a/sysutils/k3b/Makefile b/sysutils/k3b/Makefile
index 6b4704324d4..ce293ffba10 100644
--- a/sysutils/k3b/Makefile
+++ b/sysutils/k3b/Makefile
@@ -1,8 +1,7 @@
-# $NetBSD: Makefile,v 1.9 2006/06/28 21:19:55 joerg Exp $
+# $NetBSD: Makefile,v 1.10 2006/07/20 11:22:25 markd Exp $
#
-DISTNAME= k3b-0.12.15
-PKGREVISION= 1
+DISTNAME= k3b-0.12.16
CATEGORIES= sysutils
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=k3b/}
EXTRACT_SUFX= .tar.bz2
@@ -15,16 +14,12 @@ DEPENDS+= cdrdao-[0-9]*:../../sysutils/cdrdao
DEPENDS+= {cdrtools,cdrtools-ossdvd}-[0-9]*:../../sysutils/cdrtools
GNU_CONFIGURE= yes
-USE_TOOLS+= gmake autoconf perl pkg-config
+USE_TOOLS+= gmake perl pkg-config
USE_LANGUAGES= c c++
USE_LIBTOOL= yes
ONLY_FOR_PLATFORM= FreeBSD-*-* Linux-*-* NetBSD-*-* DragonFly-*-*
-pre-configure:
- cd ${WRKSRC} && autoheader
- cd ${WRKSRC} && autoconf
-
.include "../../meta-pkgs/kde3/kde3.mk"
.include "../../audio/flac/buildlink3.mk"
.include "../../audio/lame/buildlink3.mk"
diff --git a/sysutils/k3b/PLIST b/sysutils/k3b/PLIST
index 2c6aa8980ba..8e67bfd4421 100644
--- a/sysutils/k3b/PLIST
+++ b/sysutils/k3b/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.2 2006/02/20 08:53:51 markd Exp $
+@comment $NetBSD: PLIST,v 1.3 2006/07/20 11:22:25 markd Exp $
bin/k3b
bin/k3bsetup
include/k3baudiocdtrackdrag.h
@@ -105,6 +105,8 @@ include/k3bwavefilewriter.h
include/kcutlabel.h
lib/kde3/kcm_k3bsetup2.la
lib/kde3/libk3bartsoutputplugin.la
+lib/kde3/libk3baudiometainforenamerplugin.la
+lib/kde3/libk3baudioprojectcddbplugin.la
lib/kde3/libk3bexternalencoder.la
lib/kde3/libk3bflacdecoder.la
lib/kde3/libk3blameencoder.la
@@ -115,8 +117,6 @@ lib/kde3/libk3boggvorbisencoder.la
lib/kde3/libk3bsoxencoder.la
lib/kde3/libk3bwavedecoder.la
lib/libk3b.la
-lib/libk3baudiometainforenamerplugin.la
-lib/libk3baudioprojectcddbplugin.la
lib/libk3bdevice.la
share/applications/kde/k3b.desktop
share/doc/kde/HTML/en/k3b/audiocd-howto.docbook
diff --git a/sysutils/k3b/distinfo b/sysutils/k3b/distinfo
index 36ced543a7c..94692861180 100644
--- a/sysutils/k3b/distinfo
+++ b/sysutils/k3b/distinfo
@@ -1,17 +1,7 @@
-$NetBSD: distinfo,v 1.6 2006/06/20 19:08:13 joerg Exp $
+$NetBSD: distinfo,v 1.7 2006/07/20 11:22:25 markd Exp $
-SHA1 (k3b-0.12.15.tar.bz2) = 4f2768f6473032fbf6cde2d13b1c2729b7e91e3f
-RMD160 (k3b-0.12.15.tar.bz2) = 9d0ff14b394153d97ef61fcf7b46894ec5d3d511
-Size (k3b-0.12.15.tar.bz2) = 4000389 bytes
-SHA1 (patch-aa) = 5687cff4cfdfddf2258f1e991d67ed262a6a21f2
-SHA1 (patch-ab) = adf633c8ea5b2da95a6c69a2c5abedfd69b79109
-SHA1 (patch-ac) = 3b65ca0ea8e585ce68611c0332a3851a107b68f7
-SHA1 (patch-ad) = 8e111ef2a75595261f95eb533459560f01b6fae7
-SHA1 (patch-ae) = eb0ac8518ae813027aa09961344c0ab1966d4601
-SHA1 (patch-af) = 672150438329827bf89768bfdac9c5a613f02647
-SHA1 (patch-ag) = 19f37774896e691970527fdf18ce44a2c3228aff
-SHA1 (patch-ah) = 7e8822880873b3f7149a73f0d119fb52098114ff
-SHA1 (patch-ai) = cecb17457caf5bd2039b83eaf6d3e4824f5a2055
-SHA1 (patch-aj) = ebb452a3790b0cf228e3b272490bd9d6cb4c6479
-SHA1 (patch-ak) = 471bd5c253aa8aed4c5d9e4f445ad2f4dfa24fd1
-SHA1 (patch-al) = bcc69d3b5b68fad1c46989344b1fb622e7ec6ad4
+SHA1 (k3b-0.12.16.tar.bz2) = 875ebae1e5bc4ef0f186c1025087ed8005c10248
+RMD160 (k3b-0.12.16.tar.bz2) = b4b64924096581bcb0c3432f99f0e27ffe0aca79
+Size (k3b-0.12.16.tar.bz2) = 4004784 bytes
+SHA1 (patch-aa) = cd4f5203ea94d8f10e3d0b024d1edc71b688c709
+SHA1 (patch-ag) = da4c67842212d16c85ed0b5b71f6325578edcf5b
diff --git a/sysutils/k3b/patches/patch-aa b/sysutils/k3b/patches/patch-aa
index 6c52610b25a..687653c9ffc 100644
--- a/sysutils/k3b/patches/patch-aa
+++ b/sysutils/k3b/patches/patch-aa
@@ -1,48 +1,30 @@
-$NetBSD: patch-aa,v 1.2 2006/06/20 19:08:13 joerg Exp $
+$NetBSD: patch-aa,v 1.3 2006/07/20 11:22:25 markd Exp $
---- libk3b/core/k3bglobals.cpp.orig 2005-12-16 02:09:01.000000000 +1300
+--- libk3b/core/k3bglobals.cpp.orig 2006-06-23 02:45:37.000000000 +1200
+++ libk3b/core/k3bglobals.cpp
-@@ -38,12 +38,21 @@
- #include <cmath>
- #include <sys/utsname.h>
- #include <sys/stat.h>
-+#if defined(__NetBSD__) || defined(__DragonFly__)
-+#define stat64 stat
-+#endif
+@@ -41,16 +41,16 @@
--#ifdef __FreeBSD__
-+#include <config.h>
-+#if defined(__FreeBSD__) || defined(__NetBSD__)
- #include <sys/param.h>
- #include <sys/mount.h>
- #else
--#include <sys/vfs.h>
-+# ifdef HAVE_SYS_STATVFS_H
-+# include <sys/statvfs.h>
-+# endif
-+# ifdef HAVE_SYS_STATFS_H
-+# include <sys/vfs.h>
-+# endif
+ #include <config.h>
+ #if defined(__FreeBSD__) || defined(__NetBSD__)
+-#include <sys/param.h>
+-#include <sys/mount.h>
+-#else
+-# ifdef HAVE_SYS_STATVFS_H
+-# include <sys/statvfs.h>
+-# endif
+-# ifdef HAVE_SYS_STATFS_H
+-# include <sys/vfs.h>
+-# endif
++# include <sys/param.h>
++# include <sys/mount.h>
#endif
++#ifdef HAVE_SYS_STATVFS_H
++# include <sys/statvfs.h>
++#endif
++#ifdef HAVE_SYS_STATFS_H
++# include <sys/vfs.h>
++#endif
++
-@@ -235,10 +244,19 @@ QString K3b::systemName()
-
- bool K3b::kbFreeOnFs( const QString& path, unsigned long& size, unsigned long& avail )
- {
-+#ifdef HAVE_STATVFS
-+ struct statvfs fs;
-+ if( ::statvfs( QFile::encodeName(path), &fs ) == 0 ) {
-+ unsigned long kBfak = fs.f_frsize/1024;
-+#else
-+# ifndef HAVE_STATFS
-+# error "No statfs, no statvfs? Help!"
-+# endif
- struct statfs fs;
-
- if( ::statfs( QFile::encodeName(path), &fs ) == 0 ) {
- unsigned long kBfak = fs.f_bsize/1024;
-+#endif
- size = fs.f_blocks*kBfak;
- avail = fs.f_bavail*kBfak;
diff --git a/sysutils/k3b/patches/patch-ab b/sysutils/k3b/patches/patch-ab
deleted file mode 100644
index 95473a91543..00000000000
--- a/sysutils/k3b/patches/patch-ab
+++ /dev/null
@@ -1,150 +0,0 @@
-$NetBSD: patch-ab,v 1.2 2006/06/13 12:36:16 markd Exp $
-
---- libk3bdevice/k3bdevice.cpp.orig 2006-04-12 05:26:45.000000000 +1200
-+++ libk3bdevice/k3bdevice.cpp
-@@ -63,6 +63,10 @@ typedef unsigned char u8;
- #define CD_FRAMESIZE_RAW 2352
- #endif
-
-+#ifdef Q_OS_NETBSD
-+#include <sys/cdio.h>
-+#endif
-+
- #ifdef HAVE_RESMGR
- extern "C" {
- #include <resmgr.h>
-@@ -100,7 +104,7 @@ const char* K3bDevice::Device::cdrdao_dr
- };
-
-
--#ifdef Q_OS_LINUX
-+#if defined(Q_OS_LINUX) || defined(Q_OS_NETBSD)
- int K3bDevice::openDevice( const char* name, bool write )
- {
- int fd = -1;
-@@ -143,6 +147,9 @@ public:
- #ifdef Q_OS_LINUX
- deviceFd(-1),
- #endif
-+#ifdef Q_OS_NETBSD
-+ deviceFd(-1),
-+#endif
- #ifdef Q_OS_FREEBSD
- cam(0),
- #endif
-@@ -157,6 +164,9 @@ public:
- #ifdef Q_OS_LINUX
- int deviceFd;
- #endif
-+#ifdef Q_OS_NETBSD
-+ int deviceFd;
-+#endif
- #ifdef Q_OS_FREEBSD
- struct cam_device *cam;
- #endif
-@@ -1465,6 +1475,19 @@ bool K3bDevice::Device::fixupToc( K3bDev
-
- bool K3bDevice::Device::block( bool b ) const
- {
-+#ifdef Q_OS_NETBSD
-+ bool success = false;
-+ bool needToClose = !isOpen();
-+ int arg = b ? 1 : 0;
-+
-+ if( open() ) {
-+ if ( ::ioctl( d->deviceFd, DIOCLOCK, &arg ) >= 0)
-+ success = true;
-+ if( needToClose )
-+ close();
-+ }
-+ return success;
-+#else
- ScsiCommand cmd( this );
- cmd[0] = MMC_PREVENT_ALLOW_MEDIUM_REMOVAL;
- if( b )
-@@ -1475,6 +1498,7 @@ bool K3bDevice::Device::block( bool b )
- kdDebug() << "(K3bDevice::Device) MMC ALLOW MEDIA REMOVAL failed." << endl;
-
- return ( r == 0 );
-+#endif
- }
-
- bool K3bDevice::Device::rewritable() const
-@@ -1496,6 +1520,19 @@ bool K3bDevice::Device::rewritable() con
-
- bool K3bDevice::Device::eject() const
- {
-+#ifdef Q_OS_NETBSD
-+ bool success = false;
-+ bool needToClose = !isOpen();
-+ int arg = 0;
-+
-+ if( open() ) {
-+ if ( ::ioctl( d->deviceFd, DIOCEJECT, &arg ) >= 0)
-+ success = true;
-+ if( needToClose )
-+ close();
-+ }
-+ return success;
-+#else
- ScsiCommand cmd( this );
- cmd[0] = MMC_START_STOP_UNIT;
-
-@@ -1507,15 +1544,30 @@ bool K3bDevice::Device::eject() const
- cmd[4] = 0x2; // LoEj = 1, Start = 0
-
- return !cmd.transport();
-+#endif
- }
-
-
- bool K3bDevice::Device::load() const
- {
-+#ifdef Q_OS_NETBSD
-+ bool success = false;
-+ bool needToClose = !isOpen();
-+ int arg = 0;
-+
-+ if( open() ) {
-+ if ( ::ioctl( d->deviceFd, CDIOCCLOSE, &arg ) >= 0)
-+ success = true;
-+ if( needToClose )
-+ close();
-+ }
-+ return success;
-+#else
- ScsiCommand cmd( this );
- cmd[0] = MMC_START_STOP_UNIT;
- cmd[4] = 0x3; // LoEj = 1, Start = 1
- return !cmd.transport();
-+#endif
- }
-
-
-@@ -1557,7 +1609,7 @@ bool K3bDevice::Device::open( bool write
- }
- return (d->cam != 0);
- #endif
--#ifdef Q_OS_LINUX
-+#if defined(Q_OS_LINUX) || defined(Q_OS_NETBSD)
- if( d->deviceFd == -1 )
- d->deviceFd = openDevice( QFile::encodeName(devicename()), write );
-
-@@ -1574,7 +1626,7 @@ void K3bDevice::Device::close() const
- d->cam = 0;
- }
- #endif
--#ifdef Q_OS_LINUX
-+#if defined(Q_OS_LINUX) || defined(Q_OS_NETBSD)
- if( d->deviceFd != -1 ) {
- ::close( d->deviceFd );
- d->deviceFd = -1;
-@@ -1588,7 +1640,7 @@ bool K3bDevice::Device::isOpen() const
- #ifdef Q_OS_FREEBSD
- return d->cam;
- #endif
--#ifdef Q_OS_LINUX
-+#if defined(Q_OS_LINUX) || defined(Q_OS_NETBSD)
- return ( d->deviceFd != -1 );
- #endif
- }
diff --git a/sysutils/k3b/patches/patch-ac b/sysutils/k3b/patches/patch-ac
deleted file mode 100644
index 77bf4cc1831..00000000000
--- a/sysutils/k3b/patches/patch-ac
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD: patch-ac,v 1.1.1.1 2006/02/01 00:53:00 markd Exp $
-
---- libk3bdevice/k3bdevicemanager.h.orig 2005-12-16 02:08:38.000000000 +1300
-+++ libk3bdevice/k3bdevicemanager.h
-@@ -219,6 +219,7 @@ namespace K3bDevice {
-
- Device *addDevice( Device* );
- void BSDDeviceScan();
-+ void NetBSDDeviceScan();
- void LinuxDeviceScan();
- };
- }
diff --git a/sysutils/k3b/patches/patch-ad b/sysutils/k3b/patches/patch-ad
deleted file mode 100644
index 83f67f85820..00000000000
--- a/sysutils/k3b/patches/patch-ad
+++ /dev/null
@@ -1,131 +0,0 @@
-$NetBSD: patch-ad,v 1.1.1.1 2006/02/01 00:53:00 markd Exp $
-
---- libk3bdevice/k3bdevicemanager.cpp.orig 2005-12-16 02:08:38.000000000 +1300
-+++ libk3bdevice/k3bdevicemanager.cpp
-@@ -100,6 +100,11 @@ typedef unsigned char u8;
- #endif
-
-
-+#ifdef Q_OS_NETBSD
-+#include <sys/scsiio.h>
-+#endif
-+
-+
-
- class K3bDevice::DeviceManager::Private
- {
-@@ -238,6 +243,9 @@ int K3bDevice::DeviceManager::scanBus()
- #ifdef Q_OS_LINUX
- LinuxDeviceScan();
- #endif
-+#ifdef Q_OS_NETBSD
-+ NetBSDDeviceScan();
-+#endif
- #ifdef Q_OS_FREEBSD
- BSDDeviceScan();
- #endif
-@@ -335,6 +343,36 @@ void K3bDevice::DeviceManager::LinuxDevi
- }
-
-
-+void K3bDevice::DeviceManager::NetBSDDeviceScan()
-+{
-+ // Generate entries for /dev/cd* devices
-+ // Note: As there are only 10 possible /dev/(r)cd devices,
-+ // only these will be found.
-+
-+ int i;
-+
-+ // Whole disk mask (According to cd(4), the AMD64, i386 and BeBox ports use
-+ // 'd' as whole-disk partition, the rest uses 'c'.)
-+
-+#if defined(__i386__) || defined (__amd64__) || defined (__bebox__)
-+ char slicename = 'd';
-+#else
-+ char slicename = 'c';
-+#endif
-+
-+ char devicename[11]; // /dev/rcdXd + trailing zero
-+
-+ for (i = 0; i < 10; i++ ) // cd(4) claims there are max. 10 CD devices.
-+ {
-+ snprintf(devicename,11,"/dev/rcd%d%c",i, slicename);
-+ if (addDevice(QString(devicename))) // let addDevice figure it out.
-+ {
-+ m_foundDevices++;
-+ }
-+ }
-+}
-+
-+
- void K3bDevice::DeviceManager::BSDDeviceScan()
- {
- // Unfortunately uses lots of FBSD-specific data structures
-@@ -619,7 +657,7 @@ bool K3bDevice::DeviceManager::testForCd
- Q_UNUSED(devicename);
- return true;
- #endif
--#ifdef Q_OS_LINUX
-+#if defined(Q_OS_LINUX) || defined(Q_OS_NETBSD)
- bool ret = false;
- int cdromfd = K3bDevice::openDevice( devicename.ascii() );
- if (cdromfd < 0) {
-@@ -636,7 +674,10 @@ bool K3bDevice::DeviceManager::testForCd
- }
- else {
- kdDebug() << devicename << " is block device (" << (int)(cdromStat.st_rdev & 0xFF) << ")" << endl;
--
-+#if defined(Q_OS_NETBSD)
-+ }
-+ {
-+#endif
- // inquiry
- // use a 36 bytes buffer since not all devices return the full inquiry struct
- unsigned char buf[36];
-@@ -881,6 +922,46 @@ bool K3bDevice::DeviceManager::determine
- /* NOTREACHED */
- #endif
-
-+#ifdef Q_OS_NETBSD
-+ int cdromfd = K3bDevice::openDevice ( dev.ascii() );
-+ if (cdromfd < 0) {
-+ int local_errno = errno; // For all we know, kdDebug() destroys errno
-+ kdDebug() << "could not open device " << dev << " (" << strerror(local_errno) << ")" << endl;
-+ return false;
-+ }
-+
-+ struct scsi_addr my_addr;
-+
-+ if (::ioctl(cdromfd, SCIOCIDENTIFY, &my_addr))
-+ {
-+ int local_errno = errno; // For all we know, kdDebug() destroys errno
-+ kdDebug() << "ioctl(SCIOCIDENTIFY) failed on device " << dev << " (" << strerror(local_errno) << ")" << endl;
-+
-+ ::close(cdromfd);
-+ return false;
-+ }
-+
-+ if (my_addr.type == TYPE_ATAPI)
-+ {
-+ // XXX Re-map atapibus, so it doesn't conflict with "real" scsi
-+ // busses
-+
-+ bus = 15;
-+ id = my_addr.addr.atapi.drive + 2 * my_addr.addr.atapi.atbus;
-+ lun = 0;
-+ }
-+ else
-+ {
-+ bus = my_addr.addr.scsi.scbus;
-+ id = my_addr.addr.scsi.target;
-+ lun = my_addr.addr.scsi.lun;
-+ }
-+
-+ ::close(cdromfd);
-+
-+ return true;
-+#endif
-+
- #ifdef Q_OS_LINUX
- int ret = false;
- int cdromfd = K3bDevice::openDevice( dev.ascii() );
diff --git a/sysutils/k3b/patches/patch-ae b/sysutils/k3b/patches/patch-ae
deleted file mode 100644
index 9785c0b75b8..00000000000
--- a/sysutils/k3b/patches/patch-ae
+++ /dev/null
@@ -1,14 +0,0 @@
-$NetBSD: patch-ae,v 1.1.1.1 2006/02/01 00:53:00 markd Exp $
-
---- libk3bdevice/k3bscsicommand.cpp.orig 2005-12-16 02:08:38.000000000 +1300
-+++ libk3bdevice/k3bscsicommand.cpp
-@@ -186,6 +186,9 @@ void K3bDevice::ScsiCommand::debugError(
- #ifdef Q_OS_FREEBSD
- #include "k3bscsicommand_bsd.cpp"
- #endif
-+#ifdef Q_OS_NETBSD
-+#include "k3bscsicommand_netbsd.cpp"
-+#endif
-
-
-
diff --git a/sysutils/k3b/patches/patch-af b/sysutils/k3b/patches/patch-af
deleted file mode 100644
index 2667bdc4d8a..00000000000
--- a/sysutils/k3b/patches/patch-af
+++ /dev/null
@@ -1,94 +0,0 @@
-$NetBSD: patch-af,v 1.2 2006/06/13 12:36:16 markd Exp $
-
---- /dev/null 2006-01-31 00:47:43.000000000 +1300
-+++ libk3bdevice/k3bscsicommand_netbsd.cpp
-@@ -0,0 +1,89 @@
-+/*
-+ *
-+ */
-+
-+#include "k3bscsicommand.h"
-+#include "k3bdevice.h"
-+
-+#include <kdebug.h>
-+
-+#include <sys/ioctl.h>
-+#include <sys/scsiio.h>
-+// #include <sys/cdio.h>
-+// #include <sys/dkio.h>
-+
-+#include <unistd.h>
-+#include <sys/types.h>
-+
-+
-+class K3bDevice::ScsiCommand::Private
-+{
-+public:
-+ struct scsireq cmd;
-+};
-+
-+
-+void K3bDevice::ScsiCommand::clear()
-+{
-+ ::memset( &d->cmd, 0, sizeof(struct scsireq ) );
-+}
-+
-+
-+unsigned char& K3bDevice::ScsiCommand::operator[]( size_t i )
-+{
-+ return d->cmd.cmd[i];
-+}
-+
-+
-+int K3bDevice::ScsiCommand::transport( TransportDirection dir,
-+ void* data,
-+ size_t len )
-+{
-+ bool needToClose = false;
-+ if( m_device ) {
-+ if( !m_device->isOpen() ) {
-+ needToClose = true;
-+ }
-+ m_device->open( dir == TR_DIR_WRITE );
-+ m_deviceHandle = m_device->handle();
-+ }
-+
-+ if( m_deviceHandle == -1 )
-+ return -1;
-+
-+ d->cmd.cmdlen = 12;
-+ d->cmd.timeout = 10000;
-+ d->cmd.databuf = (caddr_t) data;
-+ d->cmd.datalen = len;
-+ // d->cmd.datalen_used = len;
-+ d->cmd.senselen = SENSEBUFLEN;
-+ switch (dir)
-+ {
-+ case TR_DIR_READ:
-+ d->cmd.flags = SCCMD_READ;
-+ break;
-+ case TR_DIR_WRITE:
-+ d->cmd.flags = SCCMD_WRITE;
-+ break;
-+ default:
-+ d->cmd.flags = SCCMD_READ;
-+ break;
-+ }
-+
-+ int i = ::ioctl( m_deviceHandle, SCIOCCOMMAND, &d->cmd );
-+
-+ if( needToClose )
-+ m_device->close();
-+
-+ if( i || (d->cmd.retsts != SCCMD_OK)) {
-+ debugError( d->cmd.cmd[0],
-+ d->cmd.retsts,
-+ d->cmd.sense[2],
-+ d->cmd.sense[12],
-+ d->cmd.sense[13] );
-+
-+ return 1;
-+ }
-+ else
-+ return 0;
-+}
diff --git a/sysutils/k3b/patches/patch-ag b/sysutils/k3b/patches/patch-ag
index 84bf1276a11..f647cdc6494 100644
--- a/sysutils/k3b/patches/patch-ag
+++ b/sysutils/k3b/patches/patch-ag
@@ -1,10 +1,10 @@
-$NetBSD: patch-ag,v 1.2 2006/06/20 19:08:13 joerg Exp $
+$NetBSD: patch-ag,v 1.3 2006/07/20 11:22:25 markd Exp $
---- configure.in.orig 2006-03-07 15:04:21.000000000 +0000
-+++ configure.in
-@@ -170,11 +170,13 @@ AC_TRY_COMPILE([
- [linux_scsi=yes])
- AC_MSG_RESULT($linux_scsi)
+--- configure.orig 2006-06-23 03:12:00.000000000 +1200
++++ configure
+@@ -32401,11 +32401,13 @@ rm -f conftest.err conftest.$ac_objext c
+ echo "$as_me:$LINENO: result: $linux_scsi" >&5
+ echo "${ECHO_T}$linux_scsi" >&6
-if test "FreeBSD" = `uname -s` ; then
+case "$host_os" in
@@ -18,18 +18,7 @@ $NetBSD: patch-ag,v 1.2 2006/06/20 19:08:13 joerg Exp $
if test "x$linux_scsi" = "xno" ; then
DO_NOT_COMPILE="$DO_NOT_COMPILE k3b"
-@@ -186,6 +188,10 @@ dnl - check the byte order -
- dnl this will define WORDS_BIGENDIAN or do nothing
- AC_C_BIGENDIAN()
-
-+AC_CHECK_HEADERS(sys/statfs.h sys/statvfs.h)
-+
-+AC_CHECK_FUNCS(statfs statvfs)
-+
- dnl === Ogg Vorbis Test - Begin ===
- AC_ARG_WITH(
- oggvorbis,
-@@ -438,10 +444,14 @@ AM_CONDITIONAL(with_k3bsetup1, [test x$c
+@@ -34822,11 +34824,14 @@ fi
# Extra SCSI support libs can go in CAM_LIB, and are linked into
# libk3bdevice. For Linux, nothing is needed. FreeBSD requires -lcam
# (which is in base, so no test is needed).
@@ -39,11 +28,12 @@ $NetBSD: patch-ag,v 1.2 2006/06/20 19:08:13 joerg Exp $
+freebsd* | dragonfly*)
CAM_LIB="-lcam"
-fi
+-
+ ;;
+*)
+ CAM_LIB=""
+ ;;
+esac
- AC_SUBST(CAM_LIB)
+
diff --git a/sysutils/k3b/patches/patch-ah b/sysutils/k3b/patches/patch-ah
deleted file mode 100644
index 3ebb1367533..00000000000
--- a/sysutils/k3b/patches/patch-ah
+++ /dev/null
@@ -1,50 +0,0 @@
-$NetBSD: patch-ah,v 1.1.1.1 2006/02/01 00:53:00 markd Exp $
-
---- src/rip/k3bdvdripperwidget.cpp.orig 2005-12-16 02:08:56.000000000 +1300
-+++ src/rip/k3bdvdripperwidget.cpp
-@@ -52,6 +52,7 @@
- #include <kmessagebox.h>
- #include <kcombobox.h>
- #include <kurlrequester.h>
-+#include <config.h>
-
- // OS determination and specific includes. Unsupported systems
- // will fail on the statfs() call below. Per-OS support is as
-@@ -60,11 +61,15 @@
- // FreeBSD - kde@freebsd.org or groot@kde.org
- #include <qglobal.h>
-
--#ifdef Q_OS_LINUX
-+#if defined(Q_OS_LINUX) || defined(HAVE_SYS_STATFS_H)
- #include <sys/vfs.h>
- #endif
-
--#ifdef Q_OS_FREEBSD
-+#ifdef HAVE_SYS_STATVFS_H
-+#include <sys/statvfs.h>
-+#endif
-+
-+#if defined(Q_OS_FREEBSD) || defined (Q_OS_NETBSD)
- #include <sys/param.h>
- #include <sys/mount.h>
- #endif
-@@ -231,9 +236,19 @@ void K3bDvdRipperWidget::slotSetDependDi
- tmp = p.left( index+1 );
- kdDebug() << "(K3bDvdRipperWidget) new directory. Check existing: " << tmp << endl;
- }
-+#ifdef HAVE_STATVFS
-+ struct statvfs fs;
-+ ::statvfs( QFile::encodeName( tmp ), &fs );
-+ unsigned int kBfak = (unsigned int)(fs.f_frsize/1024);
-+#else
-+ #ifdef HAVE_STATFS
- struct statfs fs;
- ::statfs( QFile::encodeName( tmp ), &fs );
- unsigned int kBfak = (unsigned int)(fs.f_bsize/1024);
-+ #else
-+ #error "No statfs, no statvfs? Help!"
-+ #endif
-+#endif
- slotFreeTempSpace( tmp, fs.f_blocks*kBfak, (fs.f_blocks-fs.f_bfree)*kBfak, fs.f_bavail*kBfak );
- }
-
diff --git a/sysutils/k3b/patches/patch-ai b/sysutils/k3b/patches/patch-ai
deleted file mode 100644
index 6a420345177..00000000000
--- a/sysutils/k3b/patches/patch-ai
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-ai,v 1.1.1.1 2006/02/01 00:53:00 markd Exp $
-
---- libk3bdevice/k3bdevice.h.orig 2005-12-16 02:08:38.000000000 +1300
-+++ libk3bdevice/k3bdevice.h
-@@ -784,7 +784,7 @@ namespace K3bDevice
- friend class DeviceManager;
- };
-
--#ifdef Q_OS_LINUX
-+#if defined(Q_OS_LINUX) || defined(Q_OS_NETBSD)
- /**
- * This should always be used to open a device since it
- * uses the resmgr
diff --git a/sysutils/k3b/patches/patch-aj b/sysutils/k3b/patches/patch-aj
deleted file mode 100644
index 0db5a733d8b..00000000000
--- a/sysutils/k3b/patches/patch-aj
+++ /dev/null
@@ -1,14 +0,0 @@
-$NetBSD: patch-aj,v 1.1.1.1 2006/02/01 00:53:00 markd Exp $
-
---- libk3b/tools/k3biso9660.h.orig 2005-12-16 02:09:00.000000000 +1300
-+++ libk3b/tools/k3biso9660.h
-@@ -18,6 +18,9 @@
- #define _K3B_ISO9660_H_
-
- #include <sys/stat.h>
-+#ifdef __NetBSD__
-+#define stat64 stat
-+#endif
- #include <sys/types.h>
-
- #include <qdatetime.h>
diff --git a/sysutils/k3b/patches/patch-ak b/sysutils/k3b/patches/patch-ak
deleted file mode 100644
index 3ff02391565..00000000000
--- a/sysutils/k3b/patches/patch-ak
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD: patch-ak,v 1.2 2006/06/20 19:08:13 joerg Exp $
-
---- libk3b/projects/datacd/k3bfileitem.h.orig 2005-12-16 02:09:02.000000000 +1300
-+++ libk3b/projects/datacd/k3bfileitem.h
-@@ -24,6 +24,10 @@
- #include <qstring.h>
-
- #include <sys/stat.h>
-+#if defined(__NetBSD__) || defined(__DragonFly__)
-+#define stat64 stat
-+#define lstat64 lstat
-+#endif
-
-
- class K3bDataDoc;
diff --git a/sysutils/k3b/patches/patch-al b/sysutils/k3b/patches/patch-al
deleted file mode 100644
index 984cf4af515..00000000000
--- a/sysutils/k3b/patches/patch-al
+++ /dev/null
@@ -1,14 +0,0 @@
-$NetBSD: patch-al,v 1.1.1.1 2006/02/01 00:53:00 markd Exp $
-
---- libk3b/projects/datacd/k3bisoimager.cpp.orig 2005-12-16 02:09:02.000000000 +1300
-+++ libk3b/projects/datacd/k3bisoimager.cpp
-@@ -42,6 +42,9 @@
- #include <string.h>
- #include <sys/types.h>
- #include <sys/stat.h>
-+#ifdef __NetBSD__
-+#define stat64 stat
-+#endif
- #include <unistd.h>
- #include <utime.h>
-