Gentoo Archives: gentoo-commits

From: "Dror Levin (spatz)" <spatz@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in kde-base/kdelibs/files: kdelibs-4.4.66-macos-unbundle.patch
Date: Tue, 30 Mar 2010 20:44:01
Message-Id: E1NwiI2-0000Hf-8y@stork.gentoo.org
1 spatz 10/03/30 20:43:58
2
3 Added: kdelibs-4.4.66-macos-unbundle.patch
4 Log:
5 Version bump KDE 4.4.2
6 (Portage version: 2.2_rc67/cvs/Linux x86_64, RepoMan options: --force)
7
8 Revision Changes Path
9 1.1 kde-base/kdelibs/files/kdelibs-4.4.66-macos-unbundle.patch
10
11 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/kde-base/kdelibs/files/kdelibs-4.4.66-macos-unbundle.patch?rev=1.1&view=markup
12 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/kde-base/kdelibs/files/kdelibs-4.4.66-macos-unbundle.patch?rev=1.1&content-type=text/plain
13
14 Index: kdelibs-4.4.66-macos-unbundle.patch
15 ===================================================================
16 KDE is smart, too smart. We don't want application bundles. And since our Qt is
17 configured to not build application bundles, since wouldn't even work. So this
18 patch disables KDE's smartness regarding application bundles.
19
20 Author: Heiko Przybyl <zuxez@××××××××××××.de>
21
22 --- kdelibs-4.3.1/kdecore/kernel/kstandarddirs.cpp.orig 2009-09-28 02:05:37 +0200
23 +++ kdelibs-4.3.1/kdecore/kernel/kstandarddirs.cpp 2009-09-28 02:22:20 +0200
24 @@ -1327,14 +1303,6 @@ int KStandardDirs::findAllExe( QStringLi
25 p = (*it) + '/';
26 p += real_appname;
27
28 -#ifdef Q_WS_MAC
29 - QString bundle = getBundle( p, (options & IgnoreExecBit) );
30 - if ( !bundle.isEmpty() ) {
31 - //kDebug(180) << "findExe(): returning " << bundle;
32 - list.append( bundle );
33 - }
34 -#endif
35 -
36 info.setFile( p );
37
38 if( info.exists() && ( ( options & IgnoreExecBit ) || info.isExecutable())
39 @@ -1636,18 +1604,6 @@ void KStandardDirs::addKDEDefaults()
40 addPrefix(localKdeDir);
41 }
42
43 -#ifdef Q_WS_MACX
44 - // Adds the "Contents" directory of the current application bundle to
45 - // the search path. This way bundled resources can be found.
46 - QDir bundleDir(mac_app_filename());
47 - if (bundleDir.dirName() == "MacOS") { // just to be sure we're in a bundle
48 - bundleDir.cdUp();
49 - // now dirName should be "Contents". In there we can find our normal
50 - // dir-structure, beginning with "share"
51 - addPrefix(bundleDir.absolutePath());
52 - }
53 -#endif
54 -
55 QStringList::ConstIterator end(kdedirList.end());
56 for (QStringList::ConstIterator it = kdedirList.constBegin();
57 it != kdedirList.constEnd(); ++it)
58 @@ -1680,11 +1636,7 @@ void KStandardDirs::addKDEDefaults()
59 }
60 else
61 {
62 -#ifdef Q_WS_MACX
63 - localXdgDir = QDir::homePath() + "/Library/Preferences/XDG/";
64 -#else
65 localXdgDir = QDir::homePath() + "/.config/";
66 -#endif
67 }
68
69 localXdgDir = KShell::tildeExpand(localXdgDir);
70 --- ./kinit/kinit.cpp.orig 2009-09-28 12:38:02 +0200
71 +++ ./kinit/kinit.cpp 2009-09-28 12:40:02 +0200
72 @@ -551,14 +551,7 @@ static pid_t launch(int argc, const char
73 QByteArray procTitle;
74 d.argv = (char **) malloc(sizeof(char *) * (argc+1));
75 d.argv[0] = (char *) _name;
76 -#ifdef Q_WS_MAC
77 - QString argvexe = s_instance->dirs()->findExe(QString::fromLatin1(d.argv[0]));
78 - if (!argvexe.isEmpty()) {
79 - QByteArray cstr = argvexe.toLocal8Bit();
80 - kDebug(7016) << "kdeinit4: launch() setting argv: " << cstr.data();
81 - d.argv[0] = strdup(cstr.data());
82 - }
83 -#endif
84 +
85 for (int i = 1; i < argc; i++)
86 {
87 d.argv[i] = (char *) args;
88 @@ -627,12 +620,6 @@ static pid_t launch(int argc, const char
89 setup_tty( tty );
90
91 QByteArray executable = execpath;
92 -#ifdef Q_WS_MAC
93 - QString bundlepath = s_instance->dirs()->findExe(QFile::decodeName(executable));
94 - if (!bundlepath.isEmpty())
95 - executable = QFile::encodeName(bundlepath);
96 -#endif
97 -
98 if (!executable.isEmpty())
99 execvp(executable, d.argv);
100
101 --- kdelibs-9999/kdecore/kernel/kstandarddirs.cpp.orig 2010-03-06 15:47:40.108111613 +0100
102 +++ kdelibs-9999/kdecore/kernel/kstandarddirs.cpp 2010-03-06 23:17:01.853905357 +0100
103 @@ -1207,41 +1207,8 @@
104 return exePaths;
105 }
106
107 -#ifdef Q_WS_MAC
108 -static QString getBundle( const QString& path, bool ignore )
109 -{
110 - kDebug(180) << "getBundle(" << path << ", " << ignore << ") called";
111 - QFileInfo info;
112 - QString bundle = path;
113 - bundle += ".app/Contents/MacOS/" + bundle.section('/', -1);
114 - info.setFile( bundle );
115 - FILE *file;
116 - if (file = fopen(info.absoluteFilePath().toUtf8().constData(), "r")) {
117 - fclose(file);
118 - struct stat _stat;
119 - if ((stat(info.absoluteFilePath().toUtf8().constData(), &_stat)) < 0) {
120 - return QString();
121 - }
122 - if ( ignore || (_stat.st_mode & S_IXUSR) ) {
123 - if ( ((_stat.st_mode & S_IFMT) == S_IFREG) || ((_stat.st_mode & S_IFMT) == S_IFLNK) ) {
124 - kDebug(180) << "getBundle(): returning " << bundle;
125 - return bundle;
126 - }
127 - }
128 - }
129 - return QString();
130 -}
131 -#endif
132 -
133 static QString checkExecutable( const QString& path, bool ignoreExecBit )
134 {
135 -#ifdef Q_WS_MAC
136 - QString bundle = getBundle( path, ignoreExecBit );
137 - if ( !bundle.isEmpty() ) {
138 - //kDebug(180) << "findExe(): returning " << bundle;
139 - return bundle;
140 - }
141 -#endif
142 QFileInfo info( path );
143 QFileInfo orig = info;
144 #if defined(Q_OS_DARWIN) || defined(Q_OS_MAC)