[PyKDE] Compiling sip 4.1.1, PyQt 3.13, PyKDE 3.11.3 on Solaris 8micro-Howto

Jim Bublitz jbublitz at nwinternet.com
Fri Mar 4 16:57:56 GMT 2005


On Friday 04 March 2005 05:01, Holger Joukl wrote:
> PyKDE-3.11.3:
> -------------
> 1. Apply a "patch" to PyKDE I found on the mailing list which adds support
> for
> KDE 3.3.2 (by using the 3.3.0 stuff):
>
>     for i in `find | grep kde330 | grep diff`; do
>         echo $i
>         mv -f $i `echo $i | sed 's/330/332/'`
>     done

KDE3.3.2 support is in the snapshots. configure.py has also been modified so 
that subsequent KDE releases will still attempt to build when the version is 
newer than what PyKDE knows about (will usually work).

> 2. Modify pykde configure.py:
> <configure.py>
> ...
>    664  #    if extra_lib not in ["kfile"] and extra_lib:
>    665      makefile.extra_libs.append(extra_lib)
>    666
>    667      # Hm, have to link libkdecore.so for kdefx, otherwise:
>    668      #  kdefx.so: symbol _._4KURL: referenced symbol not found
>    669      # c++filt _._4KURL --> KURL::~KURL(void)
>    670      if extra_lib == "kdefx":
>    671          makefile.extra_libs.append("kdecore")
>    672
> ...
> </configure.py>

This hasn't been a problem anywhere else. It's a fairly simple change to 
configure.py. It'll be in the next snapshot.

> 3. Run configure.py
> 4. Manually change generated file PyKDE-3.11.3/kdecore/sipkdecorepart0.cpp.
> Line numbers might differ for you (?), but the relevant function is
> meth_KStartupInfoData_pids:
>
> <sipkdecorepart0.cpp>
> ...
> 48621  static PyObject *meth_KStartupInfoData_pids(PyObject
> *sipSelf,PyObject *sipArgs)
>  48622  {
>  48623          int sipArgsParsed = 0;
>  48624
>  48625          {
>  48626                  KStartupInfoData *sipCpp;
>  48627
>  48628                  if
> (sipParseArgs(&sipArgsParsed,sipArgs,"m",sipSelf,sipClass_KStartupInfoData,
>&sipCpp)) 48629                  {
>  48630                          const QValueList<int> *sipRes;
>  48631
>  48632                          // sipRes = &sipCpp ->
> KStartupInfoData::pids();
>  48633                          sipRes = reinterpret_cast<const
> QValueList<int> *>( &sipCpp -> KStartupInfoData::pids() );
>  48634
>  48635                          PyObject *sipResObj =
> sipConvertFrom_QValueList_1800(const_cast<QValueList<int> *>(sipRes));
>  48636
>  48637                          return sipResObj;
>  48638                  }
>  48639          }
> ...
> </sipkdecorepart0.cpp>

This is in the 20050301 snapshot, which should be up soon.


> 2. Change sip-4.1.1/sipgen/gencode.c to use C-style casts instead of static
> casts:
> <gencode.c>
> ...
>  4002                                  else if (res -> atype == enum_type
> && isProtectedEnum(res -> u.ed))
>  4003                                  {
>  4004
> //prcode(fp,"static_cast<%E>(",res -> u.ed);
>  4005                                          // C-style cast
>  4006                                          prcode(fp,"(%E) (",res ->
> u.ed);
>  4007                                          incast = TRUE;
>  4008                                  }
> ...
> </gencode.c>
>
> Rebuild & reinstall sip!

Phil will have to look at this one.

> -QValueList<long> is not defined in
> PyQt-x11-gpl-3.13/sip/qt/qvaluelist..sip

It's now in PyKDE/sip/dcop/typedefs.sip

> B.t.w.: Should be addressed in the latest PyKDE snapshot 20050301 announced
> by Jim Bublitz,
> but it is not up on riverbankcomputing.co.uk until now (?)

Yeah - looks like Phil is away at the moment, so will probably be another few 
days.

> After a closer look at the build system I still wonder if it is possible to
> set certain build
> options for pykde (or pyqt) specifically. It seems that all the extra
> build_macros can only be
> set for sip (and will then be reused by pyqt/pykde). But I do not want
> libkdecore.so as extra
> library for everything, so I did not see another way than modifying pykde´s
> configure.py

Should be able to add the kdecore link in the  generate_code function.

Thanks! Looks like the only change left should be linking in kdecore.

Jim




More information about the PyQt mailing list