diff options
author | 2010-01-12 18:07:43 +0000 | |
---|---|---|
committer | 2010-01-12 18:07:43 +0000 | |
commit | 80d65f41e3795c79fa4b7b447971b222b5215f41 (patch) | |
tree | 9456fa1cbb62c782620b69e56a08c7e06fb2be69 /sci-visualization/qtiplot | |
parent | Stable for HPPA (bug #299751). (diff) | |
download | historical-80d65f41e3795c79fa4b7b447971b222b5215f41.tar.gz historical-80d65f41e3795c79fa4b7b447971b222b5215f41.tar.bz2 historical-80d65f41e3795c79fa4b7b447971b222b5215f41.zip |
Added upstream patch to fix transparency export, bug #300692, thank urcindalo for report.
Package-Manager: portage-2.1.7.16/cvs/Linux x86_64
Diffstat (limited to 'sci-visualization/qtiplot')
-rw-r--r-- | sci-visualization/qtiplot/ChangeLog | 9 | ||||
-rw-r--r-- | sci-visualization/qtiplot/Manifest | 4 | ||||
-rw-r--r-- | sci-visualization/qtiplot/files/qtiplot-0.9.7.11-transparency.patch | 158 | ||||
-rw-r--r-- | sci-visualization/qtiplot/qtiplot-0.9.7.11-r3.ebuild | 181 |
4 files changed, 350 insertions, 2 deletions
diff --git a/sci-visualization/qtiplot/ChangeLog b/sci-visualization/qtiplot/ChangeLog index 5ffac0b81cea..be1bdb70481d 100644 --- a/sci-visualization/qtiplot/ChangeLog +++ b/sci-visualization/qtiplot/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for sci-visualization/qtiplot # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sci-visualization/qtiplot/ChangeLog,v 1.51 2010/01/11 19:13:52 pva Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-visualization/qtiplot/ChangeLog,v 1.52 2010/01/12 18:07:37 pva Exp $ + +*qtiplot-0.9.7.11-r3 (12 Jan 2010) + + 12 Jan 2010; Peter Volkov <pva@gentoo.org> +qtiplot-0.9.7.11-r3.ebuild, + +files/qtiplot-0.9.7.11-transparency.patch: + Added upstream patch to fix transparency export, bug #300692, thank + urcindalo for report. *qtiplot-0.9.7.11-r2 (11 Jan 2010) diff --git a/sci-visualization/qtiplot/Manifest b/sci-visualization/qtiplot/Manifest index dab794091171..18cd42540262 100644 --- a/sci-visualization/qtiplot/Manifest +++ b/sci-visualization/qtiplot/Manifest @@ -9,9 +9,11 @@ AUX qtiplot-0.9.7.10-syslibs.patch 2111 RMD160 d052c2abbc46745f8cc069a666bf9650c AUX qtiplot-0.9.7.11-system-QTeXEngine.patch 1045 RMD160 11193edddf6b01a9203fe00f543497682abe2931 SHA1 cc23d68291a84ccda3c58b4bcbc53bcc8a438997 SHA256 2165b10551bbe79477f0fbd70108d352067bcab9a5b7c41a26f8970c30612a37 AUX qtiplot-0.9.7.11-system-gl2ps.patch 1765 RMD160 92e96447aa0207e4c75ea72c4116563aa404d226 SHA1 8bd2cbedb6ca372fbc547e0ee87089aa9bb0852b SHA256 3c7b08c6d9fbdbff6248da0148e714d433b214d68c558ce7498ad7dd86aa7437 AUX qtiplot-0.9.7.11-system-liborigin.patch 1527 RMD160 08e401cc3773319a887b4272ead209ebaba30296 SHA1 aee9ad7acd1797173a4a5eea47b492f0ab212621 SHA256 c82997fe4f45c0a4561d7697ac0e5d3348bf48eee254d0aebc0610e63fc90274 +AUX qtiplot-0.9.7.11-transparency.patch 5432 RMD160 532bc8249fe6a946426c66df56f8393c95931c0e SHA1 9ae1ed3839921d0d937c30f7135ab0d350ea3795 SHA256 f084e0e5bcc8793f572388c0d66a962d421912d8e1982f4404a45aa9df02f4d5 DIST qtiplot-0.9.7.10.tar.bz2 7948018 RMD160 21e4ce18b1eab877fd89e97065daa246c637da67 SHA1 38558d9026113a728834536627efbc1bff9c66e1 SHA256 88f8c45f369fb0427720757983cbe033c6761f507f8efb68c63b8d67bcfbf099 DIST qtiplot-0.9.7.11.tar.bz2 8015168 RMD160 d04669eed2c444ca390711281ecea1e0ad2b3c43 SHA1 4db101c28c4a8b8c5f11daee3bbf8979f8063914 SHA256 dd6c1c832eed89cd8bab55d73f77549338faf4e10f4dbf534df597b39bb2f52f EBUILD qtiplot-0.9.7.10.ebuild 3305 RMD160 98cbadff023c23cd5f68dfc73a0f28a4024bd8e3 SHA1 85b8ac3758bcfb48e57f128c6586254648f474ae SHA256 c9228bfda1e2e75f4fff30fc0c9e6a04e38578a01980cd77697768b2c4c64ff4 EBUILD qtiplot-0.9.7.11-r2.ebuild 4810 RMD160 158ba1f09025e60913635d7dad8b161f39239ec9 SHA1 1af4f61e28113d6889c18df14e61f5c68f07b66a SHA256 c2537011214b6ce7f42bf38679e08f33afb779da36b40d7a0539365ddfe22654 -MISC ChangeLog 14198 RMD160 8d63a2d10b6da048eb8173df72dc49a4da830dfb SHA1 1965b5d90665785da424b73e4a9183d090ad5183 SHA256 eac7c1e5cc1fe7d8e04f780e09e801ab163ef77d82428c320896d140f084e0e4 +EBUILD qtiplot-0.9.7.11-r3.ebuild 4777 RMD160 f60681ccbad46c0b330004cfa7182ca571bafbe0 SHA1 1e1f837f28e7a85c4868d60bde8642b325627b90 SHA256 63de8932257c499c2292e57f0d40cb2db76dc7c7289ecde09939a38e8e4e7fbb +MISC ChangeLog 14449 RMD160 2915f2166edf999aee2f3d054c2c8eccff1bff01 SHA1 acfc97e8a95e48969350d4aeda1d08b7ff950fc7 SHA256 ffd12484315ad3444e39e4f89710d3ab06ee177ae89657874675e7afa0ec9c97 MISC metadata.xml 857 RMD160 f0b19f02132816e5a98dade3c25c17b578ef5f33 SHA1 1a7a0769a7989384e15a2d098441966630652866 SHA256 d001c7b867a7bbc14047fc029821afe1dde7a65e2e8d146c3f467c57da26d24a diff --git a/sci-visualization/qtiplot/files/qtiplot-0.9.7.11-transparency.patch b/sci-visualization/qtiplot/files/qtiplot-0.9.7.11-transparency.patch new file mode 100644 index 000000000000..502eacf37a7c --- /dev/null +++ b/sci-visualization/qtiplot/files/qtiplot-0.9.7.11-transparency.patch @@ -0,0 +1,158 @@ +commit 7d83056ab798836dcc18de7fd0922288f40cc85e +Author: ion_vasilief <ion_vasilief@5a6a7de5-fb12-0410-b871-c33778c25c60> +Date: Tue Jan 12 12:27:02 2010 +0000 + + Fixed bug #016656: No transparency for exported .png files. + +diff --git a/qtiplot/src/plot2D/Graph.cpp b/qtiplot/src/plot2D/Graph.cpp +index 846392b..c5938f1 100755 +--- a/qtiplot/src/plot2D/Graph.cpp ++++ b/qtiplot/src/plot2D/Graph.cpp +@@ -1266,11 +1266,14 @@ void Graph::copyImage() + #endif + } + +-QPixmap Graph::graphPixmap(const QSize& size, double scaleFontsFactor) ++QPixmap Graph::graphPixmap(const QSize& size, double scaleFontsFactor, bool transparent) + { + if (!size.isValid()){ + QPixmap pixmap(boundingRect().size()); +- pixmap.fill(Qt::white); ++ if (transparent) ++ pixmap.fill(Qt::transparent); ++ else ++ pixmap.fill(); + QPainter p(&pixmap); + print(&p, rect()); + p.end(); +@@ -1292,7 +1295,10 @@ QPixmap Graph::graphPixmap(const QSize& size, double scaleFontsFactor) + scaleFonts(scaleFontsFactor); + + QPixmap pixmap(size); +- pixmap.fill(Qt::white); ++ if (transparent) ++ pixmap.fill(Qt::transparent); ++ else ++ pixmap.fill(); + QPainter p(&pixmap); + print(&p, r); + p.end(); +@@ -1346,28 +1352,8 @@ void Graph::exportImage(const QString& fileName, int quality, bool transparent, + if (customSize.isValid()) + size = customPrintSize(customSize, unit, dpi); + +- QPixmap pic = graphPixmap(size, fontsFactor); ++ QPixmap pic = graphPixmap(size, fontsFactor, transparent); + QImage image = pic.toImage(); +- +- if (transparent){ +- QBitmap mask(size); +- mask.fill(Qt::color1); +- QPainter p(&mask); +- p.setPen(Qt::color0); +- +- QRgb backgroundPixel = QColor(Qt::white).rgb (); +- for (int y = 0; y < image.height(); y++){ +- for (int x = 0; x < image.width(); x++){ +- QRgb rgb = image.pixel(x, y); +- if (rgb == backgroundPixel) // we want the frame transparent +- p.drawPoint(x, y); +- } +- } +- p.end(); +- pic.setMask(mask); +- image = pic.toImage(); +- } +- + int dpm = (int)ceil(100.0/2.54*dpi); + image.setDotsPerMeterX(dpm); + image.setDotsPerMeterY(dpm); +diff --git a/qtiplot/src/plot2D/Graph.h b/qtiplot/src/plot2D/Graph.h +index 7dd10fa..9646232 100755 +--- a/qtiplot/src/plot2D/Graph.h ++++ b/qtiplot/src/plot2D/Graph.h +@@ -313,7 +313,7 @@ class Graph: public QwtPlot + void printCropmarks(bool on){d_print_cropmarks = on;}; + + void copyImage(); +- QPixmap graphPixmap(const QSize& size = QSize(), double scaleFontsFactor = 1.0); ++ QPixmap graphPixmap(const QSize& size = QSize(), double scaleFontsFactor = 1.0, bool transparent = false); + //! Provided for convenience in scripts + void exportToFile(const QString& fileName); + void exportSVG(const QString& fname, const QSizeF& customSize = QSizeF(), int unit = FrameWidget::Pixel, double fontsFactor = 1.0); +diff --git a/qtiplot/src/plot2D/MultiLayer.cpp b/qtiplot/src/plot2D/MultiLayer.cpp +index 4e3dc4a..e0f3111 100755 +--- a/qtiplot/src/plot2D/MultiLayer.cpp ++++ b/qtiplot/src/plot2D/MultiLayer.cpp +@@ -679,11 +679,14 @@ void MultiLayer::setRows(int r) + d_rows = r; + } + +-QPixmap MultiLayer::canvasPixmap(const QSize& size, double scaleFontsFactor) ++QPixmap MultiLayer::canvasPixmap(const QSize& size, double scaleFontsFactor, bool transparent) + { + if (!size.isValid()){ + QPixmap pic(d_canvas->size()); +- pic.fill(); ++ if (transparent) ++ pic.fill(Qt::transparent); ++ else ++ pic.fill(); + QPainter p(&pic); + QObjectList lst = d_canvas->children();//! this list is sorted according to the stack order + foreach (QObject *o, lst){ +@@ -702,7 +705,10 @@ QPixmap MultiLayer::canvasPixmap(const QSize& size, double scaleFontsFactor) + scaleFontsFactor = scaleFactorY; + + QPixmap pic(size); +- pic.fill(); ++ if (transparent) ++ pic.fill(Qt::transparent); ++ else ++ pic.fill(); + QPainter p(&pic); + QObjectList lst = d_canvas->children(); + foreach (QObject *o, lst){ +@@ -769,28 +775,8 @@ void MultiLayer::exportImage(const QString& fileName, int quality, bool transpar + if (customSize.isValid()) + size = Graph::customPrintSize(customSize, unit, dpi); + +- QPixmap pic = canvasPixmap(size, fontsFactor); ++ QPixmap pic = canvasPixmap(size, fontsFactor, transparent); + QImage image = pic.toImage(); +- +- if (transparent){ +- QBitmap mask(size); +- mask.fill(Qt::color1); +- QPainter p(&mask); +- p.setPen(Qt::color0); +- +- QRgb backgroundPixel = QColor(Qt::white).rgb (); +- for (int y = 0; y < image.height(); y++){ +- for (int x = 0; x < image.width(); x++){ +- QRgb rgb = image.pixel(x, y); +- if (rgb == backgroundPixel) // we want the frame transparent +- p.drawPoint(x, y); +- } +- } +- p.end(); +- pic.setMask(mask); +- image = pic.toImage(); +- } +- + int dpm = (int)ceil(100.0/2.54*dpi); + image.setDotsPerMeterX(dpm); + image.setDotsPerMeterY(dpm); +diff --git a/qtiplot/src/plot2D/MultiLayer.h b/qtiplot/src/plot2D/MultiLayer.h +index d677403..47569a4 100755 +--- a/qtiplot/src/plot2D/MultiLayer.h ++++ b/qtiplot/src/plot2D/MultiLayer.h +@@ -157,7 +157,7 @@ public slots: + + //! \name Print and Export + //@{ +- QPixmap canvasPixmap(const QSize& size = QSize(), double scaleFontsFactor = 1.0); ++ QPixmap canvasPixmap(const QSize& size = QSize(), double scaleFontsFactor = 1.0, bool transparent = false); + void exportToFile(const QString& fileName); + void exportImage(QTextDocument *document, int quality = 100, bool transparent = false, + int dpi = 0, const QSizeF& customSize = QSizeF (), int unit = FrameWidget::Pixel, double fontsFactor = 1.0); diff --git a/sci-visualization/qtiplot/qtiplot-0.9.7.11-r3.ebuild b/sci-visualization/qtiplot/qtiplot-0.9.7.11-r3.ebuild new file mode 100644 index 000000000000..050a27279e1e --- /dev/null +++ b/sci-visualization/qtiplot/qtiplot-0.9.7.11-r3.ebuild @@ -0,0 +1,181 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sci-visualization/qtiplot/qtiplot-0.9.7.11-r3.ebuild,v 1.1 2010/01/12 18:07:37 pva Exp $ + +EAPI=2 +inherit eutils qt4 fdo-mime python + +DESCRIPTION="Qt based clone of the Origin plotting package" +HOMEPAGE="http://soft.proindependent.com/qtiplot.html" +SRC_URI="mirror://berlios/${PN}/${P}.tar.bz2" + +LICENSE="GPL-2 GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="doc python ods xls" + +LANGS="cn cz de es fr ro ru ja sv" +for l in ${LANGS}; do + lu=${l/cz/cs} + lu=${lu/cn/zh_CN} + IUSE="${IUSE} linguas_${lu}" +done + +# qwtplot3d much modified from original upstream +# >=x11-libs/qwt-5.3 they are using trunk checkouts +CDEPEND=" + x11-libs/qt-opengl:4 + x11-libs/qt-qt3support:4 + x11-libs/qt-assistant:4 + x11-libs/qt-svg:4 + >=x11-libs/gl2ps-1.3.5 + >=dev-cpp/muParser-1.30 + >=dev-libs/boost-1.35.0 + >=sci-libs/liborigin-20090406:2 + sci-libs/gsl + dev-libs/boost + dev-tex/qtexengine + xls? ( dev-libs/libxls ) + ods? ( dev-libs/quazip )" +# Still unable to build +# emf? ( media-libs/libemf +# media-libs/emfengine ) + +DEPEND="${CDEPEND} + dev-util/pkgconfig + python? ( >=dev-python/sip-4.9 ) + doc? ( app-text/docbook-sgml-utils + >=app-text/docbook-xml-dtd-4.4-r2:4.4 )" + +RDEPEND="${CDEPEND} + python? ( >=dev-lang/python-2.5 + dev-python/PyQt4[X] + dev-python/pygsl + dev-python/rpy + sci-libs/scipy )" + +PATCHES=( + "${FILESDIR}/${P}-system-QTeXEngine.patch" + "${FILESDIR}/${P}-system-liborigin.patch" + "${FILESDIR}/${P}-system-gl2ps.patch" + "${FILESDIR}/${PN}-0.9.7.10-dont-install-qwt.patch" + "${FILESDIR}/${P}-transparency.patch" + ) + +src_prepare() { + qt4_src_prepare + + rm -rf 3rdparty/{liborigin,QTeXEngine,/qwtplot3d/3rdparty/gl2ps/} + + # 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 = \$\$system(pkg-config --libs muparser) + GSL_LIBS = \$\$system(pkg-config --libs gsl) + BOOST_INCLUDEPATH = /usr/include/boost + BOOST_LIBS = -lboost_date_time-mt -lboost_thread-mt + QWT_INCLUDEPATH = \$\$QTI_ROOT/3rdparty/qwt/src + QWT_LIBS = \$\$QTI_ROOT/3rdparty/qwt/lib/libqwt.a + LIB_ORIGIN_INCLUDEPATH = /usr/include/liborigin2 + LIB_ORIGIN_LIBS = -lorigin2 + SYS_LIBS = -lQTeXEngine -lgl2ps + + PYTHON = python + LUPDATE = lupdate + LRELEASE = lrelease + + SCRIPTING_LANGS += muParser + + CONFIG += release + CONFIG += CustomInstall + + EOF + + use python && echo "SCRIPTING_LANGS += Python" >> build.conf + use xls && echo "XLS_LIBS = -lxlsreader" >> build.conf + if use ods; then + echo "QUAZIP_INCLUDEPATH = /usr/include/quazip" >> build.conf + echo "QUAZIP_LIBS = -lquazip" >> build.conf + fi + + # Fails to build... + #if use emf; then + # echo "EMF_ENGINE_INCLUDEPATH = /usr/include/libEMF" >> build.conf + # echo "EMF_ENGINE_LIBS = -lEMF" >> build.conf + #fi + + python_version + + sed -e "s:doc/${PN}/manual:doc/${PF}/html:" \ + -e "s:local/${PN}:$(get_libdir)/python${PYVER}/site-packages:" \ + -i qtiplot/qtiplot.pro || die + + sed -e '/INSTALLS.*documentation/d' \ + -e '/INSTALLS.*manual/d' \ + -i qtiplot/qtiplot.pro || die + sed -e '/manual/d' -i qtiplot.pro || 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 + 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 +} + +src_configure() { + use amd64 && export QMAKESPEC="linux-g++-64" + eqmake4 +} + +src_compile() { + emake || die "emake failed" + lrelease qtiplot/qtiplot.pro || die + if use doc; then + cd manual + emake web || die "html docbook building failed" + fi +} + +src_install() { + emake INSTALL_ROOT="${D}" install || die 'emake install failed' + newicon qtiplot_logo.png qtiplot.png + make_desktop_entry qtiplot "QtiPlot Scientific Plotting" qtiplot + if use doc; then + insinto /usr/share/doc/${PF}/html + doins -r manual/html/* || die "install manual failed" + fi + + 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() { + fdo-mime_desktop_database_update +} + +pkg_postrm() { + fdo-mime_desktop_database_update +} |