diff --git a/x11/kde/utils3/Makefile b/x11/kde/utils3/Makefile index c60d7c680d5..d66a7ec3062 100644 --- a/x11/kde/utils3/Makefile +++ b/x11/kde/utils3/Makefile @@ -1,10 +1,10 @@ -# $OpenBSD: Makefile,v 1.46 2007/01/28 13:18:51 espie Exp $ +# $OpenBSD: Makefile,v 1.47 2007/02/02 12:09:36 espie Exp $ COMMENT= "K Desktop Environment, utilities" CATEGORIES= x11 x11/kde VERSION= 3.5.6 DISTNAME= kdeutils-${VERSION} -PKGNAME= ${DISTNAME} +PKGNAME= ${DISTNAME}p0 MODKDE_VERSION= 3.5.3 SHARED_LIBS += khexeditcommon 1.0 # .0.0 SHARED_LIBS += kcmlaptop 1.0 # .0.0 diff --git a/x11/kde/utils3/patches/patch-ark_tar_cpp b/x11/kde/utils3/patches/patch-ark_tar_cpp new file mode 100644 index 00000000000..bed6e3bc177 --- /dev/null +++ b/x11/kde/utils3/patches/patch-ark_tar_cpp @@ -0,0 +1,86 @@ +$OpenBSD: patch-ark_tar_cpp,v 1.1 2007/02/02 12:09:36 espie Exp $ +--- ark/tar.cpp.orig Mon May 22 20:08:38 2006 ++++ ark/tar.cpp Fri Feb 2 02:12:52 2007 +@@ -50,6 +50,7 @@ + + // Qt includes + #include ++#include + #include + #include + +@@ -247,13 +248,17 @@ TarArch::open() + // tar archive are plain or start with "./" + KProcess *kp = m_currentProcess = new KProcess; + +- *kp << m_archiver_program; +- + if ( compressed ) + { +- *kp << "--use-compress-program=" + getUnCompressor(); ++ kp->setUseShell(true); ++ *kp << getUnCompressor() << "-d" << "-c" << KProcess::quote(m_filename) << "|"; ++ } else ++ { ++ kp->setUseShell(false); + } + ++ *kp << m_archiver_program; ++ + *kp << "-tvf" << m_filename; + + m_buffer = ""; +@@ -600,29 +605,46 @@ void TarArch::unarchFileInternal() + + KProcess *kp = m_currentProcess = new KProcess; + kp->clearArguments(); +- +- *kp << m_archiver_program; + if (compressed) +- *kp << "--use-compress-program="+getUnCompressor(); ++ { ++ kp->setUseShell(true); ++ *kp << getUnCompressor() << "-d" << "-c" << KProcess::quote(m_filename) << "|"; ++ } else ++ { ++ kp->setUseShell(false); ++ } ++ *kp << m_archiver_program; + + QString options = "-x"; +- if (!ArkSettings::extractOverwrite()) +- options += "k"; + if (ArkSettings::preservePerms()) + options += "p"; + options += "f"; + + kdDebug(1601) << "Options were: " << options << endl; +- *kp << options << m_filename << "-C" << dest; ++ if (compressed) { ++ *kp << options << "-" << "-C" << KProcess::quote(dest); ++ } else { ++ *kp << options << m_filename << "-C" << dest; ++ } + + // if the list is empty, no filenames go on the command line, + // and we then extract everything in the archive. ++ // XXX and we don't handle extractOverwrite. + if (m_fileList) + { + for ( QStringList::Iterator it = m_fileList->begin(); + it != m_fileList->end(); ++it ) + { +- *kp << QString(m_dotslash ? "./" : "")+(*it); ++ QString v = m_dotslash ? "./" : "" + (*it); ++ if (!ArkSettings::extractOverwrite()) { ++ if (QFile::exists(dest + "/" + v)) { ++ continue; ++ } ++ } ++ ++ if (compressed) ++ v = KProcess::quote(v); ++ *kp << v; + } + } +