diff options
author | skrll <skrll> | 2001-12-07 14:07:27 +0000 |
---|---|---|
committer | skrll <skrll> | 2001-12-07 14:07:27 +0000 |
commit | e54a9b294d9e1e0b09d1fcc2f82b12523f503502 (patch) | |
tree | 0eb199e16fa19cb03d2fe98d07b8db2f3ae8bd4e /misc/kdeutils2 | |
parent | ed71f6ec7d057a5937814ab3c310e2d83700f400 (diff) | |
download | pkgsrc-e54a9b294d9e1e0b09d1fcc2f82b12523f503502.tar.gz |
Apply fix in pkg/14431 from Mark Davies <mark@mcs.vuw.ac.nz> so that
the floppy formatter works for NetBSD.
Diffstat (limited to 'misc/kdeutils2')
-rw-r--r-- | misc/kdeutils2/distinfo | 3 | ||||
-rw-r--r-- | misc/kdeutils2/patches/patch-ah | 213 |
2 files changed, 215 insertions, 1 deletions
diff --git a/misc/kdeutils2/distinfo b/misc/kdeutils2/distinfo index bbddd027f95..6b6bf3115b1 100644 --- a/misc/kdeutils2/distinfo +++ b/misc/kdeutils2/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.6 2001/12/03 15:37:15 skrll Exp $ +$NetBSD: distinfo,v 1.7 2001/12/07 14:07:27 skrll Exp $ SHA1 (kdeutils-2.2.2.tar.bz2) = 3cd4ef2fbe4cf04a9fecc54ab6863f687ee1ae83 Size (kdeutils-2.2.2.tar.bz2) = 1466910 bytes @@ -9,4 +9,5 @@ SHA1 (patch-ad) = 4a021a96abd230bc391cd097fd8cafa26a89023b SHA1 (patch-ae) = 8c5fc5eb276d79ef96b373ee8f014e586416fc3d SHA1 (patch-af) = 75cf91c960fe26cc977e47ba5292609ba0d7aac0 SHA1 (patch-ag) = d494f9459b903cb1a49633741643b705ae15386a +SHA1 (patch-ah) = 8a9608147abc72a000f79c4b94402bf57b56ce6f SHA1 (patch-ai) = 5597b771e15b21ff678c1b2fce29be893ad6dedf diff --git a/misc/kdeutils2/patches/patch-ah b/misc/kdeutils2/patches/patch-ah new file mode 100644 index 00000000000..8f066c60e13 --- /dev/null +++ b/misc/kdeutils2/patches/patch-ah @@ -0,0 +1,213 @@ +$NetBSD: patch-ah,v 1.3 2001/12/07 14:07:27 skrll Exp $ + +--- kfloppy/floppy.cpp.orig Thu Jan 18 11:50:53 2001 ++++ kfloppy/floppy.cpp +@@ -176,7 +176,9 @@ + addDensity(i18n("HD")); + addDensity(i18n("DD")); + addFileSystem(i18n("Dos")); ++#ifndef __NetBSD__ + addFileSystem(i18n("ext2fs")); ++#endif + + readSettings(); + setWidgets(); +@@ -226,72 +228,120 @@ + { + if( deviceComboBox->currentText() == FLOPPYA3 ){ + if( densityComboBox->currentText() == i18n( "HD")){ ++#ifdef __NetBSD__ ++ device = "/dev/rfd0b"; ++ tracks = 160; ++#else + device = "/dev/fd0H1440"; +- blocks = 1440; + tracks = 80; ++#endif ++ blocks = 1440; + //mdev = "/dev/fd0"; ++#ifndef __NetBSD__ + if( access(QFile::encodeName(device),W_OK) < 0){ + device = "/dev/fd0u1440"; + } ++#endif + } + else{ ++#ifdef __NetBSD__ ++ device = "/dev/rfd0f"; ++ tracks = 160; ++#else + device = "/dev/fd0D720"; +- blocks = 720; + tracks = 80; ++#endif ++ blocks = 720; + //mdev = "/dev/fd0"; ++#ifndef __NetBSD__ + if( access(QFile::encodeName(device),W_OK) < 0){ + device = "/dev/fd0u720"; + } ++#endif + } + } + + if( deviceComboBox->currentText() == FLOPPYA5){ + if( densityComboBox->currentText() == i18n( "HD")){ ++#ifdef __NetBSD__ ++ device = "/dev/rfd0c"; ++ tracks = 160; ++#else + device = "/dev/fd0h1200"; +- blocks = 1200; + tracks = 80; ++#endif ++ blocks = 1200; + //mdev = "/dev/fd0"; + } + else{ ++#ifdef __NetBSD__ ++ device = "/dev/rfd0g"; ++ tracks = 160; ++#else + device = "/dev/fd0h360"; +- blocks = 720; + tracks = 40; ++#endif ++ blocks = 720; + //mdev = "/dev/fd0"; + } + } + + if( deviceComboBox->currentText() == FLOPPYB3){ + if( densityComboBox->currentText() == i18n( "HD")){ ++#ifdef __NetBSD__ ++ device = "/dev/rfd1b"; ++ tracks = 160; ++#else + device = "/dev/fd1H1440"; +- blocks = 1400; + tracks = 80; ++#endif ++ blocks = 1400; + //mdev = "/dev/fd1"; ++#ifndef __NetBSD__ + if(access(QFile::encodeName(device),W_OK) < 0){ + device = "/dev/fd1u1440"; + } ++#endif + } + else{ ++#ifdef __NetBSD__ ++ device = "/dev/rfd1f"; ++ tracks = 160; ++#else + device = "/dev/fd1D720"; +- blocks = 720; + tracks = 80; ++#endif ++ blocks = 720; + //mdev = "/dev/fd1"; ++#ifndef __NetBSD__ + if( access(QFile::encodeName(device),W_OK) < 0){ + device = "/dev/fd1u720"; + } ++#endif + } + } + + if( deviceComboBox->currentText() == FLOPPYB5){ + if( densityComboBox->currentText() == i18n( "HD")){ ++#ifdef __NetBSD__ ++ device = "/dev/rfd1c"; ++ tracks = 160; ++#else + device = "/dev/fd1h1200"; +- blocks = 1200; + tracks = 80; ++#endif ++ blocks = 1200; + //mdev = "/dev/fd1"; + } + else{ ++#ifdef __NetBSD__ ++ device = "/dev/rfd1g"; ++ tracks = 160; ++#else + device = "/dev/fd1h720"; +- blocks = 720; + tracks = 80; ++#endif ++ blocks = 720; + //mdev = "/dev/fd1"; + } + } +@@ -318,16 +368,22 @@ + path.append(":/usr/sbin:/sbin"); + + fdformat = KGlobal::dirs()->findExe("fdformat", path); ++#ifndef __NetBSD__ + mke2fs = KGlobal::dirs()->findExe("mke2fs", path); + mkdosfs = KGlobal::dirs()->findExe("mkdosfs", path); ++#else ++ mkdosfs = KGlobal::dirs()->findExe("newfs_msdos", path); ++#endif + QString str = ""; + if (fdformat.isEmpty()) { + str = i18n("Cannot find fdformat."); + } + ++#ifndef __NetBSD__ + if (mke2fs.isEmpty()) { + str = i18n("Cannot find mke2fs"); + } ++#endif + + if (mkdosfs.isEmpty()) { + str = i18n("Cannot find mkdosfs"); +@@ -406,6 +462,9 @@ + if (!verifylabel->isChecked()) { + *proc << "-n"; + } ++#ifdef __NetBSD__ ++ *proc << "-f"; ++#endif + *proc << device; + + connect(proc, SIGNAL(processExited(KProcess *)),this, SLOT(formatdone(KProcess*))); +@@ -423,6 +482,10 @@ + KMessageBox::error(this, str); + reset(); + } ++ ++#ifdef __NetBSD__ ++ proc->writeStdin("y\n", 2); ++#endif + } + + void FloppyData::formatdone(KProcess*){ +@@ -728,12 +791,17 @@ + + *proc << mkdosfs; + if(labellabel->isChecked()) ++#ifdef __NetBSD__ ++ *proc << "-L" <<lineedit->text(); ++#else + *proc << "-n" <<lineedit->text(); + if (verifylabel->isChecked()) { + *proc << "-c"; + } ++#endif + *proc << device; + } ++#ifndef __NetBSD__ + else{ + + *proc << mke2fs; +@@ -745,6 +813,7 @@ + } + *proc << device; + } ++#endif + + + |