summaryrefslogtreecommitdiffstats
path: root/source/kde/kdebindings
diff options
context:
space:
mode:
Diffstat (limited to 'source/kde/kdebindings')
-rw-r--r--source/kde/kdebindings/kdebindings-len-ptr-rfloat.diff207
-rw-r--r--source/kde/kdebindings/kdebindings-ruby-env.h.diff139
-rw-r--r--source/kde/kdebindings/kdebindings-rubyconfig.h.diff20
-rwxr-xr-xsource/kde/kdebindings/kdebindings.SlackBuild18
-rw-r--r--source/kde/kdebindings/local.options1
-rw-r--r--source/kde/kdebindings/slack-desc6
6 files changed, 381 insertions, 10 deletions
diff --git a/source/kde/kdebindings/kdebindings-len-ptr-rfloat.diff b/source/kde/kdebindings/kdebindings-len-ptr-rfloat.diff
new file mode 100644
index 000000000..0f2edc125
--- /dev/null
+++ b/source/kde/kdebindings/kdebindings-len-ptr-rfloat.diff
@@ -0,0 +1,207 @@
+--- kdebindings-4.3.0/ruby/krossruby/rubyfunction.h.org 2008-07-29 05:47:40.000000000 -0600
++++ kdebindings-4.3.0/ruby/krossruby/rubyfunction.h 2009-08-09 03:04:00.105143195 -0600
+@@ -88,11 +88,11 @@
+ //#endif
+ VALUE info = rb_gv_get("$!");
+ VALUE bt = rb_funcall(info, rb_intern("backtrace"), 0);
+- VALUE message = RARRAY(bt)->ptr[0];
++ VALUE message = RARRAY_PTR(bt)[0];
+ fprintf(stderr,"%s: %s (%s)\n", STR2CSTR(message), STR2CSTR(rb_obj_as_string(info)), rb_class2name(CLASS_OF(info)));
+- for(int i = 1; i < RARRAY(bt)->len; ++i)
+- if( TYPE(RARRAY(bt)->ptr[i]) == T_STRING )
+- fprintf(stderr,"\tfrom %s\n", STR2CSTR(RARRAY(bt)->ptr[i]));
++ for(int i = 1; i < RARRAY_LEN(bt); ++i)
++ if( TYPE(RARRAY_PTR(bt)[i]) == T_STRING )
++ fprintf(stderr,"\tfrom %s\n", STR2CSTR(RARRAY_PTR(bt)[i]));
+ //ruby_nerrs++;
+ return Qnil;
+ }
+--- kdebindings-4.3.0/ruby/krossruby/rubyobject.cpp.org 2008-06-18 06:41:05.000000000 -0600
++++ kdebindings-4.3.0/ruby/krossruby/rubyobject.cpp 2009-08-08 21:55:21.209147733 -0600
+@@ -34,7 +34,7 @@
+
+ VALUE info = rb_gv_get("$!");
+ VALUE bt = rb_funcall(info, rb_intern("backtrace"), 0);
+- VALUE message = RARRAY(bt)->ptr[0];
++ VALUE message = RARRAY_PTR(bt)[0];
+
+ QString errormessage = QString("%1: %2 (%3)")
+ .arg( STR2CSTR(message) )
+@@ -43,9 +43,9 @@
+ fprintf(stderr, "%s\n", errormessage.toLatin1().data());
+
+ QString tracemessage;
+- for(int i = 1; i < RARRAY(bt)->len; ++i) {
+- if( TYPE(RARRAY(bt)->ptr[i]) == T_STRING ) {
+- QString s = QString("%1\n").arg( STR2CSTR(RARRAY(bt)->ptr[i]) );
++ for(int i = 1; i < RARRAY_LEN(bt); ++i) {
++ if( TYPE(RARRAY_PTR(bt)[i]) == T_STRING ) {
++ QString s = QString("%1\n").arg( STR2CSTR(RARRAY_PTR(bt)[i]) );
+ Q_ASSERT( ! s.isNull() );
+ tracemessage += s;
+ fprintf(stderr, "\t%s", s.toLatin1().data());
+@@ -74,7 +74,7 @@
+ ID functionId = rb_ary_entry(args, 1);
+ VALUE arguments = rb_ary_entry(args, 2);
+ Q_ASSERT( TYPE(arguments) == T_ARRAY );
+- return rb_funcall2(self, functionId, RARRAY(arguments)->len, RARRAY(arguments)->ptr);
++ return rb_funcall2(self, functionId, RARRAY_LEN(arguments), RARRAY_PTR(arguments));
+ }
+
+ class RubyObject::Private
+@@ -112,8 +112,8 @@
+ VALUE methods;
+ const char* method;
+ methods = rb_class_instance_methods(1, args, CLASS_OF(object));
+- for (int i = 0; i < RARRAY(methods)->len; i++) {
+- method = StringValuePtr(RARRAY(methods)->ptr[i]);
++ for (int i = 0; i < RARRAY_LEN(methods); i++) {
++ method = StringValuePtr(RARRAY_PTR(methods)[i]);
+ krossdebug( QString("RubyObject::RubyObject() method=%1").arg( method ));
+ d->calls << method;
+ }
+--- kdebindings-4.3.0/ruby/krossruby/rubyscript.cpp.org 2009-01-16 08:04:29.000000000 -0700
++++ kdebindings-4.3.0/ruby/krossruby/rubyscript.cpp 2009-08-08 21:51:36.729148567 -0600
+@@ -47,7 +47,7 @@
+
+ VALUE info = rb_gv_get("$!");
+ VALUE bt = rb_funcall(info, rb_intern("backtrace"), 0);
+- VALUE message = RARRAY(bt)->ptr[0];
++ VALUE message = RARRAY_PTR(bt)[0];
+
+ QString errormessage = QString("%1: %2 (%3)")
+ .arg( STR2CSTR(message) )
+@@ -56,9 +56,9 @@
+ fprintf(stderr, "%s\n", errormessage.toLatin1().data());
+
+ QString tracemessage;
+- for(int i = 1; i < RARRAY(bt)->len; ++i) {
+- if( TYPE(RARRAY(bt)->ptr[i]) == T_STRING ) {
+- QString s = QString("%1\n").arg( STR2CSTR(RARRAY(bt)->ptr[i]) );
++ for(int i = 1; i < RARRAY_LEN(bt); ++i) {
++ if( TYPE(RARRAY_PTR(bt)[i]) == T_STRING ) {
++ QString s = QString("%1\n").arg( STR2CSTR(RARRAY_PTR(bt)[i]) );
+ Q_ASSERT( ! s.isNull() );
+ tracemessage += s;
+ fprintf(stderr, "\t%s", s.toLatin1().data());
+@@ -361,7 +361,7 @@
+ ID functionId = rb_ary_entry(args, 1);
+ VALUE arguments = rb_ary_entry(args, 2);
+ Q_ASSERT( TYPE(arguments) == T_ARRAY );
+- return rb_funcall2(self, functionId, RARRAY(arguments)->len, RARRAY(arguments)->ptr);
++ return rb_funcall2(self, functionId, RARRAY_LEN(arguments), RARRAY_PTR(arguments));
+ }
+
+ QVariant RubyScript::callFunction(const QString& name, const QVariantList& args)
+--- kdebindings-4.3.0/ruby/krossruby/rubyvariant.cpp.org 2008-11-19 03:17:32.000000000 -0700
++++ kdebindings-4.3.0/ruby/krossruby/rubyvariant.cpp 2009-08-08 21:42:27.593112416 -0600
+@@ -487,7 +487,7 @@
+ #endif
+ QList<void*> list;
+ if( TYPE(value) == T_ARRAY ) {
+- for(int i = 0; i < RARRAY(value)->len; i++)
++ for(int i = 0; i < RARRAY_LEN(value); i++)
+ if( void *ptr = VoidList::extractVoidStar(rb_ary_entry(value, i)) )
+ list << ptr;
+ }
+--- kdebindings-4.3.0/ruby/krossruby/rubyvariant.h.org 2008-07-29 05:47:40.000000000 -0600
++++ kdebindings-4.3.0/ruby/krossruby/rubyvariant.h 2009-08-09 02:51:01.845117051 -0600
+@@ -124,7 +124,7 @@
+ case T_BIGNUM:
+ return rb_big2int(value);
+ case T_FLOAT:
+- return (int)(RFLOAT(value)->value);
++ return (int)(RFLOAT_VALUE(value));
+ default:
+ break;
+ }
+@@ -147,7 +147,7 @@
+ case T_BIGNUM:
+ return rb_big2uint(value);
+ case T_FLOAT:
+- return (uint)(RFLOAT(value)->value);
++ return (uint)(RFLOAT_VALUE(value));
+ default:
+ break;
+ }
+@@ -226,7 +226,7 @@
+ //return STR2CSTR( rb_inspect(value) );
+ return QByteArray("");
+ }
+- long length = LONG2NUM( RSTRING(value)->len );
++ long length = LONG2NUM( RSTRING_LEN(value) );
+ if( length < 0 )
+ return QByteArray("");
+ char* ca = rb_str2cstr(value, &length);
+@@ -261,7 +261,7 @@
+ return l;
+ }
+ inline static QSize toVariant(VALUE value) {
+- if( TYPE(value) != T_ARRAY || RARRAY(value)->len != 2 ) {
++ if( TYPE(value) != T_ARRAY || RARRAY_LEN(value) != 2 ) {
+ rb_raise(rb_eTypeError, "QSize must be an array with 2 elements");
+ return QSize();
+ }
+@@ -280,7 +280,7 @@
+ return l;
+ }
+ inline static QSizeF toVariant(VALUE value) {
+- if( TYPE(value) != T_ARRAY || RARRAY(value)->len != 2 ) {
++ if( TYPE(value) != T_ARRAY || RARRAY_LEN(value) != 2 ) {
+ rb_raise(rb_eTypeError, "QSizeF must be an array with 2 elements");
+ return QSizeF();
+ }
+@@ -300,7 +300,7 @@
+ return l;
+ }
+ inline static QPoint toVariant(VALUE value) {
+- if( TYPE(value) != T_ARRAY || RARRAY(value)->len != 2 ) {
++ if( TYPE(value) != T_ARRAY || RARRAY_LEN(value) != 2 ) {
+ rb_raise(rb_eTypeError, "QPoint must be an array with 2 elements");
+ return QPoint();
+ }
+@@ -319,7 +319,7 @@
+ return l;
+ }
+ inline static QPointF toVariant(VALUE value) {
+- if( TYPE(value) != T_ARRAY || RARRAY(value)->len != 2 ) {
++ if( TYPE(value) != T_ARRAY || RARRAY_LEN(value) != 2 ) {
+ rb_raise(rb_eTypeError, "QPointF must be an array with 2 elements");
+ return QPointF();
+ }
+@@ -340,7 +340,7 @@
+ return l;
+ }
+ inline static QRect toVariant(VALUE value) {
+- if( TYPE(value) != T_ARRAY || RARRAY(value)->len != 4 ) {
++ if( TYPE(value) != T_ARRAY || RARRAY_LEN(value) != 4 ) {
+ rb_raise(rb_eTypeError, "QRect must be an array with 4 elements");
+ return QRect();
+ }
+@@ -362,7 +362,7 @@
+ return l;
+ }
+ inline static QRectF toVariant(VALUE value) {
+- if( TYPE(value) != T_ARRAY || RARRAY(value)->len != 4 ) {
++ if( TYPE(value) != T_ARRAY || RARRAY_LEN(value) != 4 ) {
+ rb_raise(rb_eTypeError, "QRectF must be an array with 4 elements");
+ return QRectF();
+ }
+@@ -447,7 +447,7 @@
+ return QStringList();
+ }
+ QStringList l;
+- for(int i = 0; i < RARRAY(value)->len; i++)
++ for(int i = 0; i < RARRAY_LEN(value); i++)
+ l.append( RubyType<QString>::toVariant( rb_ary_entry(value, i) ) );
+ return l;
+ }
+@@ -469,7 +469,7 @@
+ return QVariantList();
+ }
+ QVariantList l;
+- for(int i = 0; i < RARRAY(value)->len; i++)
++ for(int i = 0; i < RARRAY_LEN(value); i++)
+ l.append( RubyType<QVariant>::toVariant( rb_ary_entry(value, i) ) );
+ return l;
+ }
diff --git a/source/kde/kdebindings/kdebindings-ruby-env.h.diff b/source/kde/kdebindings/kdebindings-ruby-env.h.diff
new file mode 100644
index 000000000..61f404c70
--- /dev/null
+++ b/source/kde/kdebindings/kdebindings-ruby-env.h.diff
@@ -0,0 +1,139 @@
+--- kdebindings-r1016551/ruby/krossruby/rubyextension.cpp.org 2009-08-26 07:50:12.000000000 -0600
++++ kdebindings-r1016551/ruby/krossruby/rubyextension.cpp 2009-08-29 05:59:57.705834017 -0600
+@@ -278,7 +278,7 @@
+ sendersignal = RubyType<QByteArray>::toVariant(argv[1]);
+ idx = 2;
+ if( argc <= idx ) {
+- rb_raise(rb_eTypeError, ::QString("Expected at least %1 arguments.").arg(idx+1).toLatin1().constData());
++ /*rb_raise(rb_eTypeError, ::QString("Expected at least %1 arguments.").arg(idx+1).toLatin1().constData());*/
+ return Qfalse;
+ }
+ } break;
+@@ -310,7 +310,7 @@
+ */
+ #if(!(RUBY_VERSION_MAJOR==1 && RUBY_VERSION_MINOR==8 && RUBY_VERSION_TEENY==4))
+ else {
+- rb_raise(rb_eTypeError, ::QString("The argument number %1 is invalid.").arg(idx).toLatin1().constData());
++ /*rb_raise(rb_eTypeError, ::QString("The argument number %1 is invalid.").arg(idx).toLatin1().constData());*/
+ return Qfalse;
+ }
+ #endif
+--- kdebindings-r1016551/ruby/krossruby/rubyfunction.h.org 2009-08-26 07:50:12.000000000 -0600
++++ kdebindings-r1016551/ruby/krossruby/rubyfunction.h 2009-08-29 06:27:56.393849016 -0600
+@@ -198,7 +198,7 @@
+ //VALUE result = rb_funcall2(m_method, rb_intern("call"), argsize, args);
+
+ //TODO optimize
+- ruby_in_eval++;
++ /*ruby_in_eval++;
+ VALUE argarray = rb_ary_new2(3);
+ rb_ary_store(argarray, 0, m_method); //self
+ rb_ary_store(argarray, 1, INT2FIX(argsize));
+@@ -207,7 +207,7 @@
+ ruby_in_eval--;
+
+ // finally set the returnvalue
+- m_tmpResult = RubyType<QVariant>::toVariant(result);
++ m_tmpResult = RubyType<QVariant>::toVariant(result);*/
+ #ifdef KROSS_RUBY_FUNCTION_DEBUG
+ QObject* sender = QObject::sender();
+ krossdebug( QString("RubyFunction::qt_metacall sender.objectName=%1 sender.className=%2 result=%3 variantresult=%4").arg(sender->objectName()).arg(sender->metaObject()->className()).arg(STR2CSTR(rb_inspect(result))).arg(m_tmpResult.toString()) );
+--- kdebindings-r1016551/ruby/krossruby/rubyobject.cpp.org 2009-08-28 04:05:33.356632000 -0600
++++ kdebindings-r1016551/ruby/krossruby/rubyobject.cpp 2009-08-29 05:22:50.886344151 -0600
+@@ -52,7 +52,7 @@
+ }
+ }
+
+- ruby_nerrs++;
++ /*ruby_nerrs++;*/
+ /*
+ VALUE rubyscriptvalue = rb_funcall(self, rb_intern("const_get"), 1, ID2SYM(rb_intern("RUBYSCRIPTOBJ")));
+ RubyScript* rubyscript;
+--- kdebindings-r1016551/ruby/krossruby/rubyscript.cpp.org 2009-08-28 04:05:33.360633000 -0600
++++ kdebindings-r1016551/ruby/krossruby/rubyscript.cpp 2009-08-29 05:21:52.226333617 -0600
+@@ -65,7 +65,7 @@
+ }
+ }
+
+- ruby_nerrs++;
++/* ruby_nerrs++;*/
+
+ VALUE rubyscriptvalue = rb_funcall(self, rb_intern("const_get"), 1, ID2SYM(rb_intern("RUBYSCRIPTOBJ")));
+ RubyScript* rubyscript;
+@@ -173,11 +173,11 @@
+ // needed to prevent infinitive loops ifour scripting call uses e.g. callFunction
+ m_hasBeenSuccessFullyExecuted = true;
+
+- const int critical = rb_thread_critical;
+- rb_thread_critical = Qtrue;
++ /*const int critical = rb_thread_critical;*/
++ /*rb_thread_critical = Qtrue;
+
+ ruby_nerrs = 0;
+- ruby_errinfo = Qnil;
++ ruby_errinfo = Qnil;*/
+
+ VALUE args = rb_ary_new2(3);
+ rb_ary_store(args, 0, m_script); //self
+@@ -192,24 +192,24 @@
+ }
+ */
+
+- ruby_in_eval++;
++ /*ruby_in_eval++;*/
+ VALUE result = rb_rescue2((VALUE(*)(...))callExecute, args, (VALUE(*)(...))callExecuteException, m_script, rb_eException, 0);
+- ruby_in_eval--;
++ /*ruby_in_eval--;*/
+
+- if (ruby_nerrs != 0) {
++ /*if (ruby_nerrs != 0) {
+ //#ifdef KROSS_RUBY_SCRIPT_EXECUTE_DEBUG
+ krossdebug( QString("Compilation has failed. errorMessage=%1 errorTrace=\n%2\n").arg(q->errorMessage()).arg(q->errorTrace()) );
+ //#endif
+ m_hasBeenSuccessFullyExecuted = false;
+ } else {
+ m_hasBeenSuccessFullyExecuted = true;
+- }
++ }*/
+
+ #ifdef KROSS_RUBY_EXPLICIT_GC
+ rb_gc();
+ #endif
+
+- rb_thread_critical = critical;
++ /*rb_thread_critical = critical;*/
+ return result;
+ }
+
+@@ -371,9 +371,9 @@
+ krossdebug( QString("RubyScript::callFunction() name=%1").arg(name) );
+ #endif
+
+- const int critical = rb_thread_critical;
++ /*const int critical = rb_thread_critical;
+ rb_thread_critical = Qtrue;
+- ruby_in_eval++;
++ ruby_in_eval++;*/
+ //ruby_current_node
+
+ if( ! d->m_hasBeenSuccessFullyExecuted ) {
+@@ -383,7 +383,7 @@
+ #ifdef KROSS_RUBY_SCRIPT_CALLFUNCTION_DEBUG
+ krossdebug("RubyScript::callFunction failed");
+ #endif
+- setError( QString("Failed to call function \"%1\": %2").arg(name).arg(STR2CSTR( rb_obj_as_string(ruby_errinfo) )) ); // TODO: get the error
++ /*setError( QString("Failed to call function \"%1\": %2").arg(name).arg(STR2CSTR( rb_obj_as_string(ruby_errinfo) )) ); // TODO: get the error*/
+ }
+ else {
+ //VALUE self = rb_eval_string("self");
+@@ -413,8 +413,8 @@
+ // rb_gc(); // This one is plainly wrong, since there is a good deal of chance that it will delete the content of result before it is used
+ #endif
+
+- ruby_in_eval--;
+- rb_thread_critical = critical;
++ /*ruby_in_eval--;
++ rb_thread_critical = critical;*/
+
+ return result;
+ }
diff --git a/source/kde/kdebindings/kdebindings-rubyconfig.h.diff b/source/kde/kdebindings/kdebindings-rubyconfig.h.diff
new file mode 100644
index 000000000..aa8b426d3
--- /dev/null
+++ b/source/kde/kdebindings/kdebindings-rubyconfig.h.diff
@@ -0,0 +1,20 @@
+--- kdebindings-4.3.0/ruby/krossruby/rubyconfig.h.org 2009-01-16 08:04:29.000000000 -0700
++++ kdebindings-4.3.0/ruby/krossruby/rubyconfig.h 2009-08-08 23:14:59.917148261 -0600
+@@ -21,12 +21,12 @@
+ #define KROSS_RUBY_CONFIG_H
+
+ #include <ruby.h>
+-#include <env.h>
+-#include <rubysig.h>
+-#include <node.h>
+-#include <version.h>
++//#include <env.h>
++#include <ruby/backward/rubysig.h>
++#include <ruby/node.h>
++#include <ruby/version.h>
+
+-#include <st.h>
++#include <ruby/st.h>
+ //#include <typeinfo>
+
+ #include <kross/core/krossconfig.h>
diff --git a/source/kde/kdebindings/kdebindings.SlackBuild b/source/kde/kdebindings/kdebindings.SlackBuild
index a31407b91..21df45de4 100755
--- a/source/kde/kdebindings/kdebindings.SlackBuild
+++ b/source/kde/kdebindings/kdebindings.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2009 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2009, 2010 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -46,6 +46,11 @@ cd $TMP
echo "Building kdebindings-$VERSION..."
tar xvf $CWD/../src/kdebindings-$VERSION.tar.?z* || exit 1
cd kdebindings-$VERSION
+
+zcat $CWD/kdebindings-len-ptr-rfloat.diff.gz | patch -p1 --verbose || exit 1
+zcat $CWD/kdebindings-ruby-env.h.diff.gz | patch -p1 --verbose || exit 1
+zcat $CWD/kdebindings-rubyconfig.h.diff.gz | patch -p1 --verbose || exit 1
+
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@@ -58,6 +63,7 @@ mkdir -p build
cd build
#-DCMAKE_BACKWARDS_COMPATIBILITY:STRING="2.2" \
cmake \
+ $KDE_OPT_ARGS \
-DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_BUILD_TYPE=Release \
@@ -65,17 +71,15 @@ cd build
-DMAN_INSTALL_DIR=/usr/man \
-DSYSCONF_INSTALL_DIR=/etc/kde \
-DLIB_SUFFIX=${LIBDIRSUFFIX} \
- -DENABLE_PHONON:BOOL=OFF \
- -DENABLE_PHONON_SMOKE:BOOL=OFF \
-DENABLE_QYOTO:BOOL=OFF \
-DENABLE_QSCINTILLA_SHARP:BOOL=OFF \
-DENABLE_KIMONO:BOOL=OFF \
-DBUILD_csharp:BOOL=OFF \
- -DENABLE_KHTML:BOOL=OFF \
- -DENABLE_PHONON_RUBY:BOOL=OFF \
..
- # kdebindings has (in the past, on several occasions) barfed on multijobs, so no $NUMJOBS here:
- make || exit 1
+ # kdebindings has (in the past, on several occasions) barfed on multijobs,
+ # so no $NUMJOBS here. We run make twice because the first time is not
+ # 100% successful either...:
+ make || make || exit 1
make install DESTDIR=$PKG || exit 1
cd -
diff --git a/source/kde/kdebindings/local.options b/source/kde/kdebindings/local.options
new file mode 100644
index 000000000..aae3c765c
--- /dev/null
+++ b/source/kde/kdebindings/local.options
@@ -0,0 +1 @@
+BUILD=2
diff --git a/source/kde/kdebindings/slack-desc b/source/kde/kdebindings/slack-desc
index 753edde91..e927c76fe 100644
--- a/source/kde/kdebindings/slack-desc
+++ b/source/kde/kdebindings/slack-desc
@@ -6,14 +6,14 @@
# leave one space after the ':'.
|-----handy-ruler------------------------------------------------------|
-kdebindings: kdebindings
+kdebindings: kdebindings (KDE language bindings)
kdebindings:
kdebindings: KDE and most KDE applications are implemented using the C++
kdebindings: programming language, but that doesn't mean you don't have a choice.
kdebindings: This package contains a number of bindings to other languages,
kdebindings: including scripting languages and other systems' programming
-kdebindings: languages.
-kdebindings:
+kdebindings: languages, allowing them to be used to create applications for the
+kdebindings: KDE Platform.
kdebindings:
kdebindings:
kdebindings: