pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/x11/konsole Import konsole. A part of KDE SC 4.8.0



details:   https://anonhg.NetBSD.org/pkgsrc/rev/0b3d8a1d98ef
branches:  trunk
changeset: 601232:0b3d8a1d98ef
user:      markd <markd%pkgsrc.org@localhost>
date:      Tue Mar 20 05:07:48 2012 +0000

description:
Import konsole.  A part of KDE SC 4.8.0

a terminal emulator for the K Desktop Environment

diffstat:

 x11/konsole/DESCR                             |    1 +
 x11/konsole/Makefile                          |   15 ++
 x11/konsole/PLIST                             |   30 ++++
 x11/konsole/distinfo                          |    6 +
 x11/konsole/patches/patch-src_ProcessInfo.cpp |  185 ++++++++++++++++++++++++++
 5 files changed, 237 insertions(+), 0 deletions(-)

diffs (257 lines):

diff -r 080369e0bf09 -r 0b3d8a1d98ef x11/konsole/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/x11/konsole/DESCR Tue Mar 20 05:07:48 2012 +0000
@@ -0,0 +1,1 @@
+a terminal emulator for the K Desktop Environment
diff -r 080369e0bf09 -r 0b3d8a1d98ef x11/konsole/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/x11/konsole/Makefile      Tue Mar 20 05:07:48 2012 +0000
@@ -0,0 +1,15 @@
+# $NetBSD: Makefile,v 1.1.1.1 2012/03/20 05:07:48 markd Exp $
+
+DISTNAME=      konsole-${_KDE_VERSION}
+CATEGORIES=    x11
+COMMENT=       a terminal emulator for the K Desktop Environment
+
+.include "../../meta-pkgs/kde4/Makefile.kde4"
+
+.include "../../meta-pkgs/kde4/kde4.mk"
+
+.include "../../sysutils/desktop-file-utils/desktopdb.mk"
+.include "../../x11/kdelibs4/buildlink3.mk"
+.include "../../x11/kde-baseapps4/buildlink3.mk"
+
+.include "../../mk/bsd.pkg.mk"
diff -r 080369e0bf09 -r 0b3d8a1d98ef x11/konsole/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/x11/konsole/PLIST Tue Mar 20 05:07:48 2012 +0000
@@ -0,0 +1,30 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2012/03/20 05:07:48 markd Exp $
+bin/konsole
+bin/konsoleprofile
+lib/kde4/libkonsolepart.so
+lib/libkdeinit4_konsole.so
+lib/libkonsoleprivate.so
+share/applications/kde4/konsole.desktop
+share/doc/kde/HTML/en/konsole/common
+share/doc/kde/HTML/en/konsole/index.cache.bz2
+share/doc/kde/HTML/en/konsole/index.docbook
+share/kde/apps/konsole/BlackOnLightYellow.schema
+share/kde/apps/konsole/BlackOnRandomLight.colorscheme
+share/kde/apps/konsole/BlackOnWhite.schema
+share/kde/apps/konsole/DarkPastels.colorscheme
+share/kde/apps/konsole/GreenOnBlack.colorscheme
+share/kde/apps/konsole/Linux.colorscheme
+share/kde/apps/konsole/README.KeyTab
+share/kde/apps/konsole/Shell.profile
+share/kde/apps/konsole/Solarized.colorscheme
+share/kde/apps/konsole/WhiteOnBlack.schema
+share/kde/apps/konsole/default.keytab
+share/kde/apps/konsole/konsole.notifyrc
+share/kde/apps/konsole/konsoleui.rc
+share/kde/apps/konsole/linux.keytab
+share/kde/apps/konsole/partui.rc
+share/kde/apps/konsole/sessionui.rc
+share/kde/apps/konsole/solaris.keytab
+share/kde4/services/ServiceMenus/konsolehere.desktop
+share/kde4/services/konsolepart.desktop
+share/kde4/servicetypes/terminalemulator.desktop
diff -r 080369e0bf09 -r 0b3d8a1d98ef x11/konsole/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/x11/konsole/distinfo      Tue Mar 20 05:07:48 2012 +0000
@@ -0,0 +1,6 @@
+$NetBSD: distinfo,v 1.1.1.1 2012/03/20 05:07:48 markd Exp $
+
+SHA1 (konsole-4.8.0.tar.bz2) = f99abc20fd0042be62e48308f334b66a6a3135d7
+RMD160 (konsole-4.8.0.tar.bz2) = 4375686e3bb30a51feced29db4538e1f5dfd4de4
+Size (konsole-4.8.0.tar.bz2) = 476032 bytes
+SHA1 (patch-src_ProcessInfo.cpp) = aa0c1d6bfa7462681b82bdee4609e0cf26211300
diff -r 080369e0bf09 -r 0b3d8a1d98ef x11/konsole/patches/patch-src_ProcessInfo.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/x11/konsole/patches/patch-src_ProcessInfo.cpp     Tue Mar 20 05:07:48 2012 +0000
@@ -0,0 +1,185 @@
+$NetBSD: patch-src_ProcessInfo.cpp,v 1.1.1.1 2012/03/20 05:07:49 markd Exp $
+
+--- src/ProcessInfo.cpp.orig   2010-03-26 17:26:32.000000000 +0000
++++ src/ProcessInfo.cpp
+@@ -894,6 +894,171 @@ private:
+     }
+ } ;
+ 
++class NetBSDProcessInfo : public UnixProcessInfo
++{
++public:
++    NetBSDProcessInfo(int pid, bool env) :
++        UnixProcessInfo(pid,env)
++    {
++    }
++
++private:
++    virtual bool readProcInfo(int pid)
++    {
++        // indicies of various fields within the process status file which
++        // contain various information about the process
++        const int PARENT_PID_FIELD = 2;
++        const int PROCESS_NAME_FIELD = 0;
++        const int GROUP_PROCESS_FIELD = 3;
++        const int UID_PROCESS_FIELD = 11;
++
++        QString parentPidString;
++        QString processNameString;
++        QString foregroundPidString;
++        QString uidString;
++
++        // read process status file ( /proc/<pid/status )
++        //
++        // the expected file format is a list of fields separated by spaces, using
++        // parenthesies to escape fields such as the process name which may itself contain
++        // spaces:
++        //
++        // FIELD FIELD (FIELD WITH SPACES) FIELD FIELD
++        //
++        QFile processInfo( QString("/proc/%1/status").arg(pid) );
++        if ( processInfo.open(QIODevice::ReadOnly) )
++        {
++            QTextStream stream(&processInfo);
++            QString data = stream.readAll();
++
++            int stack = 0;
++            int field = 0;
++            int pos = 0;
++
++            while (pos < data.count())
++            {
++                QChar c = data[pos];
++
++                if ( c == '(' )
++                    stack++;
++                else if ( c == ')' )
++                    stack--;
++                else if ( stack == 0 && c == ' ' )
++                    field++;
++                else
++                {
++                    switch ( field )
++                    {
++                        case PARENT_PID_FIELD:
++                            parentPidString.append(c);
++                            break;
++                        case PROCESS_NAME_FIELD:
++                            processNameString.append(c);
++                            break;
++                        case GROUP_PROCESS_FIELD:
++                            foregroundPidString.append(c);
++                            break;
++                        case UID_PROCESS_FIELD:
++                            uidString.append(c);
++                            break;
++                    }
++                }
++
++                pos++;
++            }
++        }
++        else
++        {
++            setFileError( processInfo.error() );
++            return false;
++        }
++
++        // check that data was read successfully
++        bool ok = false;
++
++        // uid string must be less than 5 chars (uint)
++        if (uidString.size() > 5)
++            uidString.clear();
++
++        int uid = uidString.toInt(&ok);
++        if (ok)
++            setUserId(uid);
++        readUserName();
++
++        int foregroundPid = foregroundPidString.toInt(&ok);
++        if (ok)
++            setForegroundPid(foregroundPid);
++
++        int parentPid = parentPidString.toInt(&ok);
++        if (ok)
++            setParentPid(parentPid);
++
++        if (!processNameString.isEmpty())
++            setName(processNameString);
++
++        // update object state
++        setPid(pid);
++
++        return ok;
++    }
++
++    virtual bool readArguments(int pid)
++    {
++        // read command-line arguments file found at /proc/<pid>/cmdline
++        // the expected format is a list of strings delimited by null characters,
++        // and ending in a double null character pair.
++
++        QFile argumentsFile( QString("/proc/%1/cmdline").arg(pid) );
++        if ( argumentsFile.open(QIODevice::ReadOnly) )
++        {
++            QTextStream stream(&argumentsFile);
++            QString data = stream.readAll();
++
++            QStringList argList = data.split( QChar('\0') );
++
++            foreach ( const QString &entry , argList )
++            {
++                if (!entry.isEmpty())
++                    addArgument(entry);
++            }
++        }
++        else
++        {
++            setFileError( argumentsFile.error() );
++        }
++
++        return true;
++    }
++
++    virtual bool readCurrentDir(int pid)
++    {
++        QFileInfo info( QString("/proc/%1/cwd").arg(pid) );
++
++        const bool readable = info.isReadable();
++
++        if ( readable && info.isSymLink() )
++        {
++            setCurrentDir( info.symLinkTarget() );
++            return true;
++        }
++        else
++        {
++            if ( !readable )
++                setError( PermissionsError );
++            else
++                setError( UnknownError );
++
++            return false;
++        }
++    }
++
++    virtual bool readEnvironment(int pid)
++    {
++        // Not supported in NetBSD
++        return true;
++    }
++} ;
++
+ SSHProcessInfo::SSHProcessInfo(const ProcessInfo& process)
+  : _process(process)
+ {
+@@ -1039,6 +1204,8 @@ ProcessInfo* ProcessInfo::newInstance(in
+     return new LinuxProcessInfo(pid,enableEnvironmentRead);
+ #elif defined(Q_OS_SOLARIS)
+     return new SolarisProcessInfo(pid,enableEnvironmentRead);
++#elif defined(Q_OS_NETBSD)
++    return new NetBSDProcessInfo(pid,enableEnvironmentRead);
+ #elif defined(Q_OS_MAC)
+     return new MacProcessInfo(pid,enableEnvironmentRead);
+ #elif defined(Q_OS_FREEBSD)



Home | Main Index | Thread Index | Old Index