parent
7d9d6bed18
commit
15ce26197e
@ -0,0 +1,56 @@
|
|||||||
|
--- koffice/chalk/plugins/viewplugins/scripting/chalkcore/krs_iterator.h.ORI 2012-04-26 20:22:29.322777779 +0200
|
||||||
|
+++ koffice/chalk/plugins/viewplugins/scripting/chalkcore/krs_iterator.h 2012-04-26 20:23:21.216311169 +0200
|
||||||
|
@@ -137,12 +137,12 @@
|
||||||
|
}
|
||||||
|
initiales = initiales.upper();
|
||||||
|
// set/get general
|
||||||
|
- addFunction("set" + initiales, &Iterator::setPixel);
|
||||||
|
- addFunction("get" + initiales, &Iterator::getPixel);
|
||||||
|
+ this->addFunction("set" + initiales, &Iterator::setPixel);
|
||||||
|
+ this->addFunction("get" + initiales, &Iterator::getPixel);
|
||||||
|
kdDebug(41011) << ( "get" + initiales ) << endl;
|
||||||
|
// Various colorSpace
|
||||||
|
- addFunction("invertColor", &Iterator::invertColor);
|
||||||
|
- addFunction("darken", &Iterator::darken);
|
||||||
|
+ this->addFunction("invertColor", &Iterator::invertColor);
|
||||||
|
+ this->addFunction("darken", &Iterator::darken);
|
||||||
|
}
|
||||||
|
|
||||||
|
~Iterator()
|
||||||
|
--- koffice/filters/chalk/png/kis_png_converter.cc.gcc47 2012-04-26 16:38:35.805156927 -0400
|
||||||
|
+++ koffice/filters/chalk/png/kis_png_converter.cc 2012-04-26 16:49:27.179323394 -0400
|
||||||
|
@@ -43,6 +43,8 @@
|
||||||
|
#include <kis_paint_layer.h>
|
||||||
|
#include <kis_group_layer.h>
|
||||||
|
|
||||||
|
+#include <zlib.h>
|
||||||
|
+
|
||||||
|
namespace {
|
||||||
|
|
||||||
|
const TQ_UINT8 PIXEL_BLUE = 0;
|
||||||
|
@@ -222,6 +224,7 @@
|
||||||
|
|
||||||
|
// Read image profile
|
||||||
|
png_charp profile_name, profile_data;
|
||||||
|
+ unsigned char* uprofile_data = reinterpret_cast<unsigned char*>(profile_data);
|
||||||
|
int compression_type;
|
||||||
|
png_uint_32 proflen;
|
||||||
|
int number_of_passes = 1;
|
||||||
|
@@ -230,7 +233,7 @@
|
||||||
|
number_of_passes = png_set_interlace_handling(png_ptr);
|
||||||
|
|
||||||
|
KisProfile* profile = 0;
|
||||||
|
- if(png_get_iCCP(png_ptr, info_ptr, &profile_name, &compression_type, &profile_data, &proflen))
|
||||||
|
+ if(png_get_iCCP(png_ptr, info_ptr, &profile_name, &compression_type, &uprofile_data, &proflen))
|
||||||
|
{
|
||||||
|
TQByteArray profile_rawdata;
|
||||||
|
// XXX: Hardcoded for icc type -- is that correct for us?
|
||||||
|
@@ -627,7 +630,7 @@
|
||||||
|
} else { // Profile
|
||||||
|
char* name = new char[(*it)->type().length()+1];
|
||||||
|
strcpy(name, (*it)->type().ascii());
|
||||||
|
- png_set_iCCP(png_ptr, info_ptr, name, PNG_COMPRESSION_TYPE_BASE, (char*)(*it)->annotation().data(), (*it) -> annotation() . size());
|
||||||
|
+ png_set_iCCP(png_ptr, info_ptr, name, PNG_COMPRESSION_TYPE_BASE, (unsigned char*)(*it)->annotation().data(), (*it) -> annotation() . size());
|
||||||
|
}
|
||||||
|
++it;
|
||||||
|
}
|
@ -0,0 +1,11 @@
|
|||||||
|
--- /dev/shm/applications/koffice/filters/chalk/png/kis_png_converter.cc 2011-06-27 13:54:18.000000000 -0500
|
||||||
|
+++ /dev/shm/applications/koffice/filters/chalk/png/kis_png_converter.cc.new 2011-11-07 15:38:47.918508855 -0600
|
||||||
|
@@ -785,7 +785,7 @@
|
||||||
|
|
||||||
|
void KisPNGConverter::progress(png_structp png_ptr, png_uint_32 row_number, int pass)
|
||||||
|
{
|
||||||
|
- if(png_ptr == NULL || row_number > PNG_MAX_UINT || pass > 7) return;
|
||||||
|
+ if(png_ptr == NULL || row_number > PNG_UINT_31_MAX || pass > 7) return;
|
||||||
|
// setProgress(row_number);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,118 @@
|
|||||||
|
diff -urN koffice/configure.in koffice.new/configure.in
|
||||||
|
--- koffice/configure.in 2011-08-21 18:30:53.000000000 -0500
|
||||||
|
+++ koffice.new/configure.in 2011-12-08 17:56:31.000000000 -0600
|
||||||
|
@@ -1539,14 +1539,22 @@
|
||||||
|
# Check for Ruby
|
||||||
|
|
||||||
|
if test "x$compile_kross" = "xyes" ; then
|
||||||
|
- AC_CHECK_PROGS([RUBY], [ruby ruby1.8 ruby18], ruby)
|
||||||
|
+ AC_CHECK_PROGS([RUBY], [ruby ruby1.8 ruby18 ruby1.9 ruby19], ruby)
|
||||||
|
|
||||||
|
if test -n "$RUBY"; then
|
||||||
|
AC_MSG_CHECKING(for Ruby dirs)
|
||||||
|
RUBY_ARCHDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"archdir"@:>@)'`
|
||||||
|
RUBY_SITEARCHDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"sitearchdir"@:>@)'`
|
||||||
|
RUBY_SITEDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"sitelibdir"@:>@)'`
|
||||||
|
- RUBY_INCLUDEDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"rubyincludedir"@:>@)'`
|
||||||
|
+ if test -n "$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"rubyhdrdir"@:>@)'"; then
|
||||||
|
+ # Ruby 1.9
|
||||||
|
+ RUBY_INCLUDEDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"rubyhdrdir"@:>@)'`
|
||||||
|
+ RUBY_VERSION_H=ruby/version.h
|
||||||
|
+ else
|
||||||
|
+ # not Ruby 1.9
|
||||||
|
+ RUBY_INCLUDEDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"rubyincludedir"@:>@)'`
|
||||||
|
+ RUBY_VERSION_H=version.h
|
||||||
|
+ fi
|
||||||
|
RUBY_LIBDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"libdir"@:>@)'`
|
||||||
|
RUBY_LIBRUBYARG=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"LIBRUBYARG_SHARED"@:>@)'`
|
||||||
|
RUBY_ENABLESHARED=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"ENABLE_SHARED"@:>@)'`
|
||||||
|
@@ -1599,7 +1607,7 @@
|
||||||
|
[
|
||||||
|
AC_TRY_COMPILE([
|
||||||
|
#include <ruby.h>
|
||||||
|
- #include <version.h>
|
||||||
|
+ #include <$RUBY_VERSION_H>
|
||||||
|
],[
|
||||||
|
|
||||||
|
#if(RUBY_VERSION_MAJOR==1 && RUBY_VERSION_MINOR == 8 && RUBY_VERSION_TEENY <= 1)
|
||||||
|
diff -urN koffice/lib/kross/configure.in.in koffice.new/lib/kross/configure.in.in
|
||||||
|
--- koffice/lib/kross/configure.in.in 2010-08-11 22:16:27.000000000 -0500
|
||||||
|
+++ koffice.new/lib/kross/configure.in.in 2011-12-08 17:56:28.000000000 -0600
|
||||||
|
@@ -21,14 +21,22 @@
|
||||||
|
# Check for Ruby
|
||||||
|
|
||||||
|
if test "x$compile_kross" = "xyes" ; then
|
||||||
|
- AC_CHECK_PROGS([RUBY], [ruby ruby1.8 ruby18], ruby)
|
||||||
|
+ AC_CHECK_PROGS([RUBY], [ruby ruby1.8 ruby18 ruby1.9 ruby19], ruby)
|
||||||
|
|
||||||
|
if test -n "$RUBY"; then
|
||||||
|
AC_MSG_CHECKING(for Ruby dirs)
|
||||||
|
RUBY_ARCHDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"archdir"@:>@)'`
|
||||||
|
RUBY_SITEARCHDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"sitearchdir"@:>@)'`
|
||||||
|
RUBY_SITEDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"sitelibdir"@:>@)'`
|
||||||
|
- RUBY_INCLUDEDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"rubyincludedir"@:>@)'`
|
||||||
|
+ if test -n "$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"rubyhdrdir"@:>@)'"; then
|
||||||
|
+ # Ruby 1.9
|
||||||
|
+ RUBY_INCLUDEDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"rubyhdrdir"@:>@)'`
|
||||||
|
+ RUBY_VERSION_H=ruby/version.h
|
||||||
|
+ else
|
||||||
|
+ # not Ruby 1.9
|
||||||
|
+ RUBY_INCLUDEDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"rubyincludedir"@:>@)'`
|
||||||
|
+ RUBY_VERSION_H=version.h
|
||||||
|
+ fi
|
||||||
|
RUBY_LIBDIR=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"libdir"@:>@)'`
|
||||||
|
RUBY_LIBRUBYARG=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"LIBRUBYARG_SHARED"@:>@)'`
|
||||||
|
RUBY_ENABLESHARED=`$RUBY -r rbconfig -e 'printf("%s",Config::CONFIG@<:@"ENABLE_SHARED"@:>@)'`
|
||||||
|
@@ -81,7 +89,7 @@
|
||||||
|
[
|
||||||
|
AC_TRY_COMPILE([
|
||||||
|
#include <ruby.h>
|
||||||
|
- #include <version.h>
|
||||||
|
+ #include <$RUBY_VERSION_H>
|
||||||
|
],[
|
||||||
|
|
||||||
|
#if(RUBY_VERSION_MAJOR==1 && RUBY_VERSION_MINOR == 8 && RUBY_VERSION_TEENY <= 1)
|
||||||
|
diff -urN koffice/lib/kross/ruby/rubyextension.cpp koffice.new/lib/kross/ruby/rubyextension.cpp
|
||||||
|
--- koffice/lib/kross/ruby/rubyextension.cpp 2011-08-17 20:25:04.000000000 -0500
|
||||||
|
+++ koffice.new/lib/kross/ruby/rubyextension.cpp 2011-12-08 21:18:42.000000000 -0600
|
||||||
|
@@ -18,7 +18,7 @@
|
||||||
|
***************************************************************************/
|
||||||
|
#include "rubyextension.h"
|
||||||
|
|
||||||
|
-#include <st.h>
|
||||||
|
+#include <ruby/st.h>
|
||||||
|
|
||||||
|
#include <tqmap.h>
|
||||||
|
#include <tqstring.h>
|
||||||
|
@@ -211,7 +211,7 @@
|
||||||
|
case T_ARRAY:
|
||||||
|
{
|
||||||
|
TQValueList<Kross::Api::Object::Ptr> l;
|
||||||
|
- for(int i = 0; i < RARRAY(value)->len; i++)
|
||||||
|
+ for(int i = 0; i < RARRAY_LEN(value); i++)
|
||||||
|
{
|
||||||
|
Kross::Api::Object::Ptr o = toObject( rb_ary_entry( value , i ) );
|
||||||
|
if(o) l.append(o);
|
||||||
|
diff -urN koffice/lib/kross/ruby/rubyscript.cpp koffice.new/lib/kross/ruby/rubyscript.cpp
|
||||||
|
--- koffice/lib/kross/ruby/rubyscript.cpp 2011-06-25 13:42:29.000000000 -0500
|
||||||
|
+++ koffice.new/lib/kross/ruby/rubyscript.cpp 2011-12-08 21:45:36.000000000 -0600
|
||||||
|
@@ -21,8 +21,8 @@
|
||||||
|
|
||||||
|
#include <ruby.h>
|
||||||
|
#include <env.h>
|
||||||
|
-#include <rubysig.h>
|
||||||
|
-#include <node.h>
|
||||||
|
+#include <ruby/backward/rubysig.h>
|
||||||
|
+#include <ruby/node.h>
|
||||||
|
|
||||||
|
#include <main/scriptcontainer.h>
|
||||||
|
|
||||||
|
@@ -70,6 +70,8 @@
|
||||||
|
krossdebug("RubyScript::compile()");
|
||||||
|
#endif
|
||||||
|
int critical;
|
||||||
|
+ int ruby_nerrs;
|
||||||
|
+ int ruby_in_eval;
|
||||||
|
|
||||||
|
ruby_nerrs = 0;
|
||||||
|
ruby_errinfo = Qnil;
|
Loading…
Reference in new issue