sci-visualization/veusz: bump to 3.0.1
authorAndrey Grozin <grozin@gentoo.org>
Wed, 8 Aug 2018 13:29:48 +0000 (20:29 +0700)
committerAndrey Grozin <grozin@gentoo.org>
Wed, 8 Aug 2018 13:30:39 +0000 (20:30 +0700)
An upstream patch to improve smoothness of Bezier splines added
Suggested-by: Sergey Torokhov <torokhov_s_a@mail.ru>
Package-Manager: Portage-2.3.41, Repoman-2.3.9

sci-visualization/veusz/Manifest
sci-visualization/veusz/files/fix_spline.patch [new file with mode: 0644]
sci-visualization/veusz/veusz-3.0.1.ebuild [new file with mode: 0644]

index a66887c166865f25b341c4de0c74927ecc64e7c9..255f56aa435f155cb49e0ea1f1e073f89ba65bc0 100644 (file)
@@ -1 +1,2 @@
+DIST veusz-3.0.1.tar.gz 2554401 BLAKE2B 6e5649eef94ce0bd7fcdfa8325b35de144aaecd792f32c149f5a6f16c7c35f10d29bebeb37531d726e1b87f6d46855d7cdb2af402ec8fd0a2c1af91844d12c03 SHA512 99766c0fee70c12bba7b2ee8434224649763323aa9278d2116159f18257e1e1c5a491d591efb779c1bbb9dba1fb524ad8185fa2e91429ba1cc594fd632cb6238
 DIST veusz-3.0.tar.gz 2550683 BLAKE2B 72f0da8d9b993d8a3252fbb93314a53832fbf319287946e9ebc9317ebdab3f10ef2071012b88a1ff3d31d4732f367ded0b217dfa9766f5a09abe90e96b769e45 SHA512 a740d5677e8f23245e54573de0faaa66b659b54e289b256dc344f5aa0cc2a05db26efce57ff31b19c1235e04a9aa22cfa12125a784d27b0e3725277cbfae1b06
diff --git a/sci-visualization/veusz/files/fix_spline.patch b/sci-visualization/veusz/files/fix_spline.patch
new file mode 100644 (file)
index 0000000..a7d6bd8
--- /dev/null
@@ -0,0 +1,16 @@
+# Upstream patch that fixes spline interpolation:
+# https://github.com/veusz/veusz/commit/b4223800744034880fd1ca1165853636b31e576c
+diff -Naur old/veusz/helpers/src/qtloops/beziers.cpp new/veusz/helpers/src/qtloops/beziers.cpp
+--- old/veusz/helpers/src/qtloops/beziers.cpp  2017-09-23 11:10:46.000000000 +0300
++++ new/veusz/helpers/src/qtloops/beziers.cpp  2018-08-04 21:27:01.000000000 +0300
+@@ -1013,8 +1013,8 @@
+     return 0;
+   }
+-  // factor of 0.1 introduced by JSS to stop more hooks
+-  double const allowed = L2(b - a)*0.1 + tolerance;
++  // factor of 0.2 introduced by JSS to stop more hooks
++  double const allowed = L2(b - a)*0.2 + tolerance;
+   return dist / allowed;
+   /** \todo 
+    * effic: Hooks are very rare.  We could start by comparing 
diff --git a/sci-visualization/veusz/veusz-3.0.1.ebuild b/sci-visualization/veusz/veusz-3.0.1.ebuild
new file mode 100644 (file)
index 0000000..018f5fd
--- /dev/null
@@ -0,0 +1,81 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
+
+inherit eutils distutils-r1 virtualx xdg-utils gnome2-utils
+
+DESCRIPTION="Qt scientific plotting package with good Postscript output"
+HOMEPAGE="https://veusz.github.io/"
+SRC_URI="https://github.com/${PN}/${PN}/releases/download/${P}/${P}.tar.gz"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="dbus doc emf fits hdf5 minuit"
+
+CDEPEND="dev-python/PyQt5[widgets,svg,printsupport,${PYTHON_USEDEP}]
+       dev-python/numpy[${PYTHON_USEDEP}]"
+RDEPEND="${CDEPEND}
+       dbus? ( dev-python/dbus-python[${PYTHON_USEDEP}] )
+       emf? ( dev-python/pyemf[$(python_gen_usedep 'python2*')] )
+       fits? ( dev-python/astropy[${PYTHON_USEDEP}] )
+       hdf5? ( dev-python/h5py[${PYTHON_USEDEP}] )
+       minuit? ( || ( dev-python/iminuit[${PYTHON_USEDEP}] dev-python/pyminuit[${PYTHON_USEDEP}] ) )"
+DEPEND="${CDEPEND}
+       dev-python/setuptools[${PYTHON_USEDEP}]
+       dev-python/sip[${PYTHON_USEDEP}]
+       doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )"
+
+PATCHES=("${FILESDIR}/fix_spline.patch")
+
+python_test() {
+       distutils_install_for_testing
+       cd tests || die
+       VIRTUALX_COMMAND="${EPYTHON}" \
+               VEUSZ_RESOURCE_DIR="${S}" \
+               virtualmake runselftest.py
+}
+
+python_install() {
+       distutils-r1_python_install
+       # symlink the license, bug #341653
+       rm "${D}/$(python_get_sitedir)"/${PN}/{COPYING,AUTHORS,ChangeLog} || die
+       mkdir -p "${D}/$(python_get_sitedir)" || die
+       cat >> "${D}/$(python_get_sitedir)"/${PN}/COPYING <<- EOF
+       Please visit
+
+       https://www.gnu.org/licenses/gpl-2.0.html
+
+       for the full license text.
+       EOF
+}
+
+python_install_all() {
+       distutils-r1_python_install_all
+
+       if use doc; then
+               dodoc Documents/manual/pdf/${PN}.pdf
+               docinto html
+               dodoc -r Documents/manual/html
+       fi
+
+       doicon icons/veusz.png
+       domenu "${FILESDIR}"/veusz.desktop
+       insinto /usr/share/mime/packages
+       doins "${FILESDIR}"/veusz.xml
+}
+
+pkg_postinst() {
+       xdg_desktop_database_update
+       xdg_mimeinfo_database_update
+       gnome2_icon_cache_update
+}
+
+pkg_postrm() {
+       xdg_desktop_database_update
+       xdg_mimeinfo_database_update
+       gnome2_icon_cache_update
+}