Index: head/sysutils/k3b/Makefile =================================================================== --- head/sysutils/k3b/Makefile (revision 110164) +++ head/sysutils/k3b/Makefile (revision 110165) @@ -1,50 +1,50 @@ # New ports collection makefile for: k3b # Date created: 2003/02/13 # Whom: Heiner # # $FreeBSD$ # PORTNAME= k3b -PORTVERSION= 0.11.6 -PORTREVISION= 1 +PORTVERSION= 0.11.9 CATEGORIES= sysutils multimedia kde MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= ${PORTNAME} MAINTAINER= h.eichmann@gmx.de COMMENT= A CD/DVD recording GUI for KDE RUN_DEPENDS= cdrecord:${PORTSDIR}/sysutils/cdrtools \ cdrdao:${PORTSDIR}/sysutils/cdrdao \ mkisofs:${PORTSDIR}/sysutils/mkisofs LIB_DEPENDS= mad:${PORTSDIR}/audio/libmad \ + id3tag:${PORTSDIR}/audio/libid3tag \ vorbis:${PORTSDIR}/audio/libvorbis \ FLAC:${PORTSDIR}/audio/flac USE_BZIP2= yes GNU_CONFIGURE= yes CONFIGURE_TARGET=--build=${MACHINE_ARCH}-portbld-freebsd${OSREL} CONFIGURE_ARGS= --with-k3bsetup=no USE_GMAKE= yes USE_LIBTOOL_VER=13 INSTALLS_SHLIB= yes USE_KDELIBS_VER= 3 USE_REINPLACE= yes pre-configure: ${REINPLACE_CMD} "s,-pedantic ,,g; \ s,-pthread,${PTHREAD_LIBS},g; \ s,-O2 ,,g" ${WRKSRC}/configure .for i in config.h.in Makefile.in ${TOUCH} ${WRKSRC}/${i} .endfor post-install: @${CAT} ${PKGMESSAGE} @sleep 5 showinfo: more ${PKGMESSAGE} .include Property changes on: head/sysutils/k3b/Makefile ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.7 \ No newline at end of property +1.8 \ No newline at end of property Index: head/sysutils/k3b/distinfo =================================================================== --- head/sysutils/k3b/distinfo (revision 110164) +++ head/sysutils/k3b/distinfo (revision 110165) @@ -1 +1,2 @@ -MD5 (k3b-0.11.6.tar.bz2) = 0015b9ad457713425464dbdad6a15ab9 +MD5 (k3b-0.11.9.tar.bz2) = 88f46a5cfbda5fa89b4bfee504567df1 +SIZE (k3b-0.11.9.tar.bz2) = 3217141 Property changes on: head/sysutils/k3b/distinfo ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.3 \ No newline at end of property +1.4 \ No newline at end of property Index: head/sysutils/k3b/files/patch-src-Makefile.in =================================================================== --- head/sysutils/k3b/files/patch-src-Makefile.in (revision 110164) +++ head/sysutils/k3b/files/patch-src-Makefile.in (revision 110165) @@ -1,11 +1,11 @@ ---- 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 @@ +--- src/Makefile.in.orig Mon Mar 29 20:04:54 2004 ++++ src/Makefile.in Tue May 11 22:57:03 2004 +@@ -272,7 +272,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) Property changes on: head/sysutils/k3b/files/patch-src-Makefile.in ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.2 \ No newline at end of property +1.3 \ No newline at end of property Index: head/sysutils/k3b/files/patch-src-core-k3bdefaultexternalprograms.cpp =================================================================== --- head/sysutils/k3b/files/patch-src-core-k3bdefaultexternalprograms.cpp (revision 110164) +++ head/sysutils/k3b/files/patch-src-core-k3bdefaultexternalprograms.cpp (revision 110165) @@ -1,154 +1,154 @@ ---- 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 @@ +--- src/core/k3bdefaultexternalprograms.cpp.orig Mon Mar 22 18:13:21 2004 ++++ src/core/k3bdefaultexternalprograms.cpp Tue May 11 22:57:03 2004 +@@ -30,6 +30,7 @@ #include #include #include +#include "k3bprocess.h" -@@ -89,7 +90,7 @@ +@@ -123,7 +124,7 @@ K3bExternalBin* bin = 0; // probe version - KProcess vp; + MyKProcess vp; K3bProcess::OutputCollector out( &vp ); vp << path << "-version"; -@@ -128,7 +129,7 @@ +@@ -162,7 +163,7 @@ // probe features - KProcess fp; + MyKProcess fp; out.setProcess( &fp ); fp << path << "-help"; if( fp.start( KProcess::Block, KProcess::AllOutput ) ) { -@@ -200,7 +201,7 @@ +@@ -236,7 +237,7 @@ K3bExternalBin* bin = 0; // probe version - KProcess vp; + MyKProcess vp; K3bProcess::OutputCollector out( &vp ); vp << path << "-version"; -@@ -229,7 +230,7 @@ +@@ -265,7 +266,7 @@ // probe features - KProcess fp; + MyKProcess fp; out.setProcess( &fp ); fp << path << "-help"; if( fp.start( KProcess::Block, KProcess::AllOutput ) ) { -@@ -285,7 +286,7 @@ +@@ -321,7 +322,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 @@ +@@ -349,7 +350,7 @@ // probe features - KProcess fp; + MyKProcess fp; fp << path << "-help"; out.setProcess( &fp ); if( fp.start( KProcess::Block, KProcess::AllOutput ) ) { -@@ -374,7 +375,7 @@ +@@ -410,7 +411,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 @@ +@@ -438,7 +439,7 @@ // probe features - KProcess fp; + MyKProcess fp; fp << path << "-help"; out.setProcess( &fp ); if( fp.start( KProcess::Block, KProcess::AllOutput ) ) { -@@ -462,7 +463,7 @@ +@@ -498,7 +499,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 @@ +@@ -530,7 +531,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 @@ +@@ -599,7 +600,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 @@ +@@ -653,7 +654,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 @@ +@@ -710,7 +711,7 @@ K3bExternalBin* bin = 0; // probe version - KProcess vp; + MyKProcess vp; K3bProcess::OutputCollector out( &vp ); vp << path << "--version"; -@@ -726,7 +727,7 @@ +@@ -769,7 +770,7 @@ K3bExternalBin* bin = 0; // probe version - KProcess vp; + MyKProcess vp; K3bProcess::OutputCollector out( &vp ); vp << path << "-version"; -@@ -795,7 +796,7 @@ +@@ -838,7 +839,7 @@ K3bExternalBin* bin = 0; // probe version - KProcess vp; + MyKProcess vp; K3bProcess::OutputCollector out( &vp ); vp << path; -@@ -868,7 +869,7 @@ +@@ -911,7 +912,7 @@ K3bExternalBin* bin = 0; // probe version - KProcess vp; + MyKProcess vp; K3bProcess::OutputCollector out( &vp ); vp << path << "-h"; Property changes on: head/sysutils/k3b/files/patch-src-core-k3bdefaultexternalprograms.cpp ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.2 \ No newline at end of property +1.3 \ No newline at end of property Index: head/sysutils/k3b/files/patch-src-core-k3bprocess.cpp =================================================================== --- head/sysutils/k3b/files/patch-src-core-k3bprocess.cpp (revision 110164) +++ head/sysutils/k3b/files/patch-src-core-k3bprocess.cpp (revision 110165) @@ -1,63 +1,63 @@ --- src/core/k3bprocess.cpp.orig Sun Feb 1 09:18:58 2004 -+++ src/core/k3bprocess.cpp Fri Feb 13 21:03:38 2004 ++++ src/core/k3bprocess.cpp Tue May 11 22:57:03 2004 @@ -28,6 +28,60 @@ #include #include #include +#include +#include +#include +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; +} Property changes on: head/sysutils/k3b/files/patch-src-core-k3bprocess.cpp ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.2 \ No newline at end of property +1.3 \ No newline at end of property Index: head/sysutils/k3b/files/patch-src-core-k3bprocess.h =================================================================== --- head/sysutils/k3b/files/patch-src-core-k3bprocess.h (revision 110164) +++ head/sysutils/k3b/files/patch-src-core-k3bprocess.h (revision 110165) @@ -1,24 +1,24 @@ --- src/core/k3bprocess.h.orig Tue Jan 27 09:19:13 2004 -+++ src/core/k3bprocess.h Fri Feb 13 21:03:38 2004 ++++ src/core/k3bprocess.h Tue May 11 22:57:03 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 Property changes on: head/sysutils/k3b/files/patch-src-core-k3bprocess.h ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.2 \ No newline at end of property +1.3 \ No newline at end of property Index: head/sysutils/k3b/files/patch-src-device-k3bdevice.cpp =================================================================== --- head/sysutils/k3b/files/patch-src-device-k3bdevice.cpp (revision 110164) +++ head/sysutils/k3b/files/patch-src-device-k3bdevice.cpp (revision 110165) @@ -1,26 +1,79 @@ ---- src/device/k3bdevice.cpp.orig Thu Feb 12 11:21:15 2004 -+++ src/device/k3bdevice.cpp Fri Feb 13 21:03:38 2004 +--- src/device/k3bdevice.cpp.orig Sun Mar 14 17:35:20 2004 ++++ src/device/k3bdevice.cpp Mon May 24 23:31:19 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 // +@@ -192,6 +200,7 @@ + unsigned char header[2048]; + ::memset( header, 0, 2048 ); + ++ cmd.clear(); + cmd[0] = MMC::GET_CONFIGURATION; + cmd[8] = 8; + if( cmd.transport( TR_DIR_READ, header, 8 ) ) { +@@ -733,6 +742,14 @@ + m_bufferSize = 1024; + d->burnfree = false; + } ++ else if( description().startsWith("CD-R56S") ) { ++ m_writeModes |= TAO; ++ d->deviceType |= CDROM|CDR; ++ m_maxWriteSpeed = 6; ++ m_maxReadSpeed = 24; ++ m_bufferSize = 1302; ++ d->burnfree = false; ++ } + } + else if( vendor().startsWith("MATSHITA") ) { + if( description().startsWith("CD-R CW-7501") ) { +@@ -2317,10 +2334,12 @@ + { + // if the device is already opened we do not close it + // to allow fast multible method calls in a row ++#ifndef __FreeBSD__ + bool needToClose = !isOpen(); + + if (open() < 0) + return; ++#endif + + // header size is 8 + unsigned char* buffer = 0; +@@ -2406,13 +2425,16 @@ + delete [] buffer; + } + ++#ifndef __FreeBSD__ + if( needToClose ) + close(); ++#endif + } + + + bool K3bCdDevice::CdDevice::readTocPmaAtip( unsigned char** data, int& dataLen, int format, bool time, int track ) const + { ++ kdDebug() << "(K3bCdDevice::CdDevice) readTocPmaAtip started, format:" << format << ", time: " << time << ", track: " << track << endl; + unsigned char header[2048]; + ::memset( header, 0, 2048 ); + Property changes on: head/sysutils/k3b/files/patch-src-device-k3bdevice.cpp ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.1 \ No newline at end of property +1.2 \ No newline at end of property Index: head/sysutils/k3b/files/patch-src-device-k3bdevice.h =================================================================== --- head/sysutils/k3b/files/patch-src-device-k3bdevice.h (revision 110164) +++ head/sysutils/k3b/files/patch-src-device-k3bdevice.h (revision 110165) @@ -1,13 +1,13 @@ ---- 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 @@ +--- src/device/k3bdevice.h.orig Sun Mar 14 17:35:20 2004 ++++ src/device/k3bdevice.h Tue May 11 22:57:03 2004 +@@ -661,6 +661,10 @@ class Private; Private* d; +#ifdef __FreeBSD__ + QString m_passDevice; + friend class ScsiCommand; +#endif friend class DeviceManager; }; Property changes on: head/sysutils/k3b/files/patch-src-device-k3bdevice.h ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.1 \ No newline at end of property +1.2 \ No newline at end of property Index: head/sysutils/k3b/files/patch-src-device-k3bdevicemanager.cpp =================================================================== --- head/sysutils/k3b/files/patch-src-device-k3bdevicemanager.cpp (revision 110164) +++ head/sysutils/k3b/files/patch-src-device-k3bdevicemanager.cpp (revision 110165) @@ -1,289 +1,270 @@ ---- src/device/k3bdevicemanager.cpp.orig Wed Jan 21 11:20:10 2004 -+++ src/device/k3bdevicemanager.cpp Fri Feb 13 21:03:38 2004 +--- src/device/k3bdevicemanager.cpp.orig Sun Feb 29 13:52:41 2004 ++++ src/device/k3bdevicemanager.cpp Tue May 11 22:57:03 2004 @@ -49,6 +49,12 @@ #include #include +#ifdef __FreeBSD__ +#include +#include +#include +#endif + #ifdef Q_OS_LINUX -@@ -196,6 +202,22 @@ +@@ -196,6 +202,13 @@ { 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::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++; -+ } -+ } ++ bsd_scan_devices(); +#else QFile info("/proc/sys/dev/cdrom/info"); QString line,devstring; info.open(IO_ReadOnly); -@@ -286,6 +308,7 @@ +@@ -286,6 +299,7 @@ // m_foundDevices++; // } +#endif scanFstab(); return m_foundDevices; -@@ -427,6 +450,7 @@ +@@ -427,6 +441,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 @@ +@@ -467,11 +482,36 @@ } ::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::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) -+ { ++ K3bDevice* device = findDevice(devicename); ++ if (device) ++ return 0; + // 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 ) ) ++ if( K3bDevice* oldDev = findDevice( resolved ) ) + { -+ kdDebug() << "(K3bDeviceManager) dev already found" << endl; -+ oldDev->addDeviceNode( resolved ); ++ kdDebug() << "(K3bDeviceManager) dev already found" << endl; ++ oldDev->addDeviceNode( resolved ); ++ return 0; + } -+ return 0; -+ } ++ device = new K3bDevice(resolved.latin1()); ++ return addDevice( device ); ++} + ++K3bDevice* K3bCdDevice::DeviceManager::addDevice( CdDevice* device ) ++{ ++ const QString devicename = device->devicename(); +#else K3bDevice* device = 0; // resolve all symlinks -@@ -503,6 +567,7 @@ +@@ -503,6 +543,7 @@ device->m_target = target; device->m_lun = lun; } +#endif if( !device->init() ) { kdDebug() << "Could not initialize device " << devicename << endl; -@@ -578,9 +643,20 @@ +@@ -578,9 +619,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 @@ +@@ -589,6 +641,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 @@ +@@ -599,6 +653,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 @@ +@@ -674,5 +739,131 @@ 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) ++#include ++#include ++#include ++void K3bCdDevice::DeviceManager::bsd_scan_devices() +{ -+ 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); ++ union ccb ccb; ++ int fd, i; ++ int need_close = 0; ++ int skip_device = 0; ++ int bus, target, lun; ++ QString dev1, dev2; + -+ // 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; -+ } ++ if ((fd = open(XPT_DEVICE, O_RDWR)) == -1) ++ { ++ kdDebug() << "couldn't open %s " << XPT_DEVICE << endl; ++ return; ++ } ++ ++ memset(&ccb, 0, sizeof(ccb)); + -+ // read tmp file line by line -+ QFile tmp (tmpfile.name()); -+ if ( tmp.open( IO_ReadOnly ) ) -+ { -+ QTextStream stream( &tmp ); -+ while ( !stream.eof() ) ++ ccb.ccb_h.func_code = XPT_DEV_MATCH; ++ char buffer[100*sizeof(struct dev_match_result)]; ++ ccb.cdm.match_buf_len = 100*sizeof(struct dev_match_result); ++ ccb.cdm.matches = (struct dev_match_result *)buffer; ++ ccb.cdm.num_matches = 0; ++ ccb.cdm.num_patterns = 0; ++ ccb.cdm.pattern_buf_len = 0; ++ do { ++ if (ioctl(fd, CAMIOCOMMAND, &ccb) == -1) { ++ kdDebug() << "(bsd_scan_devices) error sending CAMIOCOMMAND ioctl: " << errno << endl; ++ break; ++ } ++ ++ if ((ccb.ccb_h.status != CAM_REQ_CMP) ++ || ((ccb.cdm.status != CAM_DEV_MATCH_LAST) && (ccb.cdm.status != CAM_DEV_MATCH_MORE))) { ++ kdDebug() << "(bsd_scan_devices) got CAM error " << ccb.ccb_h.status << ", CDM error %d" << ccb.cdm.status << endl; ++ break; ++ } ++ kdDebug() << "(bsd_scan_devices) number of matches " << (int)ccb.cdm.num_matches << endl; ++ for (int i = 0; i < (int)ccb.cdm.num_matches; i++) { ++ switch (ccb.cdm.matches[i].type) { ++ case DEV_MATCH_DEVICE: { ++ struct device_match_result *dev_result = &ccb.cdm.matches[i].result.device_result; ++ ++ if (dev_result->flags & DEV_RESULT_UNCONFIGURED) ++ { ++ skip_device = 1; ++ break; ++ } ++ else ++ skip_device = 0; ++ if (need_close) ++ { ++ QString pass = dev1; ++ QString dev = "/dev/" + dev2; ++ if (dev2.startsWith("pass")) ++ { ++ pass = dev2; ++ dev = "/dev/" + dev1; ++ } ++#if __FreeBSD_version < 500100 ++ dev += "c"; ++#endif ++ ++ K3bDevice* device = new K3bDevice(dev.latin1()); ++ device->m_bus = bus; ++ device->m_target = target; ++ device->m_lun = lun; ++ device->m_passDevice = "/dev/" + pass; ++ kdDebug() << "(bsd_scan_devices) add device " << dev << ":" << bus << ":" << target << ":" << lun << endl; ++ addDevice(device); ++ need_close = 0; ++ } ++ bus = dev_result->path_id; ++ target = dev_result->target_id; ++ lun = dev_result->target_lun; ++ ++ need_close = 1; ++ ++ break; ++ } ++ case DEV_MATCH_PERIPH: { ++ struct periph_match_result *periph_result = &ccb.cdm.matches[i].result.periph_result; ++ ++ if (skip_device != 0) ++ break; ++ ++ if (need_close > 1) ++ dev1 = periph_result->periph_name + QString::number(periph_result->unit_number); ++ else ++ dev2 = periph_result->periph_name + QString::number(periph_result->unit_number); ++ ++ need_close++; ++ break; ++ } ++ } ++ } ++ ++ } while ((ccb.ccb_h.status == CAM_REQ_CMP) ++ && (ccb.cdm.status == CAM_DEV_MATCH_MORE)); ++ ++ if (need_close) + { -+ 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)); ++ QString pass = dev1; ++ QString dev = "/dev/" + dev2; ++ if (dev2.startsWith("pass")) ++ { ++ pass = dev2; ++ dev = "/dev/" + dev1; ++ } ++#if __FreeBSD_version < 500100 ++ dev += "c"; +#endif -+ } -+ } ++ K3bDevice* device = new K3bDevice(dev.latin1()); ++ device->m_bus = bus; ++ device->m_target = target; ++ device->m_lun = lun; ++ device->m_passDevice = "/dev/" + pass; ++ kdDebug() << "(bsd_scan_devices) add device " << dev << ":" << bus << ":" << target << ":" << lun << endl; ++ addDevice(device); ++ } ++ close(fd); +} +#endif #include "k3bdevicemanager.moc" Property changes on: head/sysutils/k3b/files/patch-src-device-k3bdevicemanager.cpp ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.1 \ No newline at end of property +1.2 \ No newline at end of property Index: head/sysutils/k3b/files/patch-src-device-k3bdevicemanager.h =================================================================== --- head/sysutils/k3b/files/patch-src-device-k3bdevicemanager.h (revision 110164) +++ head/sysutils/k3b/files/patch-src-device-k3bdevicemanager.h (revision 110165) @@ -1,43 +1,13 @@ --- 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 ++++ src/device/k3bdevicemanager.h Tue May 11 22:57:03 2004 +@@ -112,6 +112,10 @@ - #include -+#ifdef __FreeBSD__ -+#include -+#include -+#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 m_devices; ++ void bsd_scan_devices(); ++ CdDevice* addDevice( CdDevice* ); +#endif }; } Property changes on: head/sysutils/k3b/files/patch-src-device-k3bdevicemanager.h ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.1 \ No newline at end of property +1.2 \ No newline at end of property Index: head/sysutils/k3b/files/patch-src-device-k3bscsicommand.cpp =================================================================== --- head/sysutils/k3b/files/patch-src-device-k3bscsicommand.cpp (revision 110164) +++ head/sysutils/k3b/files/patch-src-device-k3bscsicommand.cpp (revision 110165) @@ -1,142 +1,179 @@ --- 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 - * - * This file is part of the K3b project. -- * Copyright (C) 1998-2004 Sebastian Trueg -+ * Copyright (C) 1998-2003 Sebastian Trueg - * - * 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 ++++ src/device/k3bscsicommand.cpp Mon May 24 23:32:04 2004 @@ -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 @@ +@@ -135,6 +136,155 @@ return 0; } +#else + +#include +#include +#include +#include +#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 +#include + +#include +#include + +K3bCdDevice::ScsiCommand::ScsiCommand( const K3bCdDevice::CdDevice* dev ) -+ : m_device(dev) ++ : closecam(true), m_device(dev) +{ -+ clear(); ++ 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; ++ clear(); +} + ++K3bCdDevice::ScsiCommand::ScsiCommand( const K3bCdDevice::CdDevice* dev, struct cam_device * c) ++ : closecam(false), cam(c), m_device(dev) ++{ ++ clear(); ++} ++ +K3bCdDevice::ScsiCommand::~ScsiCommand() +{ -+ if(cam) ++ if(cam && closecam) ++ { + cam_close_device(cam); -+// if (m_fd >0) -+// close(m_fd); ++ kdDebug() << "(K3bCdDevice::ScsiCommand) device " << m_device->m_passDevice << " closed." << endl; ++ } +} + + +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; ++ if (!cam) ++ return; ++ ccb.ccb_h.path_id = cam->path_id; ++ ccb.ccb_h.target_id = cam->target_id; ++ ccb.ccb_h.target_lun = cam->target_lun; +} + +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; ++ unsigned char command = ccb.csio.cdb_io.cdb_bytes[0]; ++ int direction = CAM_DEV_QFRZDIS; ++ if (!len) ++ direction |= CAM_DIR_NONE; ++ else ++ direction |= (dir & TR_DIR_READ)?CAM_DIR_IN : CAM_DIR_OUT; ++ cam_fill_csio (&(ccb.csio), 1, NULL, direction | CAM_DEV_QFRZDIS, MSG_SIMPLE_Q_TAG, (u_int8_t *)data, len, sizeof(ccb.csio.sense_data), ccb.csio.cdb_len, 30*1000); ++ unsigned char * sense = (unsigned char *)&ccb.csio.sense_data; + if ((ret = cam_send_ccb(cam, &ccb)) < 0) + { + kdDebug() << "(K3bCdDevice::ScsiCommand) transport failed: " << ret << endl; -+ return -1; ++ goto dump_error; + } + if ((ccb.ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP) -+ { -+ kdDebug() << "(K3bCdDevice::ScsiCommand) transport succeeded" << endl; -+ return 0; -+ } ++ return 0; ++ + errno = EIO; -+ ret = ERRCODE(((unsigned char *)&ccb.csio.sense_data)); ++ // FreeBSD 5-CURRENT since 2003-08-24, including 5.2 fails to ++ // pull sense data automatically, at least for ATAPI transport, ++ // so I reach for it myself... ++ if ((ccb.csio.scsi_status==SCSI_STATUS_CHECK_COND) && ++ !(ccb.ccb_h.status&CAM_AUTOSNS_VALID)) ++ { ++ u_int8_t _sense[18]; ++ u_int32_t resid=ccb.csio.resid; ++ ++ memset(_sense,0,sizeof(_sense)); ++ ++ operator[](0) = 0x03; // REQUEST SENSE ++ ccb.csio.cdb_io.cdb_bytes[4] = sizeof(_sense); ++ ccb.csio.cdb_len = 6; ++ ccb.csio.ccb_h.flags |= CAM_DIR_IN|CAM_DIS_AUTOSENSE; ++ ccb.csio.data_ptr = _sense; ++ ccb.csio.dxfer_len = sizeof(_sense); ++ ccb.csio.sense_len = 0; ++ ret = cam_send_ccb(cam, &ccb); ++ ++ ccb.csio.resid = resid; ++ if (ret<0) ++ { ++ kdDebug() << "(K3bCdDevice::ScsiCommand) transport failed (2): " << ret << endl; ++ ret = -1; ++ goto dump_error; ++ } ++ if ((ccb.ccb_h.status&CAM_STATUS_MASK) != CAM_REQ_CMP) ++ { ++ kdDebug() << "(K3bCdDevice::ScsiCommand) transport failed (3): " << ret << endl; ++ errno=EIO,-1; ++ ret = -1; ++ goto dump_error; ++ } ++ ++ memcpy(sense,_sense,sizeof(_sense)); ++ } ++ ++ ret = ERRCODE(sense); ++ kdDebug() << "(K3bCdDevice::ScsiCommand) transport failed (4): " << ret << endl; + if (ret == 0) + ret = -1; + else + CREAM_ON_ERRNO(((unsigned char *)&ccb.csio.sense_data)); -+ kdDebug() << "(K3bCdDevice::ScsiCommand) transport failed (2): " << ret << endl; ++dump_error: ++ kdDebug() << "(K3bCdDevice::ScsiCommand) failed: " << endl ++ << " command: " << QString("%1 (%2)") ++ .arg( MMC::commandString( ccb.csio.cdb_io.cdb_bytes[0] ) ) ++ .arg( QString::number(ccb.csio.cdb_io.cdb_bytes[0], 16) ) << endl ++ << " errorcode: " << QString::number(((struct scsi_sense_data *)sense)->error_code & SSD_ERRCODE, 16) << endl ++ << " sense key: " << senseKeyToString(((struct scsi_sense_data *)sense)->flags & SSD_KEY) << endl ++ << " asc: " << QString::number(((struct scsi_sense_data *)sense)->add_sense_code, 16) << endl ++ << " ascq: " << QString::number(((struct scsi_sense_data *)sense)->add_sense_code_qual, 16) << endl; ++ + return ret; +} +#endif QString K3bCdDevice::MMC::commandString( const unsigned char& command ) { Property changes on: head/sysutils/k3b/files/patch-src-device-k3bscsicommand.cpp ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.1 \ No newline at end of property +1.2 \ No newline at end of property Index: head/sysutils/k3b/files/patch-src-device-k3bscsicommand.h =================================================================== --- head/sysutils/k3b/files/patch-src-device-k3bscsicommand.h (revision 110164) +++ head/sysutils/k3b/files/patch-src-device-k3bscsicommand.h (revision 110165) @@ -1,84 +1,57 @@ --- 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 - * - * This file is part of the K3b project. -- * Copyright (C) 1998-2004 Sebastian Trueg -+ * Copyright (C) 1998-2003 Sebastian Trueg - * - * 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 ++++ src/device/k3bscsicommand.h Tue May 11 22:57:03 2004 @@ -17,9 +17,27 @@ #define _K3B_SCSI_COMMAND_H_ #include +#ifndef __FreeBSD__ #undef __STRICT_ANSI__ #include #define __STRICT_ANSI__ +#else +#include +#include +#include +#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 -@@ -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 - +@@ -96,7 +114,7 @@ class ScsiCommand { public: - ScsiCommand( int fd ); +// ScsiCommand( int fd ); ScsiCommand( const CdDevice* ); ~ScsiCommand(); -@@ -109,9 +135,13 @@ +@@ -109,10 +127,16 @@ size_t len = 0 ); private: +#ifndef __FreeBSD__ struct cdrom_generic_command m_cmd; struct request_sense m_sense; - +#else ++ ScsiCommand( const CdDevice* , struct cam_device *); ++ bool closecam; + struct cam_device *cam; + union ccb ccb; -+#endif int m_fd; ++#endif const CdDevice* m_device; bool m_needToCloseDevice; + }; Property changes on: head/sysutils/k3b/files/patch-src-device-k3bscsicommand.h ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.1 \ No newline at end of property +1.2 \ No newline at end of property Index: head/sysutils/k3b/files/patch-src-rip-k3bdvdrippingprocess.cpp =================================================================== --- head/sysutils/k3b/files/patch-src-rip-k3bdvdrippingprocess.cpp (nonexistent) +++ head/sysutils/k3b/files/patch-src-rip-k3bdvdrippingprocess.cpp (revision 110165) @@ -0,0 +1,16 @@ +--- src/rip/k3bdvdrippingprocess.cpp.orig Wed Jan 21 11:20:20 2004 ++++ src/rip/k3bdvdrippingprocess.cpp Tue May 11 22:57:03 2004 +@@ -278,10 +278,13 @@ + void K3bDvdRippingProcess::slotPreProcessingDvd() { + QString video; + QDir video_ts( m_mountPoint + "/VIDEO_TS"); ++#ifndef FreeBSD ++// on FreeBSD both /VIDEO_TS and /video_ts exist on dvd devices ?!? + if( video_ts.exists() ) { + m_udfMount = true; + kdDebug() << "(K3bDvdRippingProcess) <" << m_mountPoint << "> has UDF filesystem." << endl; + } ++#endif + video_ts.setPath( m_mountPoint + "/video_ts"); + if( !video_ts.exists() && !m_udfMount){ + m_preProcessingFailed = true; Property changes on: head/sysutils/k3b/files/patch-src-rip-k3bdvdrippingprocess.cpp ___________________________________________________________________ Added: cvs2svn:cvs-rev ## -0,0 +1 ## +1.1 \ No newline at end of property Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Index: head/sysutils/k3b/files/patch-src-rip-k3bmovieview.cpp =================================================================== --- head/sysutils/k3b/files/patch-src-rip-k3bmovieview.cpp (revision 110164) +++ head/sysutils/k3b/files/patch-src-rip-k3bmovieview.cpp (revision 110165) @@ -1,14 +1,14 @@ --- src/rip/k3bmovieview.cpp.orig Fri Feb 6 12:08:51 2004 -+++ src/rip/k3bmovieview.cpp Fri Feb 13 21:03:38 2004 ++++ src/rip/k3bmovieview.cpp Tue May 11 22:57:03 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() ); Property changes on: head/sysutils/k3b/files/patch-src-rip-k3bmovieview.cpp ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.2 \ No newline at end of property +1.3 \ No newline at end of property Index: head/sysutils/k3b/files/patch-src-rip-k3btcwrapper.cpp =================================================================== --- head/sysutils/k3b/files/patch-src-rip-k3btcwrapper.cpp (revision 110164) +++ head/sysutils/k3b/files/patch-src-rip-k3btcwrapper.cpp (revision 110165) @@ -1,15 +1,24 @@ --- src/rip/k3btcwrapper.cpp.orig Wed Jan 21 11:20:20 2004 -+++ src/rip/k3btcwrapper.cpp Fri Feb 13 21:03:38 2004 ++++ src/rip/k3btcwrapper.cpp Tue May 11 22:57:03 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)) ); +@@ -77,7 +82,7 @@ + if( !p->start( KProcess::NotifyOnExit, KProcess::AllOutput ) ) { + // something went wrong when starting the program + // it "should" be the executable +- kdDebug() << "(K3bDirView) Error during checking drive for DVD." << endl; ++ kdDebug() << "(K3bTcWrapper) Error during checking drive for DVD." << endl; + } + } + Property changes on: head/sysutils/k3b/files/patch-src-rip-k3btcwrapper.cpp ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.2 \ No newline at end of property +1.3 \ No newline at end of property Index: head/sysutils/k3b/pkg-message =================================================================== --- head/sysutils/k3b/pkg-message (revision 110164) +++ head/sysutils/k3b/pkg-message (revision 110165) @@ -1,53 +1,45 @@ Notes: 1. The FreeBSD k3b port supports SCSI drives only. If you have IDE CD or DVD drives, use them through the cam system. See Chapter 12.5.9 of the handbook (http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/creating-cds.html#ATAPICAM) 2. Your CD and DVD drives must have a mount point in /etc/fstab. They have to be accessed through their atapicam device. I.e. the drives have to be adressed by e.g. /dev/cd0c instead of /dev/acd0c. 3. k3b has to be started from a root console, which is not recommended. Alternatively do all of the following: 3a. set the suid flag on cdrecord and cdrdao. The 'Notes' the chapter of 'man cdrecord' discusses this. -3b. - install sudo (security/sudo) and add the following line or similar to - sudoers (usually in /usr/local/etc/sudoers): - ALL ALL = NOPASSWD: /sbin/camcontrol devlist - - or execute 'camcontrol devlist'. For every user who should be able to use - k3b. Resolve all errors e.g. by giving him/her access rights to /dev/xpt0. - 'camcontrol devlist' must run without error for all these users! - Note that giving access rights to /dev/xpt* might be a security leak! - - or give camcontrol the suid flag, which is a security leak as well. -3c. - For every user who should be able to use k3b and for every CD or DVD +3b. - For every user who should be able to use k3b and for every CD or DVD device add a directory in the users home directory. These directories must be owned by the corresponding user. For each such directory add a line in /ect/fstab (see remark 2), like: /dev/cd0c /usr/home/XXX/cdrom cd9660 ro,noauto,nodev,nosuid 0 0 Furthermore allow user mounts as described in topic 9.22 of the FAQ: http://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/disks.html#USER-FLOPPYMOUNT - - or just give mount and umount the sudo flag, which is a security leak. -3d. - Every user who should be able to use k3b must have read and write access - to all pass through devices connected with CD and DVD drives. Run - 'camcontrol devlist' to identify those devices (seek string 'passX' at - the end of each line and modify the rights of /dev/passX). Note, that + - or just give mount and umount the suid flag, which is a security leak. +3c. - Every user who should be able to use k3b must have read and write access + to all pass through devices connected with CD and DVD drives and to the /dev/xpt0 + device. Run 'camcontrol devlist' to identify those devices (seek string 'passX' + at the end of each line and modify the rights of /dev/passX). Note, that this is a security leak as well but that there is no alternative! 4. Create a directory on a partition, which has enough disk space to hold a CDs or DVDs content (usually below /usr). Enter this directory in Settings-> Configure K3b...->Misc. 5. You should set the cdrdao driver manually. Otherwise the disk info might fail or lock a while. To do so choose Settings->Configure K3b...->Devices. Below the CD recorder click on the string "auto" behind "Cdrdao driver:" For most of the recent drives "generic-mmc" or "generic-mmc-raw" should work. See http://cdrdao.sourceforge.net/drives.html. 6. To burn video CDs install the port multimedia/vcdimager. 7. To rip DVDs additionally install the ports multimedia/transcode, - multimedia/libdvdread and multimedia/xvid. Note that multimedia/transcode - requires some variables to be set. Type "make fetch" in the - multimedia/transcode ports directory for details. The ripping process - itself is described in - http://k3b.sourceforge.net/cgi-bin/index.pl/videoencoding. + multimedia/libdvdread and multimedia/xvid. Note that k3b does NOT work with + transcode 0.6.12. 0.6.10 is the last known working version. The ripping process + itself is described in http://k3b.sourceforge.net/cgi-bin/index.pl/videoencoding. 8. To burn bootable video CDs, install the port multimedia/emovix. 9. To burn DVDs, install the port sysutils/dvd+rw-tools. 10. To normalize the volumes of audio cds, install the port audio/normalize. 11. To rip into more audio formats, install the port audio/sox. + +UPGRADERS FROM 0.11.6 OR BELOW SHOULD NOTE THE CHANGED TOPIC 3C!!! To read this instructions again, type 'make showinfo' in the k3b port directory Property changes on: head/sysutils/k3b/pkg-message ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.4 \ No newline at end of property +1.5 \ No newline at end of property Index: head/sysutils/k3b/pkg-plist =================================================================== --- head/sysutils/k3b/pkg-plist (revision 110164) +++ head/sysutils/k3b/pkg-plist (revision 110165) @@ -1,228 +1,229 @@ bin/k3b include/k3baudiodecoder.h include/k3baudiodoc.h include/k3baudioencoder.h include/k3baudiojob.h include/k3baudioview.h include/k3bblankingjob.h include/k3bbootitem.h include/k3bburnprogressdialog.h include/k3bbusywidget.h include/k3bcdparanoialib.h include/k3bcdtext.h include/k3bcore.h include/k3bcutcombobox.h include/k3bdatadoc.h include/k3bdataitem.h include/k3bdatajob.h include/k3bdataview.h include/k3bdefaultexternalprograms.h include/k3bdevice.h include/k3bdevicecombobox.h include/k3bdeviceglobals.h include/k3bdevicehandler.h include/k3bdevicemanager.h include/k3bdeviceselectiondialog.h include/k3bdiritem.h include/k3bdiskinfo.h include/k3bdoc.h include/k3bdvddoc.h include/k3bdvdformattingjob.h include/k3bdvdjob.h include/k3bdvdview.h include/k3bemptydiscwaiter.h include/k3bexternalbinmanager.h include/k3bfileitem.h include/k3bglobals.h include/k3binteractiondialog.h +include/k3bintvalidator.h include/k3biso9660.h include/k3bisooptions.h include/k3bjob.h include/k3bjobprogressdialog.h include/k3blistview.h include/k3bmd5job.h include/k3bmixeddoc.h include/k3bmixedjob.h include/k3bmixedview.h include/k3bmovixdoc.h include/k3bmovixdvddoc.h include/k3bmovixdvdjob.h include/k3bmovixdvdview.h include/k3bmovixfileitem.h include/k3bmovixjob.h include/k3bmovixview.h include/k3bmsf.h include/k3bmsfedit.h include/k3bmultichoicedialog.h include/k3bplugin.h include/k3bpluginconfigwidget.h include/k3bpluginfactory.h include/k3bpluginmanager.h include/k3bprocess.h include/k3bprojectmanager.h include/k3bstdguiitems.h include/k3bstringutils.h include/k3bthread.h include/k3bthreadjob.h include/k3bthroughputestimator.h include/k3btoc.h include/k3btrack.h include/k3bvalidators.h include/k3bvcddoc.h include/k3bvcdjob.h include/k3bvcdoptions.h include/k3bvcdview.h include/k3bversion.h include/k3bvideodvddoc.h include/k3bvideodvdjob.h include/k3bview.h include/k3bwavefilewriter.h include/k3bwriterselectionwidget.h include/kcutlabel.h lib/kde3/libk3bexternalencoder.la lib/kde3/libk3bexternalencoder.so lib/kde3/libk3bflacdecoder.la lib/kde3/libk3bflacdecoder.so lib/kde3/libk3bmaddecoder.la lib/kde3/libk3bmaddecoder.so lib/kde3/libk3boggvorbisdecoder.la lib/kde3/libk3boggvorbisdecoder.so lib/kde3/libk3boggvorbisencoder.la lib/kde3/libk3boggvorbisencoder.so lib/kde3/libk3bsoxencoder.la lib/kde3/libk3bsoxencoder.so lib/kde3/libk3bwavedecoder.la lib/kde3/libk3bwavedecoder.so lib/libk3baudiometainforenamerplugin.la lib/libk3baudiometainforenamerplugin.so lib/libk3bcore.la lib/libk3bcore.so lib/libk3bcore.so.2 lib/libk3bdevice.la lib/libk3bdevice.so lib/libk3bdevice.so.2 lib/libk3bplugin.la lib/libk3bplugin.so lib/libk3bplugin.so.2 lib/libk3bproject.la lib/libk3bproject.so lib/libk3bproject.so.2 lib/libk3btools.la lib/libk3btools.so lib/libk3btools.so.2 share/applnk/.hidden/k3b-cue.desktop share/applnk/.hidden/k3b-iso.desktop share/applnk/Multimedia/k3b.desktop share/apps/k3b/cdi/cdi_imag.rtf share/apps/k3b/cdi/cdi_text.fnt share/apps/k3b/cdi/cdi_vcd.app share/apps/k3b/cdi/cdi_vcd.cfg share/apps/k3b/cdi/icdia.htm share/apps/k3b/cdi/vcd_on_cdi_41.pdf share/apps/k3b/eventsrc share/apps/k3b/icons/crystalsvg/16x16/actions/cdburn.png share/apps/k3b/icons/crystalsvg/16x16/actions/cdinfo.png share/apps/k3b/icons/crystalsvg/16x16/actions/cdrwblank.png share/apps/k3b/icons/crystalsvg/16x16/actions/greenled.png share/apps/k3b/icons/crystalsvg/16x16/actions/redled.png share/apps/k3b/icons/crystalsvg/16x16/actions/yellowinfo.png share/apps/k3b/icons/crystalsvg/16x16/actions/yellowled.png share/apps/k3b/icons/crystalsvg/22x22/actions/cdcopy.png share/apps/k3b/icons/crystalsvg/22x22/actions/cdinfo.png share/apps/k3b/icons/crystalsvg/22x22/actions/cdrwblank.png share/apps/k3b/icons/crystalsvg/32x32/actions/cdburn.png share/apps/k3b/icons/crystalsvg/32x32/actions/cdcopy.png share/apps/k3b/k3bui.rc share/apps/k3b/kpartplugins/k3baudiometainforenamerplugin.rc share/apps/k3b/pics/73lab/diskinfo_audio.png share/apps/k3b/pics/73lab/diskinfo_data.png share/apps/k3b/pics/73lab/diskinfo_dvd.png share/apps/k3b/pics/73lab/diskinfo_empty.png share/apps/k3b/pics/73lab/diskinfo_left.png share/apps/k3b/pics/73lab/diskinfo_mixed.png share/apps/k3b/pics/73lab/diskinfo_right.png share/apps/k3b/pics/73lab/k3b.theme share/apps/k3b/pics/73lab/k3b_3d_logo.png share/apps/k3b/pics/73lab/k3b_cd_copy.png share/apps/k3b/pics/73lab/k3b_probing_cd.png share/apps/k3b/pics/73lab/k3b_progress_dialog_failed.png share/apps/k3b/pics/73lab/k3b_progress_dialog_success.png share/apps/k3b/pics/73lab/k3b_splash.png share/apps/k3b/pics/73lab/k3bprojectview_left.png share/apps/k3b/pics/73lab/k3bprojectview_left_short.png share/apps/k3b/pics/73lab/k3bprojectview_right.png share/apps/k3b/pics/73lab/k3bsetup2_guy.png share/apps/k3b/pics/crystal/diskinfo_audio.png share/apps/k3b/pics/crystal/diskinfo_data.png share/apps/k3b/pics/crystal/diskinfo_dvd.png share/apps/k3b/pics/crystal/diskinfo_empty.png share/apps/k3b/pics/crystal/diskinfo_left.png share/apps/k3b/pics/crystal/diskinfo_mixed.png share/apps/k3b/pics/crystal/diskinfo_right.png share/apps/k3b/pics/crystal/k3b.theme share/apps/k3b/pics/crystal/k3b_3d_logo.png share/apps/k3b/pics/crystal/k3b_cd_copy.png share/apps/k3b/pics/crystal/k3b_probing_cd.png share/apps/k3b/pics/crystal/k3b_progress_dialog_failed.png share/apps/k3b/pics/crystal/k3b_progress_dialog_success.png share/apps/k3b/pics/crystal/k3b_splash.png share/apps/k3b/pics/crystal/k3bprojectview_left.png share/apps/k3b/pics/crystal/k3bprojectview_left_short.png share/apps/k3b/pics/crystal/k3bprojectview_right.png share/apps/k3b/pics/crystal/k3bsetup2_guy.png share/apps/k3b/plugins/k3bexternalencoder.plugin share/apps/k3b/plugins/k3bflacdecoder.plugin share/apps/k3b/plugins/k3bmaddecoder.plugin share/apps/k3b/plugins/k3boggvorbisdecoder.plugin share/apps/k3b/plugins/k3boggvorbisencoder.plugin share/apps/k3b/plugins/k3bsoxencoder.plugin share/apps/k3b/plugins/k3bwavedecoder.plugin share/apps/k3b/tips share/apps/konqueror/servicemenus/k3b_create_audio_cd.desktop share/apps/konqueror/servicemenus/k3b_create_data_cd.desktop share/apps/konqueror/servicemenus/k3b_create_video_cd.desktop share/apps/konqueror/servicemenus/k3b_write_bin_image.desktop share/apps/konqueror/servicemenus/k3b_write_iso_image.desktop share/doc/HTML/en/k3b/audiocd-howto.docbook share/doc/HTML/en/k3b/burndialog_audio.png share/doc/HTML/en/k3b/burndialog_progress.png share/doc/HTML/en/k3b/cdcloning_dialog.png share/doc/HTML/en/k3b/cdcloning_reading.png share/doc/HTML/en/k3b/cdcopy-howto.docbook share/doc/HTML/en/k3b/cdcopy_done.png share/doc/HTML/en/k3b/cdcopy_reading.png share/doc/HTML/en/k3b/cdcopy_settings.png share/doc/HTML/en/k3b/cdcopy_writing.png share/doc/HTML/en/k3b/commands.docbook share/doc/HTML/en/k3b/common share/doc/HTML/en/k3b/dcop.docbook share/doc/HTML/en/k3b/index.cache.bz2 share/doc/HTML/en/k3b/index.docbook share/doc/HTML/en/k3b/select_audiofiles.png share/doc/HTML/en/k3b/select_project.png share/doc/HTML/en/k3b/video-encoding.docbook share/icons/crystalsvg/128x128/apps/k3b.png share/icons/crystalsvg/16x16/apps/k3b.png share/icons/crystalsvg/32x32/apps/k3b.png share/icons/crystalsvg/48x48/apps/k3b.png share/icons/crystalsvg/64x64/apps/k3b.png share/mimelnk/application/x-k3b.desktop share/sounds/k3b_error1.wav share/sounds/k3b_success1.wav share/sounds/k3b_wait_media1.wav @dirrm share/doc/HTML/en/k3b @dirrm share/apps/k3b/plugins @dirrm share/apps/k3b/pics/crystal @dirrm share/apps/k3b/pics/73lab @dirrm share/apps/k3b/pics @dirrm share/apps/k3b/kpartplugins @dirrm share/apps/k3b/icons/crystalsvg/32x32/actions @dirrm share/apps/k3b/icons/crystalsvg/32x32 @dirrm share/apps/k3b/icons/crystalsvg/22x22/actions @dirrm share/apps/k3b/icons/crystalsvg/22x22 @dirrm share/apps/k3b/icons/crystalsvg/16x16/actions @dirrm share/apps/k3b/icons/crystalsvg/16x16 @dirrm share/apps/k3b/icons/crystalsvg @dirrm share/apps/k3b/icons @dirrm share/apps/k3b/cdi @dirrm share/apps/k3b Property changes on: head/sysutils/k3b/pkg-plist ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.3 \ No newline at end of property +1.4 \ No newline at end of property Index: head/sysutils/k3b-kde4/Makefile =================================================================== --- head/sysutils/k3b-kde4/Makefile (revision 110164) +++ head/sysutils/k3b-kde4/Makefile (revision 110165) @@ -1,50 +1,50 @@ # New ports collection makefile for: k3b # Date created: 2003/02/13 # Whom: Heiner # # $FreeBSD$ # PORTNAME= k3b -PORTVERSION= 0.11.6 -PORTREVISION= 1 +PORTVERSION= 0.11.9 CATEGORIES= sysutils multimedia kde MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= ${PORTNAME} MAINTAINER= h.eichmann@gmx.de COMMENT= A CD/DVD recording GUI for KDE RUN_DEPENDS= cdrecord:${PORTSDIR}/sysutils/cdrtools \ cdrdao:${PORTSDIR}/sysutils/cdrdao \ mkisofs:${PORTSDIR}/sysutils/mkisofs LIB_DEPENDS= mad:${PORTSDIR}/audio/libmad \ + id3tag:${PORTSDIR}/audio/libid3tag \ vorbis:${PORTSDIR}/audio/libvorbis \ FLAC:${PORTSDIR}/audio/flac USE_BZIP2= yes GNU_CONFIGURE= yes CONFIGURE_TARGET=--build=${MACHINE_ARCH}-portbld-freebsd${OSREL} CONFIGURE_ARGS= --with-k3bsetup=no USE_GMAKE= yes USE_LIBTOOL_VER=13 INSTALLS_SHLIB= yes USE_KDELIBS_VER= 3 USE_REINPLACE= yes pre-configure: ${REINPLACE_CMD} "s,-pedantic ,,g; \ s,-pthread,${PTHREAD_LIBS},g; \ s,-O2 ,,g" ${WRKSRC}/configure .for i in config.h.in Makefile.in ${TOUCH} ${WRKSRC}/${i} .endfor post-install: @${CAT} ${PKGMESSAGE} @sleep 5 showinfo: more ${PKGMESSAGE} .include Property changes on: head/sysutils/k3b-kde4/Makefile ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.7 \ No newline at end of property +1.8 \ No newline at end of property Index: head/sysutils/k3b-kde4/distinfo =================================================================== --- head/sysutils/k3b-kde4/distinfo (revision 110164) +++ head/sysutils/k3b-kde4/distinfo (revision 110165) @@ -1 +1,2 @@ -MD5 (k3b-0.11.6.tar.bz2) = 0015b9ad457713425464dbdad6a15ab9 +MD5 (k3b-0.11.9.tar.bz2) = 88f46a5cfbda5fa89b4bfee504567df1 +SIZE (k3b-0.11.9.tar.bz2) = 3217141 Property changes on: head/sysutils/k3b-kde4/distinfo ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.3 \ No newline at end of property +1.4 \ No newline at end of property Index: head/sysutils/k3b-kde4/files/patch-src-Makefile.in =================================================================== --- head/sysutils/k3b-kde4/files/patch-src-Makefile.in (revision 110164) +++ head/sysutils/k3b-kde4/files/patch-src-Makefile.in (revision 110165) @@ -1,11 +1,11 @@ ---- 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 @@ +--- src/Makefile.in.orig Mon Mar 29 20:04:54 2004 ++++ src/Makefile.in Tue May 11 22:57:03 2004 +@@ -272,7 +272,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) Property changes on: head/sysutils/k3b-kde4/files/patch-src-Makefile.in ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.2 \ No newline at end of property +1.3 \ No newline at end of property Index: head/sysutils/k3b-kde4/files/patch-src-core-k3bdefaultexternalprograms.cpp =================================================================== --- head/sysutils/k3b-kde4/files/patch-src-core-k3bdefaultexternalprograms.cpp (revision 110164) +++ head/sysutils/k3b-kde4/files/patch-src-core-k3bdefaultexternalprograms.cpp (revision 110165) @@ -1,154 +1,154 @@ ---- 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 @@ +--- src/core/k3bdefaultexternalprograms.cpp.orig Mon Mar 22 18:13:21 2004 ++++ src/core/k3bdefaultexternalprograms.cpp Tue May 11 22:57:03 2004 +@@ -30,6 +30,7 @@ #include #include #include +#include "k3bprocess.h" -@@ -89,7 +90,7 @@ +@@ -123,7 +124,7 @@ K3bExternalBin* bin = 0; // probe version - KProcess vp; + MyKProcess vp; K3bProcess::OutputCollector out( &vp ); vp << path << "-version"; -@@ -128,7 +129,7 @@ +@@ -162,7 +163,7 @@ // probe features - KProcess fp; + MyKProcess fp; out.setProcess( &fp ); fp << path << "-help"; if( fp.start( KProcess::Block, KProcess::AllOutput ) ) { -@@ -200,7 +201,7 @@ +@@ -236,7 +237,7 @@ K3bExternalBin* bin = 0; // probe version - KProcess vp; + MyKProcess vp; K3bProcess::OutputCollector out( &vp ); vp << path << "-version"; -@@ -229,7 +230,7 @@ +@@ -265,7 +266,7 @@ // probe features - KProcess fp; + MyKProcess fp; out.setProcess( &fp ); fp << path << "-help"; if( fp.start( KProcess::Block, KProcess::AllOutput ) ) { -@@ -285,7 +286,7 @@ +@@ -321,7 +322,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 @@ +@@ -349,7 +350,7 @@ // probe features - KProcess fp; + MyKProcess fp; fp << path << "-help"; out.setProcess( &fp ); if( fp.start( KProcess::Block, KProcess::AllOutput ) ) { -@@ -374,7 +375,7 @@ +@@ -410,7 +411,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 @@ +@@ -438,7 +439,7 @@ // probe features - KProcess fp; + MyKProcess fp; fp << path << "-help"; out.setProcess( &fp ); if( fp.start( KProcess::Block, KProcess::AllOutput ) ) { -@@ -462,7 +463,7 @@ +@@ -498,7 +499,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 @@ +@@ -530,7 +531,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 @@ +@@ -599,7 +600,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 @@ +@@ -653,7 +654,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 @@ +@@ -710,7 +711,7 @@ K3bExternalBin* bin = 0; // probe version - KProcess vp; + MyKProcess vp; K3bProcess::OutputCollector out( &vp ); vp << path << "--version"; -@@ -726,7 +727,7 @@ +@@ -769,7 +770,7 @@ K3bExternalBin* bin = 0; // probe version - KProcess vp; + MyKProcess vp; K3bProcess::OutputCollector out( &vp ); vp << path << "-version"; -@@ -795,7 +796,7 @@ +@@ -838,7 +839,7 @@ K3bExternalBin* bin = 0; // probe version - KProcess vp; + MyKProcess vp; K3bProcess::OutputCollector out( &vp ); vp << path; -@@ -868,7 +869,7 @@ +@@ -911,7 +912,7 @@ K3bExternalBin* bin = 0; // probe version - KProcess vp; + MyKProcess vp; K3bProcess::OutputCollector out( &vp ); vp << path << "-h"; Property changes on: head/sysutils/k3b-kde4/files/patch-src-core-k3bdefaultexternalprograms.cpp ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.2 \ No newline at end of property +1.3 \ No newline at end of property Index: head/sysutils/k3b-kde4/files/patch-src-core-k3bprocess.cpp =================================================================== --- head/sysutils/k3b-kde4/files/patch-src-core-k3bprocess.cpp (revision 110164) +++ head/sysutils/k3b-kde4/files/patch-src-core-k3bprocess.cpp (revision 110165) @@ -1,63 +1,63 @@ --- src/core/k3bprocess.cpp.orig Sun Feb 1 09:18:58 2004 -+++ src/core/k3bprocess.cpp Fri Feb 13 21:03:38 2004 ++++ src/core/k3bprocess.cpp Tue May 11 22:57:03 2004 @@ -28,6 +28,60 @@ #include #include #include +#include +#include +#include +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; +} Property changes on: head/sysutils/k3b-kde4/files/patch-src-core-k3bprocess.cpp ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.2 \ No newline at end of property +1.3 \ No newline at end of property Index: head/sysutils/k3b-kde4/files/patch-src-core-k3bprocess.h =================================================================== --- head/sysutils/k3b-kde4/files/patch-src-core-k3bprocess.h (revision 110164) +++ head/sysutils/k3b-kde4/files/patch-src-core-k3bprocess.h (revision 110165) @@ -1,24 +1,24 @@ --- src/core/k3bprocess.h.orig Tue Jan 27 09:19:13 2004 -+++ src/core/k3bprocess.h Fri Feb 13 21:03:38 2004 ++++ src/core/k3bprocess.h Tue May 11 22:57:03 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 Property changes on: head/sysutils/k3b-kde4/files/patch-src-core-k3bprocess.h ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.2 \ No newline at end of property +1.3 \ No newline at end of property Index: head/sysutils/k3b-kde4/files/patch-src-device-k3bdevice.cpp =================================================================== --- head/sysutils/k3b-kde4/files/patch-src-device-k3bdevice.cpp (revision 110164) +++ head/sysutils/k3b-kde4/files/patch-src-device-k3bdevice.cpp (revision 110165) @@ -1,26 +1,79 @@ ---- src/device/k3bdevice.cpp.orig Thu Feb 12 11:21:15 2004 -+++ src/device/k3bdevice.cpp Fri Feb 13 21:03:38 2004 +--- src/device/k3bdevice.cpp.orig Sun Mar 14 17:35:20 2004 ++++ src/device/k3bdevice.cpp Mon May 24 23:31:19 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 // +@@ -192,6 +200,7 @@ + unsigned char header[2048]; + ::memset( header, 0, 2048 ); + ++ cmd.clear(); + cmd[0] = MMC::GET_CONFIGURATION; + cmd[8] = 8; + if( cmd.transport( TR_DIR_READ, header, 8 ) ) { +@@ -733,6 +742,14 @@ + m_bufferSize = 1024; + d->burnfree = false; + } ++ else if( description().startsWith("CD-R56S") ) { ++ m_writeModes |= TAO; ++ d->deviceType |= CDROM|CDR; ++ m_maxWriteSpeed = 6; ++ m_maxReadSpeed = 24; ++ m_bufferSize = 1302; ++ d->burnfree = false; ++ } + } + else if( vendor().startsWith("MATSHITA") ) { + if( description().startsWith("CD-R CW-7501") ) { +@@ -2317,10 +2334,12 @@ + { + // if the device is already opened we do not close it + // to allow fast multible method calls in a row ++#ifndef __FreeBSD__ + bool needToClose = !isOpen(); + + if (open() < 0) + return; ++#endif + + // header size is 8 + unsigned char* buffer = 0; +@@ -2406,13 +2425,16 @@ + delete [] buffer; + } + ++#ifndef __FreeBSD__ + if( needToClose ) + close(); ++#endif + } + + + bool K3bCdDevice::CdDevice::readTocPmaAtip( unsigned char** data, int& dataLen, int format, bool time, int track ) const + { ++ kdDebug() << "(K3bCdDevice::CdDevice) readTocPmaAtip started, format:" << format << ", time: " << time << ", track: " << track << endl; + unsigned char header[2048]; + ::memset( header, 0, 2048 ); + Property changes on: head/sysutils/k3b-kde4/files/patch-src-device-k3bdevice.cpp ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.1 \ No newline at end of property +1.2 \ No newline at end of property Index: head/sysutils/k3b-kde4/files/patch-src-device-k3bdevice.h =================================================================== --- head/sysutils/k3b-kde4/files/patch-src-device-k3bdevice.h (revision 110164) +++ head/sysutils/k3b-kde4/files/patch-src-device-k3bdevice.h (revision 110165) @@ -1,13 +1,13 @@ ---- 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 @@ +--- src/device/k3bdevice.h.orig Sun Mar 14 17:35:20 2004 ++++ src/device/k3bdevice.h Tue May 11 22:57:03 2004 +@@ -661,6 +661,10 @@ class Private; Private* d; +#ifdef __FreeBSD__ + QString m_passDevice; + friend class ScsiCommand; +#endif friend class DeviceManager; }; Property changes on: head/sysutils/k3b-kde4/files/patch-src-device-k3bdevice.h ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.1 \ No newline at end of property +1.2 \ No newline at end of property Index: head/sysutils/k3b-kde4/files/patch-src-device-k3bdevicemanager.cpp =================================================================== --- head/sysutils/k3b-kde4/files/patch-src-device-k3bdevicemanager.cpp (revision 110164) +++ head/sysutils/k3b-kde4/files/patch-src-device-k3bdevicemanager.cpp (revision 110165) @@ -1,289 +1,270 @@ ---- src/device/k3bdevicemanager.cpp.orig Wed Jan 21 11:20:10 2004 -+++ src/device/k3bdevicemanager.cpp Fri Feb 13 21:03:38 2004 +--- src/device/k3bdevicemanager.cpp.orig Sun Feb 29 13:52:41 2004 ++++ src/device/k3bdevicemanager.cpp Tue May 11 22:57:03 2004 @@ -49,6 +49,12 @@ #include #include +#ifdef __FreeBSD__ +#include +#include +#include +#endif + #ifdef Q_OS_LINUX -@@ -196,6 +202,22 @@ +@@ -196,6 +202,13 @@ { 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::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++; -+ } -+ } ++ bsd_scan_devices(); +#else QFile info("/proc/sys/dev/cdrom/info"); QString line,devstring; info.open(IO_ReadOnly); -@@ -286,6 +308,7 @@ +@@ -286,6 +299,7 @@ // m_foundDevices++; // } +#endif scanFstab(); return m_foundDevices; -@@ -427,6 +450,7 @@ +@@ -427,6 +441,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 @@ +@@ -467,11 +482,36 @@ } ::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::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) -+ { ++ K3bDevice* device = findDevice(devicename); ++ if (device) ++ return 0; + // 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 ) ) ++ if( K3bDevice* oldDev = findDevice( resolved ) ) + { -+ kdDebug() << "(K3bDeviceManager) dev already found" << endl; -+ oldDev->addDeviceNode( resolved ); ++ kdDebug() << "(K3bDeviceManager) dev already found" << endl; ++ oldDev->addDeviceNode( resolved ); ++ return 0; + } -+ return 0; -+ } ++ device = new K3bDevice(resolved.latin1()); ++ return addDevice( device ); ++} + ++K3bDevice* K3bCdDevice::DeviceManager::addDevice( CdDevice* device ) ++{ ++ const QString devicename = device->devicename(); +#else K3bDevice* device = 0; // resolve all symlinks -@@ -503,6 +567,7 @@ +@@ -503,6 +543,7 @@ device->m_target = target; device->m_lun = lun; } +#endif if( !device->init() ) { kdDebug() << "Could not initialize device " << devicename << endl; -@@ -578,9 +643,20 @@ +@@ -578,9 +619,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 @@ +@@ -589,6 +641,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 @@ +@@ -599,6 +653,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 @@ +@@ -674,5 +739,131 @@ 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) ++#include ++#include ++#include ++void K3bCdDevice::DeviceManager::bsd_scan_devices() +{ -+ 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); ++ union ccb ccb; ++ int fd, i; ++ int need_close = 0; ++ int skip_device = 0; ++ int bus, target, lun; ++ QString dev1, dev2; + -+ // 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; -+ } ++ if ((fd = open(XPT_DEVICE, O_RDWR)) == -1) ++ { ++ kdDebug() << "couldn't open %s " << XPT_DEVICE << endl; ++ return; ++ } ++ ++ memset(&ccb, 0, sizeof(ccb)); + -+ // read tmp file line by line -+ QFile tmp (tmpfile.name()); -+ if ( tmp.open( IO_ReadOnly ) ) -+ { -+ QTextStream stream( &tmp ); -+ while ( !stream.eof() ) ++ ccb.ccb_h.func_code = XPT_DEV_MATCH; ++ char buffer[100*sizeof(struct dev_match_result)]; ++ ccb.cdm.match_buf_len = 100*sizeof(struct dev_match_result); ++ ccb.cdm.matches = (struct dev_match_result *)buffer; ++ ccb.cdm.num_matches = 0; ++ ccb.cdm.num_patterns = 0; ++ ccb.cdm.pattern_buf_len = 0; ++ do { ++ if (ioctl(fd, CAMIOCOMMAND, &ccb) == -1) { ++ kdDebug() << "(bsd_scan_devices) error sending CAMIOCOMMAND ioctl: " << errno << endl; ++ break; ++ } ++ ++ if ((ccb.ccb_h.status != CAM_REQ_CMP) ++ || ((ccb.cdm.status != CAM_DEV_MATCH_LAST) && (ccb.cdm.status != CAM_DEV_MATCH_MORE))) { ++ kdDebug() << "(bsd_scan_devices) got CAM error " << ccb.ccb_h.status << ", CDM error %d" << ccb.cdm.status << endl; ++ break; ++ } ++ kdDebug() << "(bsd_scan_devices) number of matches " << (int)ccb.cdm.num_matches << endl; ++ for (int i = 0; i < (int)ccb.cdm.num_matches; i++) { ++ switch (ccb.cdm.matches[i].type) { ++ case DEV_MATCH_DEVICE: { ++ struct device_match_result *dev_result = &ccb.cdm.matches[i].result.device_result; ++ ++ if (dev_result->flags & DEV_RESULT_UNCONFIGURED) ++ { ++ skip_device = 1; ++ break; ++ } ++ else ++ skip_device = 0; ++ if (need_close) ++ { ++ QString pass = dev1; ++ QString dev = "/dev/" + dev2; ++ if (dev2.startsWith("pass")) ++ { ++ pass = dev2; ++ dev = "/dev/" + dev1; ++ } ++#if __FreeBSD_version < 500100 ++ dev += "c"; ++#endif ++ ++ K3bDevice* device = new K3bDevice(dev.latin1()); ++ device->m_bus = bus; ++ device->m_target = target; ++ device->m_lun = lun; ++ device->m_passDevice = "/dev/" + pass; ++ kdDebug() << "(bsd_scan_devices) add device " << dev << ":" << bus << ":" << target << ":" << lun << endl; ++ addDevice(device); ++ need_close = 0; ++ } ++ bus = dev_result->path_id; ++ target = dev_result->target_id; ++ lun = dev_result->target_lun; ++ ++ need_close = 1; ++ ++ break; ++ } ++ case DEV_MATCH_PERIPH: { ++ struct periph_match_result *periph_result = &ccb.cdm.matches[i].result.periph_result; ++ ++ if (skip_device != 0) ++ break; ++ ++ if (need_close > 1) ++ dev1 = periph_result->periph_name + QString::number(periph_result->unit_number); ++ else ++ dev2 = periph_result->periph_name + QString::number(periph_result->unit_number); ++ ++ need_close++; ++ break; ++ } ++ } ++ } ++ ++ } while ((ccb.ccb_h.status == CAM_REQ_CMP) ++ && (ccb.cdm.status == CAM_DEV_MATCH_MORE)); ++ ++ if (need_close) + { -+ 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)); ++ QString pass = dev1; ++ QString dev = "/dev/" + dev2; ++ if (dev2.startsWith("pass")) ++ { ++ pass = dev2; ++ dev = "/dev/" + dev1; ++ } ++#if __FreeBSD_version < 500100 ++ dev += "c"; +#endif -+ } -+ } ++ K3bDevice* device = new K3bDevice(dev.latin1()); ++ device->m_bus = bus; ++ device->m_target = target; ++ device->m_lun = lun; ++ device->m_passDevice = "/dev/" + pass; ++ kdDebug() << "(bsd_scan_devices) add device " << dev << ":" << bus << ":" << target << ":" << lun << endl; ++ addDevice(device); ++ } ++ close(fd); +} +#endif #include "k3bdevicemanager.moc" Property changes on: head/sysutils/k3b-kde4/files/patch-src-device-k3bdevicemanager.cpp ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.1 \ No newline at end of property +1.2 \ No newline at end of property Index: head/sysutils/k3b-kde4/files/patch-src-device-k3bdevicemanager.h =================================================================== --- head/sysutils/k3b-kde4/files/patch-src-device-k3bdevicemanager.h (revision 110164) +++ head/sysutils/k3b-kde4/files/patch-src-device-k3bdevicemanager.h (revision 110165) @@ -1,43 +1,13 @@ --- 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 ++++ src/device/k3bdevicemanager.h Tue May 11 22:57:03 2004 +@@ -112,6 +112,10 @@ - #include -+#ifdef __FreeBSD__ -+#include -+#include -+#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 m_devices; ++ void bsd_scan_devices(); ++ CdDevice* addDevice( CdDevice* ); +#endif }; } Property changes on: head/sysutils/k3b-kde4/files/patch-src-device-k3bdevicemanager.h ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.1 \ No newline at end of property +1.2 \ No newline at end of property Index: head/sysutils/k3b-kde4/files/patch-src-device-k3bscsicommand.cpp =================================================================== --- head/sysutils/k3b-kde4/files/patch-src-device-k3bscsicommand.cpp (revision 110164) +++ head/sysutils/k3b-kde4/files/patch-src-device-k3bscsicommand.cpp (revision 110165) @@ -1,142 +1,179 @@ --- 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 - * - * This file is part of the K3b project. -- * Copyright (C) 1998-2004 Sebastian Trueg -+ * Copyright (C) 1998-2003 Sebastian Trueg - * - * 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 ++++ src/device/k3bscsicommand.cpp Mon May 24 23:32:04 2004 @@ -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 @@ +@@ -135,6 +136,155 @@ return 0; } +#else + +#include +#include +#include +#include +#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 +#include + +#include +#include + +K3bCdDevice::ScsiCommand::ScsiCommand( const K3bCdDevice::CdDevice* dev ) -+ : m_device(dev) ++ : closecam(true), m_device(dev) +{ -+ clear(); ++ 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; ++ clear(); +} + ++K3bCdDevice::ScsiCommand::ScsiCommand( const K3bCdDevice::CdDevice* dev, struct cam_device * c) ++ : closecam(false), cam(c), m_device(dev) ++{ ++ clear(); ++} ++ +K3bCdDevice::ScsiCommand::~ScsiCommand() +{ -+ if(cam) ++ if(cam && closecam) ++ { + cam_close_device(cam); -+// if (m_fd >0) -+// close(m_fd); ++ kdDebug() << "(K3bCdDevice::ScsiCommand) device " << m_device->m_passDevice << " closed." << endl; ++ } +} + + +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; ++ if (!cam) ++ return; ++ ccb.ccb_h.path_id = cam->path_id; ++ ccb.ccb_h.target_id = cam->target_id; ++ ccb.ccb_h.target_lun = cam->target_lun; +} + +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; ++ unsigned char command = ccb.csio.cdb_io.cdb_bytes[0]; ++ int direction = CAM_DEV_QFRZDIS; ++ if (!len) ++ direction |= CAM_DIR_NONE; ++ else ++ direction |= (dir & TR_DIR_READ)?CAM_DIR_IN : CAM_DIR_OUT; ++ cam_fill_csio (&(ccb.csio), 1, NULL, direction | CAM_DEV_QFRZDIS, MSG_SIMPLE_Q_TAG, (u_int8_t *)data, len, sizeof(ccb.csio.sense_data), ccb.csio.cdb_len, 30*1000); ++ unsigned char * sense = (unsigned char *)&ccb.csio.sense_data; + if ((ret = cam_send_ccb(cam, &ccb)) < 0) + { + kdDebug() << "(K3bCdDevice::ScsiCommand) transport failed: " << ret << endl; -+ return -1; ++ goto dump_error; + } + if ((ccb.ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP) -+ { -+ kdDebug() << "(K3bCdDevice::ScsiCommand) transport succeeded" << endl; -+ return 0; -+ } ++ return 0; ++ + errno = EIO; -+ ret = ERRCODE(((unsigned char *)&ccb.csio.sense_data)); ++ // FreeBSD 5-CURRENT since 2003-08-24, including 5.2 fails to ++ // pull sense data automatically, at least for ATAPI transport, ++ // so I reach for it myself... ++ if ((ccb.csio.scsi_status==SCSI_STATUS_CHECK_COND) && ++ !(ccb.ccb_h.status&CAM_AUTOSNS_VALID)) ++ { ++ u_int8_t _sense[18]; ++ u_int32_t resid=ccb.csio.resid; ++ ++ memset(_sense,0,sizeof(_sense)); ++ ++ operator[](0) = 0x03; // REQUEST SENSE ++ ccb.csio.cdb_io.cdb_bytes[4] = sizeof(_sense); ++ ccb.csio.cdb_len = 6; ++ ccb.csio.ccb_h.flags |= CAM_DIR_IN|CAM_DIS_AUTOSENSE; ++ ccb.csio.data_ptr = _sense; ++ ccb.csio.dxfer_len = sizeof(_sense); ++ ccb.csio.sense_len = 0; ++ ret = cam_send_ccb(cam, &ccb); ++ ++ ccb.csio.resid = resid; ++ if (ret<0) ++ { ++ kdDebug() << "(K3bCdDevice::ScsiCommand) transport failed (2): " << ret << endl; ++ ret = -1; ++ goto dump_error; ++ } ++ if ((ccb.ccb_h.status&CAM_STATUS_MASK) != CAM_REQ_CMP) ++ { ++ kdDebug() << "(K3bCdDevice::ScsiCommand) transport failed (3): " << ret << endl; ++ errno=EIO,-1; ++ ret = -1; ++ goto dump_error; ++ } ++ ++ memcpy(sense,_sense,sizeof(_sense)); ++ } ++ ++ ret = ERRCODE(sense); ++ kdDebug() << "(K3bCdDevice::ScsiCommand) transport failed (4): " << ret << endl; + if (ret == 0) + ret = -1; + else + CREAM_ON_ERRNO(((unsigned char *)&ccb.csio.sense_data)); -+ kdDebug() << "(K3bCdDevice::ScsiCommand) transport failed (2): " << ret << endl; ++dump_error: ++ kdDebug() << "(K3bCdDevice::ScsiCommand) failed: " << endl ++ << " command: " << QString("%1 (%2)") ++ .arg( MMC::commandString( ccb.csio.cdb_io.cdb_bytes[0] ) ) ++ .arg( QString::number(ccb.csio.cdb_io.cdb_bytes[0], 16) ) << endl ++ << " errorcode: " << QString::number(((struct scsi_sense_data *)sense)->error_code & SSD_ERRCODE, 16) << endl ++ << " sense key: " << senseKeyToString(((struct scsi_sense_data *)sense)->flags & SSD_KEY) << endl ++ << " asc: " << QString::number(((struct scsi_sense_data *)sense)->add_sense_code, 16) << endl ++ << " ascq: " << QString::number(((struct scsi_sense_data *)sense)->add_sense_code_qual, 16) << endl; ++ + return ret; +} +#endif QString K3bCdDevice::MMC::commandString( const unsigned char& command ) { Property changes on: head/sysutils/k3b-kde4/files/patch-src-device-k3bscsicommand.cpp ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.1 \ No newline at end of property +1.2 \ No newline at end of property Index: head/sysutils/k3b-kde4/files/patch-src-device-k3bscsicommand.h =================================================================== --- head/sysutils/k3b-kde4/files/patch-src-device-k3bscsicommand.h (revision 110164) +++ head/sysutils/k3b-kde4/files/patch-src-device-k3bscsicommand.h (revision 110165) @@ -1,84 +1,57 @@ --- 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 - * - * This file is part of the K3b project. -- * Copyright (C) 1998-2004 Sebastian Trueg -+ * Copyright (C) 1998-2003 Sebastian Trueg - * - * 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 ++++ src/device/k3bscsicommand.h Tue May 11 22:57:03 2004 @@ -17,9 +17,27 @@ #define _K3B_SCSI_COMMAND_H_ #include +#ifndef __FreeBSD__ #undef __STRICT_ANSI__ #include #define __STRICT_ANSI__ +#else +#include +#include +#include +#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 -@@ -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 - +@@ -96,7 +114,7 @@ class ScsiCommand { public: - ScsiCommand( int fd ); +// ScsiCommand( int fd ); ScsiCommand( const CdDevice* ); ~ScsiCommand(); -@@ -109,9 +135,13 @@ +@@ -109,10 +127,16 @@ size_t len = 0 ); private: +#ifndef __FreeBSD__ struct cdrom_generic_command m_cmd; struct request_sense m_sense; - +#else ++ ScsiCommand( const CdDevice* , struct cam_device *); ++ bool closecam; + struct cam_device *cam; + union ccb ccb; -+#endif int m_fd; ++#endif const CdDevice* m_device; bool m_needToCloseDevice; + }; Property changes on: head/sysutils/k3b-kde4/files/patch-src-device-k3bscsicommand.h ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.1 \ No newline at end of property +1.2 \ No newline at end of property Index: head/sysutils/k3b-kde4/files/patch-src-rip-k3bdvdrippingprocess.cpp =================================================================== --- head/sysutils/k3b-kde4/files/patch-src-rip-k3bdvdrippingprocess.cpp (nonexistent) +++ head/sysutils/k3b-kde4/files/patch-src-rip-k3bdvdrippingprocess.cpp (revision 110165) @@ -0,0 +1,16 @@ +--- src/rip/k3bdvdrippingprocess.cpp.orig Wed Jan 21 11:20:20 2004 ++++ src/rip/k3bdvdrippingprocess.cpp Tue May 11 22:57:03 2004 +@@ -278,10 +278,13 @@ + void K3bDvdRippingProcess::slotPreProcessingDvd() { + QString video; + QDir video_ts( m_mountPoint + "/VIDEO_TS"); ++#ifndef FreeBSD ++// on FreeBSD both /VIDEO_TS and /video_ts exist on dvd devices ?!? + if( video_ts.exists() ) { + m_udfMount = true; + kdDebug() << "(K3bDvdRippingProcess) <" << m_mountPoint << "> has UDF filesystem." << endl; + } ++#endif + video_ts.setPath( m_mountPoint + "/video_ts"); + if( !video_ts.exists() && !m_udfMount){ + m_preProcessingFailed = true; Property changes on: head/sysutils/k3b-kde4/files/patch-src-rip-k3bdvdrippingprocess.cpp ___________________________________________________________________ Added: cvs2svn:cvs-rev ## -0,0 +1 ## +1.1 \ No newline at end of property Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Index: head/sysutils/k3b-kde4/files/patch-src-rip-k3bmovieview.cpp =================================================================== --- head/sysutils/k3b-kde4/files/patch-src-rip-k3bmovieview.cpp (revision 110164) +++ head/sysutils/k3b-kde4/files/patch-src-rip-k3bmovieview.cpp (revision 110165) @@ -1,14 +1,14 @@ --- src/rip/k3bmovieview.cpp.orig Fri Feb 6 12:08:51 2004 -+++ src/rip/k3bmovieview.cpp Fri Feb 13 21:03:38 2004 ++++ src/rip/k3bmovieview.cpp Tue May 11 22:57:03 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() ); Property changes on: head/sysutils/k3b-kde4/files/patch-src-rip-k3bmovieview.cpp ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.2 \ No newline at end of property +1.3 \ No newline at end of property Index: head/sysutils/k3b-kde4/files/patch-src-rip-k3btcwrapper.cpp =================================================================== --- head/sysutils/k3b-kde4/files/patch-src-rip-k3btcwrapper.cpp (revision 110164) +++ head/sysutils/k3b-kde4/files/patch-src-rip-k3btcwrapper.cpp (revision 110165) @@ -1,15 +1,24 @@ --- src/rip/k3btcwrapper.cpp.orig Wed Jan 21 11:20:20 2004 -+++ src/rip/k3btcwrapper.cpp Fri Feb 13 21:03:38 2004 ++++ src/rip/k3btcwrapper.cpp Tue May 11 22:57:03 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)) ); +@@ -77,7 +82,7 @@ + if( !p->start( KProcess::NotifyOnExit, KProcess::AllOutput ) ) { + // something went wrong when starting the program + // it "should" be the executable +- kdDebug() << "(K3bDirView) Error during checking drive for DVD." << endl; ++ kdDebug() << "(K3bTcWrapper) Error during checking drive for DVD." << endl; + } + } + Property changes on: head/sysutils/k3b-kde4/files/patch-src-rip-k3btcwrapper.cpp ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.2 \ No newline at end of property +1.3 \ No newline at end of property Index: head/sysutils/k3b-kde4/pkg-message =================================================================== --- head/sysutils/k3b-kde4/pkg-message (revision 110164) +++ head/sysutils/k3b-kde4/pkg-message (revision 110165) @@ -1,53 +1,45 @@ Notes: 1. The FreeBSD k3b port supports SCSI drives only. If you have IDE CD or DVD drives, use them through the cam system. See Chapter 12.5.9 of the handbook (http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/creating-cds.html#ATAPICAM) 2. Your CD and DVD drives must have a mount point in /etc/fstab. They have to be accessed through their atapicam device. I.e. the drives have to be adressed by e.g. /dev/cd0c instead of /dev/acd0c. 3. k3b has to be started from a root console, which is not recommended. Alternatively do all of the following: 3a. set the suid flag on cdrecord and cdrdao. The 'Notes' the chapter of 'man cdrecord' discusses this. -3b. - install sudo (security/sudo) and add the following line or similar to - sudoers (usually in /usr/local/etc/sudoers): - ALL ALL = NOPASSWD: /sbin/camcontrol devlist - - or execute 'camcontrol devlist'. For every user who should be able to use - k3b. Resolve all errors e.g. by giving him/her access rights to /dev/xpt0. - 'camcontrol devlist' must run without error for all these users! - Note that giving access rights to /dev/xpt* might be a security leak! - - or give camcontrol the suid flag, which is a security leak as well. -3c. - For every user who should be able to use k3b and for every CD or DVD +3b. - For every user who should be able to use k3b and for every CD or DVD device add a directory in the users home directory. These directories must be owned by the corresponding user. For each such directory add a line in /ect/fstab (see remark 2), like: /dev/cd0c /usr/home/XXX/cdrom cd9660 ro,noauto,nodev,nosuid 0 0 Furthermore allow user mounts as described in topic 9.22 of the FAQ: http://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/disks.html#USER-FLOPPYMOUNT - - or just give mount and umount the sudo flag, which is a security leak. -3d. - Every user who should be able to use k3b must have read and write access - to all pass through devices connected with CD and DVD drives. Run - 'camcontrol devlist' to identify those devices (seek string 'passX' at - the end of each line and modify the rights of /dev/passX). Note, that + - or just give mount and umount the suid flag, which is a security leak. +3c. - Every user who should be able to use k3b must have read and write access + to all pass through devices connected with CD and DVD drives and to the /dev/xpt0 + device. Run 'camcontrol devlist' to identify those devices (seek string 'passX' + at the end of each line and modify the rights of /dev/passX). Note, that this is a security leak as well but that there is no alternative! 4. Create a directory on a partition, which has enough disk space to hold a CDs or DVDs content (usually below /usr). Enter this directory in Settings-> Configure K3b...->Misc. 5. You should set the cdrdao driver manually. Otherwise the disk info might fail or lock a while. To do so choose Settings->Configure K3b...->Devices. Below the CD recorder click on the string "auto" behind "Cdrdao driver:" For most of the recent drives "generic-mmc" or "generic-mmc-raw" should work. See http://cdrdao.sourceforge.net/drives.html. 6. To burn video CDs install the port multimedia/vcdimager. 7. To rip DVDs additionally install the ports multimedia/transcode, - multimedia/libdvdread and multimedia/xvid. Note that multimedia/transcode - requires some variables to be set. Type "make fetch" in the - multimedia/transcode ports directory for details. The ripping process - itself is described in - http://k3b.sourceforge.net/cgi-bin/index.pl/videoencoding. + multimedia/libdvdread and multimedia/xvid. Note that k3b does NOT work with + transcode 0.6.12. 0.6.10 is the last known working version. The ripping process + itself is described in http://k3b.sourceforge.net/cgi-bin/index.pl/videoencoding. 8. To burn bootable video CDs, install the port multimedia/emovix. 9. To burn DVDs, install the port sysutils/dvd+rw-tools. 10. To normalize the volumes of audio cds, install the port audio/normalize. 11. To rip into more audio formats, install the port audio/sox. + +UPGRADERS FROM 0.11.6 OR BELOW SHOULD NOTE THE CHANGED TOPIC 3C!!! To read this instructions again, type 'make showinfo' in the k3b port directory Property changes on: head/sysutils/k3b-kde4/pkg-message ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.4 \ No newline at end of property +1.5 \ No newline at end of property Index: head/sysutils/k3b-kde4/pkg-plist =================================================================== --- head/sysutils/k3b-kde4/pkg-plist (revision 110164) +++ head/sysutils/k3b-kde4/pkg-plist (revision 110165) @@ -1,228 +1,229 @@ bin/k3b include/k3baudiodecoder.h include/k3baudiodoc.h include/k3baudioencoder.h include/k3baudiojob.h include/k3baudioview.h include/k3bblankingjob.h include/k3bbootitem.h include/k3bburnprogressdialog.h include/k3bbusywidget.h include/k3bcdparanoialib.h include/k3bcdtext.h include/k3bcore.h include/k3bcutcombobox.h include/k3bdatadoc.h include/k3bdataitem.h include/k3bdatajob.h include/k3bdataview.h include/k3bdefaultexternalprograms.h include/k3bdevice.h include/k3bdevicecombobox.h include/k3bdeviceglobals.h include/k3bdevicehandler.h include/k3bdevicemanager.h include/k3bdeviceselectiondialog.h include/k3bdiritem.h include/k3bdiskinfo.h include/k3bdoc.h include/k3bdvddoc.h include/k3bdvdformattingjob.h include/k3bdvdjob.h include/k3bdvdview.h include/k3bemptydiscwaiter.h include/k3bexternalbinmanager.h include/k3bfileitem.h include/k3bglobals.h include/k3binteractiondialog.h +include/k3bintvalidator.h include/k3biso9660.h include/k3bisooptions.h include/k3bjob.h include/k3bjobprogressdialog.h include/k3blistview.h include/k3bmd5job.h include/k3bmixeddoc.h include/k3bmixedjob.h include/k3bmixedview.h include/k3bmovixdoc.h include/k3bmovixdvddoc.h include/k3bmovixdvdjob.h include/k3bmovixdvdview.h include/k3bmovixfileitem.h include/k3bmovixjob.h include/k3bmovixview.h include/k3bmsf.h include/k3bmsfedit.h include/k3bmultichoicedialog.h include/k3bplugin.h include/k3bpluginconfigwidget.h include/k3bpluginfactory.h include/k3bpluginmanager.h include/k3bprocess.h include/k3bprojectmanager.h include/k3bstdguiitems.h include/k3bstringutils.h include/k3bthread.h include/k3bthreadjob.h include/k3bthroughputestimator.h include/k3btoc.h include/k3btrack.h include/k3bvalidators.h include/k3bvcddoc.h include/k3bvcdjob.h include/k3bvcdoptions.h include/k3bvcdview.h include/k3bversion.h include/k3bvideodvddoc.h include/k3bvideodvdjob.h include/k3bview.h include/k3bwavefilewriter.h include/k3bwriterselectionwidget.h include/kcutlabel.h lib/kde3/libk3bexternalencoder.la lib/kde3/libk3bexternalencoder.so lib/kde3/libk3bflacdecoder.la lib/kde3/libk3bflacdecoder.so lib/kde3/libk3bmaddecoder.la lib/kde3/libk3bmaddecoder.so lib/kde3/libk3boggvorbisdecoder.la lib/kde3/libk3boggvorbisdecoder.so lib/kde3/libk3boggvorbisencoder.la lib/kde3/libk3boggvorbisencoder.so lib/kde3/libk3bsoxencoder.la lib/kde3/libk3bsoxencoder.so lib/kde3/libk3bwavedecoder.la lib/kde3/libk3bwavedecoder.so lib/libk3baudiometainforenamerplugin.la lib/libk3baudiometainforenamerplugin.so lib/libk3bcore.la lib/libk3bcore.so lib/libk3bcore.so.2 lib/libk3bdevice.la lib/libk3bdevice.so lib/libk3bdevice.so.2 lib/libk3bplugin.la lib/libk3bplugin.so lib/libk3bplugin.so.2 lib/libk3bproject.la lib/libk3bproject.so lib/libk3bproject.so.2 lib/libk3btools.la lib/libk3btools.so lib/libk3btools.so.2 share/applnk/.hidden/k3b-cue.desktop share/applnk/.hidden/k3b-iso.desktop share/applnk/Multimedia/k3b.desktop share/apps/k3b/cdi/cdi_imag.rtf share/apps/k3b/cdi/cdi_text.fnt share/apps/k3b/cdi/cdi_vcd.app share/apps/k3b/cdi/cdi_vcd.cfg share/apps/k3b/cdi/icdia.htm share/apps/k3b/cdi/vcd_on_cdi_41.pdf share/apps/k3b/eventsrc share/apps/k3b/icons/crystalsvg/16x16/actions/cdburn.png share/apps/k3b/icons/crystalsvg/16x16/actions/cdinfo.png share/apps/k3b/icons/crystalsvg/16x16/actions/cdrwblank.png share/apps/k3b/icons/crystalsvg/16x16/actions/greenled.png share/apps/k3b/icons/crystalsvg/16x16/actions/redled.png share/apps/k3b/icons/crystalsvg/16x16/actions/yellowinfo.png share/apps/k3b/icons/crystalsvg/16x16/actions/yellowled.png share/apps/k3b/icons/crystalsvg/22x22/actions/cdcopy.png share/apps/k3b/icons/crystalsvg/22x22/actions/cdinfo.png share/apps/k3b/icons/crystalsvg/22x22/actions/cdrwblank.png share/apps/k3b/icons/crystalsvg/32x32/actions/cdburn.png share/apps/k3b/icons/crystalsvg/32x32/actions/cdcopy.png share/apps/k3b/k3bui.rc share/apps/k3b/kpartplugins/k3baudiometainforenamerplugin.rc share/apps/k3b/pics/73lab/diskinfo_audio.png share/apps/k3b/pics/73lab/diskinfo_data.png share/apps/k3b/pics/73lab/diskinfo_dvd.png share/apps/k3b/pics/73lab/diskinfo_empty.png share/apps/k3b/pics/73lab/diskinfo_left.png share/apps/k3b/pics/73lab/diskinfo_mixed.png share/apps/k3b/pics/73lab/diskinfo_right.png share/apps/k3b/pics/73lab/k3b.theme share/apps/k3b/pics/73lab/k3b_3d_logo.png share/apps/k3b/pics/73lab/k3b_cd_copy.png share/apps/k3b/pics/73lab/k3b_probing_cd.png share/apps/k3b/pics/73lab/k3b_progress_dialog_failed.png share/apps/k3b/pics/73lab/k3b_progress_dialog_success.png share/apps/k3b/pics/73lab/k3b_splash.png share/apps/k3b/pics/73lab/k3bprojectview_left.png share/apps/k3b/pics/73lab/k3bprojectview_left_short.png share/apps/k3b/pics/73lab/k3bprojectview_right.png share/apps/k3b/pics/73lab/k3bsetup2_guy.png share/apps/k3b/pics/crystal/diskinfo_audio.png share/apps/k3b/pics/crystal/diskinfo_data.png share/apps/k3b/pics/crystal/diskinfo_dvd.png share/apps/k3b/pics/crystal/diskinfo_empty.png share/apps/k3b/pics/crystal/diskinfo_left.png share/apps/k3b/pics/crystal/diskinfo_mixed.png share/apps/k3b/pics/crystal/diskinfo_right.png share/apps/k3b/pics/crystal/k3b.theme share/apps/k3b/pics/crystal/k3b_3d_logo.png share/apps/k3b/pics/crystal/k3b_cd_copy.png share/apps/k3b/pics/crystal/k3b_probing_cd.png share/apps/k3b/pics/crystal/k3b_progress_dialog_failed.png share/apps/k3b/pics/crystal/k3b_progress_dialog_success.png share/apps/k3b/pics/crystal/k3b_splash.png share/apps/k3b/pics/crystal/k3bprojectview_left.png share/apps/k3b/pics/crystal/k3bprojectview_left_short.png share/apps/k3b/pics/crystal/k3bprojectview_right.png share/apps/k3b/pics/crystal/k3bsetup2_guy.png share/apps/k3b/plugins/k3bexternalencoder.plugin share/apps/k3b/plugins/k3bflacdecoder.plugin share/apps/k3b/plugins/k3bmaddecoder.plugin share/apps/k3b/plugins/k3boggvorbisdecoder.plugin share/apps/k3b/plugins/k3boggvorbisencoder.plugin share/apps/k3b/plugins/k3bsoxencoder.plugin share/apps/k3b/plugins/k3bwavedecoder.plugin share/apps/k3b/tips share/apps/konqueror/servicemenus/k3b_create_audio_cd.desktop share/apps/konqueror/servicemenus/k3b_create_data_cd.desktop share/apps/konqueror/servicemenus/k3b_create_video_cd.desktop share/apps/konqueror/servicemenus/k3b_write_bin_image.desktop share/apps/konqueror/servicemenus/k3b_write_iso_image.desktop share/doc/HTML/en/k3b/audiocd-howto.docbook share/doc/HTML/en/k3b/burndialog_audio.png share/doc/HTML/en/k3b/burndialog_progress.png share/doc/HTML/en/k3b/cdcloning_dialog.png share/doc/HTML/en/k3b/cdcloning_reading.png share/doc/HTML/en/k3b/cdcopy-howto.docbook share/doc/HTML/en/k3b/cdcopy_done.png share/doc/HTML/en/k3b/cdcopy_reading.png share/doc/HTML/en/k3b/cdcopy_settings.png share/doc/HTML/en/k3b/cdcopy_writing.png share/doc/HTML/en/k3b/commands.docbook share/doc/HTML/en/k3b/common share/doc/HTML/en/k3b/dcop.docbook share/doc/HTML/en/k3b/index.cache.bz2 share/doc/HTML/en/k3b/index.docbook share/doc/HTML/en/k3b/select_audiofiles.png share/doc/HTML/en/k3b/select_project.png share/doc/HTML/en/k3b/video-encoding.docbook share/icons/crystalsvg/128x128/apps/k3b.png share/icons/crystalsvg/16x16/apps/k3b.png share/icons/crystalsvg/32x32/apps/k3b.png share/icons/crystalsvg/48x48/apps/k3b.png share/icons/crystalsvg/64x64/apps/k3b.png share/mimelnk/application/x-k3b.desktop share/sounds/k3b_error1.wav share/sounds/k3b_success1.wav share/sounds/k3b_wait_media1.wav @dirrm share/doc/HTML/en/k3b @dirrm share/apps/k3b/plugins @dirrm share/apps/k3b/pics/crystal @dirrm share/apps/k3b/pics/73lab @dirrm share/apps/k3b/pics @dirrm share/apps/k3b/kpartplugins @dirrm share/apps/k3b/icons/crystalsvg/32x32/actions @dirrm share/apps/k3b/icons/crystalsvg/32x32 @dirrm share/apps/k3b/icons/crystalsvg/22x22/actions @dirrm share/apps/k3b/icons/crystalsvg/22x22 @dirrm share/apps/k3b/icons/crystalsvg/16x16/actions @dirrm share/apps/k3b/icons/crystalsvg/16x16 @dirrm share/apps/k3b/icons/crystalsvg @dirrm share/apps/k3b/icons @dirrm share/apps/k3b/cdi @dirrm share/apps/k3b Property changes on: head/sysutils/k3b-kde4/pkg-plist ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.3 \ No newline at end of property +1.4 \ No newline at end of property