summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Lecher <jlec@gentoo.org>2010-07-05 17:04:08 +0000
committerJustin Lecher <jlec@gentoo.org>2010-07-05 17:04:08 +0000
commit5fe4ed42fa7b3aa6f215886d21ef2f96a207cbd5 (patch)
treeb6881b2909860283559e53c73ce0ffeee0a5326b /sci-visualization
parentppc64 stable wrt #325089 (diff)
downloadgentoo-2-5fe4ed42fa7b3aa6f215886d21ef2f96a207cbd5.tar.gz
gentoo-2-5fe4ed42fa7b3aa6f215886d21ef2f96a207cbd5.tar.bz2
gentoo-2-5fe4ed42fa7b3aa6f215886d21ef2f96a207cbd5.zip
Fix for bug 321547, upstream svn rev 1729
(Portage version: 2.2_rc67/cvs/Linux x86_64)
Diffstat (limited to 'sci-visualization')
-rw-r--r--sci-visualization/qtiplot/ChangeLog8
-rw-r--r--sci-visualization/qtiplot/files/qtiplot-0.9.7.14-system-2dplot.patch125
-rw-r--r--sci-visualization/qtiplot/qtiplot-0.9.7.14-r1.ebuild195
3 files changed, 327 insertions, 1 deletions
diff --git a/sci-visualization/qtiplot/ChangeLog b/sci-visualization/qtiplot/ChangeLog
index 61c63acd389b..f04013b60995 100644
--- a/sci-visualization/qtiplot/ChangeLog
+++ b/sci-visualization/qtiplot/ChangeLog
@@ -1,6 +1,12 @@
# 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.60 2010/06/30 13:52:55 jlec Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-visualization/qtiplot/ChangeLog,v 1.61 2010/07/05 17:04:08 jlec Exp $
+
+*qtiplot-0.9.7.14-r1 (05 Jul 2010)
+
+ 05 Jul 2010; Justin Lecher <jlec@gentoo.org> +qtiplot-0.9.7.14-r1.ebuild,
+ +files/qtiplot-0.9.7.14-system-2dplot.patch:
+ Fix for bug 321547, upstream svn rev 1729
*qtiplot-0.9.8 (30 Jun 2010)
diff --git a/sci-visualization/qtiplot/files/qtiplot-0.9.7.14-system-2dplot.patch b/sci-visualization/qtiplot/files/qtiplot-0.9.7.14-system-2dplot.patch
new file mode 100644
index 000000000000..88664a1d58b1
--- /dev/null
+++ b/sci-visualization/qtiplot/files/qtiplot-0.9.7.14-system-2dplot.patch
@@ -0,0 +1,125 @@
+Index: qtiplot/src/plot2D/dialogs/PlotDialog.cpp
+===================================================================
+--- qtiplot/src/plot2D/dialogs/PlotDialog.cpp (revision 1728)
++++ qtiplot/src/plot2D/dialogs/PlotDialog.cpp (revision 1729)
+@@ -503,15 +503,19 @@
+ gl2->addWidget(new QLabel( tr("width= ")), 0, 0);
+ gl2->addWidget(boxPlotWidth, 0, 1);
+
+- gl2->addWidget(new QLabel(tr("height= ")), 2, 0);
+- gl2->addWidget(boxPlotHeight, 2, 1);
++ gl2->addWidget(new QLabel(tr("height= ")), 1, 0);
++ gl2->addWidget(boxPlotHeight, 1, 1);
+
+ keepPlotRatioBox = new QCheckBox(tr("Keep aspect ratio"));
+ keepPlotRatioBox->setChecked(app->d_keep_aspect_ration);
+- gl2->addWidget(keepRatioBox, 3, 1);
+
+- gl2->setRowStretch(4, 1);
++ connect(keepPlotRatioBox, SIGNAL(clicked (bool)), keepRatioBox, SLOT(setChecked(bool)));
++ connect(keepRatioBox, SIGNAL(clicked (bool)), keepPlotRatioBox, SLOT(setChecked(bool)));
+
++ gl2->addWidget(keepPlotRatioBox, 2, 1);
++
++ gl2->setRowStretch(3, 1);
++
+ QHBoxLayout *bl2 = new QHBoxLayout();
+ bl2->addWidget(gb1);
+ bl2->addWidget(gb2);
+@@ -582,25 +586,25 @@
+ gl2->addWidget(new QLabel( tr("width= ")), 0, 0);
+ gl2->addWidget(boxLayerWidth, 0, 1);
+
+- gl2->addWidget(new QLabel(tr("height= ")), 2, 0);
+- gl2->addWidget(boxLayerHeight, 2, 1);
++ gl2->addWidget(new QLabel(tr("height= ")), 1, 0);
++ gl2->addWidget(boxLayerHeight, 1, 1);
+
+ keepRatioBox = new QCheckBox(tr("Keep aspect ratio"));
+ keepRatioBox->setChecked(app->d_keep_aspect_ration);
+- gl2->addWidget(keepRatioBox, 3, 1);
++ gl2->addWidget(keepRatioBox, 2, 1);
+
+ QLabel *l = new QLabel(tr("Apply &to..."));
+- gl2->addWidget(l, 4, 0);
++ gl2->addWidget(l, 3, 0);
+
+ sizeApplyToBox = new QComboBox();
+ sizeApplyToBox->insertItem(tr("Layer"));
+ sizeApplyToBox->insertItem(tr("Window"));
+ sizeApplyToBox->insertItem(tr("All Windows"));
+- gl2->addWidget(sizeApplyToBox, 4, 1);
++ gl2->addWidget(sizeApplyToBox, 3, 1);
+
+ l->setBuddy(sizeApplyToBox);
+
+- gl2->setRowStretch(5, 1);
++ gl2->setRowStretch(4, 1);
+
+ QBoxLayout *bl2 = new QBoxLayout (QBoxLayout::LeftToRight);
+ bl2->addWidget(gb1);
+Index: qtiplot/src/plot2D/dialogs/ImageExportDialog.cpp
+===================================================================
+--- qtiplot/src/plot2D/dialogs/ImageExportDialog.cpp (revision 1728)
++++ qtiplot/src/plot2D/dialogs/ImageExportDialog.cpp (revision 1729)
+@@ -240,7 +240,7 @@
+ size_layout->addWidget(scaleFontsBox, 3, 1);
+
+ keepRatioBox = new QCheckBox(tr("&Keep aspect ratio"));
+- keepRatioBox->setChecked(true);
++ keepRatioBox->setChecked(app->d_keep_aspect_ration);
+ size_layout->addWidget(keepRatioBox, 4, 1);
+
+ vert_layout->addWidget(d_custom_size_box);
+@@ -340,6 +340,7 @@
+
+ app->d_3D_export_text_mode = d_3D_text_export_mode->currentIndex();
+ app->d_3D_export_sort = d_3D_export_sort->currentIndex();
++ app->d_keep_aspect_ration = keepRatioBox->isChecked();
+ }
+
+ e->accept();
+Index: qtiplot/src/plot2D/dialogs/EnrichmentDialog.cpp
+===================================================================
+--- qtiplot/src/plot2D/dialogs/EnrichmentDialog.cpp (revision 1728)
++++ qtiplot/src/plot2D/dialogs/EnrichmentDialog.cpp (revision 1729)
+@@ -460,6 +460,7 @@
+ gl2->addWidget(heightBox, 1, 1);
+
+ keepAspectBox = new QCheckBox(tr("&Keep aspect ratio"));
++ keepAspectBox->setChecked(app->d_keep_aspect_ration);
+ gl2->addWidget(keepAspectBox, 2, 1);
+
+ bestSizeButton = new QPushButton(tr("&Best size"));
+@@ -646,6 +647,10 @@
+ FrameWidget *fw = qobject_cast<FrameWidget *>(d_widget);
+ if (fw)
+ fw->setAttachPolicy((FrameWidget::AttachPolicy)attachToBox->currentIndex());
++
++ ApplicationWindow *app = (ApplicationWindow *)this->parent();
++ if (app)
++ app->d_keep_aspect_ration = keepAspectBox->isChecked();
+ } else if (patternPage && tabWidget->currentPage() == patternPage)
+ patternApplyTo();
+ else if (textPage && tabWidget->currentPage() == textPage){
+Index: qtiplot/src/core/ConfigDialog.cpp
+===================================================================
+--- qtiplot/src/core/ConfigDialog.cpp (revision 1728)
++++ qtiplot/src/core/ConfigDialog.cpp (revision 1729)
+@@ -1023,7 +1023,7 @@
+ gl->addWidget(boxCanvasHeight, 2, 1);
+
+ keepRatioBox = new QCheckBox(tr("&Keep aspect ratio"));
+- keepRatioBox->setChecked(true);
++ keepRatioBox->setChecked(app->d_keep_aspect_ration);
+ gl->addWidget(keepRatioBox, 3, 1);
+
+ gl->setRowStretch(4, 1);
+@@ -2097,6 +2097,7 @@
+ FrameWidget::Unit unit = (FrameWidget::Unit)unitBox->currentIndex();
+ app->d_layer_canvas_width = convertToPixels(boxCanvasWidth->value(), unit, 0);
+ app->d_layer_canvas_height = convertToPixels(boxCanvasHeight->value(), unit, 1);
++ app->d_keep_aspect_ration = keepRatioBox->isChecked();
+ }
+
+ // 2D plots page: ticks tab
diff --git a/sci-visualization/qtiplot/qtiplot-0.9.7.14-r1.ebuild b/sci-visualization/qtiplot/qtiplot-0.9.7.14-r1.ebuild
new file mode 100644
index 000000000000..0cf6c0620d2d
--- /dev/null
+++ b/sci-visualization/qtiplot/qtiplot-0.9.7.14-r1.ebuild
@@ -0,0 +1,195 @@
+# 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.14-r1.ebuild,v 1.1 2010/07/05 17:04:08 jlec Exp $
+
+EAPI=2
+
+PYTHON_DEPEND="python? 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.32
+ >=dev-libs/boost-1.35.0
+ >=sci-libs/liborigin-20100420: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-python/PyQt4[X]
+ dev-python/pygsl
+ dev-python/rpy
+ sci-libs/scipy )"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-0.9.7.12-system-QTeXEngine.patch"
+ "${FILESDIR}/${PN}-0.9.7.14-system-liborigin.patch"
+ "${FILESDIR}/${PN}-0.9.7.14-system-2dplot.patch"
+ "${FILESDIR}/${PN}-0.9.7.12-system-gl2ps.patch"
+ "${FILESDIR}/${PN}-0.9.7.10-dont-install-qwt.patch"
+ )
+
+pkg_setup() {
+ python_set_active_version 2
+ qt4_pkg_setup
+}
+
+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
+ QWT3D_INCLUDEPATH = \$\$QTI_ROOT/3rdparty/qwtplot3d/include
+ QWT3D_LIBS = \$\$QTI_ROOT/3rdparty/qwtplot3d/lib/libqwtplot3d.a
+ LIB_ORIGIN_INCLUDEPATH = /usr/include/liborigin2
+ LIB_ORIGIN_LIBS = -lorigin2
+ QTEXENGINE_LIBS = -lQTeXEngine
+ SYS_LIBS = -lgl2ps
+
+ PYTHON = python
+ LUPDATE = lupdate
+ LRELEASE = lrelease
+
+ SCRIPTING_LANGS += muParser
+
+ CONFIG += release
+ CONFIG += CustomInstall
+ DEFINES += SCRIPTING_CONSOLE
+
+ 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
+
+ sed '/^INSTALLS/d;' -i 3rdparty/qwtplot3d/qwtplot3d.pro || die
+
+ # Fails to build...
+ #if use emf; then
+ # echo "EMF_ENGINE_INCLUDEPATH = /usr/include/libEMF" >> build.conf
+ # echo "EMF_ENGINE_LIBS = -lEMF" >> build.conf
+ #fi
+
+ sed -e "s:doc/${PN}/manual:doc/${PN}/html:" \
+ -e "s:/usr/local/${PN}:$(python_get_sitedir)/qtiplot:" \
+ -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/${PN}/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
+ python_mod_optimize "$(python_get_sitedir)/qtiplot"
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+ python_mod_cleanup "$(python_get_sitedir)/qtiplot"
+}