summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Callen <abcd@gentoo.org>2009-12-22 23:50:11 +0000
committerJonathan Callen <abcd@gentoo.org>2009-12-22 23:50:11 +0000
commitb8bb4d2ee41bb5f2684c9740090483ef8ecdeb3d (patch)
tree55781a2721f96df03d63bd881029dbb781cb6078 /kde-base/kdelibs
parentPull in changes from overlay and prefix support (diff)
downloadgentoo-2-b8bb4d2ee41bb5f2684c9740090483ef8ecdeb3d.tar.gz
gentoo-2-b8bb4d2ee41bb5f2684c9740090483ef8ecdeb3d.tar.bz2
gentoo-2-b8bb4d2ee41bb5f2684c9740090483ef8ecdeb3d.zip
Pull in changes from overlay and patches for prefix support
(Portage version: -svn/cvs/Linux i686)
Diffstat (limited to 'kde-base/kdelibs')
-rw-r--r--kde-base/kdelibs/ChangeLog15
-rw-r--r--kde-base/kdelibs/files/kdelibs-4.3.1-kdeui_util_kkeyserver_mac.patch56
-rw-r--r--kde-base/kdelibs/files/kdelibs-4.3.1-macos-kinit-fork.patch36
-rw-r--r--kde-base/kdelibs/files/kdelibs-4.3.1-macos-unbundle.patch118
-rw-r--r--kde-base/kdelibs/files/kdelibs-4.3.1-module-suffix.patch108
-rw-r--r--kde-base/kdelibs/files/kdelibs-4.3.2-solaris-fileunix.patch40
-rw-r--r--kde-base/kdelibs/files/kdelibs-4.3.2-solaris-getgrouplist.patch109
-rw-r--r--kde-base/kdelibs/files/kdelibs-4.3.2-solaris-ksyscoca.patch16
-rw-r--r--kde-base/kdelibs/files/kdelibs-4.3.3-klauncher_kdeinit.patch31
-rw-r--r--kde-base/kdelibs/files/kdelibs-4.3.3-klauncher_kioslave.patch77
-rw-r--r--kde-base/kdelibs/files/kdelibs-4.3.3-klauncher_mac.patch33
-rw-r--r--kde-base/kdelibs/kdelibs-4.3.4.ebuild141
12 files changed, 748 insertions, 32 deletions
diff --git a/kde-base/kdelibs/ChangeLog b/kde-base/kdelibs/ChangeLog
index d9aacfac116e..c593bed9faa3 100644
--- a/kde-base/kdelibs/ChangeLog
+++ b/kde-base/kdelibs/ChangeLog
@@ -1,6 +1,19 @@
# ChangeLog for kde-base/kdelibs
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/kde-base/kdelibs/ChangeLog,v 1.656 2009/12/11 17:10:28 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/kde-base/kdelibs/ChangeLog,v 1.657 2009/12/22 23:50:11 abcd Exp $
+
+ 22 Dec 2009; Jonathan Callen <abcd@gentoo.org>
+ +files/kdelibs-4.3.1-kdeui_util_kkeyserver_mac.patch,
+ +files/kdelibs-4.3.1-macos-kinit-fork.patch,
+ +files/kdelibs-4.3.1-macos-unbundle.patch,
+ +files/kdelibs-4.3.1-module-suffix.patch,
+ +files/kdelibs-4.3.2-solaris-fileunix.patch,
+ +files/kdelibs-4.3.2-solaris-getgrouplist.patch,
+ +files/kdelibs-4.3.2-solaris-ksyscoca.patch,
+ +files/kdelibs-4.3.3-klauncher_kdeinit.patch,
+ +files/kdelibs-4.3.3-klauncher_kioslave.patch,
+ +files/kdelibs-4.3.3-klauncher_mac.patch, kdelibs-4.3.4.ebuild:
+ Pull in changes from overlay and patches for prefix support
11 Dec 2009; Tomáš Chvátal <scarabeus@gentoo.org>
-kdelibs-4.3.3-r2.ebuild:
diff --git a/kde-base/kdelibs/files/kdelibs-4.3.1-kdeui_util_kkeyserver_mac.patch b/kde-base/kdelibs/files/kdelibs-4.3.1-kdeui_util_kkeyserver_mac.patch
new file mode 100644
index 000000000000..b03f7a09a89c
--- /dev/null
+++ b/kde-base/kdelibs/files/kdelibs-4.3.1-kdeui_util_kkeyserver_mac.patch
@@ -0,0 +1,56 @@
+There's some non 64-bit supported code in here. So try to redo it in a 640bit
+compatible way.
+
+Author: Heiko Przybyl <zuxez@cs.tu-berlin.de>
+
+--- kdelibs-4.3.1/work/kdelibs-4.3.1/kdeui/util/kkeyserver_mac.cpp.orig 2009-09-24 15:59:10 +0200
++++ kdelibs-4.3.1/work/kdelibs-4.3.1/kdeui/util/kkeyserver_mac.cpp 2009-09-24 16:48:46 +0200
+@@ -65,11 +65,11 @@ namespace KKeyServer {
+
+ static QMultiMap<int, uint> scancodes;
+ static long lastLayoutID = -1;
+- static KeyboardLayoutRef lastLayout = NULL;
++ static TISInputSourceRef lastLayout = NULL;
+
+ void updateScancodes() {
+- KeyboardLayoutRef layout;
+- if (KLGetCurrentKeyboardLayout(&layout) != noErr) {
++ TISInputSourceRef layout = TISCopyCurrentKeyboardLayoutInputSource();
++ if (layout == NULL) {
+ kWarning() << "Error retrieving current layout";
+ }
+ if (layout != lastLayout) {
+@@ -80,16 +80,27 @@ namespace KKeyServer {
+ #endif
+ lastLayout = layout;
+ scancodes.clear();
+- void *kchr;
+- if (KLGetKeyboardLayoutProperty(layout, kKLKCHRData, const_cast<const void**>(&kchr)) != noErr) {
++ UCKeyboardLayout *uchr = (UCKeyboardLayout *)TISGetInputSourceProperty(layout, kTISPropertyUnicodeKeyLayoutData);
++ if (uchr == NULL) {
+ kWarning() << "Couldn't load active keyboard layout";
+ } else {
+ for (int i = 0; i < 128; i++) {
+ UInt32 tmpState = 0;
+- UInt32 chr = KeyTranslate(kchr, i, &tmpState);
+- if (chr && chr != kFunctionKeyCharCode) {
+- scancodes.insert(chr, i);
+- }
++ UInt32 deadKeyState = 0;
++ UInt32 flags = 0;
++ UniCharCount maxStringLength = 255;
++ UniCharCount actualStringLength = 0;
++ UniChar unicodeString[maxStringLength];
++
++ UCKeyTranslate(uchr, i, kUCKeyActionDown,
++ flags, LMGetKbdType(),
++ 1, &deadKeyState, maxStringLength, &actualStringLength, unicodeString);
++ fprintf(stderr, "Got key: %s\n", unicodeString);
++ fflush(stderr);
++ //UInt32 chr = KeyTranslate(kchr, i, &tmpState);
++ //if (chr && chr != kFunctionKeyCharCode) {
++ // scancodes.insert(chr, i);
++ //}
+ }
+ }
+ }
diff --git a/kde-base/kdelibs/files/kdelibs-4.3.1-macos-kinit-fork.patch b/kde-base/kdelibs/files/kdelibs-4.3.1-macos-kinit-fork.patch
new file mode 100644
index 000000000000..85b006ed3bb2
--- /dev/null
+++ b/kde-base/kdelibs/files/kdelibs-4.3.1-macos-kinit-fork.patch
@@ -0,0 +1,36 @@
+This patch avoids calling of QDesktopServices::storageLocation() to workaround
+the abort(USING_FORK_WITHOUT_EXEC_IS_NOT_SUPPORTED_BY_FILE_MANAGER) on kdeinit4
+startup.
+
+--- kdelibs-4.3.2/kinit/kinit.cpp.orig 2009-10-09 18:46:20 +0200
++++ kdelibs-4.3.2/kinit/kinit.cpp 2009-10-09 18:46:51 +0200
+@@ -46,6 +46,7 @@
+
+ #include <QtCore/QLibrary>
+ #include <QtCore/QString>
++#include <QtCore/QDir>
+ #include <QtCore/QFile>
+ #include <QtCore/QDate>
+ #include <QtCore/QFileInfo>
+--- kdelibs-4.3.2/kinit/kinit.cpp.orig 2009-10-09 18:28:59 +0200
++++ kdelibs-4.3.2/kinit/kinit.cpp 2009-10-09 18:29:05 +0200
+@@ -513,7 +513,7 @@ static pid_t launch(int argc, const char
+ if (cwd && *cwd) {
+ (void)chdir(cwd);
+ } else {
+- const QByteArray docPath = QFile::encodeName(KGlobalSettings::documentPath());
++ const QByteArray docPath = QFile::encodeName(QDir::homePath());
+ (void)chdir(docPath.constData());
+ }
+
+--- kdelibs-4.3.2/kinit/klauncher_main.cpp.orig 2009-10-09 19:11:17 +0200
++++ kdelibs-4.3.2/kinit/klauncher_main.cpp 2009-10-09 19:11:24 +0200
+@@ -62,7 +62,7 @@ extern "C" KDE_EXPORT int kdemain( int a
+ #endif
+
+ KComponentData componentData("klauncher", "kdelibs4");
+- KGlobal::locale();
++ //KGlobal::locale();
+
+ // WABA: Make sure not to enable session management.
+ putenv(strdup("SESSION_MANAGER="));
diff --git a/kde-base/kdelibs/files/kdelibs-4.3.1-macos-unbundle.patch b/kde-base/kdelibs/files/kdelibs-4.3.1-macos-unbundle.patch
new file mode 100644
index 000000000000..4551e279271d
--- /dev/null
+++ b/kde-base/kdelibs/files/kdelibs-4.3.1-macos-unbundle.patch
@@ -0,0 +1,118 @@
+KDE is smart, too smart. We don't want application bundles. And since our Qt is
+configured to not build application bundles, since wouldn't even work. So this
+patch disables KDE's smartness regarding application bundles.
+
+Author: Heiko Przybyl <zuxez@cs.tu-berlin.de>
+
+--- kdelibs-4.3.1/kdecore/kernel/kstandarddirs.cpp.orig 2009-09-28 02:05:37 +0200
++++ kdelibs-4.3.1/kdecore/kernel/kstandarddirs.cpp 2009-09-28 02:22:20 +0200
+@@ -1207,32 +1207,8 @@ QStringList KStandardDirs::systemPaths(
+ return exePaths;
+ }
+
+-#ifdef Q_WS_MAC
+-static QString getBundle( const QString& path, bool ignore )
+-{
+- kDebug(180) << "getBundle(" << path << ", " << ignore << ") called";
+- QFileInfo info;
+- QString bundle = path;
+- bundle += ".app/Contents/MacOS/" + bundle.section('/', -1);
+- info.setFile( bundle );
+- if ( info.exists() && ( ignore || info.isExecutable() )
+- && ( info.isFile() || info.isSymLink() ) ) {
+- kDebug(180) << "getBundle(): returning " << bundle;
+- return bundle;
+- }
+- return QString();
+-}
+-#endif
+-
+ static QString checkExecutable( const QString& path, bool ignoreExecBit )
+ {
+-#ifdef Q_WS_MAC
+- QString bundle = getBundle( path, ignoreExecBit );
+- if ( !bundle.isEmpty() ) {
+- //kDebug(180) << "findExe(): returning " << bundle;
+- return bundle;
+- }
+-#endif
+ QFileInfo info( path );
+ QFileInfo orig = info;
+ if( info.exists() && info.isSymLink() )
+@@ -1327,14 +1303,6 @@ int KStandardDirs::findAllExe( QStringLi
+ p = (*it) + '/';
+ p += real_appname;
+
+-#ifdef Q_WS_MAC
+- QString bundle = getBundle( p, (options & IgnoreExecBit) );
+- if ( !bundle.isEmpty() ) {
+- //kDebug(180) << "findExe(): returning " << bundle;
+- list.append( bundle );
+- }
+-#endif
+-
+ info.setFile( p );
+
+ if( info.exists() && ( ( options & IgnoreExecBit ) || info.isExecutable())
+@@ -1636,18 +1604,6 @@ void KStandardDirs::addKDEDefaults()
+ addPrefix(localKdeDir);
+ }
+
+-#ifdef Q_WS_MACX
+- // Adds the "Contents" directory of the current application bundle to
+- // the search path. This way bundled resources can be found.
+- QDir bundleDir(mac_app_filename());
+- if (bundleDir.dirName() == "MacOS") { // just to be sure we're in a bundle
+- bundleDir.cdUp();
+- // now dirName should be "Contents". In there we can find our normal
+- // dir-structure, beginning with "share"
+- addPrefix(bundleDir.absolutePath());
+- }
+-#endif
+-
+ QStringList::ConstIterator end(kdedirList.end());
+ for (QStringList::ConstIterator it = kdedirList.constBegin();
+ it != kdedirList.constEnd(); ++it)
+@@ -1680,11 +1636,7 @@ void KStandardDirs::addKDEDefaults()
+ }
+ else
+ {
+-#ifdef Q_WS_MACX
+- localXdgDir = QDir::homePath() + "/Library/Preferences/XDG/";
+-#else
+ localXdgDir = QDir::homePath() + "/.config/";
+-#endif
+ }
+
+ localXdgDir = KShell::tildeExpand(localXdgDir);
+--- ./kinit/kinit.cpp.orig 2009-09-28 12:38:02 +0200
++++ ./kinit/kinit.cpp 2009-09-28 12:40:02 +0200
+@@ -551,14 +551,7 @@ static pid_t launch(int argc, const char
+ QByteArray procTitle;
+ d.argv = (char **) malloc(sizeof(char *) * (argc+1));
+ d.argv[0] = (char *) _name;
+-#ifdef Q_WS_MAC
+- QString argvexe = s_instance->dirs()->findExe(QString::fromLatin1(d.argv[0]));
+- if (!argvexe.isEmpty()) {
+- QByteArray cstr = argvexe.toLocal8Bit();
+- kDebug(7016) << "kdeinit4: launch() setting argv: " << cstr.data();
+- d.argv[0] = strdup(cstr.data());
+- }
+-#endif
++
+ for (int i = 1; i < argc; i++)
+ {
+ d.argv[i] = (char *) args;
+@@ -627,12 +620,6 @@ static pid_t launch(int argc, const char
+ setup_tty( tty );
+
+ QByteArray executable = execpath;
+-#ifdef Q_WS_MAC
+- QString bundlepath = s_instance->dirs()->findExe(QFile::decodeName(executable));
+- if (!bundlepath.isEmpty())
+- executable = QFile::encodeName(bundlepath);
+-#endif
+-
+ if (!executable.isEmpty())
+ execvp(executable, d.argv);
+
diff --git a/kde-base/kdelibs/files/kdelibs-4.3.1-module-suffix.patch b/kde-base/kdelibs/files/kdelibs-4.3.1-module-suffix.patch
new file mode 100644
index 000000000000..5ec4c2d9f350
--- /dev/null
+++ b/kde-base/kdelibs/files/kdelibs-4.3.1-module-suffix.patch
@@ -0,0 +1,108 @@
+The current approach to load shared objects in KDE4 sucks, so
+just use the cmake provided shared object extensions for the
+KPluginLoader as the preferred extension.
+
+Author: Heiko Przybyl <zuxez@cs.tu-berlin.de>
+
+--- kdelibs-4.3.1/config.h.cmake 2009-02-04 16:44:05 +0100
++++ kdelibs-4.3.1/config.h.cmake 2009-02-04 16:43:43 +0100
+@@ -12,6 +12,7 @@
+ #define kde_socklen_t socklen_t
+
+ #define KDELIBSUFF "${KDELIBSUFF}"
++#define KDE_MODULE_SUFFIX "${CMAKE_SHARED_MODULE_SUFFIX}"
+
+ /****************************/
+
+--- kdelibs-4.3.1/kdecore/util/kpluginloader.cpp 2009-09-28 13:52:23 +0200
++++ kdelibs-4.3.1/kdecore/util/kpluginloader.cpp 2009-09-28 14:57:15 +0200
+@@ -27,6 +27,8 @@
+ #include "klibrary.h"
+ #include <kdebug.h>
+
++#include <config.h>
++
+ #include <QtCore/QLibrary>
+ #include <QtCore/QDir>
+ #include <QtCore/QFileInfo>
+@@ -53,25 +55,37 @@ protected:
+ KLibrary *lib;
+ };
+
+-inline QString makeLibName( const QString &libname )
++inline QString makeLibName( const QString &libname, const QString &type )
+ {
+ #ifdef Q_OS_WIN
+ if (!libname.endsWith(".dll"))
+ return libname + ".dll";
+ return libname;
+-#else
++#else // Q_OS_WIN
+ int pos = libname.lastIndexOf('/');
+ if (pos < 0)
+ pos = 0;
+ if (libname.indexOf('.', pos) < 0) {
+- const char* const extList[] = { ".so", ".dylib", ".bundle", ".sl" };
++#ifdef Q_OS_MAC
++ // Libraries are always .dylib
++ if (type.compare("lib") == 0) {
++ return libname + ".dylib";
++ }
++ // Modules mostly go .bundle but we'll use CMake smartness
++ else {
++ return libname + KDE_MODULE_SUFFIX;
++ }
++#else // Q_OS_MAC
++ // Prefer the value specified by cmake for the target, fall back to standard
++ const char* const extList[] = { KDE_MODULE_SUFFIX, ".so", ".sl" };
+ for (uint i = 0; i < sizeof(extList) / sizeof(*extList); ++i) {
+ if (QLibrary::isLibrary(libname + extList[i]))
+ return libname + extList[i];
+ }
++#endif // Q_OS_MAC
+ }
+ return libname;
+-#endif
++#endif // Q_OS_WIN
+ }
+
+ #ifdef Q_OS_WIN
+@@ -80,13 +94,13 @@ extern QString fixLibPrefix(const QStrin
+
+ QString findLibraryInternal(const QString &name, const KComponentData &cData)
+ {
+- // Convert name to a valid platform libname
+- QString libname = makeLibName(name);
+-
+ QFileInfo fileinfo(name);
+ bool hasPrefix = fileinfo.fileName().startsWith("lib");
+ bool kdeinit = fileinfo.fileName().startsWith("libkdeinit4_");
+
++ // Convert name to a valid platform libname depending on requested type.
++ QString libname = makeLibName(name, kdeinit ? "lib" : "module");
++
+ if (hasPrefix && !kdeinit)
+ kDebug(150) << "plugins should not have a 'lib' prefix:" << libname;
+ #ifdef Q_OS_WIN
+--- kdelibs-4.3.1/kdecore/util/klibloader.cpp 2009-09-28 13:57:03 +0200
++++ kdelibs-4.3.1/kdecore/util/klibloader.cpp 2009-09-28 13:57:46 +0200
+@@ -57,7 +57,7 @@ KLibLoader::~KLibLoader()
+ {
+ }
+
+-extern QString makeLibName( const QString &libname );
++extern QString makeLibName( const QString &libname, const QString &type );
+
+ extern QString findLibrary(const QString &name, const KComponentData &cData);
+
+--- kdelibs-4.3.1/kdecore/util/klibrary.cpp 2009-09-28 13:57:13 +0200
++++ kdelibs-4.3.1/kdecore/util/klibrary.cpp 2009-09-28 13:58:04 +0200
+@@ -27,7 +27,7 @@
+ #include <kpluginfactory.h>
+ #include <kdebug.h>
+
+-extern QString makeLibName( const QString &libname );
++extern QString makeLibName( const QString &libname, const QString &type );
+
+ extern QString findLibraryInternal(const QString &name, const KComponentData &cData);
+
diff --git a/kde-base/kdelibs/files/kdelibs-4.3.2-solaris-fileunix.patch b/kde-base/kdelibs/files/kdelibs-4.3.2-solaris-fileunix.patch
new file mode 100644
index 000000000000..c03620637dc8
--- /dev/null
+++ b/kde-base/kdelibs/files/kdelibs-4.3.2-solaris-fileunix.patch
@@ -0,0 +1,40 @@
+Solaris has no d_type element in dir_ent.
+
+Please refer to
+ https://solaris.bionicmutton.org/hg/kde4-specs-432/rev/be96f7fc958a
+
+--- kioslave/file/file_unix.cpp.orig 2009-03-10 13:26:04.000000000 +0100
++++ kioslave/file/file_unix.cpp 2009-05-04 03:27:15.231305077 +0200
+@@ -42,7 +42,7 @@
+ #include <grp.h>
+ #include <utime.h>
+ #include <pwd.h>
+-
++#include <sys/stat.h>
+ #if defined(HAVE_LIMITS_H)
+ #include <limits.h> // PATH_MAX
+ #endif
+@@ -338,15 +338,20 @@
+ // files where QFile::encodeName(QFile::decodeName(a)) != a.
+ QList<QByteArray> entryNames;
+ KDE_struct_dirent *ep;
++ KDE_struct_stat hajmaep;
+ if (details == 0) {
+ // Fast path (for recursive deletion, mostly)
+ // Simply emit the name and file type, nothing else.
+ while ( ( ep = KDE_readdir( dp ) ) != 0 ) {
+ entry.clear();
+ entry.insert(KIO::UDSEntry::UDS_NAME, QFile::decodeName(ep->d_name));
+- entry.insert(KIO::UDSEntry::UDS_FILE_TYPE,
+- (ep->d_type & DT_DIR) ? S_IFDIR : S_IFREG );
+- if (ep->d_type & DT_LNK) {
++// entry.insert(KIO::UDSEntry::UDS_FILE_TYPE,
++// (ep->d_type & DT_DIR) ? S_IFDIR : S_IFREG );
++KDE_lstat( ep->d_name, &hajmaep );
++entry.insert(KIO::UDSEntry::UDS_FILE_TYPE,
++(S_ISDIR(hajmaep.st_mode)) ? S_IFDIR : S_IFREG );
++// if (ep->d_type & DT_LNK) {
++if (S_ISLNK(hajmaep.st_mode)) {
+ // for symlinks obey the UDSEntry contract and provide UDS_LINK_DEST
+ // even if we don't know the link dest (and DeleteJob doesn't care...)
+ entry.insert(KIO::UDSEntry::UDS_LINK_DEST, QLatin1String("Dummy Link Target"));
diff --git a/kde-base/kdelibs/files/kdelibs-4.3.2-solaris-getgrouplist.patch b/kde-base/kdelibs/files/kdelibs-4.3.2-solaris-getgrouplist.patch
new file mode 100644
index 000000000000..59ab862d5f65
--- /dev/null
+++ b/kde-base/kdelibs/files/kdelibs-4.3.2-solaris-getgrouplist.patch
@@ -0,0 +1,109 @@
+Solaris does not provide getgrouplist().
+
+Please refer to
+ https://solaris.bionicmutton.org/hg/kde4-specs-432/file/539d9ed6c7b5/specs/patches/kdelibs-getgrouplist.diff
+
+--- ./kio/kfile/kpropertiesdialog.cpp.orig Tue Apr 14 23:40:16 2009
++++ ./kio/kfile/kpropertiesdialog.cpp Tue Apr 14 23:40:29 2009
+@@ -141,6 +141,101 @@
+ #endif
+ #endif
+
++/*-
++ * Copyright (c) 1991, 1993
++ * The Regents of the University of California. All rights reserved.
++ *
++ * Redistribution and use in source and binary forms, with or without
++ * modification, are permitted provided that the following conditions
++ * are met:
++ * 1. Redistributions of source code must retain the above copyright
++ * notice, this list of conditions and the following disclaimer.
++ * 2. Redistributions in binary form must reproduce the above copyright
++ * notice, this list of conditions and the following disclaimer in the
++ * documentation and/or other materials provided with the distribution.
++ * 3. All advertising materials mentioning features or use of this software
++ * must display the following acknowledgement:
++ * This product includes software developed by the University of
++ * California, Berkeley and its contributors.
++ * 4. Neither the name of the University nor the names of its contributors
++ * may be used to endorse or promote products derived from this software
++ * without specific prior written permission.
++ *
++ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
++ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
++ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
++ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
++ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
++ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
++ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
++ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
++ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
++ * SUCH DAMAGE.
++ */
++
++#if 0
++#if defined(LIBC_SCCS) && !defined(lint)
++static char sccsid[] = "@(#)getgrouplist.c 8.2 (Berkeley) 12/8/94";
++#endif /* LIBC_SCCS and not lint */
++#include <sys/cdefs.h>
++__FBSDID("$FreeBSD: src/lib/libc/gen/getgrouplist.c,v 1.14 2005/05/03 16:20:03 delphij Exp $");
++#endif
++
++/*
++ * get credential
++ */
++#include <sys/types.h>
++
++#include <grp.h>
++#include <string.h>
++#include <unistd.h>
++
++int
++getgrouplist(const char *uname, gid_t agroup, gid_t *groups, int *grpcnt)
++{
++ const struct group *grp;
++ int i, maxgroups, ngroups, ret;
++
++ ret = 0;
++ ngroups = 0;
++ maxgroups = *grpcnt;
++ /*
++ * When installing primary group, duplicate it;
++ * the first element of groups is the effective gid
++ * and will be overwritten when a setgid file is executed.
++ */
++ groups ? groups[ngroups++] = agroup : ngroups++;
++ if (maxgroups > 1)
++ groups ? groups[ngroups++] = agroup : ngroups++;
++ /*
++ * Scan the group file to find additional groups.
++ */
++ setgrent();
++ while ((grp = getgrent()) != NULL) {
++ if (groups) {
++ for (i = 0; i < ngroups; i++) {
++ if (grp->gr_gid == groups[i])
++ goto skip;
++ }
++ }
++ for (i = 0; grp->gr_mem[i]; i++) {
++ if (!strcmp(grp->gr_mem[i], uname)) {
++ if (ngroups >= maxgroups) {
++ ret = -1;
++ break;
++ }
++ groups ? groups[ngroups++] = grp->gr_gid : ngroups++;
++ break;
++ }
++ }
++skip:
++ ;
++ }
++ endgrent();
++ *grpcnt = ngroups;
++ return (ret);
++}
+ using namespace KDEPrivate;
+
+ static QString nameFromFileName(QString nameStr)
diff --git a/kde-base/kdelibs/files/kdelibs-4.3.2-solaris-ksyscoca.patch b/kde-base/kdelibs/files/kdelibs-4.3.2-solaris-ksyscoca.patch
new file mode 100644
index 000000000000..64da2e6cc900
--- /dev/null
+++ b/kde-base/kdelibs/files/kdelibs-4.3.2-solaris-ksyscoca.patch
@@ -0,0 +1,16 @@
+Desc: Add needed include for mmap() on Solaris.
+Author: Daniel Vergien
+
+--- kdelibs-4.3.2/kdecore/sycoca/ksycoca.cpp.orig 2009-10-14 12:12:45.697358506 +0200
++++ kdelibs-4.3.2/kdecore/sycoca/ksycoca.cpp 2009-10-14 12:13:16.082152232 +0200
+@@ -46,6 +46,10 @@
+
+ #include "ksycocadevices_p.h"
+
++/* needed on solaris 10 for mmap */
++
++#include <sys/mman.h>
++
+ // TODO: remove mmap() from kdewin32 and use QFile::mmap() when needed
+ #ifdef Q_WS_WIN
+ #undef HAVE_MMAP
diff --git a/kde-base/kdelibs/files/kdelibs-4.3.3-klauncher_kdeinit.patch b/kde-base/kdelibs/files/kdelibs-4.3.3-klauncher_kdeinit.patch
new file mode 100644
index 000000000000..24d6f1632f30
--- /dev/null
+++ b/kde-base/kdelibs/files/kdelibs-4.3.3-klauncher_kdeinit.patch
@@ -0,0 +1,31 @@
+Please refer to
+ https://bugs.kde.org/show_bug.cgi?id=209903
+
+ http://bugsfiles.kde.org/attachment.cgi?id=37552
+
+Index: kdelibs-4.3.2/kinit/kinit.cpp
+===================================================================
+--- kdelibs-4.3.2.orig/kinit/kinit.cpp 2009-10-13 07:31:16.000000000 +0200
++++ kdelibs-4.3.2/kinit/kinit.cpp 2009-10-13 07:31:52.000000000 +0200
+@@ -489,6 +489,13 @@
+ init_startup_info( startup_id, name, envc, envs );
+ #endif
+
++ // Don't run this inside the child process, it crashes on OS/X 10.6
++ const QByteArray docPath = QFile::encodeName(KGlobalSettings::documentPath());
++#ifdef Q_WS_MAC
++ QString bundlepath = s_instance->dirs()->findExe(QFile::decodeName(execpath));
++ QString argvexe = s_instance->dirs()->findExe(QString::fromLatin1(_name));
++#endif
++
+ d.errorMsg = 0;
+ d.fork = fork();
+ switch(d.fork) {
+@@ -513,7 +520,6 @@
+ if (cwd && *cwd) {
+ (void)chdir(cwd);
+ } else {
+- const QByteArray docPath = QFile::encodeName(KGlobalSettings::documentPath());
+ (void)chdir(docPath.constData());
+ }
+
diff --git a/kde-base/kdelibs/files/kdelibs-4.3.3-klauncher_kioslave.patch b/kde-base/kdelibs/files/kdelibs-4.3.3-klauncher_kioslave.patch
new file mode 100644
index 000000000000..788e8025a70f
--- /dev/null
+++ b/kde-base/kdelibs/files/kdelibs-4.3.3-klauncher_kioslave.patch
@@ -0,0 +1,77 @@
+Please refer to
+ https://bugs.kde.org/show_bug.cgi?id=209903
+
+ http://www.davidfaure.fr/2009/klauncher_kioslave.diff
+
+Index: klauncher.cpp
+===================================================================
+--- kdelibs-4.3.3/kinit/klauncher.cpp (revision 1034932)
++++ kdelibs-4.3.3/kinit/klauncher.cpp (working copy)
+@@ -621,7 +621,7 @@
+ void
+ KLauncher::requestStart(KLaunchRequest *request)
+ {
+-#ifdef Q_WS_WIN
++#ifdef USE_KPROCESS_FOR_KIOSLAVES
+ requestList.append( request );
+ lastRequest = request;
+
+@@ -1126,12 +1126,15 @@
+ }
+
+ QStringList arg_list;
+-#ifdef Q_WS_WIN
++#ifdef USE_KPROCESS_FOR_KIOSLAVES
+ arg_list << name;
+ arg_list << protocol;
+ arg_list << mConnectionServer.address();
+ arg_list << app_socket;
+ name = KStandardDirs::findExe(QLatin1String("kioslave"));
++#ifdef Q_OS_UNIX
++ QString arg1 = protocol;
++#endif
+ #else
+ QString arg1 = protocol;
+ QString arg2 = mConnectionServer.address();
+@@ -1268,7 +1268,7 @@
+ slave->reparseConfiguration();
+ }
+
+-#ifdef Q_WS_WIN
++#ifdef USE_KPROCESS_FOR_KIOSLAVES
+ void
+ KLauncher::slotGotOutput()
+ {
+Index: klauncher.h
+===================================================================
+--- kdelibs-4.3.3/kinit/klauncher.h (revision 1034932)
++++ kdelibs-4.3.3/kinit/klauncher.h (working copy)
+@@ -31,6 +31,10 @@
+ #include <fixx11h.h>
+ #endif
+
++#if defined(Q_WS_WIN) || defined(Q_WS_MAC)
++#define USE_KPROCESS_FOR_KIOSLAVES
++#endif
++
+ #include <QtCore/QString>
+ #include <QtCore/QSocketNotifier>
+ #include <QtCore/QTimer>
+@@ -105,7 +105,7 @@ public:
+ #endif
+ QStringList envs; // env. variables to be app's environment
+ QString cwd;
+-#ifdef Q_WS_WIN
++#ifdef USE_KPROCESS_FOR_KIOSLAVES
+ protected:
+ KProcess *process;
+ friend class KLauncher;
+@@ -286,7 +290,7 @@
+ void processRequestReturn(int status, const QByteArray &requestData);
+
+ protected Q_SLOTS:
+-#ifdef Q_WS_WIN
++#ifdef USE_KPROCESS_FOR_KIOSLAVES
+ void slotGotOutput();
+ void slotFinished(int exitCode, QProcess::ExitStatus exitStatus);
+ #endif
diff --git a/kde-base/kdelibs/files/kdelibs-4.3.3-klauncher_mac.patch b/kde-base/kdelibs/files/kdelibs-4.3.3-klauncher_mac.patch
new file mode 100644
index 000000000000..83d415703fa9
--- /dev/null
+++ b/kde-base/kdelibs/files/kdelibs-4.3.3-klauncher_mac.patch
@@ -0,0 +1,33 @@
+Please refer to
+ https://bugs.kde.org/show_bug.cgi?id=209903
+
+ http://www.davidfaure.fr/2009/klauncher_mac.diff
+
+Index: klauncher.cpp
+===================================================================
+--- kdelibs-4.3.3/kinit/klauncher.cpp (revision 1034932)
++++ kdelibs-4.3.3/kinit/klauncher.cpp (working copy)
+@@ -1144,6 +1144,12 @@
+ kDebug(7016) << "KLauncher: launching new slave " << name << " with protocol=" << protocol
+ << " args=" << arg_list << endl;
+
++#ifdef Q_WS_MAC
++ arg_list.prepend(KLibLoader::findLibrary(name));
++ name = KStandardDirs::locate("exe", QString::fromLatin1("kioslave"));
++ arg_list.prepend(name);
++#endif
++
+ #ifdef Q_OS_UNIX
+ if (mSlaveDebug == arg1)
+ {
+@@ -1154,8 +1160,10 @@
+ }
+ if (mSlaveValgrind == arg1)
+ {
++#ifndef Q_WS_MAC
+ arg_list.prepend(KLibLoader::findLibrary(name));
+ arg_list.prepend(KStandardDirs::locate("exe", QString::fromLatin1("kioslave")));
++#endif
+ name = QString::fromLatin1("valgrind");
+ if (!mSlaveValgrindSkin.isEmpty()) {
+ arg_list.prepend(QLatin1String("--tool=") + mSlaveValgrindSkin);
diff --git a/kde-base/kdelibs/kdelibs-4.3.4.ebuild b/kde-base/kdelibs/kdelibs-4.3.4.ebuild
index 7ac8bd6ca58d..28d2f7a665f5 100644
--- a/kde-base/kdelibs/kdelibs-4.3.4.ebuild
+++ b/kde-base/kdelibs/kdelibs-4.3.4.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/kde-base/kdelibs/kdelibs-4.3.4.ebuild,v 1.4 2009/12/04 17:51:54 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/kde-base/kdelibs/kdelibs-4.3.4.ebuild,v 1.5 2009/12/22 23:50:11 abcd Exp $
EAPI="2"
@@ -31,25 +31,31 @@ COMMONDEPEND="
media-libs/giflib
media-libs/jpeg
media-libs/libpng
- >=media-sound/phonon-4.3.49[xcb]
- sys-apps/dbus[X]
- sys-libs/libutempter
sys-libs/zlib
- x11-libs/libICE
- x11-libs/libSM
- x11-libs/libX11
- x11-libs/libXau
- x11-libs/libXcursor
- x11-libs/libXdmcp
- x11-libs/libXext
- x11-libs/libXfixes
- x11-libs/libXft
- x11-libs/libXpm
- x11-libs/libXrender
- x11-libs/libXtst
>=x11-misc/shared-mime-info-0.60
acl? ( virtual/acl )
alsa? ( media-libs/alsa-lib )
+ aqua? (
+ >=media-sound/phonon-4.3.49
+ sys-apps/dbus
+ )
+ !aqua? (
+ >=media-sound/phonon-4.3.49[xcb]
+ sys-apps/dbus[X]
+ x11-libs/libICE
+ x11-libs/libSM
+ x11-libs/libX11
+ x11-libs/libXau
+ x11-libs/libXcursor
+ x11-libs/libXdmcp
+ x11-libs/libXext
+ x11-libs/libXfixes
+ x11-libs/libXft
+ x11-libs/libXpm
+ x11-libs/libXrender
+ x11-libs/libXtst
+ !kernel_SunOS? ( sys-libs/libutempter )
+ )
bzip2? ( app-arch/bzip2 )
fam? ( virtual/fam )
jpeg2k? ( media-libs/jasper )
@@ -81,9 +87,11 @@ RDEPEND="${COMMONDEPEND}
!<=kde-misc/kdnssd-avahi-0.1.2:0
!x11-libs/qt-phonon
>=app-crypt/gnupg-2.0.11
- x11-apps/iceauth
- x11-apps/rgb
- >=x11-misc/xdg-utils-1.0.2-r3
+ !aqua? (
+ x11-apps/iceauth
+ x11-apps/rgb
+ >=x11-misc/xdg-utils-1.0.2-r3
+ )
"
PDEPEND="
$(add_kdebase_dep kde-env)
@@ -107,6 +115,11 @@ PATCHES=(
"${FILESDIR}/dist/01_gentoo_set_xdg_menu_prefix.patch"
"${FILESDIR}/dist/02_gentoo_append_xdg_config_dirs.patch"
"${FILESDIR}/dist/23_solid_no_double_build.patch"
+ "${FILESDIR}/${PN}-4.3.1-module-suffix.patch"
+ "${FILESDIR}/${PN}-4.3.1-macos-unbundle.patch"
+ "${FILESDIR}/${PN}-4.3.3-klauncher_kdeinit.patch"
+ "${FILESDIR}/${PN}-4.3.3-klauncher_kioslave.patch"
+ "${FILESDIR}/${PN}-4.3.3-klauncher_mac.patch"
)
src_prepare() {
@@ -123,26 +136,68 @@ src_prepare() {
# kde-base/libknotificationitem for now
sed -e "/macro_optional_add_subdirectory( experimental )/ s:^:#:" \
-i CMakeLists.txt || die "Failed to sed-out experimental."
+
+ if use aqua; then
+ sed -i -e \
+ "s:BUNDLE_INSTALL_DIR \"/Applications:BUNDLE_INSTALL_DIR \"${EPREFIX}/${APP_BUNDLE_DIR}:g" \
+ cmake/modules/FindKDE4Internal.cmake || die "failed to sed FindKDE4Internal.cmake"
+
+ #if [[ ${CHOST} == *-darwin8 ]]; then
+ sed -i -e \
+ "s:set(_add_executable_param MACOSX_BUNDLE):remove(_add_executable_param MACOSX_BUNDLE):g" \
+ cmake/modules/KDE4Macros.cmake || die "failed to sed KDE4Macros.cmake"
+ #fi
+
+ # solid/solid/backends/iokit doesn't properly link, so disable it.
+ sed -e "s|\(APPLE\)|(FALSE)|g" -i solid/solid/CMakeLists.txt \
+ || die "disabling solid/solid/backends/iokit failed"
+ sed -e "s|m_backend = .*Backends::IOKit.*;|m_backend = 0;|g" -i solid/solid/managerbase.cpp \
+ || die "disabling solid/solid/backends/iokit failed"
+
+ # There's no fdatasync on OSX and the check fails to detect that.
+ sed -e "/HAVE_FDATASYNC/ d" -i config.h.cmake \
+ || die "disabling fdatasync failed"
+
+ # Fix nameser include to nameser8_compat
+ sed -e "s|nameser8_compat.h|nameser_compat.h|g" -i kio/misc/kpac/discovery.cpp \
+ || die "fixing nameser include failed"
+ append-flags -DHAVE_ARPA_NAMESER8_COMPAT_H=1
+
+ # Try to fix kkeyserver_mac
+ epatch "${FILESDIR}"/${PN}-4.3.1-kdeui_util_kkeyserver_mac.patch
+
+ # Workaround the problem with
+ # USING_FORK_WITHOUT_EXEC_IS_NOT_SUPPORTED_BY_FILE_MANAGER
+ #epatch "${FILESDIR}/${PN}-4.3.1-macos-kinit-fork.patch"
+ fi
+
+ if [[ ${CHOST} == *-solaris* ]] ; then
+ epatch "${FILESDIR}/kdelibs-4.3.2-solaris-ksyscoca.patch"
+ # getgrouplist not in solaris libc
+ epatch "${FILESDIR}/kdelibs-4.3.2-solaris-getgrouplist.patch"
+ # solaris has no d_type element in dir_ent
+ epatch "${FILESDIR}/kdelibs-4.3.2-solaris-fileunix.patch"
+ fi
}
src_configure() {
if use zeroconf; then
if has_version net-dns/avahi; then
- mycmakeargs="${mycmakeargs} -DWITH_Avahi=ON -DWITH_DNSSD=OFF"
+ mycmakeargs=(-DWITH_Avahi=ON -DWITH_DNSSD=OFF)
elif has_version net-misc/mDNSResponder; then
- mycmakeargs="${mycmakeargs} -DWITH_Avahi=OFF -DWITH_DNSSD=ON"
+ mycmakeargs=(-DWITH_Avahi=OFF -DWITH_DNSSD=ON)
else
die "USE=\"zeroconf\" enabled but neither net-dns/avahi nor net-misc/mDNSResponder were found."
fi
else
- mycmakeargs="${mycmakeargs} -DWITH_Avahi=OFF -DWITH_DNSSD=OFF"
+ mycmakeargs=(-DWITH_Avahi=OFF -DWITH_DNSSD=OFF)
fi
if use kdeprefix; then
HME=".kde${SLOT}"
else
HME=".kde4"
fi
- mycmakeargs="${mycmakeargs}
+ mycmakeargs+=(
-DWITH_HSPELL=OFF
-DKDE_DEFAULT_HOME=${HME}
$(cmake-utils_use_build handbook doc)
@@ -165,7 +220,7 @@ src_configure() {
$(cmake-utils_use_with spell ASPELL)
$(cmake-utils_use_with spell ENCHANT)
$(cmake-utils_use_with ssl OpenSSL)
- "
+ )
kde4-base_src_configure
}
@@ -189,10 +244,30 @@ src_install() {
docinto /HTML/en/kdelibs-apidox
dohtml -r ${P}-apidocs/* || die "Install phase of KDE4 API Documentation failed"
fi
+
+ if use aqua; then
+ einfo "fixing ${PN} plugins"
+
+ local _PV=${PV:0:3}.0
+ local _dir=${EKDEDIR}/$(get_libdir)/kde4/plugins/script
+
+ install_name_tool -id \
+ "${_dir}/libkrossqtsplugin.${_PV}.dylib" \
+ "${D}/${_dir}/libkrossqtsplugin.${_PV}.dylib" \
+ || die "failed fixing libkrossqtsplugin.${_PV}.dylib"
+
+ einfo "fixing ${PN} cmake detection files"
+ #sed -i -e \
+ # "s:if (HAVE_XKB):if (HAVE_XKB AND NOT APPLE):g" \
+ echo -e "set(XKB_FOUND FALSE)\nset(HAVE_XKB FALSE)" > \
+ "${ED}"/${KDEDIR}/share/apps/cmake/modules/FindXKB.cmake \
+ || die "failed fixing FindXKB.cmake"
+ fi
}
pkg_postinst() {
fdo-mime_mime_database_update
+
if use zeroconf; then
echo
elog "To make zeroconf support available in KDE make sure that the 'mdnsd' daemon"
@@ -204,19 +279,23 @@ pkg_postinst() {
einfo " hosts: files mdns dns"
echo
fi
- elog "Your homedir is set to "'${HOME}'"/${HME}"
- elog
- local config_path="${ROOT}usr/share/config"
- [[ ${PREFIX} != "${ROOT}usr" ]] && config_path+=" ${PREFIX}/share/config"
- elog "If you experience weird application behavior (missing texts, etc.) run as root:"
- elog "# chmod go+rX -R ${config_path}"
+
+ elog "Your homedir is set to \${HOME}/${HME}"
+ echo
+
+ if ! has_version sys-apps/hal; then
+ echo
+ ewarn "You need sys-apps/hal for new device notifications, power management and any"
+ ewarn "other hardware related functionalities to work."
+ echo
+ fi
kde4-base_pkg_postinst
}
pkg_prerm() {
# Remove ksycoca4 global database
- rm -f "${PREFIX}"/share/kde4/services/ksycoca4
+ rm -f "${EROOT}${PREFIX}"/share/kde4/services/ksycoca4
}
pkg_postrm() {