aboutsummaryrefslogtreecommitdiff
path: root/sysutils/k3b-kde4/files
diff options
context:
space:
mode:
Diffstat (limited to 'sysutils/k3b-kde4/files')
-rw-r--r--sysutils/k3b-kde4/files/patch-src-Makefile.in11
-rw-r--r--sysutils/k3b-kde4/files/patch-src-core-k3bdefaultexternalprograms.cpp154
-rw-r--r--sysutils/k3b-kde4/files/patch-src-core-k3bprocess.cpp63
-rw-r--r--sysutils/k3b-kde4/files/patch-src-core-k3bprocess.h24
-rw-r--r--sysutils/k3b-kde4/files/patch-src-device-k3bdevice.cpp26
-rw-r--r--sysutils/k3b-kde4/files/patch-src-device-k3bdevice.h13
-rw-r--r--sysutils/k3b-kde4/files/patch-src-device-k3bdevicemanager.cpp289
-rw-r--r--sysutils/k3b-kde4/files/patch-src-device-k3bdevicemanager.h43
-rw-r--r--sysutils/k3b-kde4/files/patch-src-device-k3bscsicommand.cpp142
-rw-r--r--sysutils/k3b-kde4/files/patch-src-device-k3bscsicommand.h84
-rw-r--r--sysutils/k3b-kde4/files/patch-src-rip-k3bmovieview.cpp14
-rw-r--r--sysutils/k3b-kde4/files/patch-src-rip-k3btcwrapper.cpp15
12 files changed, 0 insertions, 878 deletions
diff --git a/sysutils/k3b-kde4/files/patch-src-Makefile.in b/sysutils/k3b-kde4/files/patch-src-Makefile.in
deleted file mode 100644
index bf6506bc152a..000000000000
--- a/sysutils/k3b-kde4/files/patch-src-Makefile.in
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/Makefile.in.orig Sun Feb 29 19:38:32 2004
-+++ src/Makefile.in Mon Mar 8 15:40:08 2004
-@@ -286,7 +286,7 @@
- #>+ 1
- k3b_SOURCES=k3bwelcomewidget.cpp k3bapplication.cpp k3bdiroperator.cpp kdndfileview.cpp k3bfiletreeview.cpp k3bcddbmultientriesdialog.cpp k3baudioplayer.cpp k3bprojecttabbar.cpp k3bprojecttabwidget.cpp k3bsplash.cpp k3bblankingdialog.cpp k3bfileview.cpp k3bdirview.cpp k3btoolbox.cpp k3b.cpp main.cpp k3bstatusbarmanager.cpp k3bfiletreecombobox.cpp k3breadcdreader.cpp k3binterface.cpp k3bprojectinterface.cpp k3bsystemproblemdialog.cpp k3bcdcontentsview.cpp k3bwriterspeedverificationdialog.cpp k3bdatatrackreader.cpp k3binterface_skel.cpp k3bprojectinterface_skel.cpp
-
--k3b_LDADD = ./cdinfo/libcdinfo.la ./option/liboption.la ./rip/librip.la ./cdcopy/libcdcopy.la ./dvdcopy/libdvdcopy.la ./videoEncoding/libvideoEncoding.la ./plugin/libk3bplugin.la $(ARTS_LIBS) -lkio -lkparts ./device/libk3bdevice.la ./core/libk3bcore.la ./tools/libk3btools.la ./projects/libk3bproject.la ./images/libimagewriting.la
-+k3b_LDADD = ./cdinfo/libcdinfo.la ./option/liboption.la ./rip/librip.la ./cdcopy/libcdcopy.la ./dvdcopy/libdvdcopy.la ./videoEncoding/libvideoEncoding.la ./plugin/libk3bplugin.la $(ARTS_LIBS) -lkio -lkparts -lcam ./device/libk3bdevice.la ./core/libk3bcore.la ./tools/libk3btools.la ./projects/libk3bproject.la ./images/libimagewriting.la
-
- SUBDIRS = device core tools plugin projects cddb cdinfo option rip cdcopy images dvdcopy videoEncoding pics icons konqi mimetypes tests audiodecoding audioencoding sounds $(K3BSETUP1_BUILD)
-
diff --git a/sysutils/k3b-kde4/files/patch-src-core-k3bdefaultexternalprograms.cpp b/sysutils/k3b-kde4/files/patch-src-core-k3bdefaultexternalprograms.cpp
deleted file mode 100644
index 008a58d004fe..000000000000
--- a/sysutils/k3b-kde4/files/patch-src-core-k3bdefaultexternalprograms.cpp
+++ /dev/null
@@ -1,154 +0,0 @@
---- src/core/k3bdefaultexternalprograms.cpp.orig Wed Jan 21 11:20:10 2004
-+++ src/core/k3bdefaultexternalprograms.cpp Fri Feb 13 21:03:38 2004
-@@ -28,6 +28,7 @@
- #include <unistd.h>
- #include <sys/stat.h>
- #include <stdlib.h>
-+#include "k3bprocess.h"
-
-
-
-@@ -89,7 +90,7 @@
- K3bExternalBin* bin = 0;
-
- // probe version
-- KProcess vp;
-+ MyKProcess vp;
- K3bProcess::OutputCollector out( &vp );
-
- vp << path << "-version";
-@@ -128,7 +129,7 @@
-
-
- // probe features
-- KProcess fp;
-+ MyKProcess fp;
- out.setProcess( &fp );
- fp << path << "-help";
- if( fp.start( KProcess::Block, KProcess::AllOutput ) ) {
-@@ -200,7 +201,7 @@
- K3bExternalBin* bin = 0;
-
- // probe version
-- KProcess vp;
-+ MyKProcess vp;
- K3bProcess::OutputCollector out( &vp );
-
- vp << path << "-version";
-@@ -229,7 +230,7 @@
-
-
- // probe features
-- KProcess fp;
-+ MyKProcess fp;
- out.setProcess( &fp );
- fp << path << "-help";
- if( fp.start( KProcess::Block, KProcess::AllOutput ) ) {
-@@ -285,7 +286,7 @@
- K3bExternalBin* bin = 0;
-
- // probe version
-- KProcess vp;
-+ MyKProcess vp;
- vp << path << "-version";
- K3bProcess::OutputCollector out( &vp );
- if( vp.start( KProcess::Block, KProcess::AllOutput ) ) {
-@@ -313,7 +314,7 @@
-
-
- // probe features
-- KProcess fp;
-+ MyKProcess fp;
- fp << path << "-help";
- out.setProcess( &fp );
- if( fp.start( KProcess::Block, KProcess::AllOutput ) ) {
-@@ -374,7 +375,7 @@
- K3bExternalBin* bin = 0;
-
- // probe version
-- KProcess vp;
-+ MyKProcess vp;
- vp << path << "-version";
- K3bProcess::OutputCollector out( &vp );
- if( vp.start( KProcess::Block, KProcess::AllOutput ) ) {
-@@ -402,7 +403,7 @@
-
-
- // probe features
-- KProcess fp;
-+ MyKProcess fp;
- fp << path << "-help";
- out.setProcess( &fp );
- if( fp.start( KProcess::Block, KProcess::AllOutput ) ) {
-@@ -462,7 +463,7 @@
- K3bExternalBin* bin = 0;
-
- // probe version
-- KProcess vp;
-+ MyKProcess vp;
- vp << path ;
- K3bProcess::OutputCollector out( &vp );
- if( vp.start( KProcess::Block, KProcess::AllOutput ) ) {
-@@ -490,7 +491,7 @@
-
-
- // probe features
-- KProcess fp;
-+ MyKProcess fp;
- fp << path << "write" << "-h";
- out.setProcess( &fp );
- if( fp.start( KProcess::Block, KProcess::AllOutput ) ) {
-@@ -556,7 +557,7 @@
- K3bExternalBin* bin = 0;
-
- // probe version
-- KProcess vp;
-+ MyKProcess vp;
- vp << path ;
- K3bProcess::OutputCollector out( &vp );
- if( vp.start( KProcess::Block, KProcess::AllOutput ) ) {
-@@ -610,7 +611,7 @@
- K3bExternalBin* bin = 0;
-
- // probe version
-- KProcess vp;
-+ MyKProcess vp;
- vp << path << "-V";
- K3bProcess::OutputCollector out( &vp );
- if( vp.start( KProcess::Block, KProcess::AllOutput ) ) {
-@@ -667,7 +668,7 @@
- K3bExternalBin* bin = 0;
-
- // probe version
-- KProcess vp;
-+ MyKProcess vp;
- K3bProcess::OutputCollector out( &vp );
-
- vp << path << "--version";
-@@ -726,7 +727,7 @@
- K3bExternalBin* bin = 0;
-
- // probe version
-- KProcess vp;
-+ MyKProcess vp;
- K3bProcess::OutputCollector out( &vp );
-
- vp << path << "-version";
-@@ -795,7 +796,7 @@
- K3bExternalBin* bin = 0;
-
- // probe version
-- KProcess vp;
-+ MyKProcess vp;
- K3bProcess::OutputCollector out( &vp );
-
- vp << path;
-@@ -868,7 +869,7 @@
- K3bExternalBin* bin = 0;
-
- // probe version
-- KProcess vp;
-+ MyKProcess vp;
- K3bProcess::OutputCollector out( &vp );
-
- vp << path << "-h";
diff --git a/sysutils/k3b-kde4/files/patch-src-core-k3bprocess.cpp b/sysutils/k3b-kde4/files/patch-src-core-k3bprocess.cpp
deleted file mode 100644
index 14543eb14ea8..000000000000
--- a/sysutils/k3b-kde4/files/patch-src-core-k3bprocess.cpp
+++ /dev/null
@@ -1,63 +0,0 @@
---- src/core/k3bprocess.cpp.orig Sun Feb 1 09:18:58 2004
-+++ src/core/k3bprocess.cpp Fri Feb 13 21:03:38 2004
-@@ -28,6 +28,60 @@
- #include <unistd.h>
- #include <stdio.h>
- #include <fcntl.h>
-+#include <ktempfile.h>
-+#include <stdlib.h>
-+#include <qfile.h>
-+MyKProcess & MyKProcess::operator<<(const QString& arg)
-+{
-+ m_args += " " + arg;
-+ return *this;
-+}
-+
-+MyKProcess &MyKProcess::operator<<(const char * arg)
-+{
-+ m_args += " ";
-+ m_args += arg;
-+ return *this;
-+}
-+
-+MyKProcess &MyKProcess::operator<<(const QCString & arg)
-+{
-+ m_args += " " + arg;
-+ return *this;
-+}
-+
-+bool MyKProcess::start(KProcess::RunMode runmode, KProcess::Communication comm)
-+{
-+ // create temp file
-+ KTempFile tmpfile;
-+ tmpfile.setAutoDelete(true);
-+
-+ // create call
-+ QString call = "/bin/sh -c \"" + m_args + " > " + tmpfile.name() + " 2>&1 \"";
-+ printf("MyKProcess call: %s\n", call.latin1());
-+
-+ // execute it
-+ system(call.latin1());
-+
-+ // read tmp file line by line
-+ QFile tmp (tmpfile.name());
-+ if ( tmp.open( IO_ReadOnly ) )
-+ {
-+ QTextStream stream( &tmp );
-+ while ( !stream.eof() )
-+ {
-+ QString s = stream.readLine() + "\n";
-+ printf("MyKProcess reponse: %s", s.latin1());
-+
-+ // send line to receivedStdout signal
-+ receivedStdout(this, (char *)s.latin1(), strlen(s.latin1()));
-+ }
-+
-+ // close and delete tmp file
-+ tmp.close();
-+ }
-+ return true;
-+}
-
-
-
diff --git a/sysutils/k3b-kde4/files/patch-src-core-k3bprocess.h b/sysutils/k3b-kde4/files/patch-src-core-k3bprocess.h
deleted file mode 100644
index f4f96946d694..000000000000
--- a/sysutils/k3b-kde4/files/patch-src-core-k3bprocess.h
+++ /dev/null
@@ -1,24 +0,0 @@
---- src/core/k3bprocess.h.orig Tue Jan 27 09:19:13 2004
-+++ src/core/k3bprocess.h Fri Feb 13 21:03:38 2004
-@@ -194,4 +194,21 @@
- KProcess* m_process;
- };
-
-+/** This is a KProcess fake class. It uses system() to call the process
-+ * and waits for its return. It redirects all output into a file and
-+ * reads this file after the system() call. The redirected output
-+ * (out and err!) is sent to the receivedStdout signal. This eliminates
-+ * the problem reported as bug
-+ * http://www.FreeBSD.org/cgi/query-pr.cgi?pr=ports/51651
-+ */
-+class MyKProcess : public KProcess
-+{
-+ Q_OBJECT
-+ QString m_args;
-+public:
-+ MyKProcess &operator<<(const QString& arg);
-+ MyKProcess &operator<<(const char * arg);
-+ MyKProcess &operator<<(const QCString & arg);
-+ bool start(RunMode runmode = NotifyOnExit, Communication comm = NoCommunication);
-+};
- #endif
diff --git a/sysutils/k3b-kde4/files/patch-src-device-k3bdevice.cpp b/sysutils/k3b-kde4/files/patch-src-device-k3bdevice.cpp
deleted file mode 100644
index c3e8d0ce63d7..000000000000
--- a/sysutils/k3b-kde4/files/patch-src-device-k3bdevice.cpp
+++ /dev/null
@@ -1,26 +0,0 @@
---- src/device/k3bdevice.cpp.orig Thu Feb 12 11:21:15 2004
-+++ src/device/k3bdevice.cpp Fri Feb 13 21:03:38 2004
-@@ -56,6 +56,12 @@
-
- #endif // Q_OS_LINUX
-
-+#ifdef __FreeBSD__
-+#define __BYTE_ORDER BYTE_ORDER
-+#define __BIG_ENDIAN BIG_ENDIAN
-+#define CD_FRAMESIZE_RAW 2352
-+#endif
-+
-
- #ifdef HAVE_RESMGR
- extern "C" {
-@@ -152,8 +158,10 @@
-
- d->supportedProfiles = 0;
-
-+#ifndef __FreeBSD__
- if(open() < 0)
- return false;
-+#endif
-
-
- //
diff --git a/sysutils/k3b-kde4/files/patch-src-device-k3bdevice.h b/sysutils/k3b-kde4/files/patch-src-device-k3bdevice.h
deleted file mode 100644
index ecb893f0d514..000000000000
--- a/sysutils/k3b-kde4/files/patch-src-device-k3bdevice.h
+++ /dev/null
@@ -1,13 +0,0 @@
---- src/device/k3bdevice.h.orig Fri Jan 30 11:28:15 2004
-+++ src/device/k3bdevice.h Fri Feb 13 21:03:38 2004
-@@ -654,6 +654,10 @@
-
- class Private;
- Private* d;
-+#ifdef __FreeBSD__
-+ QString m_passDevice;
-+ friend class ScsiCommand;
-+#endif
- friend class DeviceManager;
- };
-
diff --git a/sysutils/k3b-kde4/files/patch-src-device-k3bdevicemanager.cpp b/sysutils/k3b-kde4/files/patch-src-device-k3bdevicemanager.cpp
deleted file mode 100644
index 75ba9c14b38f..000000000000
--- a/sysutils/k3b-kde4/files/patch-src-device-k3bdevicemanager.cpp
+++ /dev/null
@@ -1,289 +0,0 @@
---- src/device/k3bdevicemanager.cpp.orig Wed Jan 21 11:20:10 2004
-+++ src/device/k3bdevicemanager.cpp Fri Feb 13 21:03:38 2004
-@@ -49,6 +49,12 @@
- #include <sys/stat.h>
- #include <sys/ioctl.h>
-
-+#ifdef __FreeBSD__
-+#include <osreldate.h>
-+#include <ktempfile.h>
-+#include <sys/param.h>
-+#endif
-+
-
- #ifdef Q_OS_LINUX
-
-@@ -196,6 +202,22 @@
- {
- m_foundDevices = 0;
-
-+#ifdef __FreeBSD__
-+// What k3b does here is the following: it takes a list of device point, which are good candidates for cd drives
-+// and asks their properties. If they are indeed cd drives, they are added to a device list. This does not work
-+// on FreeBSD (no corresponding ioctls). Here cdrecord is asked for a list of scsi device, which work as cd
-+// drives. The device points of those devices are added to the device list.
-+ bsd_scan_devices(false);
-+ kdDebug() << "(K3bDeviceManager) analyze found device" << endl;
-+ for ( QValueList<BSDDevice>::iterator it = m_devices.begin(); it != m_devices.end(); ++it )
-+ {
-+ if( addDevice( (*it).m_name ) )
-+ {
-+ kdDebug() << "(K3bDeviceManager) Device " << (*it).m_name << " added" << endl;
-+ m_foundDevices++;
-+ }
-+ }
-+#else
- QFile info("/proc/sys/dev/cdrom/info");
- QString line,devstring;
- info.open(IO_ReadOnly);
-@@ -286,6 +308,7 @@
- // m_foundDevices++;
- // }
-
-+#endif
- scanFstab();
-
- return m_foundDevices;
-@@ -427,6 +450,7 @@
- bool K3bCdDevice::DeviceManager::testForCdrom(const QString& devicename)
- {
- bool ret = false;
-+#ifndef __FreeBSD__
- int cdromfd = K3bCdDevice::openDevice( devicename.ascii() );
- if (cdromfd < 0) {
- kdDebug() << "could not open device " << devicename << " (" << strerror(errno) << ")" << endl;
-@@ -467,11 +491,51 @@
- }
-
- ::close( cdromfd );
-+#endif
- return ret;
- }
-
- K3bDevice* K3bCdDevice::DeviceManager::addDevice( const QString& devicename )
- {
-+#ifdef __FreeBSD__
-+// this piece of code extracts some device parameter, like scsi or ide device. The whole process
-+// fails on FreeBSD. Here the device name is simply looked up in a list of devices found by a
-+// call of cdrecord --scanbus.
-+ K3bDevice* device = 0;
-+ if (!m_lastRefresh.isValid())
-+ bsd_scan_devices(false);
-+ bool found = false;
-+ for ( QValueList<BSDDevice>::iterator it = m_devices.begin(); it != m_devices.end(); ++it )
-+ {
-+ if( (*it).m_name == devicename )
-+ {
-+ device = new K3bDevice((*it).m_name.latin1());
-+ device->m_bus = (*it).m_bus;
-+ device->m_target = (*it).m_target;
-+ device->m_lun = (*it).m_lun;
-+ device->m_passDevice = (*it).m_passDevice;
-+ device->m_vendor = (*it).m_vendor;
-+ device->m_description = (*it).m_product;
-+ device->m_version = (*it).m_revision;
-+ found = true;
-+ break;
-+ }
-+ }
-+ if (!found)
-+ {
-+ // resolve all symlinks
-+ QString resolved = resolveSymLink( devicename );
-+ kdDebug() << "(K3bDeviceManager) " << devicename << " resolved to " << resolved << endl;
-+ int bus, target, lun;
-+ if( K3bDevice* oldDev = findDevice( bus, target, lun ) )
-+ {
-+ kdDebug() << "(K3bDeviceManager) dev already found" << endl;
-+ oldDev->addDeviceNode( resolved );
-+ }
-+ return 0;
-+ }
-+
-+#else
- K3bDevice* device = 0;
-
- // resolve all symlinks
-@@ -503,6 +567,7 @@
- device->m_target = target;
- device->m_lun = lun;
- }
-+#endif
-
- if( !device->init() ) {
- kdDebug() << "Could not initialize device " << devicename << endl;
-@@ -578,9 +643,20 @@
-
- if( K3bDevice* dev = findDevice( resolveSymLink(md) ) )
- {
-+#ifndef __FreeBSD__
- kdDebug() << "(K3bDeviceManager) found device for " << md << ": " << resolveSymLink(md) << endl;
- if( dev->mountDevice().isEmpty() ) {
- dev->setMountPoint( mountInfo->fs_file );
-+#else
-+ kdDebug() << "(K3bDeviceManager) found device for " << md << " (" << resolveSymLink(md) << "): " << mountInfo->fs_file << endl;
-+// Several mount points for one device might exist. If more than one are found, the one with
-+// user permission should have a higher priority.
-+ struct stat filestat;
-+ if( dev->mountDevice().isEmpty() || (mountInfo->fs_file && !stat(mountInfo->fs_file, &filestat) && filestat.st_uid == geteuid()))
-+ {
-+ kdDebug() << "(K3bDeviceManager) setting mount point for device " << md << ": " << mountInfo->fs_file << endl;
-+ dev->setMountPoint( mountInfo->fs_file );
-+#endif
- dev->setMountDevice( md );
- dev->m_supermount = supermount;
- }
-@@ -589,6 +665,8 @@
- {
- // compare bus, id, lun since the same device can for example be
- // determined as /dev/srX or /dev/scdX
-+#ifndef __FreeBSD__
-+// On FreeBSD scsi parameters can not be extracted from a file handle
- int bus = -1, id = -1, lun = -1;
- if( determineBusIdLun( mountInfo->fs_spec, bus, id, lun ) ) {
- if( K3bDevice* dev = findDevice( bus, id, lun ) ) {
-@@ -599,6 +677,17 @@
- }
- }
- }
-+#else
-+// Therefore they are looked up in the device list.
-+ kdDebug() << "(K3bDeviceManager) device: " << mountInfo->fs_spec << endl;
-+ if( K3bDevice* dev = findDevice( mountInfo->fs_spec ) ) {
-+ kdDebug() << " found! " << endl;
-+ if( dev->mountDevice().isEmpty() ) {
-+ dev->setMountPoint( mountInfo->fs_file );
-+ dev->setMountDevice( md );
-+ }
-+ }
-+#endif
-
-
- }
-@@ -673,5 +762,126 @@
- return QString::fromLatin1( resolved );
- }
-
-+
-+#ifdef __FreeBSD__
-+// Calls "camcontrol devlist" to get a list of all available cd devices.
-+// The sudo flag indicates, that "camcontrol devlist" should be
-+// called. This is tried, if bsd_scan_devices(false) fails.
-+// The result of the scan ist stored in m_devices. If within 3
-+// seconds after the last call to bsd_scan_devices this function
-+// is called again, the last result is used (prevents to call
-+// camcontrol several times within a short time).
-+void K3bCdDevice::DeviceManager::bsd_scan_devices(bool sudo)
-+{
-+ QDateTime now = QDateTime::currentDateTime();
-+ if (m_lastRefresh.isValid() && m_lastRefresh.secsTo(now) < 3)
-+ return;
-+ m_lastRefresh = now;
-+ m_devices.clear();
-+ kdDebug() << "(K3bDeviceManager) Scanning for devices: " << sudo << endl;
-+ KTempFile tmpfile;
-+ tmpfile.setAutoDelete(true);
-+
-+ // create call
-+ QString call = "/bin/sh -c \"";
-+ if (sudo)
-+ call += "sudo ";
-+ call += "camcontrol devlist > " + tmpfile.name() + " 2>&1 \"";
-+ kdDebug() << "(K3bDeviceManager) Reading device list : " << call << endl;
-+ if (system(call.latin1()))
-+ {
-+ if (!sudo)
-+ {
-+ m_lastRefresh = m_lastRefresh.addDays(-1);
-+ bsd_scan_devices(true);
-+ }
-+ return;
-+ }
-+
-+ // read tmp file line by line
-+ QFile tmp (tmpfile.name());
-+ if ( tmp.open( IO_ReadOnly ) )
-+ {
-+ QTextStream stream( &tmp );
-+ while ( !stream.eof() )
-+ {
-+ QString str = stream.readLine();
-+ if (!str.startsWith("<"))
-+ continue;
-+ str.remove(0,1);
-+ int i = str.find(">");
-+ if (i < 0)
-+ continue;
-+ QStringList details = QStringList::split(" ", str.left(i));
-+ i = str.find("at scbus", i);
-+ if (i < 0)
-+ continue;
-+ str.remove(0, i+8);
-+ i = str.find(" ");
-+ if (i < 0)
-+ continue;
-+ bool ok;
-+ int bus = str.left(i).toInt(&ok);
-+ if (!ok)
-+ continue;
-+ i = str.find("target ", i);
-+ if (i < 0)
-+ continue;
-+ str.remove(0, i+7);
-+ i = str.find(" ");
-+ if (i < 0)
-+ continue;
-+ int target = str.left(i).toInt(&ok);
-+ if (!ok)
-+ continue;
-+ i = str.find("lun ", i);
-+ if (i < 0)
-+ continue;
-+ str.remove(0, i+4);
-+ i = str.find(" ");
-+ if (i < 0)
-+ continue;
-+ int lun = str.left(i).toInt(&ok);
-+ if (!ok)
-+ continue;
-+ i = str.find("(", i);
-+ if (i < 0)
-+ continue;
-+ str.remove(0, i+1);
-+ i = str.find(",");
-+ if (i < 0)
-+ continue;
-+ QString name = str.left(i);
-+ str.remove(0, i+1);
-+ i = str.find(")");
-+ if (i < 0)
-+ continue;
-+ QString pass = name;
-+ if (name.startsWith("pass"))
-+ name = str.left(i);
-+ else
-+ pass = str.left(i);
-+ QString vendor, product, revision;
-+ if (details.count() > 0)
-+ revision = details.last();
-+ details.pop_back();
-+ if (details.count() > 0)
-+ product = details.last();
-+ details.pop_back();
-+ if (details.count() > 0)
-+ vendor = details.join(" ");
-+ if (!name.startsWith("cd"))
-+ continue;
-+ kdDebug() << "(K3bDeviceManager) Found device " << name << ", pass = " << pass << ", bus = " << bus << ", target = " << target << ", lun = " << lun << endl;
-+ kdDebug() << "(K3bDeviceManager) vendor: " << vendor << ", product: " << product << ", revision: " << revision << ", target = " << target << ", lun = " << lun << endl;
-+#if __FreeBSD_version >= 500100
-+ m_devices.push_back(BSDDevice("/dev/" + name, "/dev/" + pass, vendor, product, revision, bus, target, lun));
-+#else
-+ m_devices.push_back(BSDDevice("/dev/" + name + "c", "/dev/" + pass, vendor, product, revision, bus, target, lun));
-+#endif
-+ }
-+ }
-+}
-+#endif
-
- #include "k3bdevicemanager.moc"
diff --git a/sysutils/k3b-kde4/files/patch-src-device-k3bdevicemanager.h b/sysutils/k3b-kde4/files/patch-src-device-k3bdevicemanager.h
deleted file mode 100644
index 8d285e3ec035..000000000000
--- a/sysutils/k3b-kde4/files/patch-src-device-k3bdevicemanager.h
+++ /dev/null
@@ -1,43 +0,0 @@
---- src/device/k3bdevicemanager.h.orig Wed Jan 21 11:20:11 2004
-+++ src/device/k3bdevicemanager.h Fri Feb 13 21:03:38 2004
-@@ -24,6 +24,10 @@
- #include <qptrlist.h>
-
- #include <kdebug.h>
-+#ifdef __FreeBSD__
-+#include <qdatetime.h>
-+#include <qvaluelist.h>
-+#endif
-
- class KProcess;
- class KConfig;
-@@ -112,6 +116,29 @@
-
- class Private;
- Private* d;
-+#ifdef __FreeBSD__
-+ void bsd_scan_devices(bool sudo);
-+ QDateTime m_lastRefresh;
-+ class BSDDevice
-+ {
-+ public:
-+ BSDDevice() : m_bus(-1), m_target(-1), m_lun(-1) {}
-+ BSDDevice(const QString & name, const QString & passDevice, const QString & vendor,
-+ const QString & product, const QString & revision, int bus, int target, int lun) :
-+ m_name(name), m_passDevice(passDevice), m_vendor(vendor), m_product(product),
-+ m_revision(revision), m_bus(bus), m_target(target), m_lun(lun) {}
-+ BSDDevice(const BSDDevice & src) :
-+ m_name(src.m_name), m_passDevice(src.m_passDevice), m_vendor(src.m_vendor), m_product(src.m_product),
-+ m_revision(src.m_revision), m_bus(src.m_bus), m_target(src.m_target), m_lun(src.m_lun) {}
-+ const BSDDevice & operator= (const BSDDevice & src)
-+ { m_name = src.m_name; m_passDevice = src.m_passDevice; m_vendor = src.m_vendor;
-+ m_product = src.m_product; m_revision = src.m_revision; m_bus = src.m_bus; m_target = src.m_target;
-+ m_lun = src.m_lun; return *this; }
-+ QString m_name, m_passDevice, m_vendor, m_product, m_revision;
-+ int m_bus, m_target, m_lun;
-+ };
-+ QValueList<BSDDevice> m_devices;
-+#endif
- };
- }
-
diff --git a/sysutils/k3b-kde4/files/patch-src-device-k3bscsicommand.cpp b/sysutils/k3b-kde4/files/patch-src-device-k3bscsicommand.cpp
deleted file mode 100644
index 6c11e8f5307f..000000000000
--- a/sysutils/k3b-kde4/files/patch-src-device-k3bscsicommand.cpp
+++ /dev/null
@@ -1,142 +0,0 @@
---- src/device/k3bscsicommand.cpp.orig Wed Jan 21 11:20:11 2004
-+++ src/device/k3bscsicommand.cpp Fri Feb 13 21:03:38 2004
-@@ -1,10 +1,10 @@
- /*
- *
-- * $Id: k3bscsicommand.cpp,v 1.4 2004/01/21 10:20:11 trueg Exp $
-+ * $Id: k3bscsicommand.cpp,v 1.3 2003/12/31 14:15:17 trueg Exp $
- * Copyright (C) 2003 Sebastian Trueg <trueg@k3b.org>
- *
- * This file is part of the K3b project.
-- * Copyright (C) 1998-2004 Sebastian Trueg <trueg@k3b.org>
-+ * Copyright (C) 1998-2003 Sebastian Trueg <trueg@k3b.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
-@@ -58,13 +58,14 @@
-
-
-
--K3bCdDevice::ScsiCommand::ScsiCommand( int fd )
-- : m_fd(fd),
-- m_device(0)
--{
-- clear();
--}
-+//K3bCdDevice::ScsiCommand::ScsiCommand( int fd )
-+// : m_fd(fd),
-+// m_device(0)
-+//{
-+// clear();
-+//}
-
-+#ifndef __FreeBSD__
-
- K3bCdDevice::ScsiCommand::ScsiCommand( const K3bCdDevice::CdDevice* dev )
- : m_device(dev)
-@@ -135,6 +136,105 @@
- return 0;
- }
-
-+#else
-+
-+#include <fcntl.h>
-+#include <cam/scsi/scsi_message.h>
-+#include <cam/scsi/scsi_pass.h>
-+#include <errno.h>
-+#define ERRCODE(s) ((((s)[2]&0x0F)<<16)|((s)[12]<<8)|((s)[13]))
-+#define EMEDIUMTYPE EINVAL
-+#define ENOMEDIUM ENODEV
-+#define CREAM_ON_ERRNO(s) do { \
-+ switch ((s)[12]) \
-+ { case 0x04: errno=EAGAIN; break; \
-+ case 0x20: errno=ENODEV; break; \
-+ case 0x21: if ((s)[13]==0) errno=ENOSPC; \
-+ else errno=EINVAL; \
-+ break; \
-+ case 0x30: errno=EMEDIUMTYPE; break; \
-+ case 0x3A: errno=ENOMEDIUM; break; \
-+ } \
-+} while(0)
-+#include <unistd.h>
-+#include <kdebug.h>
-+
-+#include <string.h>
-+#include <sys/ioctl.h>
-+
-+K3bCdDevice::ScsiCommand::ScsiCommand( const K3bCdDevice::CdDevice* dev )
-+ : m_device(dev)
-+{
-+ clear();
-+}
-+
-+K3bCdDevice::ScsiCommand::~ScsiCommand()
-+{
-+ if(cam)
-+ cam_close_device(cam);
-+// if (m_fd >0)
-+// close(m_fd);
-+}
-+
-+
-+void K3bCdDevice::ScsiCommand::clear()
-+{
-+// char pass[32];
-+ cam=NULL;
-+ memset (&ccb,0,sizeof(ccb));
-+ ccb.ccb_h.func_code = XPT_GDEVLIST;
-+// if (ioctl (m_fd,CAMGETPASSTHRU,&ccb) < 0) return;
-+// sprintf (pass,"/dev/%.15s%u",ccb.cgdl.periph_name,ccb.cgdl.unit_number);
-+ cam = cam_open_pass (m_device->m_passDevice.latin1(),O_RDWR,NULL);
-+ kdDebug() << "(K3bCdDevice::ScsiCommand) open device " << m_device->m_passDevice << ((cam)?" succeeded.":" failed.") << endl;
-+}
-+
-+unsigned char& K3bCdDevice::ScsiCommand::operator[]( size_t i )
-+{
-+ if (!i && cam)
-+ {
-+ memset(&ccb,0,sizeof(ccb));
-+ ccb.ccb_h.path_id = cam->path_id;
-+ ccb.ccb_h.target_id = cam->target_id;
-+ ccb.ccb_h.target_lun = cam->target_lun;
-+ cam_fill_csio (&(ccb.csio), 1, NULL, CAM_DEV_QFRZDIS, MSG_SIMPLE_Q_TAG, NULL, 0, sizeof(ccb.csio.sense_data), 0, 30*1000);
-+ }
-+ ccb.csio.cdb_len = i+1;
-+ return ccb.csio.cdb_io.cdb_bytes[i];
-+}
-+
-+
-+int K3bCdDevice::ScsiCommand::transport( TransportDirection dir,
-+ void* data,
-+ size_t len )
-+{
-+ if (!cam)
-+ return -1;
-+ kdDebug() << "(K3bCdDevice::ScsiCommand) transport command " << QString::number((int)ccb.csio.cdb_io.cdb_bytes[0], 16) << ", length: " << (int)ccb.csio.cdb_len << endl;
-+ int ret=0;
-+ ccb.csio.ccb_h.flags |= dir;
-+ ccb.csio.data_ptr = (u_int8_t *)data;
-+ ccb.csio.dxfer_len = len;
-+ if ((ret = cam_send_ccb(cam, &ccb)) < 0)
-+ {
-+ kdDebug() << "(K3bCdDevice::ScsiCommand) transport failed: " << ret << endl;
-+ return -1;
-+ }
-+ if ((ccb.ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP)
-+ {
-+ kdDebug() << "(K3bCdDevice::ScsiCommand) transport succeeded" << endl;
-+ return 0;
-+ }
-+ errno = EIO;
-+ ret = ERRCODE(((unsigned char *)&ccb.csio.sense_data));
-+ if (ret == 0)
-+ ret = -1;
-+ else
-+ CREAM_ON_ERRNO(((unsigned char *)&ccb.csio.sense_data));
-+ kdDebug() << "(K3bCdDevice::ScsiCommand) transport failed (2): " << ret << endl;
-+ return ret;
-+}
-+#endif
-
- QString K3bCdDevice::MMC::commandString( const unsigned char& command )
- {
diff --git a/sysutils/k3b-kde4/files/patch-src-device-k3bscsicommand.h b/sysutils/k3b-kde4/files/patch-src-device-k3bscsicommand.h
deleted file mode 100644
index 06cebf91dd79..000000000000
--- a/sysutils/k3b-kde4/files/patch-src-device-k3bscsicommand.h
+++ /dev/null
@@ -1,84 +0,0 @@
---- src/device/k3bscsicommand.h.orig Wed Jan 21 11:20:11 2004
-+++ src/device/k3bscsicommand.h Fri Feb 13 21:03:38 2004
-@@ -1,10 +1,10 @@
- /*
- *
-- * $Id: k3bscsicommand.h,v 1.3 2004/01/21 10:20:11 trueg Exp $
-+ * $Id: k3bscsicommand.h,v 1.2 2003/12/19 19:40:40 trueg Exp $
- * Copyright (C) 2003 Sebastian Trueg <trueg@k3b.org>
- *
- * This file is part of the K3b project.
-- * Copyright (C) 1998-2004 Sebastian Trueg <trueg@k3b.org>
-+ * Copyright (C) 1998-2003 Sebastian Trueg <trueg@k3b.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
-@@ -17,9 +17,27 @@
- #define _K3B_SCSI_COMMAND_H_
-
- #include <sys/types.h>
-+#ifndef __FreeBSD__
- #undef __STRICT_ANSI__
- #include <linux/cdrom.h>
- #define __STRICT_ANSI__
-+#else
-+#include <sys/types.h>
-+#include <stdio.h>
-+#include <camlib.h>
-+#undef INQUIRY
-+#undef READ_10
-+#undef READ_12
-+#undef READ_BUFFER
-+#undef READ_CAPACITY
-+#undef REQUEST_SENSE
-+#undef START_STOP_UNIT
-+#undef SYNCHRONIZE_CACHE
-+#undef TEST_UNIT_READY
-+#undef WRITE_10
-+#undef WRITE_12
-+#undef WRITE_BUFFER
-+#endif
-
-
- #include <qstring.h>
-@@ -87,16 +105,24 @@
- }
-
-
-+#ifndef __FreeBSD__
- enum TransportDirection {
- TR_DIR_NONE,
- TR_DIR_READ,
- TR_DIR_WRITE
- };
-+#else
-+ enum TransportDirection {
-+ TR_DIR_NONE = 0,
-+ TR_DIR_READ = CAM_DIR_IN,
-+ TR_DIR_WRITE = CAM_DIR_OUT
-+ };
-+#endif
-
- class ScsiCommand
- {
- public:
-- ScsiCommand( int fd );
-+// ScsiCommand( int fd );
- ScsiCommand( const CdDevice* );
- ~ScsiCommand();
-
-@@ -109,9 +135,13 @@
- size_t len = 0 );
-
- private:
-+#ifndef __FreeBSD__
- struct cdrom_generic_command m_cmd;
- struct request_sense m_sense;
--
-+#else
-+ struct cam_device *cam;
-+ union ccb ccb;
-+#endif
- int m_fd;
- const CdDevice* m_device;
- bool m_needToCloseDevice;
diff --git a/sysutils/k3b-kde4/files/patch-src-rip-k3bmovieview.cpp b/sysutils/k3b-kde4/files/patch-src-rip-k3bmovieview.cpp
deleted file mode 100644
index cfd8f4e7c79a..000000000000
--- a/sysutils/k3b-kde4/files/patch-src-rip-k3bmovieview.cpp
+++ /dev/null
@@ -1,14 +0,0 @@
---- src/rip/k3bmovieview.cpp.orig Fri Feb 6 12:08:51 2004
-+++ src/rip/k3bmovieview.cpp Fri Feb 13 21:03:38 2004
-@@ -223,8 +223,11 @@
- }
-
- QWidget::show();
-+ if (longestTitle)
-+ {
- longestTitle->parent()->setOpen( true );
- m_listView->setSelected( longestTitle, true );
-+ }
- } else {
- // error during parsing
- emit notSupportedDisc( m_device->devicename() );
diff --git a/sysutils/k3b-kde4/files/patch-src-rip-k3btcwrapper.cpp b/sysutils/k3b-kde4/files/patch-src-rip-k3btcwrapper.cpp
deleted file mode 100644
index 9ef70edca96a..000000000000
--- a/sysutils/k3b-kde4/files/patch-src-rip-k3btcwrapper.cpp
+++ /dev/null
@@ -1,15 +0,0 @@
---- src/rip/k3btcwrapper.cpp.orig Wed Jan 21 11:20:20 2004
-+++ src/rip/k3btcwrapper.cpp Fri Feb 13 21:03:38 2004
-@@ -65,7 +65,12 @@
- //K3bProcess *p = new K3bProcess();
- emit tcprobeTitleParsed( m_currentTitle );
-
-+#ifndef __FreeBSD__
- *p << bin->path << "-i" << m_device->blockDeviceName() << "-T" << QString::number(m_currentTitle);
-+#else
-+ kdDebug() << "(K3bTcWrapper) executing: " << bin->path << " -i " << m_device->mountPoint() << " -T " << QString::number(m_currentTitle) << endl;
-+ *p << bin->path << "-i" << m_device->mountPoint() << "-T" << QString::number(m_currentTitle);
-+#endif
- //p->setSplitStdout( true );
- connect( p, SIGNAL(receivedStderr(KProcess*, char*, int)), this, SLOT(slotParseTcprobeError(KProcess*, char*, int)) );
- connect( p, SIGNAL(receivedStdout(KProcess*, char*, int)), this, SLOT(slotParseTcprobeOutput(KProcess*, char*, int)) );