diff options
author | Sebastien Fabbro <bicatali@gentoo.org> | 2008-03-17 17:51:47 +0000 |
---|---|---|
committer | Sebastien Fabbro <bicatali@gentoo.org> | 2008-03-17 17:51:47 +0000 |
commit | 446c5e9fca475d24785025c951f2d400634f12b4 (patch) | |
tree | b467a661002172976b196103e37b0e6191cffe4b /sci-visualization/labplot | |
parent | Disable tls support if we're using uClibc (#213223 by Sergey Dryabzhinsky). (diff) | |
download | gentoo-2-446c5e9fca475d24785025c951f2d400634f12b4.tar.gz gentoo-2-446c5e9fca475d24785025c951f2d400634f12b4.tar.bz2 gentoo-2-446c5e9fca475d24785025c951f2d400634f12b4.zip |
Added a patch to use newer liborigin, from Debian
(Portage version: 2.1.4.4)
Diffstat (limited to 'sci-visualization/labplot')
-rw-r--r-- | sci-visualization/labplot/ChangeLog | 8 | ||||
-rw-r--r-- | sci-visualization/labplot/files/labplot-1.6.0.1-liborigin.patch | 136 | ||||
-rw-r--r-- | sci-visualization/labplot/labplot-1.6.0.1-r1.ebuild | 107 |
3 files changed, 250 insertions, 1 deletions
diff --git a/sci-visualization/labplot/ChangeLog b/sci-visualization/labplot/ChangeLog index 0e6a1fac1cfd..33b0a0ceaf2e 100644 --- a/sci-visualization/labplot/ChangeLog +++ b/sci-visualization/labplot/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for sci-visualization/labplot # Copyright 2000-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sci-visualization/labplot/ChangeLog,v 1.19 2008/03/07 03:02:44 bicatali Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-visualization/labplot/ChangeLog,v 1.20 2008/03/17 17:51:47 bicatali Exp $ + +*labplot-1.6.0.1-r1 (17 Mar 2008) + + 17 Mar 2008; Sébastien Fabbro <bicatali@gentoo.org> + +files/labplot-1.6.0.1-liborigin.patch, +labplot-1.6.0.1-r1.ebuild: + Added a patch to use newer liborigin, from Debian 06 Mar 2008; Sébastien Fabbro <bicatali@gentoo.org> -labplot-1.5.1.6.ebuild, labplot-1.5.1.6-r1.ebuild, diff --git a/sci-visualization/labplot/files/labplot-1.6.0.1-liborigin.patch b/sci-visualization/labplot/files/labplot-1.6.0.1-liborigin.patch new file mode 100644 index 000000000000..5be4aec9e9c5 --- /dev/null +++ b/sci-visualization/labplot/files/labplot-1.6.0.1-liborigin.patch @@ -0,0 +1,136 @@ +diff --git a/src/ImportOPJ.cc b/src/ImportOPJ.cc +index 2b625d4..c49752f 100644 +--- a/src/ImportOPJ.cc ++++ b/src/ImportOPJ.cc +@@ -12,6 +12,44 @@ + + #include <liborigin/OPJFile.h> + ++// The declaration of liborigin's OPJFile::colType() changed from ++// const char *OPJFile::colType(int, int) const; ++// in version 20071119 to ++// ColumnType OPJFile::colType(int, int) const; ++// in version 20080225. This function can be used to get the string ++// that colType() returned in liborigin/20071119 from the ColumnType ++// that colType() returns in liborigin/20080225. The use of this ++// function requires a build-dependency on liborigin (>= 20080225). ++QString colTypeToString(const ColumnType type) { ++ QString type_str = ""; ++ ++ switch (type) { ++ case X: ++ type_str = "X"; ++ break; ++ case Y: ++ type_str = "Y"; ++ break; ++ case Z: ++ type_str = "Z"; ++ break; ++ case XErr: ++ type_str = "DX"; ++ break; ++ case YErr: ++ type_str = "DY"; ++ break; ++ case Label: ++ type_str = "LABEL"; ++ break; ++ case NONE: ++ type_str = "NONE"; ++ break; ++ } ++ ++ return type_str; ++} ++ + ImportOPJ::ImportOPJ(MainWin *mw, QString filename) + : mw(mw),filename(filename) + {} +@@ -44,13 +82,13 @@ int ImportOPJ::import() { + for (int j=0;j<nr_cols;j++) { + QString name(opj.colName(s,j)); + spread->setColumnTitle(j,name.replace(QRegExp(".*_"),"")); +- spread->setColumnType(j,opj.colType(s,j)); ++ spread->setColumnType(j,colTypeToString(opj.colType(s,j))); + + for (int i=0;i<opj.numRows(s,j);i++) { + double *v = (double *) opj.oData(s,j,i,true); + + LTableItem *item; +- if(strcmp(opj.colType(s,j),"LABEL")) { // number ++ if(strcmp(colTypeToString(opj.colType(s,j)),"LABEL")) { // number + if(fabs(*v)>0 && fabs(*v)<2.0e-300) // empty entry + continue; + item = new LTableItem( table, QTableItem::OnTyping,QString::number(*v)); +@@ -62,7 +100,7 @@ int ImportOPJ::import() { + } + } + for (int s=0;s<opj.numMatrices();s++) { +- kdDebug()<<" Matrix "<<s+1<<" : "<<opj.matrixName(s)<<" (ParentFolder : "<<opj.matrixParentFolder(s)<<")"<<endl; ++ kdDebug()<<" Matrix "<<s+1<<" : "<<opj.matrixName(s)<<endl; //" (ParentFolder : "<<opj.matrixParentFolder(s)<<")"<<endl; + kdDebug()<<" Label : "<<opj.matrixLabel(s)<<" Cols/Rows : "<<opj.numMatrixCols(s)<<'/'<<opj.numMatrixRows(s)<<endl; + kdDebug()<<" Formula : "<<opj.matrixFormula(s)<<" DisplayType : "<<opj.matrixNumDisplayType(s)<<endl; + +@@ -99,7 +137,7 @@ int ImportOPJ::import() { + + QString notes = mw->getProject()->Notes(); + for (int s=0;s<opj.numNotes();s++) { +- kdDebug()<<" Note "<<s+1<<" : "<<opj.noteName(s)<<" (ParentFolder : "<<opj.noteParentFolder(s)<<")"<<endl; ++ kdDebug()<<" Note "<<s+1<<" : "<<opj.noteName(s)<<endl; //" (ParentFolder : "<<opj.noteParentFolder(s)<<")"<<endl; + kdDebug()<<" Label : "<<opj.noteLabel(s)<<" Text : "<<opj.noteText(s)<<endl; + notes.append(QString(opj.noteLabel(s))+":\n"); + notes.append(opj.noteText(s)); +@@ -115,7 +153,7 @@ int ImportOPJ::import() { + } + + for (int s=0;s<opj.numGraphs();s++) { +- kdDebug()<<" Graph "<<s+1<<" : "<<opj.graphName(s)<<" (ParentFolder : "<<opj.graphParentFolder(s)<<")"<<endl; ++ kdDebug()<<" Graph "<<s+1<<" : "<<opj.graphName(s)<<endl; //" (ParentFolder : "<<opj.graphParentFolder(s)<<")"<<endl; + kdDebug()<<" Label : "<<opj.graphLabel(s)<<" Layers : "<<opj.numLayers(s)<<endl; + + Worksheet *work = mw->newWorksheet(); +@@ -139,8 +177,10 @@ int ImportOPJ::import() { + #else + kdDebug()<<"Layer x axis : "<<opj.layerXAxisTitle(s,l).txt<<endl; + kdDebug()<<"Layer y axis : "<<opj.layerYAxisTitle(s,l).txt<<endl; +- Label *xlabel = new Label(parseOriginText(opj.layerXAxisTitle(s,l).txt)); +- Label *ylabel = new Label(parseOriginText(opj.layerYAxisTitle(s,l).txt)); ++ ++ // The name Label is ambiguous, therefore use LPLabel here. ++ LPLabel *xlabel = new LPLabel(parseOriginText(opj.layerXAxisTitle(s,l).txt)); ++ LPLabel *ylabel = new LPLabel(parseOriginText(opj.layerYAxisTitle(s,l).txt)); + kdDebug()<<"Layer legend : "<<opj.layerLegend(s,l).txt<<endl; + #endif + plot->getAxis(0)->setLabel(xlabel); +@@ -342,11 +382,11 @@ int ImportOPJ::import() { + } + + // axis range +- vector<double> xrange=opj.layerXRange(s,l); +- vector<double> yrange=opj.layerYRange(s,l); ++ graphLayerRange xrange=opj.layerXRange(s,l); ++ graphLayerRange yrange=opj.layerYRange(s,l); + LRange range[2]; +- range[0] = LRange(xrange[0],xrange[1]); +- range[1] = LRange(yrange[0],yrange[1]); ++ range[0] = LRange(xrange.min,xrange.max); ++ range[1] = LRange(yrange.min,yrange.max); + plot->setActRanges(range); + + // axis scale +diff --git a/src/Label.h b/src/Label.h +index b61c55b..5aa7097 100644 +--- a/src/Label.h ++++ b/src/Label.h +@@ -66,4 +66,10 @@ private: + bool is_texlabel; // if it is a tex label + }; + ++// <liborigin/OPJFile.h> defines an enumerator of the type ColumnType with ++// the name Label in the global namespace. Since the class Label defined in ++// this file ("Label.h") collides with the aforementioned enumerator in ++// "ImportOPJ.cc" we define a synonym for Label here to avoid the ambiguity. ++typedef Label LPLabel; ++ + #endif //LABEL_H diff --git a/sci-visualization/labplot/labplot-1.6.0.1-r1.ebuild b/sci-visualization/labplot/labplot-1.6.0.1-r1.ebuild new file mode 100644 index 000000000000..98a22e413223 --- /dev/null +++ b/sci-visualization/labplot/labplot-1.6.0.1-r1.ebuild @@ -0,0 +1,107 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sci-visualization/labplot/labplot-1.6.0.1-r1.ebuild,v 1.1 2008/03/17 17:51:47 bicatali Exp $ + +inherit eutils kde multilib + +MY_P="LabPlot-${PV}" + +DESCRIPTION="KDE application for data plotting and function analysis." +HOMEPAGE="http://labplot.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz" + +LICENSE="GPL-2" + +KEYWORDS="~amd64 ~x86" +SLOT="0" +IUSE="audiofile bindist cdf fftw hdf5 gsl imagemagick jpeg2k kexi + netcdf opengl qhull R tiff" + +RDEPEND="media-gfx/pstoedit + >=sci-libs/liborigin-20080225 + virtual/ghostscript + gsl? ( bindist? ( <sci-libs/gsl-1.10 ) !bindist? ( sci-libs/gsl ) ) + audiofile? ( media-libs/audiofile ) + fftw? ( >=sci-libs/fftw-3 ) + imagemagick? ( media-gfx/imagemagick ) + jpeg2k? ( media-libs/jasper ) + tiff? ( media-libs/tiff ) + opengl? ( virtual/opengl x11-libs/qwtplot3d-qt3 ) + kexi? ( || ( app-office/kexi app-office/koffice ) ) + cdf? ( sci-libs/cdf ) + netcdf? ( sci-libs/netcdf ) + hdf5? ( sci-libs/hdf5 ) + qhull? ( media-libs/qhull ) + R? ( dev-lang/R )" + +DEPEND="${RDEPEND}" +PATCHES="${FILESDIR}/${P}-linkexec.patch + ${FILESDIR}/${P}-desktop.patch + ${FILESDIR}/${P}-liborigin.patch" + +need-kde 3.5 + +S="${WORKDIR}/${MY_P}" + +src_unpack() { + kde_src_unpack + + cd "${S}" + + # let's make sure we don't use included libs + echo "# Using shared libs!" >| netcdf/netcdf.h + echo "# Using shared libs!" >| qwtplot3d/qwt3d_plot.h + echo "# Using shared libs!" >| liborigin*/OPJFile.h + + # sed for qwtplot3d, qt3 version (gentoo-specific) + # (should be gone when labplot using qt4) + sed -i \ + -e 's:-lqwtplot3d:-lqwtplot3d-qt3:g' \ + -e 's:include/qwtplot3d:include/qwtplot3d-qt3:g' \ + -e 's:AC_CHECK_LIB(qwtplot3d,:AC_CHECK_LIB(qwtplot3d-qt3,:' \ + configure || die +} + +src_compile() { + export QTDIR="/usr/qt/3" + export QWT3D_PATH="/usr" + export KEXIDB_DIR="/usr" + use R && export R_HOME=/usr/$(get_libdir)/R + + # reasons for disabling options: + # - fftw is fftw2, so we prefer fftw3 + # - texvc external would need mediawiki (big), internal conflicts with it + # - ocaml: only used to compile internal texvc + # - qsa in portage tree is too buggy + # file a bug if you have workarounds + local myconf=" + --disable-fftw + --disable-texvc + --disable-ocaml + --disable-qsa + --enable-ps2eps + --enable-system-liborigin + $(use_enable audiofile) + $(use_enable fftw fftw3) + $(use_enable gsl) + $(use_enable imagemagick ImageMagick) + $(use_enable jpeg2k jasper) + $(use_enable tiff) + $(use_enable kexi KexiDB) + $(use_enable cdf) + $(use_enable hdf5) + $(use_enable netcdf) + $(use_enable netcdf system-netcdf) + $(use_enable opengl gl) + $(use_enable opengl system-qwtplot3d) + $(use_enable qhull) + $(use_enable R)" + + kde_src_compile +} + +src_install() { + kde_src_install + dodoc BUGS* WISHLIST CHANGES FEATURES \ + TIPS PLAN CREDITS || die +} |