summaryrefslogtreecommitdiff
path: root/sci-visualization/qtiplot
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 /sci-visualization/qtiplot
reinit the tree, so we can have metadata
Diffstat (limited to 'sci-visualization/qtiplot')
-rw-r--r--sci-visualization/qtiplot/Manifest24
-rw-r--r--sci-visualization/qtiplot/files/qtiplot-0.9.7.10-dont-install-qwt.patch22
-rw-r--r--sci-visualization/qtiplot/files/qtiplot-0.9.8.6-gold.patch15
-rw-r--r--sci-visualization/qtiplot/files/qtiplot-0.9.8.7-kde.patch16
-rw-r--r--sci-visualization/qtiplot/files/qtiplot-0.9.8.8-system-gl2ps.patch76
-rw-r--r--sci-visualization/qtiplot/files/qtiplot-0.9.8.9-PyQt4-4.10.patch32
-rw-r--r--sci-visualization/qtiplot/files/qtiplot-0.9.8.9-PyQt4-4.11.3.patch32
-rw-r--r--sci-visualization/qtiplot/files/qtiplot-0.9.8.9-adopt_to_alglib3.patch115
-rw-r--r--sci-visualization/qtiplot/files/qtiplot-0.9.8.9-crasher_without_internet.patch25
-rw-r--r--sci-visualization/qtiplot/files/qtiplot-0.9.8.9-gsl-2.patch36
-rw-r--r--sci-visualization/qtiplot/files/qtiplot-0.9.8.9-origin-2.patch38
-rw-r--r--sci-visualization/qtiplot/files/qtiplot-0.9.8.9-private.patch15
-rw-r--r--sci-visualization/qtiplot/files/qtiplot-0.9.8.9-qt48.patch29
-rw-r--r--sci-visualization/qtiplot/files/qtiplot-0.9.8.9-set_col_values.patch18
-rw-r--r--sci-visualization/qtiplot/files/qtiplot-0.9.8.9-sip-4.15.patch31
-rw-r--r--sci-visualization/qtiplot/files/qtiplot-0.9.8.9-sip-4.19.patch38
-rw-r--r--sci-visualization/qtiplot/metadata.xml15
-rw-r--r--sci-visualization/qtiplot/qtiplot-0.9.8.9-r2.ebuild235
-rw-r--r--sci-visualization/qtiplot/qtiplot-0.9.8.9-r3.ebuild238
-rw-r--r--sci-visualization/qtiplot/qtiplot-0.9.8.9-r4.ebuild241
20 files changed, 1291 insertions, 0 deletions
diff --git a/sci-visualization/qtiplot/Manifest b/sci-visualization/qtiplot/Manifest
new file mode 100644
index 000000000000..c69d94a37fa7
--- /dev/null
+++ b/sci-visualization/qtiplot/Manifest
@@ -0,0 +1,24 @@
+AUX qtiplot-0.9.7.10-dont-install-qwt.patch 605 SHA256 161657d37de71ea58fc0e0af3495dc45082f5c398bd82c70e40968b23d0b898b SHA512 c2ff3cac3745c0f6b15aaecd64601b0869684c850de4b431b719bf448c08e86906ca1f506fdc4c2e8da6e44ed79376f5338b0f96fd89b59f72db6159596c06b2 WHIRLPOOL a65bc19da769e3bd977825cc8c6256dfcec4fde0af5fe5ca4a1619447fd903ebf86b4c439e9899a0506d15efb53d3f29ff339fb684d045d9d5de8b67e70e4a68
+AUX qtiplot-0.9.8.6-gold.patch 535 SHA256 601bdea70053618be63f446c7c35fc991587a5ca439260d75bcb84308d116784 SHA512 fae41593f480c0d32a4a1f619d735bbd67ff3d97ae5d2e6813ef7f487fb3dac6edb99022f34ab6e725358bddef988de025d2d6261c93f9c1429dd2329649b04f WHIRLPOOL 4d0f7e48049d70f9f314397e8b3378774f134bc6ea71a89bc26a08806436798c05be65c214d33e2fff7ff415712def6466e32e24f77bfee687d7cbcb6f8d0fb5
+AUX qtiplot-0.9.8.7-kde.patch 454 SHA256 5cfe122907403ed1f766118934aa42eac05db41efabd0c6618df17af16e3aff1 SHA512 6de43a6fea8dee412b5b9b0ca8d36099167febbf86292222077cbd9bc3055808e317ad1ef4b721b76b7fdec7b26520ee5edc27407b0ac44e0e2d73256424f620 WHIRLPOOL 15a5615d9851e4a9844b0529bf3bb7d2edb4449a7276d8575b6c2cc1b6438a4c81ddaf706f51878ad0fcf19dab0f369fc5664343021039a14cec6bbab4e13df7
+AUX qtiplot-0.9.8.8-system-gl2ps.patch 2436 SHA256 0787155b465aa6cdf4b2c12a87dd68e6b5aa2197b041b06a550023c1ca96c81c SHA512 d5342962c2710048eac398b3122bbf1bbfb7360dff2aad759fa8fe111d23b761f1bcfd8597ebba996813c082d9c746ad2d4b393e00c527845ca7a684f698b4d2 WHIRLPOOL a1e0addc9746f3e0829aa15f9549deadcfeb7621de307c2ec398cacecde49f67cc0288e5afc1f24079fa69f299ab90ea6846c407cb01aef525b01b5420e1214c
+AUX qtiplot-0.9.8.9-PyQt4-4.10.patch 1089 SHA256 58f2c8e64b315dc670452ee777084bcfe8869b6175fdb9f66afc3c8218a5aee2 SHA512 6c85172fda42f0f381a7146080a92858c850d92eca0c580afe0ce384f4bf124afdc94b809af78bc6d9373a5921be5647a79d0159ae3f26daeb911a7e0bb072fb WHIRLPOOL 1852b83df00ece7ac882e712da496d39439794f879fe918a9c4504f9fde3010c0ac6e0a6c2a34e2ca205efcf42dae9869411a783bcb982b6f86f2a5bad024cb7
+AUX qtiplot-0.9.8.9-PyQt4-4.11.3.patch 1098 SHA256 cc7f66e28467d849101421eca45b0497245acb3affeca8323b66c96c7381ee48 SHA512 58268def88227cfb765873bc4b809c3f3851bf9bb09a3e3fd1b54e6158de9294226e3394968312c25cf452ddf02af9078a494e9d62149f458f5b67d21438c740 WHIRLPOOL ef8d0fa9c1ff1196dbf7b66fe6d716e462d0b524a3883e04cb820e4c3b44c7b22c0cb0f5851d62b1a5abfa101c2e7beb441f30b64a76b05597bab9c66f0134a9
+AUX qtiplot-0.9.8.9-adopt_to_alglib3.patch 3596 SHA256 5256ff47807762def7de5c00ef206c73c15d5c61c0fd1087aa6b1a7b866aca32 SHA512 7e1a1b1ce174c010c66025e3d84975d2f636924abf5f4f862d3e3a367731fb25856e017bc3fd8e6a726ce3d707143b704dafef8b272a6307b3f17747c2a35b67 WHIRLPOOL 1826c5131f59d42a70d66535b55936916e15cb6f8200e03521f762d82daf930588879eed958db8ceadcf652c3ca09a2ac029e3b1623446da1d3177cf6362aef5
+AUX qtiplot-0.9.8.9-crasher_without_internet.patch 939 SHA256 d2d51f7e560296c11501c6882d4e201c248afd9b0359670c276a33558d5953a4 SHA512 d32a0302ec508d9646b1e2c40a69329d376d9c8e859a607044e5fd9cfa6a59a5b89ff5c21c8a56c110cc0747ddf8538751f28309635c3ef97876abeae7782f4a WHIRLPOOL 424574675f53aa863fcf22c023f4c56250c1e6f345fbf181fb87a6c0eb4cffc5bf9bd8a54a97a55ef1d4d0be5872fc7464ca6de4d9b25844bf8412da8d3b5504
+AUX qtiplot-0.9.8.9-gsl-2.patch 1285 SHA256 31b4dfaabc58de6b0675d79ed77d732b0b9b595f2d8faeb15299c24c77457d3d SHA512 04c77ffb1f187bfeee813c2a1947922aec2f05cbfdd6e3a11be81924c6dcf302a365c05ceef60f9138105235c3413c5dbcb494ac18ff58da1d99ad49c9f68e84 WHIRLPOOL 8fe54c238a68276bb8d0731fd5bbac212dee2316d55b8f2e7af48e5362654441b0221cef470277f2cf205b3834f90c3958167210ebb56e53005927f86a0b4f23
+AUX qtiplot-0.9.8.9-origin-2.patch 1713 SHA256 f48441a91326dbea572d52d9e22449fc29c3e205ce90925f277a1121233a4c40 SHA512 516addaab1a21aff57dece95e424afc7df6cbc5422962aef668f991d52122d07e44b8b17b985edde3074ac8d846c8f54a6ef857a5924ae393da56852692dd64d WHIRLPOOL d9455e9acfe6030c068f5076a1308eecbfbb5810af2a911a62242f58ce0e578a1dcf2c2a2c519dab26f4110ef7916b1663cf433c6e3bdeec8324178a0bc93a09
+AUX qtiplot-0.9.8.9-private.patch 696 SHA256 3f02d460e8df60d661b26ab2b6fb8188d60c7645d35db01d4adfabdae6f2d1be SHA512 e7ae0f1b010f5d4ed69e553932f97c97f643c948795619bbf33ff8d6137a3f02dc4832b434aa28c43ba71a01c9ebd5c60642d14cb24f0c83f2cb866955cb9815 WHIRLPOOL aacf9282fe0bbe6dab535b8246f75bf241eba32eb97e0e436aeb538296121726f0808cb65ada072181160b383d4d0b2f3a705aa01a0f79f4e94868c792b9734c
+AUX qtiplot-0.9.8.9-qt48.patch 984 SHA256 e434763efdad1693dadd7c94d5871d4b5d808ceebbaf7b2acd434b9b6166eb29 SHA512 5405786c3b42626d34f3fdf7f04f186def79b0b242cb1850cf5075b020d39f601cfa961aaf21e7a9276f4c2ce12cde4cc426f5f879be8135fd4bf10f9728098b WHIRLPOOL 3c3e087efe57e542077e3901ce9741df12eafd5fa79bac0cdef2cb183fad546b6b639f8647b20ccfec045fc8d9bd7a18ea2ed9abc4f5a8fc805fe19ec8a47a4a
+AUX qtiplot-0.9.8.9-set_col_values.patch 945 SHA256 969a7158e8c8b6cbf03a6dc06620730b3c10a0d12c51c933cb4d825d64174c93 SHA512 7de22eca7cc9ac40321c450d406fffe5b76a88b34bd9ddb8fda801f7d70d67f5747ee3144eb2a14d5e30a8c31b6f27b229f96e206ebbea5b6e22494c393cd1eb WHIRLPOOL 74f41cd537ea0f49bc85001cf86ad4dbad09c22af505bc7a9a4387ccc65cad1fa2aa7f933512faaf84b5121a16dcc1c7c8329e4d138d20732d0952382fc05700
+AUX qtiplot-0.9.8.9-sip-4.15.patch 1248 SHA256 06634d1555aef2e7bf2c2aa081522b69eb8c61e64e848f32931014984035d39f SHA512 5db9db5189ba3914dfe2413d899438e8f5da267d6d1367eef3a781592ab7b70e4381e5eb35dca8a60bb9b0540187586d4f75f80b90afa15a9aecb4bf872f66c4 WHIRLPOOL 8d537a391bdd226abc4520f709d842ce5c9935459ac2cb989844c35933c6a3c609726eac609504c7dfdeecc001e10deec1315e679d2b22f70daa3c68311a5b96
+AUX qtiplot-0.9.8.9-sip-4.19.patch 1548 SHA256 48dcbb31c79496587bccbd79f0bbb2b5f68c9b4fe5029b5dd638ef92df3fa72a SHA512 c3ddce29bda642b8d9deccd53136ca25c0a2d5b97547a7219be7f30400abfd595f23f49d4d7049382d3b481e111db01c3d89f0625aedf0b4c1c3eafd65672c5f WHIRLPOOL 6228d73f484ec0f9c34d2ce498c6a63ca7d5b1482cb4db21dbf3f075e4e789f067aa583eac4b6fc7b8932fab5e52ff8ce3c4bdeaa8d30044af58ed31c90ea43a
+DIST qtiplot-0.9.8.9-origin.patch.bz2 104708 SHA256 e83d7212be0fadae31b14c8a86b655fdb3b7c7b8fc80b1e2d91eb0a7e96b1e99 SHA512 62f5bb531c2fc7e061661ab5733a70acf9a61ff90a934af42b5741c63478caebabc8240f37d25660f623c5cbcd530e1303e967a095ca99b3452f29cfb5200b69 WHIRLPOOL 94b4b704737c2e6bb86caa00497164749df7eb01b13b49d06daa8f33b3e34d23782bde4fec617f35755c2e2f4286327bb39270bf48a9f020e94ef113f9d962bb
+DIST qtiplot-0.9.8.9-origin.patch.xz 89660 SHA256 8d1a9927fad711b7e357641926b884f68d28f8e2f648f6a7c071514d5d552c11 SHA512 adbd002975bb49997eb610b150c1bbfe9c9617b0b5bbb70f52df7475339b7d68cada175eb9f6048f6ece043ca3dcf5c62ef361d82bc670b1576ee8493d6b757c WHIRLPOOL 41fd5c1627737f060d7a0d99682e58417e050c7655798453a602c1cf9409d5bab319870b6054efe3542ac038c2bc32f804ae427646a3f56290a2c5b1905cbcd4
+DIST qtiplot-0.9.8.9.tar.bz2 16202943 SHA256 a523ea259516d7581abaf2fe376507d152db32f71d88176cff18f5bc391b9ef0 SHA512 3a0cb7b49c508f56228e8e3a259b4fd34c872410ad14ef1d8656372e3e8ab9f92e59094a9cc1a75680099a8832f7472ad31462b3ae8a9e132ac7056d5245cf2a WHIRLPOOL 3cf9d9ab7d58301364a61f6c5ad51858ffe1e6214c5971c1d042c7894fcb70fa4b28fe0e6631f142ab8fa9b2c2b979e4e178bc44b1961cde70b29d9aaa2c7d3f
+EBUILD qtiplot-0.9.8.9-r2.ebuild 6199 SHA256 038c218a508e8ac19b69a15e31cdb2a7653185c3889184e3520ae96f23db8825 SHA512 def75343c2eb7da66633ff27fee433d2cad928b2c19d146931e1bfd07427cbb8da3530a6126e82c570472c27dc1c9c6d95286359d3b9f9cdb5d9c55286dd9c0d WHIRLPOOL 069fafd56e50ba6c11e771db2675b5c1493429cf242f06084776d2bb433ad260a97e2f2bfd9c387fa899f5259550b88a143f70e3671d463c92eab177314336a1
+EBUILD qtiplot-0.9.8.9-r3.ebuild 6240 SHA256 b9e34e119b8e06c57e885bf0f5cc72590d74b160864312ca6cd226d227ee61ea SHA512 12a2a19b0ca2602e0d391303ea232d821c68a1371a0dddb2cba4bd850564ca74db72cd0f1605da7f6c6d0cd29d887d0e95776ffe60177b2bdac5c825f63b01a4 WHIRLPOOL 8baa2773f6062072fecb834f719293e0ed9ae97b5208b7ab5c0e0ad88b4101c99de28666f255c788d6d88de37a566d4ebe7f6596e1ccb4bfd20aedc5b845a7fa
+EBUILD qtiplot-0.9.8.9-r4.ebuild 6221 SHA256 cb4d842b78d7cc7de52bb2b9cb730b70e52d2dfaffa81d507e760f5233b2126c SHA512 31563c2024b29df7167b0530d5ed9c6084150cd2ffb7d0625eeec27eb3288d916f95773ad9a2c1a35daacbf873124cd327921db9890db762ecffcd1100f7bbac WHIRLPOOL e584cf7d430928c8c6e3ce9b2fc5125e4ea1d82e8831644b58124098f8c5f765bc46d7bd072f0a6cb672a1c3c171ea5d51d1907028bc1377e7028581b9fa951d
+MISC ChangeLog 4140 SHA256 bf1053e872c39da23f0f690cb0f5de2db8ddea5212049438772e74ee17caee70 SHA512 68d9f7dc60e5075d80574cc28f0fdb804d54cf39de2753c4bdb8c1db331e1d4d12437695ad2c8bfecddb77b3777415f09bd02be1005f27ab3d40811be5424f49 WHIRLPOOL 5b37c8a9fe2724cc7ea7dcea604ea17ce3c3f99a0eea3b150f558374a459e4f29976d6d7d9aadbfe4ccc741a8e9bfedbdb0bca6a2373fcb287a9fe39e171028d
+MISC ChangeLog-2015 25352 SHA256 4c1a25227a21dac8e5b8bee69b0db6b6d0969b7960504c7ded318697c0f6cf14 SHA512 3ea3daf811697b21ae82f714ef9d3f4b7b708ab6cc9ccc4af0160de297e3d243d5ed147b0a42e73454dd27445eeb01b1232f4fa29d82ed2efcf0cfb268350fd4 WHIRLPOOL aad640c48b2415d5e17490f7eb3fffacb351779c83696da658bc599eb1926f71fc6a82569e47f6fc9b8a94862346fc24847ce884572af506016c1332b01f92ba
+MISC metadata.xml 635 SHA256 263ddfd99f9ba0d0417fa2b37cb2de18aea47a861169f55fbbe8a0547c819e5a SHA512 cda594b03db95c44965d2f703be581e796bb7e5bd289d3db66b95484b8549296121414bd82d10bb6f19505e9a466f7efdaee940e3755dbba21013f668e8a71e1 WHIRLPOOL e140b88d02b77ac3fb0251ea45f7d7e32103f2ec058aad3d4f6a8c437b82f7ec34d06800c5094ff9a9b6a65dc6df653b12408d9266e5ea4c879a7e45fd199df0
diff --git a/sci-visualization/qtiplot/files/qtiplot-0.9.7.10-dont-install-qwt.patch b/sci-visualization/qtiplot/files/qtiplot-0.9.7.10-dont-install-qwt.patch
new file mode 100644
index 000000000000..86e4d4c6a9c1
--- /dev/null
+++ b/sci-visualization/qtiplot/files/qtiplot-0.9.7.10-dont-install-qwt.patch
@@ -0,0 +1,22 @@
+diff --git a/3rdparty/qwt/qwtconfig.pri b/3rdparty/qwt/qwtconfig.pri
+index b7d0d0e..e36f131 100755
+--- a/3rdparty/qwt/qwtconfig.pri
++++ b/3rdparty/qwt/qwtconfig.pri
+@@ -7,17 +7,6 @@ VER_MIN = 2
+ VER_PAT = 0
+ VERSION = $${VER_MAJ}.$${VER_MIN}.$${VER_PAT}
+
+-unix {
+- INSTALLBASE = /usr/local/qwt-5.2.0
+-}
+-
+-win32 {
+- INSTALLBASE = C:/Qwt-5.2.0
+-}
+-
+-target.path = $$INSTALLBASE/lib
+-headers.path = $$INSTALLBASE/include
+-doc.path = $$INSTALLBASE/doc
+
+ ######################################################################
+ # qmake internal options
diff --git a/sci-visualization/qtiplot/files/qtiplot-0.9.8.6-gold.patch b/sci-visualization/qtiplot/files/qtiplot-0.9.8.6-gold.patch
new file mode 100644
index 000000000000..3b6757533a52
--- /dev/null
+++ b/sci-visualization/qtiplot/files/qtiplot-0.9.8.6-gold.patch
@@ -0,0 +1,15 @@
+ qtiplot/qtiplot.pro | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+diff --git a/qtiplot/qtiplot.pro b/qtiplot/qtiplot.pro
+index 99e0e36..b7cf373 100755
+--- a/qtiplot/qtiplot.pro
++++ b/qtiplot/qtiplot.pro
+@@ -20,6 +20,7 @@ LIBS += $$MUPARSER_LIBS
+ LIBS += $$QWT_LIBS
+ LIBS += $$QWT3D_LIBS
+ LIBS += $$GSL_LIBS
++LIBS += -lz
+
+ #############################################################################
+ ###################### BASIC PROJECT PROPERTIES #############################
diff --git a/sci-visualization/qtiplot/files/qtiplot-0.9.8.7-kde.patch b/sci-visualization/qtiplot/files/qtiplot-0.9.8.7-kde.patch
new file mode 100644
index 000000000000..af1dca42da42
--- /dev/null
+++ b/sci-visualization/qtiplot/files/qtiplot-0.9.8.7-kde.patch
@@ -0,0 +1,16 @@
+ qtiplot/src/plot2D/Graph.cpp | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+diff --git a/qtiplot/src/plot2D/Graph.cpp b/qtiplot/src/plot2D/Graph.cpp
+index 626172a..d4eab1b 100755
+--- a/qtiplot/src/plot2D/Graph.cpp
++++ b/qtiplot/src/plot2D/Graph.cpp
+@@ -73,7 +73,8 @@
+ #include <PatternBox.h>
+ #include <SymbolBox.h>
+ #include <LinearColorMap.h>
+
++#include <QPaintEngine>
+ #include <QApplication>
+ #include <QBitmap>
+ #include <QClipboard>
diff --git a/sci-visualization/qtiplot/files/qtiplot-0.9.8.8-system-gl2ps.patch b/sci-visualization/qtiplot/files/qtiplot-0.9.8.8-system-gl2ps.patch
new file mode 100644
index 000000000000..d7b40c414b1d
--- /dev/null
+++ b/sci-visualization/qtiplot/files/qtiplot-0.9.8.8-system-gl2ps.patch
@@ -0,0 +1,76 @@
+ 3rdparty/qwtplot3d/qwtplot3d.pri | 8 ++++----
+ 3rdparty/qwtplot3d/qwtplot3d.pro | 3 ---
+ 3rdparty/qwtplot3d/src/qwt3d_io_gl2ps.cpp | 2 +-
+ 3rdparty/qwtplot3d/src/qwt3d_label.cpp | 2 +-
+ 4 files changed, 6 insertions(+), 9 deletions(-)
+
+diff --git a/3rdparty/qwtplot3d/qwtplot3d.pri b/3rdparty/qwtplot3d/qwtplot3d.pri
+index 45a0c3e..16bbe53 100755
+--- a/3rdparty/qwtplot3d/qwtplot3d.pri
++++ b/3rdparty/qwtplot3d/qwtplot3d.pri
+@@ -8,6 +8,8 @@ DEPENDPATH += src \
+ 3rdparty\gl2ps
+ INCLUDEPATH += .
+
++LIBS+=-lgl2ps
++
+ # Input
+ HEADERS += include/qwt3d_extglwidget.h \
+ include/qwt3d_color.h \
+@@ -37,8 +39,7 @@ HEADERS += include/qwt3d_extglwidget.h \
+ include/qwt3d_volumeplot.h \
+ include/qwt3d_graphplot.h \
+ include/qwt3d_multiplot.h \
+- include/qwt3d_io_gl2ps.h \
+- 3rdparty/gl2ps/gl2ps.h
++ include/qwt3d_io_gl2ps.h
+ SOURCES += src/qwt3d_extglwidget.cpp \
+ src/qwt3d_axis.cpp \
+ src/qwt3d_color.cpp \
+@@ -62,5 +63,4 @@ SOURCES += src/qwt3d_extglwidget.cpp \
+ src/qwt3d_function.cpp \
+ src/qwt3d_gridplot.cpp \
+ src/qwt3d_meshplot.cpp \
+- src/qwt3d_io_gl2ps.cpp \
+- 3rdparty/gl2ps/gl2ps.c
++ src/qwt3d_io_gl2ps.cpp
+diff --git a/3rdparty/qwtplot3d/qwtplot3d.pro b/3rdparty/qwtplot3d/qwtplot3d.pro
+index 95c8e26..18d03e3 100755
+--- a/3rdparty/qwtplot3d/qwtplot3d.pro
++++ b/3rdparty/qwtplot3d/qwtplot3d.pro
+@@ -31,9 +31,6 @@ RCC_DIR = $$DESTDIR/tmp
+ MOC_DIR = $$DESTDIR/tmp
+
+ DEFINES += GL2PS_HAVE_LIBPNG
+-INCLUDEPATH += ../zlib/
+-INCLUDEPATH += ../libpng/
+-LIBS += ../libpng/libpng.a
+
+ # install
+ target.path = lib
+diff --git a/3rdparty/qwtplot3d/src/qwt3d_io_gl2ps.cpp b/3rdparty/qwtplot3d/src/qwt3d_io_gl2ps.cpp
+index bc7a9d8..589cfd2 100755
+--- a/3rdparty/qwtplot3d/src/qwt3d_io_gl2ps.cpp
++++ b/3rdparty/qwtplot3d/src/qwt3d_io_gl2ps.cpp
+@@ -6,7 +6,7 @@
+ #include <locale.h>
+
+ #include "qwt3d_openglhelper.h"
+-#include "../3rdparty/gl2ps/gl2ps.h"
++#include "gl2ps.h"
+ #include "qwt3d_io_gl2ps.h"
+ #include "qwt3d_plot.h"
+
+diff --git a/3rdparty/qwtplot3d/src/qwt3d_label.cpp b/3rdparty/qwtplot3d/src/qwt3d_label.cpp
+index 7e54ad9..cc8bd60 100755
+--- a/3rdparty/qwtplot3d/src/qwt3d_label.cpp
++++ b/3rdparty/qwtplot3d/src/qwt3d_label.cpp
+@@ -1,7 +1,7 @@
+ #include <qbitmap.h>
+ #include "qwt3d_label.h"
+ #include "qwt3d_plot.h"
+-#include "../3rdparty/gl2ps/gl2ps.h"
++#include "gl2ps.h"
+
+ using namespace Qwt3D;
+
diff --git a/sci-visualization/qtiplot/files/qtiplot-0.9.8.9-PyQt4-4.10.patch b/sci-visualization/qtiplot/files/qtiplot-0.9.8.9-PyQt4-4.10.patch
new file mode 100644
index 000000000000..67bd0a32d105
--- /dev/null
+++ b/sci-visualization/qtiplot/files/qtiplot-0.9.8.9-PyQt4-4.10.patch
@@ -0,0 +1,32 @@
+ qtiplot/python-sipcmd.py | 21 ++++++++++++++++++---
+ 1 file changed, 18 insertions(+), 3 deletions(-)
+
+diff --git a/qtiplot/python-sipcmd.py b/qtiplot/python-sipcmd.py
+index f643194..d8d1ef2 100755
+--- a/qtiplot/python-sipcmd.py
++++ b/qtiplot/python-sipcmd.py
+@@ -27,6 +27,21 @@
+ # #
+ ############################################################################
+
+-from PyQt4 import pyqtconfig
+-config = pyqtconfig.Configuration()
+-print " ".join([config.sip_bin, "-I", config.pyqt_sip_dir, config.pyqt_sip_flags])
++from __future__ import print_function
++
++import os
++import sipconfig
++import PyQt4.QtCore
++
++try:
++ # >= 4.10
++ SIP_FLAGS = PyQt4.QtCore.PYQT_CONFIGURATION['sip_flags']
++except:
++ import PyQt4.pyqtconfig
++ SIP_FLAGS = PyQt4.pyqtconfig.Configuration().pyqt_sip_flags
++
++PYQT_SIP_DIR = os.path.join(sipconfig.Configuration().default_sip_dir)
++SIP_BIN = sipconfig.Configuration().sip_bin
++SIP_INC_DIR = sipconfig.Configuration().sip_inc_dir
++
++print(" ".join([SIP_BIN, "-I", PYQT_SIP_DIR, SIP_FLAGS]))
diff --git a/sci-visualization/qtiplot/files/qtiplot-0.9.8.9-PyQt4-4.11.3.patch b/sci-visualization/qtiplot/files/qtiplot-0.9.8.9-PyQt4-4.11.3.patch
new file mode 100644
index 000000000000..a011782550d6
--- /dev/null
+++ b/sci-visualization/qtiplot/files/qtiplot-0.9.8.9-PyQt4-4.11.3.patch
@@ -0,0 +1,32 @@
+ qtiplot/python-sipcmd.py | 21 ++++++++++++++++++---
+ 1 file changed, 18 insertions(+), 3 deletions(-)
+
+diff --git a/qtiplot/python-sipcmd.py b/qtiplot/python-sipcmd.py
+index f643194..d8d1ef2 100755
+--- a/qtiplot/python-sipcmd.py
++++ b/qtiplot/python-sipcmd.py
+@@ -27,6 +27,21 @@
+ # #
+ ############################################################################
+
+-from PyQt4 import pyqtconfig
+-config = pyqtconfig.Configuration()
+-print " ".join([config.sip_bin, "-I", config.pyqt_sip_dir, config.pyqt_sip_flags])
++from __future__ import print_function
++
++import os
++import sipconfig
++import PyQt4.QtCore
++
++try:
++ # >= 4.10
++ SIP_FLAGS = PyQt4.QtCore.PYQT_CONFIGURATION['sip_flags']
++except:
++ import PyQt4.pyqtconfig
++ SIP_FLAGS = PyQt4.pyqtconfig.Configuration().pyqt_sip_flags
++
++PYQT_SIP_DIR = os.path.join(sipconfig.Configuration().default_sip_dir, 'PyQt4')
++SIP_BIN = sipconfig.Configuration().sip_bin
++SIP_INC_DIR = sipconfig.Configuration().sip_inc_dir
++
++print(" ".join([SIP_BIN, "-I", PYQT_SIP_DIR, SIP_FLAGS]))
diff --git a/sci-visualization/qtiplot/files/qtiplot-0.9.8.9-adopt_to_alglib3.patch b/sci-visualization/qtiplot/files/qtiplot-0.9.8.9-adopt_to_alglib3.patch
new file mode 100644
index 000000000000..8f1bde25a038
--- /dev/null
+++ b/sci-visualization/qtiplot/files/qtiplot-0.9.8.9-adopt_to_alglib3.patch
@@ -0,0 +1,115 @@
+Description: adoptation to alglib3.
+Author: Anton Gladky <gladk@debian.org>
+Last-Update: 2013-05-16
+
+--- a/qtiplot/src/analysis/dialogs/GriddingDialog.cpp
++++ b/qtiplot/src/analysis/dialogs/GriddingDialog.cpp
+@@ -41,7 +41,7 @@
+ #include <QComboBox>
+ #include <QLayout>
+
+-#include <idwint.h>
++#include <interpolation.h>
+
+ GriddingDialog::GriddingDialog(Table* t, const QString& colName, int nodes, QWidget* parent, Qt::WFlags fl )
+ : QDialog( parent, fl ),
+@@ -365,26 +365,27 @@
+ Matrix* m = app->newMatrix(rows, cols);
+ m->setCoordinates(xmin, xmax, ymin, ymax);
+
+- idwinterpolant z;
++ alglib::idwinterpolant z;
++
+ switch (boxMethod->currentIndex()){
+ case 0:
+- idwbuildmodifiedshepardr(xy, d_nodes, 2, boxRadius->value(), z);
++ alglib::idwbuildmodifiedshepardr(xy, d_nodes, 2, boxRadius->value(), z);
+ break;
+ case 1:
+- idwbuildmodifiedshepard(xy, d_nodes, 2, boxModel->currentIndex() + 1, boxNQ->value(), boxNW->value(), z);
++ alglib::idwbuildmodifiedshepard(xy, d_nodes, 2, boxModel->currentIndex() + 1, boxNQ->value(), boxNW->value(), z);
+ break;
+ case 2:
+- idwbuildnoisy(xy, d_nodes, 2, boxModel->currentIndex() + 1, boxNQ->value(), boxNW->value(), z);
++ alglib::idwbuildnoisy(xy, d_nodes, 2, boxModel->currentIndex() + 1, boxNQ->value(), boxNW->value(), z);
+ break;
+ }
+
+- ap::real_1d_array p;
++ alglib::real_1d_array p;
+ p.setlength(2);
+ for (int i = 0; i < rows; i++){
+ p(1) = ymin + i*ystep;
+ for (int j = 0; j < cols; j++){
+ p(0) = xmin + j*xstep;
+- m->setCell(i, j, idwcalc(z, p));
++ m->setCell(i, j, alglib::idwcalc(z, p));
+ }
+ }
+
+@@ -435,20 +436,20 @@
+ double xstep = fabs(xmax - xmin)/(cols - 1);
+ double ystep = fabs(ymax - ymin)/(rows - 1);
+
+- idwinterpolant z;
++ alglib::idwinterpolant z;
+ switch (boxMethod->currentIndex()){
+ case 0:
+- idwbuildmodifiedshepardr(xy, d_nodes, 2, boxRadius->value(), z);
++ alglib::idwbuildmodifiedshepardr(xy, d_nodes, 2, boxRadius->value(), z);
+ break;
+ case 1:
+- idwbuildmodifiedshepard(xy, d_nodes, 2, boxModel->currentIndex() + 1, boxNQ->value(), boxNW->value(), z);
++ alglib::idwbuildmodifiedshepard(xy, d_nodes, 2, boxModel->currentIndex() + 1, boxNQ->value(), boxNW->value(), z);
+ break;
+ case 2:
+- idwbuildnoisy(xy, d_nodes, 2, boxModel->currentIndex() + 1, boxNQ->value(), boxNW->value(), z);
++ alglib::idwbuildnoisy(xy, d_nodes, 2, boxModel->currentIndex() + 1, boxNQ->value(), boxNW->value(), z);
+ break;
+ }
+
+- ap::real_1d_array p;
++ alglib::real_1d_array p;
+ p.setlength(2);
+
+ double **data_matrix = Matrix::allocateMatrixData(cols, rows);
+@@ -456,7 +457,7 @@
+ p(1) = ymin + i*ystep;
+ for (int j = 0; j < cols; j++){
+ p(0) = xmin + j*xstep;
+- data_matrix[j][i] = idwcalc(z, p);
++ data_matrix[j][i] = alglib::idwcalc(z, p);
+ }
+ }
+
+--- a/qtiplot/src/analysis/dialogs/GriddingDialog.h
++++ b/qtiplot/src/analysis/dialogs/GriddingDialog.h
+@@ -71,7 +71,7 @@
+
+ QString d_col_name;
+ int d_nodes;
+- ap::real_2d_array xy;
++ alglib::real_2d_array xy;
+
+ QPushButton* buttonFit;
+ QPushButton* buttonCancel;
+--- a/qtiplot/src/matrix/MatrixModel.cpp
++++ b/qtiplot/src/matrix/MatrixModel.cpp
+@@ -45,7 +45,7 @@
+ #include <stdlib.h>
+
+ #ifdef HAVE_ALGLIB
+- #include <spline2d.h>
++ #include <interpolation.h>
+ #endif
+
+ MatrixModel::MatrixModel(int rows, int cols, QObject *parent)
+@@ -1026,7 +1026,7 @@
+ #ifdef HAVE_ALGLIB
+ QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
+
+- ap::real_2d_array oldValues, newValues;
++ alglib::real_2d_array oldValues, newValues;
+ oldValues.setlength(d_rows, d_cols);
+ newValues.setlength(rows, cols);
+
diff --git a/sci-visualization/qtiplot/files/qtiplot-0.9.8.9-crasher_without_internet.patch b/sci-visualization/qtiplot/files/qtiplot-0.9.8.9-crasher_without_internet.patch
new file mode 100644
index 000000000000..fe542341e99d
--- /dev/null
+++ b/sci-visualization/qtiplot/files/qtiplot-0.9.8.9-crasher_without_internet.patch
@@ -0,0 +1,25 @@
+Description: Crashes if not connected to the internet.
+Author: Scott Howard <showard@debian.org>
+Bug-Debian: http://bugs.debian.org/626915
+
+Index: qtiplot/qtiplot/src/core/ApplicationWindow.cpp
+===================================================================
+--- qtiplot.orig/qtiplot/src/core/ApplicationWindow.cpp 2012-11-07 11:14:15.021706679 -0500
++++ qtiplot/qtiplot/src/core/ApplicationWindow.cpp 2012-11-07 11:14:22.853706641 -0500
+@@ -16228,11 +16228,12 @@
+ if (hostInfo.error() != QHostInfo::NoError){
+ QApplication::restoreOverrideCursor();
+ QMessageBox::critical(this, tr("QtiPlot - Error"), qtiplotWeb + ": " + hostInfo.errorString());
+- exit(0);
++ QApplication::restoreOverrideCursor();
++ }
++ else {
++ QApplication::restoreOverrideCursor();
++ showDonationsPage();
+ }
+-
+- QApplication::restoreOverrideCursor();
+- showDonationsPage();
+ }
+
+ void ApplicationWindow::parseCommandLineArguments(const QStringList& args)
diff --git a/sci-visualization/qtiplot/files/qtiplot-0.9.8.9-gsl-2.patch b/sci-visualization/qtiplot/files/qtiplot-0.9.8.9-gsl-2.patch
new file mode 100644
index 000000000000..9ad891938cd6
--- /dev/null
+++ b/sci-visualization/qtiplot/files/qtiplot-0.9.8.9-gsl-2.patch
@@ -0,0 +1,36 @@
+ * Info: Using [gentoo] (https://bugs.gentoo.org/xmlrpc.cgi)
+ * Info: Getting attachment 425760
+ * Info: Viewing attachment: "fix_fit_gsl_fdfsolver.patch"
+diff --git a/qtiplot/src/analysis/Fit.cpp b/qtiplot/src/analysis/Fit.cpp
+index 22cb5be..555f21d 100755
+--- a/qtiplot/src/analysis/Fit.cpp
++++ b/qtiplot/src/analysis/Fit.cpp
+@@ -106,6 +106,7 @@ void Fit::init()
+ gsl_multifit_fdfsolver * Fit::fitGSL(gsl_multifit_function_fdf f, int &iterations, int &status)
+ {
+ const gsl_multifit_fdfsolver_type *T;
++ gsl_matrix *J;
+ if (d_solver)
+ T = gsl_multifit_fdfsolver_lmder;
+ else
+@@ -128,7 +129,8 @@ gsl_multifit_fdfsolver * Fit::fitGSL(gsl_multifit_function_fdf f, int &iteration
+ }
+
+ if (status){
+- gsl_multifit_covar (s->J, 0.0, covar);
++ gsl_multifit_fdfsolver_jac (s, J);
++ gsl_multifit_covar (J, 0.0, covar);
+ iterations = 0;
+ return s;
+ }
+@@ -155,7 +157,8 @@ gsl_multifit_fdfsolver * Fit::fitGSL(gsl_multifit_function_fdf f, int &iteration
+ status = gsl_multifit_test_delta (s->dx, s->x, d_tolerance, d_tolerance);
+ } while (inRange && status == GSL_CONTINUE && (int)iter < d_max_iterations);
+
+- gsl_multifit_covar (s->J, 0.0, covar);
++ gsl_multifit_fdfsolver_jac (s, J);
++ gsl_multifit_covar (J, 0.0, covar);
+
+ iterations = iter;
+ return s;
+
diff --git a/sci-visualization/qtiplot/files/qtiplot-0.9.8.9-origin-2.patch b/sci-visualization/qtiplot/files/qtiplot-0.9.8.9-origin-2.patch
new file mode 100644
index 000000000000..d85420b790f4
--- /dev/null
+++ b/sci-visualization/qtiplot/files/qtiplot-0.9.8.9-origin-2.patch
@@ -0,0 +1,38 @@
+diff -ruN qtiplot-0.9.8.9-origin/qtiplot/exportEMF.pro qtiplot-0.9.8.9/qtiplot/exportEMF.pro
+--- qtiplot-0.9.8.9-origin/qtiplot/exportEMF.pro 2012-01-21 20:39:03.000000000 +0100
++++ qtiplot-0.9.8.9/qtiplot/exportEMF.pro 2012-01-21 20:32:45.000000000 +0100
+@@ -5,6 +5,7 @@
+
+ INCLUDEPATH += $$QWT_INCLUDEPATH
+ INCLUDEPATH += $$GSL_INCLUDEPATH
++INCLUDEPATH += $$EMF_INCLUDEPATH
+
+ include(src/core/core.pri)
+ include(src/lib/libqti.pri)
+diff -ruN qtiplot-0.9.8.9-origin/qtiplot/qtiplot.pro qtiplot-0.9.8.9/qtiplot/qtiplot.pro
+--- qtiplot-0.9.8.9-origin/qtiplot/qtiplot.pro 2011-11-07 10:17:21.000000000 +0100
++++ qtiplot-0.9.8.9/qtiplot/qtiplot.pro 2012-01-21 20:44:11.000000000 +0100
+@@ -236,9 +236,9 @@
+ ###############################################################
+
+ TARGET = qtiplot
+-DESTDIR = ../
++DESTDIR = ./
+ LIBS += ../tmp/qtiplot/libFreeSoftwareQtiPlotExportEMF.a \
+ ../tmp/qtiplot/libFreeSoftwareQtiPlotImportOPJ.a
+
+ include(src/plugins/exportEMF/exportEMF.pri)
+-include(src/plugins/OriginPlugin/OriginPlugin.pri)
+\ Kein Zeilenumbruch am Dateiende.
++include(src/plugins/OriginPlugin/OriginPlugin.pri)
+diff -ruN qtiplot-0.9.8.9-origin/qtiplot/src/plugins/exportEMF/exportEMF.pri qtiplot-0.9.8.9/qtiplot/src/plugins/exportEMF/exportEMF.pri
+--- qtiplot-0.9.8.9-origin/qtiplot/src/plugins/exportEMF/exportEMF.pri 2011-10-27 13:44:34.000000000 +0200
++++ qtiplot-0.9.8.9/qtiplot/src/plugins/exportEMF/exportEMF.pri 2012-01-21 20:51:34.000000000 +0100
+@@ -10,5 +10,5 @@
+ SOURCES += src/plugins/exportEMF/exportEMF.cpp \
+ src/plugins/exportEMF/3rdparty/EmfEngine/src/EmfEngine.cpp \
+ src/plugins/exportEMF/3rdparty/EmfEngine/src/EmfPaintDevice.cpp
+-
+-LIBS += -lgdi32
++
++LIBS += -lEMF
diff --git a/sci-visualization/qtiplot/files/qtiplot-0.9.8.9-private.patch b/sci-visualization/qtiplot/files/qtiplot-0.9.8.9-private.patch
new file mode 100644
index 000000000000..7bec3771813c
--- /dev/null
+++ b/sci-visualization/qtiplot/files/qtiplot-0.9.8.9-private.patch
@@ -0,0 +1,15 @@
+diff -ruN qtiplot-0.9.8.9.orig/qtiplot/src/plot2D/ImageWidget.h qtiplot-0.9.8.9/qtiplot/src/plot2D/ImageWidget.h
+--- qtiplot-0.9.8.9.orig/qtiplot/src/plot2D/ImageWidget.h 2010-10-17 09:04:05.000000000 +0200
++++ qtiplot-0.9.8.9/qtiplot/src/plot2D/ImageWidget.h 2013-11-01 12:11:36.559973891 +0100
+@@ -67,10 +67,10 @@
+ void setWindowName(const QString& name){d_window_name = name;};
+
+ static QPixmap windowPixmap(ApplicationWindow *mw, const QString& name, const QSize& size);
++ void paintEvent(QPaintEvent *e);
+
+ private:
+ void draw(QPainter *painter, const QRect& r);
+- void paintEvent(QPaintEvent *e);
+ QPixmap d_pix;
+ //! The file from which the image was loaded.
+ QString d_file_name;
diff --git a/sci-visualization/qtiplot/files/qtiplot-0.9.8.9-qt48.patch b/sci-visualization/qtiplot/files/qtiplot-0.9.8.9-qt48.patch
new file mode 100644
index 000000000000..31c8a5ee7af2
--- /dev/null
+++ b/sci-visualization/qtiplot/files/qtiplot-0.9.8.9-qt48.patch
@@ -0,0 +1,29 @@
+ 3rdparty/qwtplot3d/include/qwt3d_openglhelper.h | 2 ++
+ qtiplot/src/plot3D/Cone3D.cpp | 1 +
+ 2 files changed, 3 insertions(+), 0 deletions(-)
+
+diff --git a/3rdparty/qwtplot3d/include/qwt3d_openglhelper.h b/3rdparty/qwtplot3d/include/qwt3d_openglhelper.h
+index 0ee80de..3d02e3f 100755
+--- a/3rdparty/qwtplot3d/include/qwt3d_openglhelper.h
++++ b/3rdparty/qwtplot3d/include/qwt3d_openglhelper.h
+@@ -8,6 +8,8 @@
+ #include <QtOpenGL/qgl.h>
+ #endif
+
++#include <GL/glu.h>
++
+ namespace Qwt3D
+ {
+
+diff --git a/qtiplot/src/plot3D/Cone3D.cpp b/qtiplot/src/plot3D/Cone3D.cpp
+index 16df12d..169d5c7 100755
+--- a/qtiplot/src/plot3D/Cone3D.cpp
++++ b/qtiplot/src/plot3D/Cone3D.cpp
+@@ -27,6 +27,7 @@
+ * *
+ ***************************************************************************/
+ #include <math.h>
++#include <GL/glu.h>
+ #include "qwt3d_color.h"
+ #include "qwt3d_plot.h"
+ #include <qwt3d_curve.h>
diff --git a/sci-visualization/qtiplot/files/qtiplot-0.9.8.9-set_col_values.patch b/sci-visualization/qtiplot/files/qtiplot-0.9.8.9-set_col_values.patch
new file mode 100644
index 000000000000..5afe43eb3daf
--- /dev/null
+++ b/sci-visualization/qtiplot/files/qtiplot-0.9.8.9-set_col_values.patch
@@ -0,0 +1,18 @@
+Description: if you don't initialize the "i" variable, or initialize it to 0.0
+ qtiplot won't let you set the column values using muparser.
+Author: Scott Howard <showard@debian.org>
+Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=707736
+
+Index: qtiplot/qtiplot/src/table/Table.cpp
+===================================================================
+--- qtiplot.orig/qtiplot/src/table/Table.cpp 2013-06-08 02:06:35.550201324 -0400
++++ qtiplot/qtiplot/src/table/Table.cpp 2013-06-08 02:08:30.026204044 -0400
+@@ -564,7 +564,7 @@
+ QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
+
+ muParserScript *mup = new muParserScript(scriptEnv, cmd, this, QString("<%1>").arg(colName(col)));
+- double *r = mup->defineVariable("i");
++ double *r = mup->defineVariable("i",startRow + 1.0);
+ mup->defineVariable("j", (double)col);
+ mup->defineVariable("sr", startRow + 1.0);
+ mup->defineVariable("er", endRow + 1.0);
diff --git a/sci-visualization/qtiplot/files/qtiplot-0.9.8.9-sip-4.15.patch b/sci-visualization/qtiplot/files/qtiplot-0.9.8.9-sip-4.15.patch
new file mode 100644
index 000000000000..c08163019a3e
--- /dev/null
+++ b/sci-visualization/qtiplot/files/qtiplot-0.9.8.9-sip-4.15.patch
@@ -0,0 +1,31 @@
+--- ./qtiplot/src/analysis/FFT.cpp.orig 2011-07-06 11:51:08.000000000 +0000
++++ ./qtiplot/src/analysis/FFT.cpp 2013-10-23 23:07:45.674925476 +0000
+@@ -353,7 +353,7 @@
+ ml->arrangeLayers(false, false);
+ }
+
+-bool FFT::setDataFromTable(Table *t, const QString& realColName, const QString& imagColName, int from, int to)
++bool FFT::setDataFromTable(Table *t, const QString& realColName, const QString& imagColName, int from, int to, bool unused)
+ {
+ d_init_err = true;
+
+--- ./qtiplot/src/analysis/FFT.h.orig 2011-07-05 22:05:03.000000000 +0000
++++ ./qtiplot/src/analysis/FFT.h 2013-10-23 23:11:34.277924367 +0000
+@@ -52,6 +52,8 @@
+ Matrix *realOutputMatrix(){return d_re_out_matrix;}
+ Matrix *imaginaryOutputMatrix(){return d_im_out_matrix;}
+
++ bool setDataFromTable(Table *t, const QString& realColName, const QString& imagColName = QString(), int from = 0, int to = -1, bool unused = false);
++
+ private:
+ void init();
+ void output();
+@@ -60,8 +62,6 @@
+ void fftTable();
+ void fftMatrix();
+
+- bool setDataFromTable(Table *t, const QString& realColName, const QString& imagColName = QString(), int from = 0, int to = -1);
+-
+ double d_sampling;
+ //! Flag telling if an inverse FFT must be performed.
+ bool d_inverse;
diff --git a/sci-visualization/qtiplot/files/qtiplot-0.9.8.9-sip-4.19.patch b/sci-visualization/qtiplot/files/qtiplot-0.9.8.9-sip-4.19.patch
new file mode 100644
index 000000000000..a1ea502787c3
--- /dev/null
+++ b/sci-visualization/qtiplot/files/qtiplot-0.9.8.9-sip-4.19.patch
@@ -0,0 +1,38 @@
+--- a/qtiplot/src/scripting/qti.sip 2017-02-13 17:01:03.123828499 +0100
++++ b/qtiplot/src/scripting/qti.sip 2017-02-13 17:02:12.628828234 +0100
+@@ -148,14 +148,14 @@
+ }
+ break;
+ case Table::Date:
+- if (sipCanConvertToType(item, sipType_QDateTime, 0)) {
++ if (sipCanConvertToType(item, sipFindType("QDateTime"), 0)) {
+ int isErr = 0;
+- QDateTime* dateTime = reinterpret_cast<QDateTime*>(sipConvertToType(item, sipType_QDateTime,
++ QDateTime* dateTime = reinterpret_cast<QDateTime*>(sipConvertToType(item, sipFindType("QDateTime"),
+ 0/*sipTransferObj*/, 0/*flags*/, 0/*state*/, &isErr));
+ if (isErr)
+ return 1;
+ table->setText(row, col, dateTime->toString(table->columnFormat(col)));
+- delete dateTime;
++ //delete dateTime;
+ }
+ else {
+ if (PyType_Ready(item_type) == 0)
+@@ -164,14 +164,14 @@
+ }
+ break;
+ case Table::Time:
+- if (sipCanConvertToType(item, sipType_QTime, 0)) {
++ if (sipCanConvertToType(item, sipFindType("QTime"), 0)) {
+ int isErr = 0;
+- QTime* time = reinterpret_cast<QTime*>(sipConvertToType(item, sipType_QTime,
++ QTime* time = reinterpret_cast<QTime*>(sipConvertToType(item, sipFindType("QTime"),
+ 0/*sipTransferObj*/, 0/*flags*/, 0/*state*/, &isErr));
+ if (isErr)
+ return 1;
+ table->setText(row, col, time->toString(table->columnFormat(col)));
+- delete time;
++ //delete time;
+ }
+ else {
+ if (PyType_Ready(item_type) == 0)
diff --git a/sci-visualization/qtiplot/metadata.xml b/sci-visualization/qtiplot/metadata.xml
new file mode 100644
index 000000000000..9a33f746ffda
--- /dev/null
+++ b/sci-visualization/qtiplot/metadata.xml
@@ -0,0 +1,15 @@
+<?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>
+ Data analysis and scientific plotting package. This is a clone of the
+ popular Origin software available on another well known platform implemented
+ in Qt with powerful 2D and 3D data plotting, ASCII import and powerful
+ spreadsheet data manipulation using column logic. Curve fitting and other
+ statistical tools are also available.
+ </longdescription>
+</pkgmetadata>
diff --git a/sci-visualization/qtiplot/qtiplot-0.9.8.9-r2.ebuild b/sci-visualization/qtiplot/qtiplot-0.9.8.9-r2.ebuild
new file mode 100644
index 000000000000..3fcaffb291d1
--- /dev/null
+++ b/sci-visualization/qtiplot/qtiplot-0.9.8.9-r2.ebuild
@@ -0,0 +1,235 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils qt4-r2 fdo-mime python-single-r1 toolchain-funcs
+
+DESCRIPTION="Qt based clone of the Origin plotting package"
+HOMEPAGE="http://soft.proindependent.com/qtiplot.html
+ http://www.staff.science.uu.nl/~zeven101/qtiplot.html"
+SRC_URI="
+ https://dev.gentoo.org/~dilfridge/distfiles/${P}.tar.bz2
+ https://dev.gentoo.org/~dilfridge/distfiles/${P}-origin.patch.bz2"
+
+LICENSE="GPL-2 GPL-3"
+SLOT="0"
+KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux"
+IUSE="bindist doc mono latex python"
+
+LANGS="cn cz de es fr ja ro ru sv"
+for l in ${LANGS}; do
+ lu=${l/cz/cs}
+ lu=${lu/cn/zh_CN}
+ IUSE="${IUSE} linguas_${lu}"
+done
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+# qwtplot3d much modified from original upstream
+# >=x11-libs/qwt-5.3 they are using trunk checkouts
+CDEPEND="
+ media-libs/libemf
+ dev-qt/qthelp:4
+ dev-qt/qtgui:4
+ dev-qt/qtopengl:4
+ dev-qt/qt3support:4
+ dev-qt/qthelp:4[compat]
+ dev-qt/qtsvg:4
+ >=x11-libs/gl2ps-1.3.5[png]
+ >=dev-cpp/muParser-1.32
+ >=dev-libs/boost-1.35.0:=
+ dev-libs/quazip[qt4]
+ media-libs/libpng:=
+ sci-libs/alglib:=
+ <sci-libs/gsl-2
+ sci-libs/tamu_anova
+ latex? ( dev-tex/qtexengine )
+ mono? ( dev-dotnet/libgdiplus )
+ python? ( ${PYTHON_DEPS} )"
+DEPEND="${CDEPEND}
+ virtual/pkgconfig
+ python? ( >=dev-python/sip-4.9[${PYTHON_USEDEP}] )
+ doc? (
+ >=app-text/docbook-sgml-utils-0.6.14-r1
+ >=app-text/docbook-xml-dtd-4.4-r2:4.4 )"
+
+RDEPEND="${CDEPEND}
+ python? ( dev-python/PyQt4[X,${PYTHON_USEDEP}] )"
+
+PATCHES=(
+ "${DISTDIR}"/${P}-origin.patch.bz2
+ "${FILESDIR}"/${P}-origin-2.patch
+ "${FILESDIR}"/${P}-qt48.patch
+ "${FILESDIR}"/${PN}-0.9.8.8-system-gl2ps.patch
+ "${FILESDIR}"/${PN}-0.9.7.10-dont-install-qwt.patch
+ "${FILESDIR}"/${PN}-0.9.8.6-gold.patch
+ "${FILESDIR}"/${PN}-0.9.8.7-kde.patch
+ "${FILESDIR}"/${P}-set_col_values.patch
+ "${FILESDIR}"/${P}-adopt_to_alglib3.patch
+ "${FILESDIR}"/${P}-crasher_without_internet.patch
+ "${FILESDIR}"/${P}-private.patch
+ "${FILESDIR}"/${P}-sip-4.15.patch
+ "${FILESDIR}"/${P}-PyQt4-4.10.patch
+ )
+
+RESTRICT="!bindist? ( bindist )"
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ local mylibs
+
+ qt4-r2_src_prepare
+
+ rm -rf 3rdparty/{liborigin,QTeXEngine,/qwtplot3d/3rdparty/gl2ps/,boost,alglib} || die
+ sed \
+ -e "s:dll:static:g" \
+ -e "/INSTALLS/d" \
+ -i 3rdparty/qwtplot3d/*.pro
+
+ mylibs="${mylibs} -lquazip"
+ use mono && mylibs="${mylibs} $($(tc-getPKG_CONFIG) --libs libgdiplus)"
+
+ # Check build.conf for changes on bump.
+ cat > build.conf <<-EOF
+ # Automatically generated by Gentoo ebuild
+ isEmpty( QTI_ROOT ) {
+ message( "each file including this config needs to set QTI_ROOT to the dir containing this file!" )
+ }
+
+ MUPARSER_LIBS = $($(tc-getPKG_CONFIG) --libs muparser)
+ GSL_LIBS = $($(tc-getPKG_CONFIG) --libs gsl)
+ QWT_INCLUDEPATH = \$\$QTI_ROOT/3rdparty/qwt/src
+ QWT_LIBS = \$\$QTI_ROOT/3rdparty/qwt/lib/libqwt.a
+ QWT3D_INCLUDEPATH = \$\$QTI_ROOT/3rdparty/qwtplot3d/include
+ QWT3D_LIBS = \$\$QTI_ROOT/3rdparty/qwtplot3d/lib/libqwtplot3d.a
+ EMF_INCLUDEPATH = "${EPREFIX}/usr/include/libEMF
+ SYS_LIBS = -lgl2ps ${mylibs} -lGLU
+
+ LUPDATE = lupdate
+ LRELEASE = lrelease
+
+ SCRIPTING_LANGS += muParser
+
+ CONFIG += release
+ CONFIG += CustomInstall
+ DEFINES += SCRIPTING_CONSOLE
+
+ LIBPNG_LIBS = $($(tc-getPKG_CONFIG) --libs libpng)
+ TAMUANOVA_LIBS = -ltamuanova
+ TAMUANOVA_INCLUDEPATH = "${EPREFIX}/usr/include/tamu_anova"
+ ALGLIB_LIBS = -lalglib
+
+ EOF
+
+ use bindist && echo "DEFINES += QTIPLOT_SUPPORT" >> build.conf
+ use bindist || echo "DEFINES += QTIPLOT_PRO" >> build.conf
+ use python && echo "SCRIPTING_LANGS += Python" >> build.conf
+ use python && echo "PYTHON = ${EPYTHON}" >> build.conf
+ use latex && echo "TEX_ENGINE_LIBS = -lQTeXEngine" >> build.conf
+
+ sed \
+ -e "s:doc/${PN}/manual:doc/${PN}/html:" \
+ -e '/INSTALLS.*documentation/d' \
+ -e '/INSTALLS.*manual/d' \
+ -e "/INSTALLBASE/s: /usr: ${EPREFIX}/usr:g" \
+ -e 's:/usr/local/qtiplot:$$INSTALLBASE:g' \
+ -i qtiplot/qtiplot.pro || die
+
+ if use python; then
+ sed \
+ -e "s:/usr/local/${PN}:${EPREFIX}$(python_get_sitedir)/qtiplot:" \
+ -i qtiplot/qtiplot.pro || die
+ fi
+
+ sed \
+ -e "/^target.path/s:/usr:${EPREFIX}/usr:g" \
+ -i fitPlugins/*/*.pro || die
+
+ sed -e '/manual/d' -i qtiplot.pro || die
+
+ sed -e "s:QTIPLOT_PRO:QTIPLOT_PROFESSIONAL:g" -i qtiplot/src/core/main.cpp || die
+
+ # Drop langs only if LINGUAS is not empty
+ if [[ -n ${LINGUAS} ]]; then
+ for l in ${LANGS}; do
+ lu=${l/cz/cs}
+ lu=${lu/cn/zh_CN}
+ use linguas_${lu} || \
+ sed -e "s:translations/qtiplot_${l}.[tq][sm]::" \
+ -i qtiplot/qtiplot.pro || die
+ done
+ fi
+
+ sed \
+ -e "s:d_python_config_folder + \":\"${EPREFIX}/usr/share/qtiplot:g" \
+ -i qtiplot/src/core/ApplicationWindow.cpp || die
+
+ chmod -x qtiplot/qti_wordlist.txt
+
+ # sed out debian paths
+ sed -e 's:\(/usr/share/sgml/\)docbook/stylesheet/dsssl/modular\(/html/docbook.dsl\):\1stylesheets/dsssl/docbook\2:' \
+ -i manual/qtiplot.dsl || die
+ sed -e 's:\(/usr/share/\)xml/docbook/stylesheet/nwalsh\(/html/chunk.xsl\):\1sgml/docbook/xsl-stylesheets\2:' \
+ -i manual/qtiplot_html.xsl || die
+
+ sed \
+ -e '1i#define OF(x) x' \
+ -i 3rdparty/zlib/minigzip.c || die
+}
+
+src_configure() {
+ use amd64 && export QMAKESPEC="linux-g++-64"
+ eqmake4
+}
+
+src_compile() {
+ emake
+ lrelease qtiplot/qtiplot.pro || die
+ if use doc; then
+ cd manual
+ emake web
+ fi
+}
+
+src_install() {
+ qt4-r2_src_install
+
+ insinto /usr/share/qtiplot
+ doins qtiplot/qti_wordlist.txt
+
+ newicon qtiplot_logo.png qtiplot.png
+ make_desktop_entry qtiplot "QtiPlot Scientific Plotting" qtiplot
+
+ use doc && dohtml -r manual/html/*
+
+ use python && python_optimize
+
+ if [[ -n ${LINGUAS} ]]; then
+ insinto /usr/share/${PN}/translations
+ for l in ${LANGS}; do
+ lu=${l/cz/cs}
+ lu=${lu/cn/zh_CN}
+ use linguas_${lu} && \
+ doins qtiplot/translations/qtiplot_${l}.qm
+ done
+ fi
+}
+
+pkg_postinst() {
+ if use python; then
+ optfeature "Enhanced python support" \
+ dev-python/pygsl dev-python/rpy sci-libs/scipy dev-python/sympy
+ fi
+
+ fdo-mime_desktop_database_update
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+}
diff --git a/sci-visualization/qtiplot/qtiplot-0.9.8.9-r3.ebuild b/sci-visualization/qtiplot/qtiplot-0.9.8.9-r3.ebuild
new file mode 100644
index 000000000000..65c127fe41f9
--- /dev/null
+++ b/sci-visualization/qtiplot/qtiplot-0.9.8.9-r3.ebuild
@@ -0,0 +1,238 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils qt4-r2 fdo-mime python-single-r1 toolchain-funcs
+
+DESCRIPTION="Qt based clone of the Origin plotting package"
+HOMEPAGE="http://soft.proindependent.com/qtiplot.html
+ http://www.staff.science.uu.nl/~zeven101/qtiplot.html"
+SRC_URI="
+ https://dev.gentoo.org/~dilfridge/distfiles/${P}.tar.bz2
+ https://dev.gentoo.org/~dilfridge/distfiles/${P}-origin.patch.bz2"
+
+LICENSE="GPL-2 GPL-3"
+SLOT="0"
+KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux"
+IUSE="bindist doc mono latex python"
+
+LANGS="cn cz de es fr ja ro ru sv"
+for l in ${LANGS}; do
+ lu=${l/cz/cs}
+ lu=${lu/cn/zh_CN}
+ IUSE="${IUSE} linguas_${lu}"
+done
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+# qwtplot3d much modified from original upstream
+# >=x11-libs/qwt-5.3 they are using trunk checkouts
+CDEPEND="
+ media-libs/libemf
+ dev-qt/qthelp:4
+ dev-qt/qtgui:4
+ dev-qt/qtopengl:4
+ dev-qt/qt3support:4
+ dev-qt/qthelp:4[compat]
+ dev-qt/qtsvg:4
+ >=x11-libs/gl2ps-1.3.5[png]
+ >=dev-cpp/muParser-1.32
+ >=dev-libs/boost-1.35.0:=
+ dev-libs/quazip[qt4]
+ media-libs/libpng:=
+ sci-libs/alglib:=
+ <sci-libs/gsl-2
+ sci-libs/tamu_anova
+ latex? ( dev-tex/qtexengine )
+ mono? ( dev-dotnet/libgdiplus )
+ python? (
+ ${PYTHON_DEPS}
+ >=dev-python/PyQt4-4.11.3[X,${PYTHON_USEDEP}]
+ )"
+DEPEND="${CDEPEND}
+ virtual/pkgconfig
+ python? ( >=dev-python/sip-4.16.5[${PYTHON_USEDEP}] )
+ doc? (
+ >=app-text/docbook-sgml-utils-0.6.14-r1
+ >=app-text/docbook-xml-dtd-4.4-r2:4.4 )"
+
+RDEPEND="${CDEPEND}"
+
+PATCHES=(
+ "${DISTDIR}"/${P}-origin.patch.bz2
+ "${FILESDIR}"/${P}-origin-2.patch
+ "${FILESDIR}"/${P}-qt48.patch
+ "${FILESDIR}"/${PN}-0.9.8.8-system-gl2ps.patch
+ "${FILESDIR}"/${PN}-0.9.7.10-dont-install-qwt.patch
+ "${FILESDIR}"/${PN}-0.9.8.6-gold.patch
+ "${FILESDIR}"/${PN}-0.9.8.7-kde.patch
+ "${FILESDIR}"/${P}-set_col_values.patch
+ "${FILESDIR}"/${P}-adopt_to_alglib3.patch
+ "${FILESDIR}"/${P}-crasher_without_internet.patch
+ "${FILESDIR}"/${P}-private.patch
+ "${FILESDIR}"/${P}-sip-4.15.patch
+ "${FILESDIR}"/${P}-PyQt4-4.11.3.patch
+ "${FILESDIR}"/${P}-sip-4.19.patch
+)
+
+RESTRICT="!bindist? ( bindist )"
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ local mylibs
+
+ qt4-r2_src_prepare
+
+ rm -rf 3rdparty/{liborigin,QTeXEngine,/qwtplot3d/3rdparty/gl2ps/,boost,alglib} || die
+ sed \
+ -e "s:dll:static:g" \
+ -e "/INSTALLS/d" \
+ -i 3rdparty/qwtplot3d/*.pro
+
+ mylibs="${mylibs} -lquazip"
+ use mono && mylibs="${mylibs} $($(tc-getPKG_CONFIG) --libs libgdiplus)"
+
+ # Check build.conf for changes on bump.
+ cat > build.conf <<-EOF
+ # Automatically generated by Gentoo ebuild
+ isEmpty( QTI_ROOT ) {
+ message( "each file including this config needs to set QTI_ROOT to the dir containing this file!" )
+ }
+
+ MUPARSER_LIBS = $($(tc-getPKG_CONFIG) --libs muparser)
+ GSL_LIBS = $($(tc-getPKG_CONFIG) --libs gsl)
+ QWT_INCLUDEPATH = \$\$QTI_ROOT/3rdparty/qwt/src
+ QWT_LIBS = \$\$QTI_ROOT/3rdparty/qwt/lib/libqwt.a
+ QWT3D_INCLUDEPATH = \$\$QTI_ROOT/3rdparty/qwtplot3d/include
+ QWT3D_LIBS = \$\$QTI_ROOT/3rdparty/qwtplot3d/lib/libqwtplot3d.a
+ EMF_INCLUDEPATH = "${EPREFIX}/usr/include/libEMF
+ SYS_LIBS = -lgl2ps ${mylibs} -lGLU
+
+ LUPDATE = lupdate
+ LRELEASE = lrelease
+
+ SCRIPTING_LANGS += muParser
+
+ CONFIG += release
+ CONFIG += CustomInstall
+ DEFINES += SCRIPTING_CONSOLE
+
+ LIBPNG_LIBS = $($(tc-getPKG_CONFIG) --libs libpng)
+ TAMUANOVA_LIBS = -ltamuanova
+ TAMUANOVA_INCLUDEPATH = "${EPREFIX}/usr/include/tamu_anova"
+ ALGLIB_LIBS = -lalglib
+
+ EOF
+
+ use bindist && echo "DEFINES += QTIPLOT_SUPPORT" >> build.conf
+ use bindist || echo "DEFINES += QTIPLOT_PRO" >> build.conf
+ use python && echo "SCRIPTING_LANGS += Python" >> build.conf
+ use python && echo "PYTHON = ${EPYTHON}" >> build.conf
+ use latex && echo "TEX_ENGINE_LIBS = -lQTeXEngine" >> build.conf
+
+ sed \
+ -e "s:doc/${PN}/manual:doc/${PN}/html:" \
+ -e '/INSTALLS.*documentation/d' \
+ -e '/INSTALLS.*manual/d' \
+ -e "/INSTALLBASE/s: /usr: ${EPREFIX}/usr:g" \
+ -e 's:/usr/local/qtiplot:$$INSTALLBASE:g' \
+ -i qtiplot/qtiplot.pro || die
+
+ if use python; then
+ sed \
+ -e "s:/usr/local/${PN}:${EPREFIX}$(python_get_sitedir)/qtiplot:" \
+ -i qtiplot/qtiplot.pro || die
+ fi
+
+ sed \
+ -e "/^target.path/s:/usr:${EPREFIX}/usr:g" \
+ -i fitPlugins/*/*.pro || die
+
+ sed -e '/manual/d' -i qtiplot.pro || die
+
+ sed -e "s:QTIPLOT_PRO:QTIPLOT_PROFESSIONAL:g" -i qtiplot/src/core/main.cpp || die
+
+ # Drop langs only if LINGUAS is not empty
+ if [[ -n ${LINGUAS} ]]; then
+ for l in ${LANGS}; do
+ lu=${l/cz/cs}
+ lu=${lu/cn/zh_CN}
+ use linguas_${lu} || \
+ sed -e "s:translations/qtiplot_${l}.[tq][sm]::" \
+ -i qtiplot/qtiplot.pro || die
+ done
+ fi
+
+ sed \
+ -e "s:d_python_config_folder + \":\"${EPREFIX}/usr/share/qtiplot:g" \
+ -i qtiplot/src/core/ApplicationWindow.cpp || die
+
+ chmod -x qtiplot/qti_wordlist.txt
+
+ # sed out debian paths
+ sed -e 's:\(/usr/share/sgml/\)docbook/stylesheet/dsssl/modular\(/html/docbook.dsl\):\1stylesheets/dsssl/docbook\2:' \
+ -i manual/qtiplot.dsl || die
+ sed -e 's:\(/usr/share/\)xml/docbook/stylesheet/nwalsh\(/html/chunk.xsl\):\1sgml/docbook/xsl-stylesheets\2:' \
+ -i manual/qtiplot_html.xsl || die
+
+ sed \
+ -e '1i#define OF(x) x' \
+ -i 3rdparty/zlib/minigzip.c || die
+}
+
+src_configure() {
+ use amd64 && export QMAKESPEC="linux-g++-64"
+ eqmake4
+}
+
+src_compile() {
+ emake
+ lrelease qtiplot/qtiplot.pro || die
+ if use doc; then
+ cd manual
+ emake web
+ fi
+}
+
+src_install() {
+ qt4-r2_src_install
+
+ insinto /usr/share/qtiplot
+ doins qtiplot/qti_wordlist.txt
+
+ newicon qtiplot_logo.png qtiplot.png
+ make_desktop_entry qtiplot "QtiPlot Scientific Plotting" qtiplot
+
+ use doc && dohtml -r manual/html/*
+
+ use python && python_optimize
+
+ if [[ -n ${LINGUAS} ]]; then
+ insinto /usr/share/${PN}/translations
+ for l in ${LANGS}; do
+ lu=${l/cz/cs}
+ lu=${lu/cn/zh_CN}
+ use linguas_${lu} && \
+ doins qtiplot/translations/qtiplot_${l}.qm
+ done
+ fi
+}
+
+pkg_postinst() {
+ if use python; then
+ optfeature "Enhanced python support" \
+ dev-python/pygsl dev-python/rpy sci-libs/scipy dev-python/sympy
+ fi
+
+ fdo-mime_desktop_database_update
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+}
diff --git a/sci-visualization/qtiplot/qtiplot-0.9.8.9-r4.ebuild b/sci-visualization/qtiplot/qtiplot-0.9.8.9-r4.ebuild
new file mode 100644
index 000000000000..42a68ecc39cb
--- /dev/null
+++ b/sci-visualization/qtiplot/qtiplot-0.9.8.9-r4.ebuild
@@ -0,0 +1,241 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils qmake-utils python-single-r1 toolchain-funcs xdg
+
+DESCRIPTION="Qt based clone of the Origin plotting package"
+HOMEPAGE="
+ http://soft.proindependent.com/qtiplot.html
+ http://www.staff.science.uu.nl/~zeven101/qtiplot.html"
+SRC_URI="
+ https://dev.gentoo.org/~dilfridge/distfiles/${P}.tar.bz2
+ https://dev.gentoo.org/~jlec/distfiles/${P}-origin.patch.xz"
+
+LICENSE="GPL-2 GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="bindist doc mono latex python"
+
+LANGS="cn cz de es fr ja ro ru sv"
+for l in ${LANGS}; do
+ lu=${l/cz/cs}
+ lu=${lu/cn/zh_CN}
+ IUSE="${IUSE} linguas_${lu}"
+done
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+# qwtplot3d much modified from original upstream
+# >=x11-libs/qwt-5.3 they are using trunk checkouts
+RDEPEND="
+ >=dev-cpp/muParser-1.32
+ >=dev-libs/boost-1.35.0:=
+ dev-libs/quazip[qt4]
+ dev-qt/qt3support:4
+ dev-qt/qtgui:4
+ dev-qt/qthelp:4
+ dev-qt/qthelp:4[compat]
+ dev-qt/qtopengl:4
+ dev-qt/qtsvg:4
+ media-libs/libemf
+ media-libs/libpng:=
+ sci-libs/alglib:=
+ >=sci-libs/gsl-2
+ sci-libs/tamu_anova
+ >=x11-libs/gl2ps-1.3.5[png]
+ latex? ( dev-tex/qtexengine )
+ mono? ( dev-dotnet/libgdiplus )
+ python? (
+ ${PYTHON_DEPS}
+ >=dev-python/PyQt4-4.11.3[X,${PYTHON_USEDEP}]
+ )
+"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ doc? (
+ >=app-text/docbook-sgml-utils-0.6.14-r1
+ >=app-text/docbook-xml-dtd-4.4-r2:4.4
+ )
+ python? ( >=dev-python/sip-4.16.5[${PYTHON_USEDEP}] )
+"
+
+PATCHES=(
+ "${WORKDIR}"/${P}-origin.patch
+ "${FILESDIR}"/${P}-origin-2.patch
+ "${FILESDIR}"/${P}-qt48.patch
+ "${FILESDIR}"/${PN}-0.9.8.8-system-gl2ps.patch
+ "${FILESDIR}"/${PN}-0.9.7.10-dont-install-qwt.patch
+ "${FILESDIR}"/${PN}-0.9.8.6-gold.patch
+ "${FILESDIR}"/${PN}-0.9.8.7-kde.patch
+ "${FILESDIR}"/${P}-set_col_values.patch
+ "${FILESDIR}"/${P}-adopt_to_alglib3.patch
+ "${FILESDIR}"/${P}-crasher_without_internet.patch
+ "${FILESDIR}"/${P}-private.patch
+ "${FILESDIR}"/${P}-sip-4.15.patch
+ "${FILESDIR}"/${P}-PyQt4-4.11.3.patch
+ "${FILESDIR}"/${P}-gsl-2.patch
+ "${FILESDIR}"/${P}-sip-4.19.patch
+)
+
+RESTRICT="!bindist? ( bindist )"
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ local mylibs
+
+ xdg_src_prepare
+
+ rm -rf \
+ 3rdparty/{liborigin,QTeXEngine,/qwtplot3d/3rdparty/gl2ps/,boost,alglib} \
+ || die
+ sed \
+ -e "s:dll:static:g" \
+ -e "/INSTALLS/d" \
+ -i 3rdparty/qwtplot3d/*.pro || die
+
+ mylibs="${mylibs} -lquazip"
+ use mono && mylibs="${mylibs} $($(tc-getPKG_CONFIG) --libs libgdiplus)"
+
+ # Check build.conf for changes on bump.
+ cat > build.conf <<-EOF
+ # Automatically generated by Gentoo ebuild
+ isEmpty( QTI_ROOT ) {
+ message( "each file including this config needs to set QTI_ROOT to the dir containing this file!" )
+ }
+
+ MUPARSER_LIBS = $($(tc-getPKG_CONFIG) --libs muparser)
+ GSL_LIBS = $($(tc-getPKG_CONFIG) --libs gsl)
+ QWT_INCLUDEPATH = \$\$QTI_ROOT/3rdparty/qwt/src
+ QWT_LIBS = \$\$QTI_ROOT/3rdparty/qwt/lib/libqwt.a
+ QWT3D_INCLUDEPATH = \$\$QTI_ROOT/3rdparty/qwtplot3d/include
+ QWT3D_LIBS = \$\$QTI_ROOT/3rdparty/qwtplot3d/lib/libqwtplot3d.a
+ EMF_INCLUDEPATH = "${EPREFIX}"/usr/include/libEMF
+ SYS_LIBS = -lgl2ps ${mylibs} -lGLU
+
+ LUPDATE = lupdate
+ LRELEASE = lrelease
+
+ SCRIPTING_LANGS += muParser
+
+ CONFIG += release
+ CONFIG += CustomInstall
+ DEFINES += SCRIPTING_CONSOLE
+
+ LIBPNG_LIBS = $($(tc-getPKG_CONFIG) --libs libpng)
+ TAMUANOVA_LIBS = -ltamuanova
+ TAMUANOVA_INCLUDEPATH = "${EPREFIX}/usr/include/tamu_anova"
+ ALGLIB_LIBS = -lalglib
+
+ EOF
+
+ use bindist && echo "DEFINES += QTIPLOT_SUPPORT" >> build.conf
+ use bindist || echo "DEFINES += QTIPLOT_PRO" >> build.conf
+ use python && echo "SCRIPTING_LANGS += Python" >> build.conf
+ use python && echo "PYTHON = ${EPYTHON}" >> build.conf
+ use latex && echo "TEX_ENGINE_LIBS = -lQTeXEngine" >> build.conf
+
+ sed \
+ -e "s:doc/${PN}/manual:doc/${PN}/html:" \
+ -e '/INSTALLS.*documentation/d' \
+ -e '/INSTALLS.*manual/d' \
+ -e "/INSTALLBASE/s: /usr: ${EPREFIX}/usr:g" \
+ -e 's:/usr/local/qtiplot:$$INSTALLBASE:g' \
+ -i qtiplot/qtiplot.pro || die
+
+ if use python; then
+ sed \
+ -e "s:/usr/local/${PN}:${EPREFIX}$(python_get_sitedir)/qtiplot:" \
+ -i qtiplot/qtiplot.pro || die
+ fi
+
+ sed \
+ -e "/^target.path/s:/usr:${EPREFIX}/usr:g" \
+ -i fitPlugins/*/*.pro || die
+
+ sed -e '/manual/d' -i qtiplot.pro || die
+
+ sed -e "s:QTIPLOT_PRO:QTIPLOT_PROFESSIONAL:g" -i qtiplot/src/core/main.cpp || die
+
+ # Drop langs only if LINGUAS is not empty
+ if [[ -n ${LINGUAS} ]]; then
+ for l in ${LANGS}; do
+ lu=${l/cz/cs}
+ lu=${lu/cn/zh_CN}
+ use linguas_${lu} || \
+ sed -e "s:translations/qtiplot_${l}.[tq][sm]::" \
+ -i qtiplot/qtiplot.pro || die
+ done
+ fi
+
+ sed \
+ -e "s:d_python_config_folder + \":\"${EPREFIX}/usr/share/qtiplot:g" \
+ -i qtiplot/src/core/ApplicationWindow.cpp || die
+
+ chmod -x qtiplot/qti_wordlist.txt
+
+ # sed out debian paths
+ sed \
+ -e 's:\(/usr/share/sgml/\)docbook/stylesheet/dsssl/modular\(/html/docbook.dsl\):\1stylesheets/dsssl/docbook\2:' \
+ -i manual/qtiplot.dsl || die
+ sed \
+ -e 's:\(/usr/share/\)xml/docbook/stylesheet/nwalsh\(/html/chunk.xsl\):\1sgml/docbook/xsl-stylesheets\2:' \
+ -i manual/qtiplot_html.xsl || die
+
+ sed \
+ -e '1i#define OF(x) x' \
+ -i 3rdparty/zlib/minigzip.c || die
+}
+
+src_configure() {
+ use amd64 && export QMAKESPEC="linux-g++-64"
+ eqmake4
+}
+
+src_compile() {
+ default
+ lrelease qtiplot/qtiplot.pro || die
+ if use doc; then
+ cd manual || die
+ emake web
+ fi
+}
+
+src_install() {
+ emake INSTALL_ROOT="${D}" install
+
+ insinto /usr/share/qtiplot
+ doins qtiplot/qti_wordlist.txt
+
+ newicon qtiplot_logo.png qtiplot.png
+ make_desktop_entry qtiplot "QtiPlot Scientific Plotting" qtiplot
+
+ use doc && dodoc -r manual/html
+
+ use python && python_optimize
+
+ if [[ -n ${LINGUAS} ]]; then
+ insinto /usr/share/${PN}/translations
+ for l in ${LANGS}; do
+ lu=${l/cz/cs}
+ lu=${lu/cn/zh_CN}
+ use linguas_${lu} && \
+ doins qtiplot/translations/qtiplot_${l}.qm
+ done
+ fi
+}
+
+pkg_postinst() {
+ if use python; then
+ optfeature "Enhanced python support" \
+ dev-python/pygsl dev-python/rpy sci-libs/scipy dev-python/sympy
+ fi
+
+ xdg_pkg_postinst
+}