1
0
mirror of git://projects.qi-hardware.com/openwrt-packages.git synced 2025-04-21 12:27:27 +03:00

plplot: many fixes, separate packages for qt,tcl,octave,c++ interfaces

Octave interface still crashes when attempting to plot via Qt :(
Tcl interface is currently unusable since openwrt's Tcl package is too crippled.
This commit is contained in:
David Kühling
2011-01-04 17:49:15 +01:00
parent 54e3ee03fd
commit fa537a3c64
4 changed files with 236 additions and 47 deletions

View File

@@ -0,0 +1,35 @@
Index: plplot-5.9.7/bindings/octave/matwrap/matwrap
===================================================================
--- plplot-5.9.7.orig/bindings/octave/matwrap/matwrap 2011-01-04 13:31:52.000000000 +0100
+++ plplot-5.9.7/bindings/octave/matwrap/matwrap 2011-01-04 13:52:42.000000000 +0100
@@ -21,7 +21,9 @@
#
# Parse the command line arguments:
#
-@cpp_ignore_dirs = ('/usr/include/', '/usr/local/include/');
+# double-slash prefixes occur with newer GCCs and cause this script to fail
+# if not treated here. See also regexp fixes below.
+@cpp_ignore_dirs = ('/usr/include/', '/usr/local/include/', '//usr/include/', '//usr/local/include/');
# Directory hierarchies to ignore when the
# -cpp switch is active. These should be
# followed by a trailing slash to avoid
@@ -214,8 +216,8 @@
# Then it must have been included at the
# top level. Add it to our list.
my $incstr = $fname; # Assume we include the file as is.
- if ($incstr =~ s@^/usr/include/@@ || # Is it a system include file?
- $incstr =~ s@^/usr/local/include/@@ ||
+ if ($incstr =~ s@^/+usr/include/@@ || # Is it a system include file?
+ $incstr =~ s@^/+usr/local/include/@@ ||
$incstr =~ s@.*/gcc-lib/.*/include/@@) { # Is it a system include
# file that was fixed by gcc?
$include_str .= "#include <$incstr>\n"; # Use a different syntax.
@@ -228,6 +230,8 @@
grep(substr($fname, 0, length($_)) eq $_, @cpp_ignore_dirs) ||
# Or does it begin with the list of forbidden
# directories?
+ $fname =~ m@/gcc/@ ||
+ $fname =~ m@rej.h@ ||
$fname =~ m@/gcc-lib/@) { # Somewhere in gcc fixed includes?
$remember_defs_in_file = 0; # We're not really interested in this file.
} else {

View File

@@ -0,0 +1,13 @@
Index: plplot-5.9.7/bindings/octave/CMakeLists.txt
===================================================================
--- plplot-5.9.7.orig/bindings/octave/CMakeLists.txt 2011-01-04 17:02:32.000000000 +0100
+++ plplot-5.9.7/bindings/octave/CMakeLists.txt 2011-01-04 17:03:09.000000000 +0100
@@ -222,7 +222,7 @@
COMMAND cat ${CMAKE_CURRENT_SOURCE_DIR}/plplot_octave_def >> plplot_stub.m
COMMAND echo >> plplot_stub.m
COMMAND
- ${massage_LOCATION} >> plplot_stub.m 2> missing_help
+ plplot-massage >> plplot_stub.m 2> missing_help
DEPENDS
${CMAKE_CURRENT_BINARY_DIR}/tmp_stub
${CMAKE_CURRENT_SOURCE_DIR}/plplot_octave_def

View File

@@ -0,0 +1,23 @@
Index: plplot-5.9.7/drivers/qt.cpp
===================================================================
--- plplot-5.9.7.orig/drivers/qt.cpp 2011-01-04 17:25:22.000000000 +0100
+++ plplot-5.9.7/drivers/qt.cpp 2011-01-04 17:26:02.000000000 +0100
@@ -90,12 +90,14 @@
++appCounter;
if ( qApp == NULL && appCounter == 1 )
{
- argc = 1;
- argv = new char*[2];
+ argc = 2;
+ argv = new char*[3];
argv[0] = new char[10];
- argv[1] = new char[1];
+ argv[1] = new char[10];
+ argv[2] = new char[1];
snprintf( argv[0], 10, "qt_driver" );
- argv[1][0] = '\0';
+ snprintf( argv[1], 10, "-qws" );
+ argv[2][0] = '\0';
new QApplication( argc, argv, isGUI );
res = true;
}