summaryrefslogtreecommitdiff
path: root/x11-libs/qwt
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /x11-libs/qwt
reinit the tree, so we can have metadata
Diffstat (limited to 'x11-libs/qwt')
-rw-r--r--x11-libs/qwt/Manifest10
-rw-r--r--x11-libs/qwt/files/qwt-5.2.3-install_qt.patch28
-rw-r--r--x11-libs/qwt/files/qwt-6.0.2-invalid-read.patch250
-rw-r--r--x11-libs/qwt/files/qwt-6.1.1-pc-destdir.patch15
-rw-r--r--x11-libs/qwt/metadata.xml22
-rw-r--r--x11-libs/qwt/qwt-5.2.3-r2.ebuild101
-rw-r--r--x11-libs/qwt/qwt-6.1.3-r1.ebuild213
7 files changed, 639 insertions, 0 deletions
diff --git a/x11-libs/qwt/Manifest b/x11-libs/qwt/Manifest
new file mode 100644
index 000000000000..8dd255a0c1ab
--- /dev/null
+++ b/x11-libs/qwt/Manifest
@@ -0,0 +1,10 @@
+AUX qwt-5.2.3-install_qt.patch 963 SHA256 e497e1bdbba7700b28e7cbe99faa196d76115bcfad588495a41f0a05672b5740 SHA512 e4bd767fd0942dbac0a585f4c6b588faa99f1f38d02fe8db6c3be181c7a7c6955abc874df916ed446dde537f6090ca81610ae49ba55766033bd8bd801808e8e9 WHIRLPOOL 1723c57b40061938158977f5ab183caab26b71ed610b5eaef8f90c53596753089719f3a7d345ccc6c6feec86f7ae8f50c7c3154d37bb5b4502a84880d1167d9b
+AUX qwt-6.0.2-invalid-read.patch 9447 SHA256 d063b36170af2c2ca12c44fa283cc1b387b97ce6c53f02f101db45ebed975b43 SHA512 e9912ec60d062bad89ecb74c0342815f8c7b351318df88120e7510e44224f52a1c89e8ab2bcafd6d8c418a7a3e67347b159d174d417cbebf4fa3377191d0f201 WHIRLPOOL 0a71af42f61e605f03c648dd21b74a3b3e6864ca956c9adf84eafe7d98ca6aec49ec23316137ea60a9d0c078f06ec39ac6ae3e02fc217b56b0d3f3f4608564f2
+AUX qwt-6.1.1-pc-destdir.patch 498 SHA256 45f56f496dd50bf30e541605e97659a30c55b60b8aab9241cb8738ee180224cf SHA512 a2035e27af7110a2aaf4e28f316e2c6c49b6909345ceec01eb4793ac66445594bf362fa6939506ba6d0300bde9487c83ea770299af8c3ca8d71b162cbc71e769 WHIRLPOOL c68cca8380ca2c049419c574bec89ce61668f379b1e8ed47c79266c7430e8fcf1a325946f04bc1600538aeb353d7a8c03147759eccb47832aaab0f019eda9f6c
+DIST qwt-5.2.3.tar.bz2 1983725 SHA256 37feaf306753230b0d8538b4ff9b255c6fddaa3d6609ec5a5cc39a5a4d020ab7 SHA512 60545712790699b145a54baba4c40802d9a58bf5f68f997faed5027db6773a801097be8675e00b2af1de568e36e2e498db0a0310ac4877fd9f2b52871409dd49 WHIRLPOOL 01969f3e52c687b8db211c81c0865762fe908e49255f3517fc4731a8d3e6e1c738a8d18b8a43d8035314832693277cdc6303db2c5151be1385238812e6248ff6
+DIST qwt-6.1.3.tar.bz2 4245614 SHA256 f3ecd34e72a9a2b08422fb6c8e909ca76f4ce5fa77acad7a2883b701f4309733 SHA512 d4a73e9e7ddcb7c16c508920a298784935be2eddc8f7585993d9fffe1bb01e1787a0d5d7ea4f220398b94ea2b211a19009dccaeadce56a84410357124bcb051a WHIRLPOOL ebcc43a29bb056d6fc4433a63b07e0dcfa6e09b5581d7ff9d96c09826faec9ea62c1d6d6f3ee2e79859c56df491ee65b29b08cb9a3b0644a0eace3351c4a322c
+EBUILD qwt-5.2.3-r2.ebuild 2613 SHA256 f42e13b1ec019603cd93b217e5db6c939630806bbe54c40d3e61454b88a0a58e SHA512 d1cde98eaebe87e74f0b40f4743d3ba0dd4a446c9998694083bd8514d125dc16cabef377c8a83a24301f51fe7013e3bd1171320a6aaeb6338eed5d0472f4356f WHIRLPOOL 36ad396eb8384292c04977fcddb9ec72e1238f2bc97033e10ee9e5ead396f9d6cf38348ade4f27de0e0340f5090d80dd035a89ac453ae852353fba4e94e7914f
+EBUILD qwt-6.1.3-r1.ebuild 5238 SHA256 a879318d818b1e4308d4dbd9767aee83916286e098744fefd0822d729905a156 SHA512 1ae81490e6f49e58fa03df9c06e1105f41d2a243632dd83390a525c090a4c58d84bd60614f1e3c35b293d3bd272f8c2443cbfe908a6a2e5cea153560955a2c88 WHIRLPOOL 2256a13508a71470dc45c5a8a8c89b617fdf3c333a2ef9d0a4f2bb10d812d5446543a2e0625018a5223fe9bccd75f199dc24d7614309ac89919e18e76dc5dd9e
+MISC ChangeLog 3839 SHA256 18a4a5c7a4acfa43da61c4c6f9ab976f24057d992be75a6d1f2b390ddfbe0b28 SHA512 91540f579972fa56c3272bd0d230e0d7e3a622c56853be7229b4e79a63a8e2c700a1f7504aca8d96012938837ce133acf7b34cf39fdada51b41fdf6d2d52eaf5 WHIRLPOOL 3c2c90027da97ecbcb3955357df84743628edaa7f3d3a9443dab8f9a77990eb28b58e888a49d88bf5f76452a136dbaaf64b118b485709e11a824562df6b6456f
+MISC ChangeLog-2015 19038 SHA256 83db1e8558fc51466d501fa2475236072167f71751375820bd0acfcb74d89519 SHA512 ac4bdce06fee516a2c15c677924ab8fffc60212cdba4b1196927cec2f3249f73d9324ec613872815f448b85396711fc585ee32d3334005e5cf04ba0b3fe6e436 WHIRLPOOL d48b384b68b3789e5414782b5327cbb4c283b08234cabaa60be5e4f1ce7a6a351d6bde9a2198445d165caf41130106cce76c4ef782c2adf0e9d2a869e8f6150b
+MISC metadata.xml 870 SHA256 592529b9f7b70dd59cfd9044a9ffe1e97be15be067efe1308f6a2794ce147a99 SHA512 53e10079699529613ece87ae1e2908e7f7144d041f62618512d00df0b6bf9ae2c5b70afc8309cef0523e10a6605126f3ce871589c3133d64ac52db9ff7346b43 WHIRLPOOL 5f1fc0740549ab51cabc2323b3f25afb439e31aadbb63ce186c30a7cbccbe05d136c1b8667e2299098ad73b232ef4e1ef589770b4539159d94b4379c11f4b2e4
diff --git a/x11-libs/qwt/files/qwt-5.2.3-install_qt.patch b/x11-libs/qwt/files/qwt-5.2.3-install_qt.patch
new file mode 100644
index 000000000000..48e9385811f8
--- /dev/null
+++ b/x11-libs/qwt/files/qwt-5.2.3-install_qt.patch
@@ -0,0 +1,28 @@
+diff -up qwt-5.2.2/designer/designer.pro.install_qt qwt-5.2.2/designer/designer.pro
+--- qwt-5.2.2/designer/designer.pro.install_qt 2011-08-01 04:28:22.000000000 -0500
++++ qwt-5.2.2/designer/designer.pro 2012-08-14 11:11:22.569229749 -0500
+@@ -36,6 +37,7 @@ contains(CONFIG, QwtDesigner) {
+ else {
+ SUFFIX_STR = $${RELEASE_SUFFIX}
+ }
++ LIBNAME = qwt$${SUFFIX_STR}
+ }
+
+ TEMPLATE = lib
+@@ -45,7 +47,6 @@ contains(CONFIG, QwtDesigner) {
+ INCLUDEPATH += $${QWT_ROOT}/src
+ DEPENDPATH += $${QWT_ROOT}/src
+
+- LIBNAME = qwt$${SUFFIX_STR}
+ contains(CONFIG, QwtDll) {
+ win32 {
+ DEFINES += QT_DLL QWT_DLL
+@@ -103,7 +104,7 @@ contains(CONFIG, QwtDesigner) {
+
+ # Qt 4
+
+- TARGET = qwt_designer_plugin$${SUFFIX_STR}
++ TARGET = qwt5_designer_plugin$${SUFFIX_STR}
+ CONFIG += qt designer plugin
+
+ RCC_DIR = resources
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/files/qwt-6.1.1-pc-destdir.patch b/x11-libs/qwt/files/qwt-6.1.1-pc-destdir.patch
new file mode 100644
index 000000000000..f00ea604f5f4
--- /dev/null
+++ b/x11-libs/qwt/files/qwt-6.1.1-pc-destdir.patch
@@ -0,0 +1,15 @@
+ textengines/mathml/mathml.pro | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/textengines/mathml/mathml.pro b/textengines/mathml/mathml.pro
+index 7032366..b1372f7 100644
+--- a/textengines/mathml/mathml.pro
++++ b/textengines/mathml/mathml.pro
+@@ -63,6 +63,7 @@ contains(QWT_CONFIG, QwtPkgConfig) {
+
+ # QMAKE_PKGCONFIG_DESTDIR is buggy, in combination
+ # with including pri files: better don't use it
++ QMAKE_PKGCONFIG_DESTDIR = pkgconfig
+
+ greaterThan(QT_MAJOR_VERSION, 4) {
+
diff --git a/x11-libs/qwt/metadata.xml b/x11-libs/qwt/metadata.xml
new file mode 100644
index 000000000000..5fa861212232
--- /dev/null
+++ b/x11-libs/qwt/metadata.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sci@gentoo.org</email>
+ <name>Gentoo Science Project</name>
+ </maintainer>
+ <longdescription lang="en">
+ The Qwt library contains GUI Components and utility classes which are
+ primarily useful for programs with a technical background.
+ Besides a 2D plot widget it provides scales, sliders, dials,
+ compasses, thermometers, wheels and knobs to control or display
+ values, arrays or ranges of type double.
+</longdescription>
+ <use>
+ <flag name="designer">Installs <pkg>dev-qt/designer</pkg> plugin.</flag>
+ <flag name="mathml">Use the MathML renderer of the Qt solutions package.</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">qwt</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/x11-libs/qwt/qwt-5.2.3-r2.ebuild b/x11-libs/qwt/qwt-5.2.3-r2.ebuild
new file mode 100644
index 000000000000..73b753b76ec7
--- /dev/null
+++ b/x11-libs/qwt/qwt-5.2.3-r2.ebuild
@@ -0,0 +1,101 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils multibuild qt4-r2
+
+DESCRIPTION="2D plotting library for Qt4"
+HOMEPAGE="http://qwt.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+
+LICENSE="qwt"
+KEYWORDS="~alpha amd64 arm ia64 ppc ppc64 sparc x86 ~x86-macos"
+SLOT="5"
+IUSE="doc examples static-libs svg"
+
+DEPEND="
+ dev-qt/designer:4
+ dev-qt/qtgui:4
+ doc? ( !<media-libs/coin-3.1.3[doc] )
+ svg? ( dev-qt/qtsvg:4 )"
+RDEPEND="${DEPEND}"
+
+DOCS="CHANGES README"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-install_qt.patch
+ sed -e "/QwtVersion/s:5.2.2.:${PV}:g" -i ${PN}.prf || die
+
+ cat > qwtconfig.pri <<-EOF
+ target.path = "${EPREFIX}/usr/$(get_libdir)"
+ headers.path = "${EPREFIX}/usr/include/qwt5"
+ doc.path = "${EPREFIX}/usr/share/doc/${PF}"
+ CONFIG += qt warn_on thread release
+ CONFIG += QwtPlot QwtWidgets QwtDesigner
+ VERSION = ${PV}
+ QWT_VERSION = ${PV/_*}
+ QWT_INSTALL_PLUGINS = "${EPREFIX}/usr/$(get_libdir)/qt4/plugins/designer"
+ QWT_INSTALL_FEATURES = "${EPREFIX}/usr/share/qt4/mkspecs/features"
+ EOF
+ sed -i -e 's/headers doc/headers/' src/src.pro || die
+ use svg && echo >> qwtconfig.pri "CONFIG += QwtSVGItem"
+
+ MULTIBUILD_VARIANTS=( )
+ use static-libs && MULTIBUILD_VARIANTS+=( static )
+ MULTIBUILD_VARIANTS+=( shared )
+
+ qt4-r2_src_prepare
+
+ preparation() {
+ cp -rf "${S}" "${BUILD_DIR}" || die
+ [[ ${MULTIBUILD_VARIANT} == shared ]] && \
+ echo "CONFIG += QwtDll" >> "${BUILD_DIR}"/qwtconfig.pri
+ }
+
+ multibuild_foreach_variant preparation
+}
+
+src_configure() {
+ multibuild_parallel_foreach_variant run_in_build_dir eqmake4 ${PN}.pro
+}
+
+src_compile() {
+ multibuild_foreach_variant run_in_build_dir qt4-r2_src_compile
+}
+
+src_test() {
+ testing() {
+ cd examples || die
+ eqmake4 examples.pro
+ emake
+ }
+ multibuild_foreach_variant run_in_build_dir testing
+}
+
+src_install () {
+ multibuild_foreach_variant run_in_build_dir qt4-r2_src_install
+
+ if use doc; then
+ insinto /usr/share/doc/${PF}
+ rm doc/man/*/*license* || die
+ rm -f doc/man/*/{_,deprecated}* || die
+ doman doc/man/*/*
+ doins -r doc/html
+ fi
+ if use examples; then
+ # 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/qwt5"
+ DEPENDPATH += "${EPREFIX}/usr/include/qwt5"
+ LIBS += -lqwt
+ EOF
+ sed -i -e 's:../qwtconfig:qwtconfig:' examples/examples.pro || die
+ cp *.pri examples/ || die
+ insinto /usr/share/${PN}5
+ doins -r examples
+ fi
+}
diff --git a/x11-libs/qwt/qwt-6.1.3-r1.ebuild b/x11-libs/qwt/qwt-6.1.3-r1.ebuild
new file mode 100644
index 000000000000..8d6468047b2d
--- /dev/null
+++ b/x11-libs/qwt/qwt-6.1.3-r1.ebuild
@@ -0,0 +1,213 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit multibuild qmake-utils
+
+MY_P="${PN}-${PV/_/-}"
+
+DESCRIPTION="2D plotting library for Qt4 and Qt5"
+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 ~arm ~ia64 ppc ppc64 sparc x86 ~amd64-linux ~x86-linux ~x86-macos"
+SLOT="6/1.3"
+IUSE="designer doc examples mathml opengl qt4 qt5 static-libs svg"
+
+REQUIRED_USE="|| ( qt4 qt5 )"
+
+DEPEND="
+ opengl? ( virtual/opengl )
+ qt4? (
+ dev-qt/qtcore:4
+ dev-qt/qtgui:4
+ designer? ( dev-qt/designer:4 )
+ opengl? ( dev-qt/qtopengl:4 )
+ svg? ( dev-qt/qtsvg:4 )
+ )
+ qt5? (
+ dev-qt/qtconcurrent:5
+ dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qtprintsupport:5
+ dev-qt/qtwidgets:5
+ designer? ( dev-qt/designer:5 )
+ opengl? ( dev-qt/qtopengl:5 )
+ svg? ( dev-qt/qtsvg:5 )
+ )
+"
+RDEPEND="${DEPEND}
+ !<x11-libs/qwt-5.2.3
+ !x11-libs/qwt:5[doc]
+ doc? ( !<media-libs/coin-3.1.3[doc] )
+"
+
+S="${WORKDIR}"/${MY_P}
+
+DOCS=( CHANGES-6.1 README )
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-6.0.2-invalid-read.patch
+ "${FILESDIR}"/${PN}-6.1.1-pc-destdir.patch
+)
+
+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 += QwtPlot QwtWidgets QwtPkgConfig
+ VERSION = ${PV/_*}
+ QWT_VERSION = ${PV/_*}
+ EOF
+
+ use designer && echo "QWT_CONFIG += QwtDesigner" >> qwtconfig.pri
+ use mathml && echo "QWT_CONFIG += QwtMathML" >> qwtconfig.pri
+ use opengl && echo "QWT_CONFIG += QwtOpenGL" >> qwtconfig.pri
+ use svg && echo "QWT_CONFIG += QwtSvg" >> qwtconfig.pri
+
+ cat > qwtbuild.pri <<-EOF
+ QWT_CONFIG += qt warn_on thread release no_keywords
+ EOF
+
+ MULTIBUILD_VARIANTS=( )
+
+ if use qt4; then
+ use static-libs && MULTIBUILD_VARIANTS+=( qt4-static )
+ MULTIBUILD_VARIANTS+=( qt4-shared )
+ fi
+
+ if use qt5; then
+ use static-libs && MULTIBUILD_VARIANTS+=( qt5-static )
+ MULTIBUILD_VARIANTS+=( qt5-shared )
+ fi
+
+ multibuild_copy_sources
+
+ preparation() {
+ if [[ ${MULTIBUILD_VARIANT} == *-shared ]]; then
+ echo "QWT_CONFIG += QwtDll" >> qwtconfig.pri
+ fi
+
+ case "${MULTIBUILD_VARIANT}" in
+ qt4-*)
+ cat >> qwtconfig.pri <<-EOF
+ QWT_INSTALL_PLUGINS = "${EPREFIX}$(qt4_get_plugindir)/designer"
+ QWT_INSTALL_FEATURES = "${EPREFIX}$(qt4_get_mkspecsdir)/features"
+ EOF
+ sed \
+ -e 's/target doc/target/' \
+ -e "/^TARGET/s:(qwt):(qwt6-qt4):g" \
+ -e "/^TARGET/s:qwt):qwt6-qt4):g" \
+ -i src/src.pro || die
+
+ sed \
+ -e '/qwtAddLibrary/s:(qwt):(qwt6-qt4):g' \
+ -e '/qwtAddLibrary/s:qwt):qwt6-qt4):g' \
+ -i qwt.prf designer/designer.pro examples/examples.pri \
+ textengines/mathml/qwtmathml.prf textengines/textengines.pri || die
+
+ ;;
+ qt5-*)
+ cat >> qwtconfig.pri <<-EOF
+ QWT_INSTALL_PLUGINS = "${EPREFIX}$(qt5_get_plugindir)/designer"
+ QWT_INSTALL_FEATURES = "${EPREFIX}$(qt5_get_mkspecsdir)/features"
+ EOF
+ sed \
+ -e 's/target doc/target/' \
+ -e "/^TARGET/s:(qwt):(qwt6-qt5):g" \
+ -e "/^TARGET/s:qwt):qwt6-qt5):g" \
+ -i src/src.pro || die
+
+ sed \
+ -e '/qwtAddLibrary/s:(qwt):(qwt6-qt5):g' \
+ -e '/qwtAddLibrary/s:qwt):qwt6-qt5):g' \
+ -i qwt.prf designer/designer.pro examples/examples.pri \
+ textengines/mathml/qwtmathml.prf textengines/textengines.pri || die
+ ;;
+ esac
+ default
+ }
+
+ multibuild_foreach_variant run_in_build_dir preparation
+}
+
+src_configure() {
+ configuration() {
+ case "${MULTIBUILD_VARIANT}" in
+ qt4-*)
+ eqmake4
+ ;;
+ qt5-*)
+ eqmake5
+ ;;
+ esac
+ }
+ multibuild_foreach_variant run_in_build_dir configuration
+}
+
+src_compile() {
+ multibuild_foreach_variant run_in_build_dir default
+}
+
+src_test() {
+ testing() {
+ cd examples || die
+ case "${MULTIBUILD_VARIANT}" in
+ qt4-*)
+ eqmake4 examples.pro
+ ;;
+ qt5-*)
+ eqmake5 examples.pro
+ ;;
+ esac
+ emake
+ }
+ multibuild_foreach_variant run_in_build_dir testing
+}
+
+src_install () {
+ rm -f doc/man/*/{_,deprecated}* || die
+
+ multibuild_foreach_variant run_in_build_dir emake INSTALL_ROOT="${D}" install
+
+ if use qt4; then
+ mv "${ED}"/usr/$(get_libdir)/pkgconfig/qwt6{-qt4,}.pc || die
+ fi
+
+ if use mathml; then
+ sed \
+ -e "s: -L\"${WORKDIR}\".* -lqwt6: -lqwt6:g" \
+ -i "${ED}"/usr/$(get_libdir)/pkgconfig/qwtmathml.pc || die
+ fi
+
+ if use doc; then
+ HTML_DOCS=( doc/html/. )
+ else
+ rm -rf "${ED}"/usr/share/doc/${PF}/html || die
+ fi
+
+ einstalldocs
+
+ mkdir -p "${ED}"/usr/share/man/ || die
+ mv "${ED}"/usr/share/doc/${PF}/man/man3 "${ED}"/usr/share/man/ && \
+ rmdir "${ED}"/usr/share/doc/${PF}/man || die
+
+ if use examples; then
+ # 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 += -lqwt6
+ EOF
+ sed -i -e 's:../qwtconfig:qwtconfig:' examples/examples.pro || die
+ cp *.pri examples/ || die
+ insinto /usr/share/${PN}6
+ doins -r examples
+ fi
+}