summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--x11-libs/qwt/ChangeLog10
-rw-r--r--x11-libs/qwt/files/qwt-6.0.2-invalid-read.patch250
-rw-r--r--x11-libs/qwt/metadata.xml3
-rw-r--r--x11-libs/qwt/qwt-6.0.2.ebuild95
4 files changed, 356 insertions, 2 deletions
diff --git a/x11-libs/qwt/ChangeLog b/x11-libs/qwt/ChangeLog
index aeb9484b9108..6f3d1392d2ed 100644
--- a/x11-libs/qwt/ChangeLog
+++ b/x11-libs/qwt/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for x11-libs/qwt
-# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/x11-libs/qwt/ChangeLog,v 1.102 2012/08/31 06:51:31 jlec Exp $
+# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/x11-libs/qwt/ChangeLog,v 1.103 2013/01/31 11:40:58 gienah Exp $
+
+*qwt-6.0.2 (31 Jan 2013)
+
+ 31 Jan 2013; Mark Wright <gienah@gentoo.org>
+ +files/qwt-6.0.2-invalid-read.patch, +qwt-6.0.2.ebuild, metadata.xml:
+ Bump qwt to 6.0.2. Add mathml USE flag.
*qwt-6.0.1-r1 (31 Aug 2012)
diff --git a/x11-libs/qwt/files/qwt-6.0.2-invalid-read.patch b/x11-libs/qwt/files/qwt-6.0.2-invalid-read.patch
new file mode 100644
index 000000000000..a225350990a0
--- /dev/null
+++ b/x11-libs/qwt/files/qwt-6.0.2-invalid-read.patch
@@ -0,0 +1,250 @@
+--- qwt-6.0.2-orig/textengines/mathml/qwt_mml_document.cpp 2012-12-01 00:22:46.752106265 +1100
++++ qwt-6.0.2/textengines/mathml/qwt_mml_document.cpp 2013-01-31 14:29:30.590197611 +1100
+@@ -4421,7 +4421,10 @@
+ if ( ok )
+ return value;
+ else
+- qWarning( "Could not convert %s to form", value_str.toLatin1().data() );
++ {
++ QByteArray value_str_ba = value_str.toLatin1();
++ qWarning( "Could not convert %s to form", value_str_ba.data() );
++ }
+
+ }
+
+@@ -4658,7 +4661,10 @@
+ continue;
+ }
+ else
+- qWarning( "MmlMtableNode::layoutSymbol(): could not parse value %s%%", value.toLatin1().data() );
++ {
++ QByteArray value_ba = value.toLatin1();
++ qWarning( "MmlMtableNode::layoutSymbol(): could not parse value %s%%", value_ba.data() );
++ }
+ }
+
+ // Relatively sized column, but we failed to parse the factor. Treat is like an auto
+@@ -5167,7 +5173,8 @@
+ double factor = factor_str.toFloat( &float_ok );
+ if ( !float_ok || factor < 0 )
+ {
+- qWarning( "MmlMpaddedNode::interpretSpacing(): could not parse \"%s\"", value.toLatin1().data() );
++ QByteArray value_ba = value.toLatin1();
++ qWarning( "MmlMpaddedNode::interpretSpacing(): could not parse \"%s\"", value_ba.data() );
+ return 0;
+ }
+
+@@ -5196,7 +5203,8 @@
+ unit_size = QwtMmlNode::interpretSpacing( "1" + pseudo_unit, &unit_ok );
+ if ( !unit_ok )
+ {
+- qWarning( "MmlMpaddedNode::interpretSpacing(): could not parse \"%s\"", value.toLatin1().data() );
++ QByteArray value_ba = value.toLatin1();
++ qWarning( "MmlMpaddedNode::interpretSpacing(): could not parse \"%s\"", value_ba.data() );
+ return 0;
+ }
+ }
+@@ -5368,7 +5376,8 @@
+ return ( int )( em * factor );
+ else
+ {
+- qWarning( "interpretSpacing(): could not parse \"%sem\"", value.toLatin1().data() );
++ QByteArray value_ba = value.toLatin1();
++ qWarning( "interpretSpacing(): could not parse \"%sem\"", value_ba.data() );
+ if ( ok != 0 )
+ *ok = false;
+ return 0;
+@@ -5384,7 +5393,8 @@
+ return ( int )( ex * factor );
+ else
+ {
+- qWarning( "interpretSpacing(): could not parse \"%sex\"", value.toLatin1().data() );
++ QByteArray value_ba = value.toLatin1();
++ qWarning( "interpretSpacing(): could not parse \"%sex\"", value_ba.data() );
+ if ( ok != 0 )
+ *ok = false;
+ return 0;
+@@ -5406,7 +5416,8 @@
+ }
+ else
+ {
+- qWarning( "interpretSpacing(): could not parse \"%scm\"", value.toLatin1().data() );
++ QByteArray value_ba = value.toLatin1();
++ qWarning( "interpretSpacing(): could not parse \"%scm\"", value_ba.data() );
+ if ( ok != 0 )
+ *ok = false;
+ return 0;
+@@ -5428,7 +5439,8 @@
+ }
+ else
+ {
+- qWarning( "interpretSpacing(): could not parse \"%smm\"", value.toLatin1().data() );
++ QByteArray value_ba = value.toLatin1();
++ qWarning( "interpretSpacing(): could not parse \"%smm\"", value_ba.data() );
+ if ( ok != 0 )
+ *ok = false;
+ return 0;
+@@ -5450,7 +5462,8 @@
+ }
+ else
+ {
+- qWarning( "interpretSpacing(): could not parse \"%sin\"", value.toLatin1().data() );
++ QByteArray value_ba = value.toLatin1();
++ qWarning( "interpretSpacing(): could not parse \"%sin\"", value_ba.data() );
+ if ( ok != 0 )
+ *ok = false;
+ return 0;
+@@ -5466,7 +5479,8 @@
+ return i;
+ else
+ {
+- qWarning( "interpretSpacing(): could not parse \"%spx\"", value.toLatin1().data() );
++ QByteArray value_ba = value.toLatin1();
++ qWarning( "interpretSpacing(): could not parse \"%spx\"", value_ba.data() );
+ if ( ok != 0 )
+ *ok = false;
+ return 0;
+@@ -5478,7 +5492,8 @@
+ if ( float_ok && i >= 0 )
+ return i;
+
+- qWarning( "interpretSpacing(): could not parse \"%s\"", value.toLatin1().data() );
++ QByteArray value_ba = value.toLatin1();
++ qWarning( "interpretSpacing(): could not parse \"%s\"", value_ba.data() );
+ if ( ok != 0 )
+ *ok = false;
+ return 0;
+@@ -5503,7 +5518,8 @@
+ return ( int )( base * factor / 100.0 );
+ }
+
+- qWarning( "interpretPercentSpacing(): could not parse \"%s%%\"", value.toLatin1().data() );
++ QByteArray value_ba = value.toLatin1();
++ qWarning( "interpretPercentSpacing(): could not parse \"%s%%\"", value_ba.data() );
+ if ( ok != 0 )
+ *ok = false;
+ return 0;
+@@ -5528,7 +5544,8 @@
+ return pt_size;
+ }
+
+- qWarning( "interpretPointSize(): could not parse \"%spt\"", value.toLatin1().data() );
++ QByteArray value_ba = value.toLatin1();
++ qWarning( "interpretPointSize(): could not parse \"%spt\"", value_ba.data() );
+ if ( ok != 0 )
+ *ok = false;
+ return 0;
+@@ -5737,7 +5754,8 @@
+ */
+ static const QwtMmlOperSpec *searchOperSpecData( const QString &name )
+ {
+- const char *name_latin1 = name.toLatin1().data();
++ QByteArray name_latin1_ba = name.toLatin1();
++ const char *name_latin1 = name_latin1_ba.data();
+
+ // binary search
+ // establish invariant g_oper_spec_data[begin].name < name < g_oper_spec_data[end].name
+@@ -5789,7 +5807,8 @@
+ if ( spec == 0 )
+ continue;
+
+- const char *name_latin1 = name.toLatin1().data();
++ QByteArray name_ba = name.toLatin1();
++ const char *name_latin1 = name_ba.data();
+
+ // backtrack to the first instance of name
+ while ( spec > g_oper_spec_data && qstrcmp( ( spec - 1 )->name, name_latin1 ) == 0 )
+@@ -5918,7 +5937,8 @@
+ if ( ok != 0 )
+ *ok = false;
+
+- qWarning( "interpretMathVariant(): could not parse value: \"%s\"", value.toLatin1().data() );
++ QByteArray value_ba = value.toLatin1();
++ qWarning( "interpretMathVariant(): could not parse value: \"%s\"", value_ba.data() );
+
+ return QwtMml::NormalMV;
+ }
+@@ -5938,7 +5958,8 @@
+ if ( ok != 0 )
+ *ok = false;
+
+- qWarning( "interpretForm(): could not parse value \"%s\"", value.toLatin1().data() );
++ QByteArray value_ba = value.toLatin1();
++ qWarning( "interpretForm(): could not parse value \"%s\"", value_ba.data() );
+ return QwtMml::InfixForm;
+ }
+
+@@ -5959,7 +5980,8 @@
+ if ( ok != 0 )
+ *ok = false;
+
+- qWarning( "interpretColAlign(): could not parse value \"%s\"", value.toLatin1().data() );
++ QByteArray value_ba = value.toLatin1();
++ qWarning( "interpretColAlign(): could not parse value \"%s\"", value_ba.data() );
+ return QwtMml::ColAlignCenter;
+ }
+
+@@ -5984,7 +6006,8 @@
+ if ( ok != 0 )
+ *ok = false;
+
+- qWarning( "interpretRowAlign(): could not parse value \"%s\"", value.toLatin1().data() );
++ QByteArray value_ba = value.toLatin1();
++ qWarning( "interpretRowAlign(): could not parse value \"%s\"", value_ba.data() );
+ return QwtMml::RowAlignAxis;
+ }
+
+@@ -6018,7 +6041,8 @@
+ if ( ok != 0 )
+ *ok = false;
+
+- qWarning( "interpretFrameType(): could not parse value \"%s\"", value.toLatin1().data() );
++ QByteArray value_ba = value.toLatin1();
++ qWarning( "interpretFrameType(): could not parse value \"%s\"", value_ba.data() );
+ return QwtMml::FrameNone;
+ }
+
+@@ -6030,7 +6054,8 @@
+ QStringList l = value_list.split( ' ' );
+ if ( l.count() != 2 )
+ {
+- qWarning( "interpretFrameSpacing: could not parse value \"%s\"", value_list.toLatin1().data() );
++ QByteArray value_list_ba = value_list.toLatin1();
++ qWarning( "interpretFrameSpacing: could not parse value \"%s\"", value_list_ba.data() );
+ if ( ok != 0 )
+ *ok = false;
+ return QwtMml::FrameSpacing( ( int )( 0.4 * em ), ( int )( 0.5 * ex ) );
+@@ -6089,7 +6114,10 @@
+ else if ( value == "bold" )
+ fn.setBold( true );
+ else
+- qWarning( "interpretDepreciatedFontAttr(): could not parse fontweight \"%s\"", value.toLatin1().data() );
++ {
++ QByteArray value_ba = value.toLatin1();
++ qWarning( "interpretDepreciatedFontAttr(): could not parse fontweight \"%s\"", value_ba.data() );
++ }
+ }
+
+ if ( font_attr.contains( "fontstyle" ) )
+@@ -6100,7 +6128,10 @@
+ else if ( value == "italic" )
+ fn.setItalic( true );
+ else
+- qWarning( "interpretDepreciatedFontAttr(): could not parse fontstyle \"%s\"", value.toLatin1().data() );
++ {
++ QByteArray value_ba = value.toLatin1();
++ qWarning( "interpretDepreciatedFontAttr(): could not parse fontstyle \"%s\"", value_ba.data() );
++ }
+ }
+
+ if ( font_attr.contains( "fontfamily" ) )
+@@ -6150,7 +6181,8 @@
+
+ if ( ok != 0 )
+ *ok = false;
+- qWarning( "interpretMathSize(): could not parse mathsize \"%s\"", value.toLatin1().data() );
++ QByteArray value_ba = value.toLatin1();
++ qWarning( "interpretMathSize(): could not parse mathsize \"%s\"", value_ba.data() );
+ return fn;
+ }
+
diff --git a/x11-libs/qwt/metadata.xml b/x11-libs/qwt/metadata.xml
index 8ce04e6e2158..5927e4d57e6e 100644
--- a/x11-libs/qwt/metadata.xml
+++ b/x11-libs/qwt/metadata.xml
@@ -9,4 +9,7 @@
compasses, thermometers, wheels and knobs to control or display
values, arrays or ranges of type double.
</longdescription>
+<use>
+ <flag name='mathml'>Use the MathML renderer of the Qt solutions package.</flag>
+</use>
</pkgmetadata>
diff --git a/x11-libs/qwt/qwt-6.0.2.ebuild b/x11-libs/qwt/qwt-6.0.2.ebuild
new file mode 100644
index 000000000000..5ed0498b4da0
--- /dev/null
+++ b/x11-libs/qwt/qwt-6.0.2.ebuild
@@ -0,0 +1,95 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/x11-libs/qwt/qwt-6.0.2.ebuild,v 1.1 2013/01/31 11:40:58 gienah Exp $
+
+EAPI=4
+
+inherit eutils qt4-r2
+
+MY_P="${PN}-${PV/_/-}"
+
+DESCRIPTION="2D plotting library for Qt4"
+HOMEPAGE="http://qwt.sourceforge.net/"
+SRC_URI="mirror://sourceforge/project/${PN}/${PN}/${PV/_/-}/${MY_P}.tar.bz2"
+
+LICENSE="qwt mathml? ( LGPL-2.1 Nokia-Qt-LGPL-Exception-1.1 )"
+KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-macos"
+SLOT="6"
+IUSE="doc examples mathml svg"
+
+DEPEND="
+ x11-libs/qt-gui:4
+ doc? ( !<media-libs/coin-3.1.3[doc] )
+ svg? ( x11-libs/qt-svg:4 )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}"/${MY_P}
+
+DOCS="CHANGES README"
+
+src_prepare() {
+ cat > qwtconfig.pri <<-EOF
+ QWT_INSTALL_LIBS = "${EPREFIX}/usr/$(get_libdir)"
+ QWT_INSTALL_HEADERS = "${EPREFIX}/usr/include/qwt6"
+ QWT_INSTALL_DOCS = "${EPREFIX}/usr/share/doc/${PF}"
+ QWT_CONFIG += QwtDll QwtPlot QwtWidgets QwtDesigner
+ VERSION = ${PV/_*}
+ QWT_INSTALL_PLUGINS = "${EPREFIX}/usr/$(get_libdir)/qt4/plugins/designer6"
+ QWT_INSTALL_FEATURES = "${EPREFIX}/usr/$(get_libdir)/qt4/features6"
+ EOF
+ if use mathml; then
+ cat >> qwtconfig.pri <<-EOF
+ QWT_CONFIG += QwtMathML
+ EOF
+ fi
+ cat > qwtbuild.pri <<-EOF
+ QWT_CONFIG += qt warn_on thread release no_keywords
+ EOF
+
+ # don't build examples - fix the qt files to build once installed
+ cat > examples/examples.pri <<-EOF
+ include( qwtconfig.pri )
+ TEMPLATE = app
+ MOC_DIR = moc
+ INCLUDEPATH += "${EPREFIX}/usr/include/qwt6"
+ DEPENDPATH += "${EPREFIX}/usr/include/qwt6"
+ LIBS += -lqwt
+ EOF
+ sed -i -e 's:../qwtconfig:qwtconfig:' examples/examples.pro || die
+ sed \
+ -e 's/target doc/target/' \
+ -i src/src.pro || die
+
+ # Renaming lib to libqwt6.so to enable slotting
+ sed \
+ -e "/^TARGET/s:(qwt):(qwt6):g" \
+ -i src/src.pro || die
+ sed \
+ -e '/qwtAddLibrary/s:qwt:qwt6:g' \
+ -i qwt.prf designer/designer.pro examples/examples.pri \
+ textengines/mathml/qwtmathml.prf textengines/textengines.pri || die
+ sed \
+ -e 's:libqwt:libqwt6:g' \
+ -i qwtbuild.pri || die
+
+ use svg && echo "QWT_CONFIG += QwtSvg" >> qwtconfig.pri
+ cp *.pri examples/ || die
+ epatch "${FILESDIR}/${PN}-6.0.2-invalid-read.patch"
+}
+
+src_compile() {
+ # split compilation to allow parallel building
+ emake sub-src
+ emake
+}
+
+src_install () {
+ qt4-r2_src_install
+ if use doc; then
+ dohtml -r doc/html/*
+ fi
+ if use examples; then
+ insinto /usr/share/doc/${PF}
+ doins -r examples
+ fi
+}