diff options
author | markd <markd@pkgsrc.org> | 2006-02-01 00:52:59 +0000 |
---|---|---|
committer | markd <markd@pkgsrc.org> | 2006-02-01 00:52:59 +0000 |
commit | 9b490d94acca11c0b74ab675ebfa5604ae43857c (patch) | |
tree | c359fda5dfb30168fa6fba5d02b475a9c5a77786 /sysutils/k3b/patches | |
parent | c4274bb8cadd9c276b82e4b34d26731c6e51d63c (diff) | |
download | pkgsrc-9b490d94acca11c0b74ab675ebfa5604ae43857c.tar.gz |
Initial import of k3b version 0.12.10.
From the pkgsrc-wip package by Martijn van Buul. Updated to 0.12.10
and finished off by me.
K3b is a CD and DVD burning application for Linux and BSD systems
optimized for KDE. It provides a comfortable user interface to perform
most CD/DVD burning tasks like creating an Audio CD from a set of audio
files or copying a CD. The actual burning in K3b is done by the command
line utilities cdrecord, cdrdao, and growisofs.
Diffstat (limited to 'sysutils/k3b/patches')
-rw-r--r-- | sysutils/k3b/patches/patch-aa | 48 | ||||
-rw-r--r-- | sysutils/k3b/patches/patch-ab | 116 | ||||
-rw-r--r-- | sysutils/k3b/patches/patch-ac | 12 | ||||
-rw-r--r-- | sysutils/k3b/patches/patch-ad | 131 | ||||
-rw-r--r-- | sysutils/k3b/patches/patch-ae | 14 | ||||
-rw-r--r-- | sysutils/k3b/patches/patch-af | 141 | ||||
-rw-r--r-- | sysutils/k3b/patches/patch-ag | 15 | ||||
-rw-r--r-- | sysutils/k3b/patches/patch-ah | 50 | ||||
-rw-r--r-- | sysutils/k3b/patches/patch-ai | 13 | ||||
-rw-r--r-- | sysutils/k3b/patches/patch-aj | 14 | ||||
-rw-r--r-- | sysutils/k3b/patches/patch-ak | 15 | ||||
-rw-r--r-- | sysutils/k3b/patches/patch-al | 14 | ||||
-rw-r--r-- | sysutils/k3b/patches/patch-am | 14 | ||||
-rw-r--r-- | sysutils/k3b/patches/patch-an | 40 | ||||
-rw-r--r-- | sysutils/k3b/patches/patch-ao | 40 |
15 files changed, 677 insertions, 0 deletions
diff --git a/sysutils/k3b/patches/patch-aa b/sysutils/k3b/patches/patch-aa new file mode 100644 index 00000000000..326da31cb1b --- /dev/null +++ b/sysutils/k3b/patches/patch-aa @@ -0,0 +1,48 @@ +$NetBSD: patch-aa,v 1.1.1.1 2006/02/01 00:53:00 markd Exp $ + +--- libk3b/core/k3bglobals.cpp.orig 2005-12-16 02:09:01.000000000 +1300 ++++ libk3b/core/k3bglobals.cpp +@@ -38,12 +38,21 @@ + #include <cmath> + #include <sys/utsname.h> + #include <sys/stat.h> ++#ifdef __NetBSD__ ++#define stat64 stat ++#endif + +-#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 + #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 new file mode 100644 index 00000000000..93d2b44256a --- /dev/null +++ b/sysutils/k3b/patches/patch-ab @@ -0,0 +1,116 @@ +$NetBSD: patch-ab,v 1.1.1.1 2006/02/01 00:53:00 markd Exp $ + +--- libk3bdevice/k3bdevice.cpp.orig 2005-12-16 02:08:38.000000000 +1300 ++++ libk3bdevice/k3bdevice.cpp +@@ -63,6 +63,10 @@ typedef unsigned char u8; + #define CD_FRAMESIZE_RAW 2352 + #endif + ++// #ifdef Q_OS_NETBSD ++// #include <sys/scsiio.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 +@@ -1466,15 +1482,7 @@ bool K3bDevice::Device::fixupToc( K3bDev + bool K3bDevice::Device::block( bool b ) const + { + ScsiCommand cmd( this ); +- cmd[0] = MMC_PREVENT_ALLOW_MEDIUM_REMOVAL; +- if( b ) +- cmd[4] = 0x01; +- int r = cmd.transport(); +- +- if( r ) +- kdDebug() << "(K3bDevice::Device) MMC ALLOW MEDIA REMOVAL failed." << endl; +- +- return ( r == 0 ); ++ return cmd.traylock( b ); + } + + bool K3bDevice::Device::rewritable() const +@@ -1497,25 +1505,14 @@ bool K3bDevice::Device::rewritable() con + bool K3bDevice::Device::eject() const + { + ScsiCommand cmd( this ); +- cmd[0] = MMC_START_STOP_UNIT; +- +- // Since all other eject methods I saw also start the unit before ejecting +- // we do it also although I don't know why... +- cmd[4] = 0x1; // Start unit +- cmd.transport(); +- +- cmd[4] = 0x2; // LoEj = 1, Start = 0 +- +- return !cmd.transport(); ++ return cmd.eject( true ); + } + + + bool K3bDevice::Device::load() const + { + ScsiCommand cmd( this ); +- cmd[0] = MMC_START_STOP_UNIT; +- cmd[4] = 0x3; // LoEj = 1, Start = 1 +- return !cmd.transport(); ++ return !cmd.eject( false ); + } + + +@@ -1557,7 +1554,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 +1571,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 +1585,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 new file mode 100644 index 00000000000..77bf4cc1831 --- /dev/null +++ b/sysutils/k3b/patches/patch-ac @@ -0,0 +1,12 @@ +$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 new file mode 100644 index 00000000000..83f67f85820 --- /dev/null +++ b/sysutils/k3b/patches/patch-ad @@ -0,0 +1,131 @@ +$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 new file mode 100644 index 00000000000..9785c0b75b8 --- /dev/null +++ b/sysutils/k3b/patches/patch-ae @@ -0,0 +1,14 @@ +$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 new file mode 100644 index 00000000000..b03ee1e329d --- /dev/null +++ b/sysutils/k3b/patches/patch-af @@ -0,0 +1,141 @@ +$NetBSD: patch-af,v 1.1.1.1 2006/02/01 00:53:00 markd Exp $ + +--- /dev/null 2006-01-31 00:47:43.000000000 +1300 ++++ libk3bdevice/k3bscsicommand_netbsd.cpp 2006-01-31 00:08:25.000000000 +1300 +@@ -0,0 +1,136 @@ ++/* ++ * ++ */ ++ ++#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; ++} ++ ++bool K3bDevice::ScsiCommand::eject ( bool open ) ++{ ++ unsigned long request = open ? DIOCEJECT : CDIOCCLOSE; ++ int arg = 0; ++ bool needToClose = false; ++ if( m_device ) { ++ if( !m_device->isOpen() ) { ++ needToClose = true; ++ } ++ m_device->open( false ); ++ m_deviceHandle = m_device->handle(); ++ } ++ ++ if( m_deviceHandle == -1 ) ++ return false; ++ ++ int i = ::ioctl( m_deviceHandle, request, &arg ); ++ ++ if( needToClose ) ++ m_device->close(); ++ ++ return i >= 0; ++} ++ ++bool K3bDevice::ScsiCommand::traylock ( bool on ) ++{ ++ int arg = on ? 1 : 0; ++ bool needToClose = false; ++ if( m_device ) { ++ if( !m_device->isOpen() ) { ++ needToClose = true; ++ } ++ m_device->open( false ); ++ m_deviceHandle = m_device->handle(); ++ } ++ ++ if( m_deviceHandle == -1 ) ++ return false; ++ ++ int i = ::ioctl( m_deviceHandle, DIOCLOCK, &arg ); ++ ++ if( needToClose ) ++ m_device->close(); ++ ++ return i >= 0; ++} diff --git a/sysutils/k3b/patches/patch-ag b/sysutils/k3b/patches/patch-ag new file mode 100644 index 00000000000..ed3194e6f21 --- /dev/null +++ b/sysutils/k3b/patches/patch-ag @@ -0,0 +1,15 @@ +$NetBSD: patch-ag,v 1.1.1.1 2006/02/01 00:53:00 markd Exp $ + +--- configure.in.orig 2005-12-16 02:26:31.000000000 +1300 ++++ configure.in +@@ -186,6 +186,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, diff --git a/sysutils/k3b/patches/patch-ah b/sysutils/k3b/patches/patch-ah new file mode 100644 index 00000000000..3ebb1367533 --- /dev/null +++ b/sysutils/k3b/patches/patch-ah @@ -0,0 +1,50 @@ +$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 new file mode 100644 index 00000000000..6a420345177 --- /dev/null +++ b/sysutils/k3b/patches/patch-ai @@ -0,0 +1,13 @@ +$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 new file mode 100644 index 00000000000..0db5a733d8b --- /dev/null +++ b/sysutils/k3b/patches/patch-aj @@ -0,0 +1,14 @@ +$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 new file mode 100644 index 00000000000..ab9a4e101d5 --- /dev/null +++ b/sysutils/k3b/patches/patch-ak @@ -0,0 +1,15 @@ +$NetBSD: patch-ak,v 1.1.1.1 2006/02/01 00:53:00 markd 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> ++#ifdef __NetBSD__ ++#define stat64 stat ++#define lstat64 lstat ++#endif + + + class K3bDataDoc; diff --git a/sysutils/k3b/patches/patch-al b/sysutils/k3b/patches/patch-al new file mode 100644 index 00000000000..984cf4af515 --- /dev/null +++ b/sysutils/k3b/patches/patch-al @@ -0,0 +1,14 @@ +$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> + diff --git a/sysutils/k3b/patches/patch-am b/sysutils/k3b/patches/patch-am new file mode 100644 index 00000000000..9546bec7d53 --- /dev/null +++ b/sysutils/k3b/patches/patch-am @@ -0,0 +1,14 @@ +$NetBSD: patch-am,v 1.1.1.1 2006/02/01 00:53:00 markd Exp $ + +--- libk3bdevice/k3bscsicommand.h.orig 2005-12-16 02:08:38.000000000 +1300 ++++ libk3bdevice/k3bscsicommand.h +@@ -108,6 +108,9 @@ namespace K3bDevice + void* = 0, + size_t len = 0 ); + ++ bool eject ( bool open ); ++ bool traylock ( bool on ); ++ + private: + static QString senseKeyToString( int key ); + void debugError( int command, int errorCode, int senseKey, int asc, int ascq ); diff --git a/sysutils/k3b/patches/patch-an b/sysutils/k3b/patches/patch-an new file mode 100644 index 00000000000..b03e01da5c9 --- /dev/null +++ b/sysutils/k3b/patches/patch-an @@ -0,0 +1,40 @@ +$NetBSD: patch-an,v 1.1.1.1 2006/02/01 00:53:00 markd Exp $ + +--- libk3bdevice/k3bscsicommand_bsd.cpp.orig 2005-12-16 02:08:38.000000000 +1300 ++++ libk3bdevice/k3bscsicommand_bsd.cpp +@@ -190,3 +190,35 @@ int K3bDevice::ScsiCommand::transport( T + + return ret; + } ++ ++bool K3bDevice::ScsiCommand::eject ( bool b ) ++{ ++ d->cmd.cmd[0] = MMC_START_STOP_UNIT; ++ ++ if ( b ) { ++ // Since all other eject methods I saw also start the unit before ejecting ++ // we do it also although I don't know why... ++ d->cmd.cmd[4] = 0x1; // Start unit ++ transport(); ++ ++ d->cmd.cmd[4] = 0x2; // LoEj = 1, Start = 0 ++ } ++ else ++ d->cmd.cmd[4] = 0x3; // LoEj = 1, Start = 1 ++ ++ return !transport(); ++ ++} ++ ++bool K3bDevice::ScsiCommand::traylock ( bool on ) ++{ ++ d->cmd.cmd[0] = MMC_PREVENT_ALLOW_MEDIUM_REMOVAL; ++ if( on ) ++ d->cmd.cmd[4] = 0x01; ++ int r = transport(); ++ ++ if( r ) ++ kdDebug() << "(K3bDevice::Device) MMC ALLOW MEDIA REMOVAL failed." << endl; ++ ++ return ( r == 0 ); ++} diff --git a/sysutils/k3b/patches/patch-ao b/sysutils/k3b/patches/patch-ao new file mode 100644 index 00000000000..54114135119 --- /dev/null +++ b/sysutils/k3b/patches/patch-ao @@ -0,0 +1,40 @@ +$NetBSD: patch-ao,v 1.1.1.1 2006/02/01 00:53:00 markd Exp $ + +--- libk3bdevice/k3bscsicommand_linux.cpp.orig 2005-12-16 02:08:38.000000000 +1300 ++++ libk3bdevice/k3bscsicommand_linux.cpp +@@ -100,3 +100,35 @@ int K3bDevice::ScsiCommand::transport( T + else + return 0; + } ++ ++bool K3bDevice::ScsiCommand::eject ( bool b ) ++{ ++ d->cmd.cmd[0] = MMC_START_STOP_UNIT; ++ ++ if ( b ) { ++ // Since all other eject methods I saw also start the unit before ejecting ++ // we do it also although I don't know why... ++ d->cmd.cmd[4] = 0x1; // Start unit ++ transport(); ++ ++ d->cmd.cmd[4] = 0x2; // LoEj = 1, Start = 0 ++ } ++ else ++ d->cmd.cmd[4] = 0x3; // LoEj = 1, Start = 1 ++ ++ return !transport(); ++ ++} ++ ++bool K3bDevice::ScsiCommand::traylock ( bool on ) ++{ ++ d->cmd.cmd[0] = MMC_PREVENT_ALLOW_MEDIUM_REMOVAL; ++ if( on ) ++ d->cmd.cmd[4] = 0x01; ++ int r = transport(); ++ ++ if( r ) ++ kdDebug() << "(K3bDevice::Device) MMC ALLOW MEDIA REMOVAL failed." << endl; ++ ++ return ( r == 0 ); ++} |