aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils
diff options
context:
space:
mode:
authorbarner <barner@FreeBSD.org>2007-07-16 14:39:30 +0800
committerbarner <barner@FreeBSD.org>2007-07-16 14:39:30 +0800
commit498902132be9ad25985eb353c9c6ee70a852f520 (patch)
treed878d3124e7064c9cd9273b06f47076af30d6098 /sysutils
parent498ee61f7d9f54db3806fcecb3bbd5f348b89bd3 (diff)
downloadfreebsd-ports-gnome-498902132be9ad25985eb353c9c6ee70a852f520.tar.gz
freebsd-ports-gnome-498902132be9ad25985eb353c9c6ee70a852f520.tar.zst
freebsd-ports-gnome-498902132be9ad25985eb353c9c6ee70a852f520.zip
- Fix detection of writer device if other devices than cdX and passX (e.g.
sgX) for X=0, 1, ... are reported by CAM. - Bump port revision - Submitted by Heiner Eichmann (maintainer)
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/k3b-kde4/Makefile1
-rw-r--r--sysutils/k3b-kde4/files/patch-libk3bdevice-k3bdevicemanager.cpp94
-rw-r--r--sysutils/k3b/Makefile1
-rw-r--r--sysutils/k3b/files/patch-libk3bdevice-k3bdevicemanager.cpp94
4 files changed, 190 insertions, 0 deletions
diff --git a/sysutils/k3b-kde4/Makefile b/sysutils/k3b-kde4/Makefile
index 32b6548f74c9..b2b2a2aa2968 100644
--- a/sysutils/k3b-kde4/Makefile
+++ b/sysutils/k3b-kde4/Makefile
@@ -7,6 +7,7 @@
PORTNAME= k3b
PORTVERSION= 1.0.2
+PORTREVISION= 1
CATEGORIES= sysutils multimedia kde
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
diff --git a/sysutils/k3b-kde4/files/patch-libk3bdevice-k3bdevicemanager.cpp b/sysutils/k3b-kde4/files/patch-libk3bdevice-k3bdevicemanager.cpp
new file mode 100644
index 000000000000..2dbbb2d3c55a
--- /dev/null
+++ b/sysutils/k3b-kde4/files/patch-libk3bdevice-k3bdevicemanager.cpp
@@ -0,0 +1,94 @@
+--- libk3bdevice/k3bdevicemanager.cpp.orig Sat Jun 23 20:35:15 2007
++++ libk3bdevice/k3bdevicemanager.cpp Fri Jul 13 23:37:31 2007
+@@ -357,7 +357,7 @@
+ int need_close = 0;
+ int skip_device = 0;
+ int bus, target, lun;
+- QString dev1, dev2;
++ QString cddev, passdev;
+
+ if ((fd = open(XPT_DEVICE, O_RDWR)) == -1)
+ {
+@@ -400,29 +400,22 @@
+ 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";
++ cddev += "c";
+ #endif
+- if (!dev1.isEmpty() && !dev2.isEmpty() && dev.startsWith("/dev/cd"))
++ if (!cddev.isEmpty() && !passdev.isEmpty())
+ {
+- Device* device = new Device(dev.latin1());
++ Device* device = new Device(cddev.latin1());
+ device->m_bus = bus;
+ device->m_target = target;
+ device->m_lun = lun;
+- device->m_passDevice = "/dev/" + pass;
+- k3bDebug() << "(BSDDeviceScan) add device " << dev << ":" << bus << ":" << target << ":" << lun << endl;
++ device->m_passDevice = passdev;
++ k3bDebug() << "(BSDDeviceScan) add device " << cddev << ":" << bus << ":" << target << ":" << lun << " (" << passdev << ")" << endl;
+ addDevice(device);
+ }
+ need_close = 0;
+- dev1="";
+- dev2="";
++ cddev="";
++ passdev="";
+ }
+ bus = dev_result->path_id;
+ target = dev_result->target_id;
+@@ -438,10 +431,11 @@
+ 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);
++ k3bDebug() << "(BSDDeviceScan) periph: " << periph_result->periph_name << periph_result->unit_number << endl;
++ if (QString("cd") == periph_result->periph_name)
++ cddev = "/dev/cd" + QString::number(periph_result->unit_number);
++ else if (QString("pass") == periph_result->periph_name)
++ passdev = "/dev/pass" + QString::number(periph_result->unit_number);
+
+ need_close++;
+ break;
+@@ -459,24 +453,17 @@
+
+ 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";
++ cddev += "c";
+ #endif
+- if (!dev1.isEmpty() && !dev2.isEmpty() && dev.startsWith("/dev/cd"))
++ if (!cddev.isEmpty() && !passdev.isEmpty())
+ {
+- Device* device = new Device(dev.latin1());
++ Device* device = new Device(cddev.latin1());
+ device->m_bus = bus;
+ device->m_target = target;
+ device->m_lun = lun;
+- device->m_passDevice = "/dev/" + pass;
+- k3bDebug() << "(BSDDeviceScan) add device " << dev << ":" << bus << ":" << target << ":" << lun << endl;
++ device->m_passDevice = passdev;
++ k3bDebug() << "(BSDDeviceScan) add device " << cddev << ":" << bus << ":" << target << ":" << lun << " (" << passdev << ")" << endl;
+ addDevice(device);
+ }
+ }
diff --git a/sysutils/k3b/Makefile b/sysutils/k3b/Makefile
index 32b6548f74c9..b2b2a2aa2968 100644
--- a/sysutils/k3b/Makefile
+++ b/sysutils/k3b/Makefile
@@ -7,6 +7,7 @@
PORTNAME= k3b
PORTVERSION= 1.0.2
+PORTREVISION= 1
CATEGORIES= sysutils multimedia kde
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
diff --git a/sysutils/k3b/files/patch-libk3bdevice-k3bdevicemanager.cpp b/sysutils/k3b/files/patch-libk3bdevice-k3bdevicemanager.cpp
new file mode 100644
index 000000000000..2dbbb2d3c55a
--- /dev/null
+++ b/sysutils/k3b/files/patch-libk3bdevice-k3bdevicemanager.cpp
@@ -0,0 +1,94 @@
+--- libk3bdevice/k3bdevicemanager.cpp.orig Sat Jun 23 20:35:15 2007
++++ libk3bdevice/k3bdevicemanager.cpp Fri Jul 13 23:37:31 2007
+@@ -357,7 +357,7 @@
+ int need_close = 0;
+ int skip_device = 0;
+ int bus, target, lun;
+- QString dev1, dev2;
++ QString cddev, passdev;
+
+ if ((fd = open(XPT_DEVICE, O_RDWR)) == -1)
+ {
+@@ -400,29 +400,22 @@
+ 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";
++ cddev += "c";
+ #endif
+- if (!dev1.isEmpty() && !dev2.isEmpty() && dev.startsWith("/dev/cd"))
++ if (!cddev.isEmpty() && !passdev.isEmpty())
+ {
+- Device* device = new Device(dev.latin1());
++ Device* device = new Device(cddev.latin1());
+ device->m_bus = bus;
+ device->m_target = target;
+ device->m_lun = lun;
+- device->m_passDevice = "/dev/" + pass;
+- k3bDebug() << "(BSDDeviceScan) add device " << dev << ":" << bus << ":" << target << ":" << lun << endl;
++ device->m_passDevice = passdev;
++ k3bDebug() << "(BSDDeviceScan) add device " << cddev << ":" << bus << ":" << target << ":" << lun << " (" << passdev << ")" << endl;
+ addDevice(device);
+ }
+ need_close = 0;
+- dev1="";
+- dev2="";
++ cddev="";
++ passdev="";
+ }
+ bus = dev_result->path_id;
+ target = dev_result->target_id;
+@@ -438,10 +431,11 @@
+ 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);
++ k3bDebug() << "(BSDDeviceScan) periph: " << periph_result->periph_name << periph_result->unit_number << endl;
++ if (QString("cd") == periph_result->periph_name)
++ cddev = "/dev/cd" + QString::number(periph_result->unit_number);
++ else if (QString("pass") == periph_result->periph_name)
++ passdev = "/dev/pass" + QString::number(periph_result->unit_number);
+
+ need_close++;
+ break;
+@@ -459,24 +453,17 @@
+
+ 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";
++ cddev += "c";
+ #endif
+- if (!dev1.isEmpty() && !dev2.isEmpty() && dev.startsWith("/dev/cd"))
++ if (!cddev.isEmpty() && !passdev.isEmpty())
+ {
+- Device* device = new Device(dev.latin1());
++ Device* device = new Device(cddev.latin1());
+ device->m_bus = bus;
+ device->m_target = target;
+ device->m_lun = lun;
+- device->m_passDevice = "/dev/" + pass;
+- k3bDebug() << "(BSDDeviceScan) add device " << dev << ":" << bus << ":" << target << ":" << lun << endl;
++ device->m_passDevice = passdev;
++ k3bDebug() << "(BSDDeviceScan) add device " << cddev << ":" << bus << ":" << target << ":" << lun << " (" << passdev << ")" << endl;
+ addDevice(device);
+ }
+ }