Magellan Linux

Annotation of /trunk/kdebindings4/patches/kdebindings4-4.5.1-pyqt4.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1170 - (hide annotations) (download)
Mon Oct 11 19:08:39 2010 UTC (13 years, 7 months ago) by niro
File size: 4075 byte(s)
serveral build fixes
1 niro 1170 diff -Naur kdebindings-4.5.1/python/pykde4/sip/kdecore/typedefs.sip kdebindings-4.5.1-magellan/python/pykde4/sip/kdecore/typedefs.sip
2     --- kdebindings-4.5.1/python/pykde4/sip/kdecore/typedefs.sip 2010-01-20 17:25:59.000000000 +0100
3     +++ kdebindings-4.5.1-magellan/python/pykde4/sip/kdecore/typedefs.sip 2010-10-11 20:59:48.000000000 +0200
4     @@ -733,61 +733,6 @@
5     };
6    
7    
8     -%MappedType QList<uint>
9     -{
10     -%TypeHeaderCode
11     -#include <qlist.h>
12     -%End
13     -
14     -%ConvertFromTypeCode
15     - // Create the list.
16     - PyObject *l;
17     -
18     - if ((l = PyList_New(sipCpp->size())) == NULL)
19     - return NULL;
20     -
21     - // Set the list elements.
22     - for (int i = 0; i < sipCpp->size(); ++i) {
23     - PyObject *pobj;
24     -
25     -#if PY_MAJOR_VERSION >= 3
26     - if ((pobj = PyLong_FromLong(sipCpp->value(i))) == NULL) {
27     -#else
28     - if ((pobj = PyInt_FromLong(sipCpp->value(i))) == NULL) {
29     -#endif
30     - Py_DECREF(l);
31     -
32     - return NULL;
33     - }
34     -
35     - PyList_SET_ITEM(l, i, pobj);
36     - }
37     -
38     - return l;
39     -%End
40     -
41     -%ConvertToTypeCode
42     - // Check the type if that is all that is required.
43     - if (sipIsErr == NULL)
44     - return PyList_Check(sipPy);
45     -
46     - QList<uint> *ql = new QList<uint>;
47     -
48     - for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i) {
49     -#if PY_MAJOR_VERSION >= 3
50     - ql->append(PyLong_AsLong(PyList_GET_ITEM(sipPy, i)));
51     -#else
52     - ql->append(PyInt_AsLong(PyList_GET_ITEM(sipPy, i)));
53     -#endif
54     - }
55     -
56     - *sipCppPtr = ql;
57     -
58     - return sipGetState(sipTransferObj);
59     -%End
60     -};
61     -
62     -
63     template <TYPE*>
64     %MappedType QStack<TYPE*>
65     {
66     diff -Naur kdebindings-4.5.1/ruby/CMakeLists.txt kdebindings-4.5.1-magellan/ruby/CMakeLists.txt
67     --- kdebindings-4.5.1/ruby/CMakeLists.txt 2010-08-27 10:11:01.000000000 +0200
68     +++ kdebindings-4.5.1-magellan/ruby/CMakeLists.txt 2010-10-11 20:55:05.000000000 +0200
69     @@ -74,9 +74,9 @@
70     #include <ruby.h>
71     int main() { ruby_init(); return 0; }" RubyCompiles)
72     if(RubyCompiles)
73     - if(ENABLE_KROSSRUBY AND RUBY_VERSION_MAJOR = 1 AND RUBY_VERSION_MINOR < 9)
74     + if(ENABLE_KROSSRUBY AND RUBY_VERSION_MAJOR EQUAL 1 AND RUBY_VERSION_MINOR LESS 9)
75     set(BUILD_KrossRuby TRUE)
76     - endif(ENABLE_KROSSRUBY AND RUBY_VERSION_MAJOR = 1 AND RUBY_VERSION_MINOR < 9)
77     + endif(ENABLE_KROSSRUBY AND RUBY_VERSION_MAJOR EQUAL 1 AND RUBY_VERSION_MINOR LESS 9)
78     else(RubyCompiles)
79     message(STATUS "Failed to compile a C++ program that embeds ruby.")
80     endif(RubyCompiles)
81     diff -Naur kdebindings-4.5.1/ruby/korundum/src/krubypluginfactory.cpp kdebindings-4.5.1-magellan/ruby/korundum/src/krubypluginfactory.cpp
82     --- kdebindings-4.5.1/ruby/korundum/src/krubypluginfactory.cpp 2010-07-07 19:11:01.000000000 +0200
83     +++ kdebindings-4.5.1-magellan/ruby/korundum/src/krubypluginfactory.cpp 2010-10-11 20:53:53.000000000 +0200
84     @@ -51,17 +51,18 @@
85     VALUE info = rb_gv_get("$!");
86     VALUE bt = rb_funcall(info, rb_intern("backtrace"), 0);
87     VALUE message = RARRAY_PTR(bt)[0];
88     + VALUE obj_string = rb_obj_as_string(info);
89    
90     QString errormessage = QString("%1: %2 (%3)")
91     - .arg( STR2CSTR(message) )
92     - .arg( STR2CSTR(rb_obj_as_string(info)) )
93     - .arg( rb_class2name(CLASS_OF(info)) );
94     + .arg( QString::fromLatin1(StringValuePtr(message)) )
95     + .arg( QString::fromLatin1(StringValuePtr(obj_string)) )
96     + .arg( QString::fromLatin1(rb_class2name(CLASS_OF(info))) );
97     fprintf(stderr, "%s\n", errormessage.toLatin1().constData());
98    
99     QString tracemessage;
100     for(int i = 1; i < RARRAY_LEN(bt); ++i) {
101     if( TYPE(RARRAY_PTR(bt)[i]) == T_STRING ) {
102     - QString s = QString("%1\n").arg( STR2CSTR(RARRAY_PTR(bt)[i]) );
103     + QString s = QString("%1\n").arg( QString::fromLatin1(StringValuePtr(RARRAY_PTR(bt)[i])) );
104     Q_ASSERT( ! s.isNull() );
105     tracemessage += s;
106     fprintf(stderr, "\t%s", s.toLatin1().constData());