How to build KDE4 on OpenSolaris (note this are not proper fixes, just a way to 
have
KDE4 running):

First make sure to have SunStudio 12 with the latest patches, you will
have to use Stefan Teleman's CXXFLAGS (I also had to add 
-D_RWSTD_USE_CONFIG to it).

1. You'll have to build the following libraries (remember all C++ files
have to be built with stdcxx)
  a) stdcxx (rename /opt/stdcxx/include/config.h to rwstd_config.h, and change
   rw/_config.h to use that)
  b) qt4.3.1 (if you want anti-alias in qt apps, modify /etc/fonts/font.conf by
   removing blocks that disable anti-alias, they seem to affect all qt apps)
  c) boost1.34.1
  d) libungif
  e) berkleydb, raptor, redland (make sure redland finds berkleydb)
  f) panoromaxiext, libXinerama
  g) gnupg, libgpg-error, gpgme
  h) cmake
  i) OPTIONAL - clucene (you'll have to mod .h's for ...Hits::doc, 
..TermInfo::set
   and ...::Term because they have "const someType" in the header and
   just "someType" in .cpp resulting in UNDEF symbols in .so

2. Backup /opt/cmake/share/cmake-2.4/Modules/Platform/SunOS.make 
and modify it so that all CMAKE_CXX_FLAGS*_INIT have Stefan's CXXFLAGS

3. In some dir with enough free space:
svn checkout svn://anonsvn.kde.org/home/kde/trunk/kdesupport/
svn checkout svn://anonsvn.kde.org/home/kde/trunk/KDE/kdelibs
svn checkout svn://anonsvn.kde.org/home/kde/trunk/KDE/kdepimlibs
svn checkout svn://anonsvn.kde.org/home/kde/trunk/KDE/kdebase

4. Building kdesupport
mkdir kdesupport-build && cd kdesupport-build
cmake -DCMAKE_INSTALL_PREFIX=/opt/kde4 ../kdesupport 

modify:

eigent/test/main.h:
#define min(a, b)               ((a) > (b) ? (b) : (a))
and use that instead of std::min

eigen/src/vectorbase.h:
the same

strigidaemonconfiguration.h, metadataproperties.h (#include <ostream>)

then just compile and add string.h & stdlib.h as required to several more files:
KmpSearcherTest.cpp, zipinputstream.cpp, streambase.h, tarinputstream.cpp,
textutils.cpp, dummyindexwriter.h, asyncsocket.cpp, daemonconfigurator.cpp,
odfmimetypelineanalyzer.cpp, odfsaxanalyzer.cpp, helperendanalyzer.cpp,
fieldpropertiesdb.cpp

now there's one problematic file:
strigi/src/streams/archivereader.cpp: the source of the problem here is 
using an incomplete type (SubEntry refers to itself), I just went on disabling
the cache by commenting out the usages of "entries" there..

fire up gmake -j4 and you should have a successful build.


5. Building kde-libs:
mkdir kdelibs-build && cd kdelibs-build
cmake -DCMAKE_INSTALL_PREFIX=/opt/kde4 ../kdelibs

modify:

kdeui/icons/kpixmapcache.cpp:
 +extern "C" int madvise(caddr_t, size_t, int);

kjs/number_object.cpp, kjs/kjs.cpp, kjs/wtf/Vector.h:
+#include <string.h>

khtml/khtml_part.cpp:
instead of:
khtml::RenderPart *renderPart = d->m_frame ? d->m_frame->m_frame : 0L; 
                                                     
just do an explicit if check and define it:
    if (d->m_frame) {                                                        
                                                   
      khtml::RenderPart *renderPart = d->m_frame->m_frame;    
       .... 
    }

khtml/ecma/kjs_binding.h:
-      friend ObjectImp* KJS_GCC_ROOT_NS_HACK 
cacheGlobalObject<ClassProto>(ExecState *exec, const Identifier 
&propertyName); \  
+      friend ObjectImp* cacheGlobalObject<ClassProto>(ExecState *exec, 
const Identifier &propertyName); \                      
and 
-          return ::cacheGlobalObject<ClassProto>(exec, *name()); \       
                                                       
+          return cacheGlobalObject<ClassProto>(exec, *name()); \       

khtml/ecma/kjs_css.cpp:
-            styleDecl.setProperty(pId, DOM::DOMString(propvalue), "", 
exception);                                               
+            styleDecl.setProperty(pId, DOM::DOMString(propvalue), "");         
                                                 
and
-            styleDecl.setProperty(pId, DOM::DOMString(propvalue.left(important 
- 1)), "important", exception);                  
+            styleDecl.setProperty(pId, DOM::DOMString(propvalue.left(important 
- 1)), "important");     

khtml/xml/dom_elementimpl.h:
-    DOMStringImpl *val() const { return m_attrId ? m_data.value : 
m_data.attr->val(); }                                         
+    DOMStringImpl *val() const { return m_attrId ? 
(DOMStringImpl*)m_data.value : (DOMStringImpl*)m_data.attr->val(); }

kjs/lookup.h:
move the cacheGlobal object into the KJS namespace, and:
-    friend KJS::JSObject *KJS_GCC_ROOT_NS_HACK 
cacheGlobalObject<ClassProto>(KJS::ExecState *exec, const KJS::Identifier 
&proper
tyName); \                                                                      
                                                 
+    friend KJS::JSObject* 
KJS::cacheGlobalObject<ClassProto>(KJS::ExecState *exec, const 
KJS::Identifier &propertyName); \      

(there'll be two occurences of the above)
and:
-      return ::cacheGlobalObject<ClassProto>(exec, *name()); \           
                                                       
+      return KJS::cacheGlobalObject<ClassProto>(exec, *name()); \    

add to kdelibs-build/kioslave/file/CMakeFiles/kio_file.dir/link.txt:
-lvolmgmt

now run gmake -j4, and you should have kdelibs up.

6. Building kdepimlibs:
mkdir kdepimlibs-build && cd kdepimlibs-build
cmake -DCMAKE_INSTALL_PREFIX=/opt/kde4 ../kdepimlibs

kpimidentities/identitymanager.cpp
-#include <QtDBus>  
+#include <QtDBus/QtDBus>                                                 
                                                       

gpgme++/result_p.h:
-#define make_isNull(x) bool GpgME::x::isNull() const { return !d && !error(); 
}                                                 
+#define make_isNull(x) bool GpgME::x::isNull() const { return !d && error() == 
false; }

gpgme++/keygenerationresult.cpp, gpgme++/decryptionresult.cpp, 
gpgme++/importresult.cpp,
gpgme++/callbacks.cpp, gpgme++/callbacks.cpp, gpgme++/verificationresult.cpp,
gpgme++/encryptionresult.cpp, gpgme++/signingresult.cpp:
+ #include <string.h>

gpgme++/keylistresult.cpp:
-  if ( !error() ) // only merge the error when there was none yet.             
                                                 
+  if ( error() == false ) // only merge the error when there was none yet.

gpgme++/data.h:
+#include <stdio.h> 

now run gmake -j4, you should have kdepimlibs
--
This message posted from opensolaris.org

Reply via email to