--- /home/makc/porting/ports/math/qtiplot/Makefile Mon Sep 25 22:58:02 2006 +++ /home/makc/porting/ports/math/qtiplot/Makefile Sat Dec 9 20:14:26 2006 @@ -6,32 +6,31 @@ # PORTNAME= qtiplot -PORTVERSION= 0.8.7.3 +PORTVERSION= 0.8.9.r2 CATEGORIES= math science MASTER_SITES= http://soft.proindependent.com/src/ -DISTNAME= ${PORTNAME}-0.8.7-3 +DISTNAME= ${PORTNAME}-0.8.9-rc2 MAINTAINER= makc@issp.ac.ru COMMENT= An Origin clone for data analysis and scientific plotting -BUILD_DEPENDS= qmake:${PORTSDIR}/devel/qmake \ - sip:${PORTSDIR}/devel/py-sip \ - pylupdate:${PORTSDIR}/x11-toolkits/py-qt +BUILD_DEPENDS= qmake:${PORTSDIR}/devel/qmake LIB_DEPENDS= gsl.9:${PORTSDIR}/math/gsl \ origin.0:${PORTSDIR}/math/liborigin \ - qwtplot3d:${PORTSDIR}/math/qwtplot3d -RUN_DEPENDS= pylupdate:${PORTSDIR}/x11-toolkits/py-qt + qwtplot3d:${PORTSDIR}/math/qwtplot3d \ + qwt.5:${PORTSDIR}/x11-toolkits/qwt-devel USE_BZIP2= yes USE_GMAKE= yes -USE_PYTHON= 2.4 - -USE_DOS2UNIX= qtiplot/src/application.cpp - USE_QT_VER= 3 MAKE_ENV= QTDIR=${QT_PREFIX} -OPTIONS= DOCS "Install the QtiPlot Handbook" on +DESKTOP_ENTRIES="QtiPlot" "Data analysis and plotting" \ + "${DOCSDIR}/common/qtiplot_logo.png" \ + "qtiplot" "" false + +OPTIONS= DOCS "Install the QtiPlot Handbook" on \ + PYTHON "Python scripting support" off .include @@ -39,6 +38,19 @@ IGNORE= does not compile on FreeBSD 4.x .endif +.if defined(WITH_PYTHON) +USE_PYTHON= 2.4 +# manually include this, because USE_PYTHON is defined +# after including bsd.port.pre.mk +.include "${PORTSDIR}/Mk/bsd.python.mk" +BUILD_DEPENDS+= sip:${PORTSDIR}/devel/py-sip \ + ${PYTHON_SITELIBDIR}/qt.so:${PORTSDIR}/x11-toolkits/py-qt +RUN_DEPENDS+= ${PYTHON_SITELIBDIR}/qt.so:${PORTSDIR}/x11-toolkits/py-qt +PLIST_SUB+= PYTHON="" +.else +PLIST_SUB+= PYTHON="@comment " +.endif + .if !defined(WITHOUT_DOCS) RUN_DEPENDS+= qtiplot-doc>=0:${PORTSDIR}/math/qtiplot-doc .endif @@ -54,22 +66,38 @@ QMAKESPEC= ${LOCALBASE}/share/qt/mkspecs/freebsd-g++ QPRO_DIRS= . \ - 3rdparty/qwt \ fitPlugins/fitRational0 \ fitPlugins/fitRational1 \ qtiplot post-patch: -.for d in ${QPRO_DIRS} +.if defined(WITH_PYTHON) + @${REINPLACE_CMD} \ + -e "s:/usr/include/python2.4:${PYTHON_INCLUDEDIR}:" \ + -e "s:/usr/share/sip:${LOCALBASE}/share/py-sip/:" \ + ${WRKSRC}/qtiplot/qtiplot.pro @${REINPLACE_CMD} -e \ - "s:../3rdparty/liborigin/include:${LOCALBASE}/include:" \ + 's|loadInitFile("qtiplotrc")|loadInitFile("${DATADIR}/qtiplotrc")|' \ + ${WRKSRC}/qtiplot/src/PythonScripting.cpp +.else + @${REINPLACE_CMD} \ + -e "s/unix:SCRIPTING_LANGS += Python//" \ + ${WRKSRC}/qtiplot/qtiplot.pro +.endif + +.for d in ${QPRO_DIRS} + @${REINPLACE_CMD} \ + -e "s/#system/system/g" \ + -e "s:../3rdparty/liborigin:${LOCALBASE}/include:" \ + -e "s:../3rdparty/qwt/include:${LOCALBASE}/include/qwt:" \ -e "s:/usr/include/qwtplot3d:${X11BASE}/include:" \ -e "/^unix:LIBS/s:-L /usr/lib:-L${LOCALBASE}/lib:" \ -e "/^unix:documentation.path/s:/usr/share/doc/qtiplot:${DATADIR}/manual:" \ - -e "s:/usr/include/python2.4:/usr/local/include/python2.4:" \ - -e "s:/usr/share/sip:/usr/local/share/py-sip/:" \ ${WRKSRC}/${d}/*.pro .endfor + @${REINPLACE_CMD} -e "s:3rdparty/qwt::" ${WRKSRC}/qtiplot.pro + @${REINPLACE_CMD} -e 's:"/usr/share/doc/qtiplot:"${DOCSDIR}:' \ + ${WRKSRC}/qtiplot/src/application.cpp do-configure: .for d in ${QPRO_DIRS} @@ -84,7 +112,8 @@ s|^CXX .*|CXX=${CXX}|; \ s|-pipe||; \ s|^\(CFLAGS .*= \)|\1${CFLAGS}|; \ - s|^\(CXXFLAGS = \)|\1${CXXFLAGS}|' \ + s|^\(CXXFLAGS = \)|\1${CXXFLAGS}|; \ + s|../3rdparty/qwt/lib/libqwt.a|-lqwt|' \ ${WRKSRC}/${d}/Makefile .endfor @@ -92,7 +121,16 @@ ${MKDIR} ${DATADIR} ${INSTALL_PROGRAM} ${WRKSRC}/qtiplot/qtiplot ${DATADIR}/qtiplot ${LN} -fs ${DATADIR}/qtiplot ${PREFIX}/bin/qtiplot + ${MKDIR} ${DATADIR}/fitPlugins + ${INSTALL_PROGRAM} ${WRKSRC}/fitPlugins/libfitRational0.so.1.0.0 \ + ${DATADIR}/fitPlugins/libfitRational0.so + ${INSTALL_PROGRAM} ${WRKSRC}/fitPlugins/libfitRational1.so.1.0.0 \ + ${DATADIR}/fitPlugins/libfitRational1.so +.if defined(WITH_PYTHON) ${INSTALL_DATA} ${WRKSRC}/qtiplot/qtiplotrc.py ${DATADIR}/qtiplotrc.py + @cd ${WRKSRC}/qtiplot && ${PYTHON_CMD} -c "import py_compile; py_compile.compile('qtiplotrc.py')" + ${INSTALL_DATA} ${WRKSRC}/qtiplot/qtiplotrc.pyc ${DATADIR}/qtiplotrc.pyc +.endif .if !defined(WITHOUT_NLS) .for i in ${QTI_LANG} ${MKDIR} ${DATADIR}/translations/ --- /home/makc/porting/ports/math/qtiplot/distinfo Mon Sep 25 22:58:02 2006 +++ /home/makc/porting/ports/math/qtiplot/distinfo Sat Dec 9 15:38:35 2006 @@ -1,3 +1,3 @@ -MD5 (qtiplot-0.8.7-3.tar.bz2) = 85b91966ebe206e1cfb990890252abde -SHA256 (qtiplot-0.8.7-3.tar.bz2) = 27c1229e6bbd1982b4bfd5c9dbd883b494a3fedd3a8fca71d20add5175d57538 -SIZE (qtiplot-0.8.7-3.tar.bz2) = 741895 +MD5 (qtiplot-0.8.9-rc2.tar.bz2) = fdf3996b4361c83c7e86ae4d8176bc04 +SHA256 (qtiplot-0.8.9-rc2.tar.bz2) = efc9090413e4d446b8eed2182f9fe956406d24e92e82a51396a400eee8ba8765 +SIZE (qtiplot-0.8.9-rc2.tar.bz2) = 598479 --- /home/makc/porting/ports/math/qtiplot/files/patch-qtiplot_src_application.cpp Sun Sep 10 12:05:25 2006 +++ /home/makc/porting/ports/math/qtiplot/files/patch-qtiplot_src_application.cpp Thu Jan 1 03:00:00 1970 @@ -1,11 +0,0 @@ ---- qtiplot/src/application.cpp.orig Wed Sep 6 01:26:14 2006 -+++ qtiplot/src/application.cpp Fri Sep 8 22:21:43 2006 -@@ -4240,7 +4240,7 @@ - workingDir = settings.readEntry("/WorkingDir", qApp->applicationDirPath()); - templatesDir = settings.readEntry("/TemplatesDir", qApp->applicationDirPath()); - -- helpFilePath="/usr/share/doc/qtiplot/index.html"; -+ helpFilePath=qApp->applicationDirPath()+"/manual/index.html"; - #ifdef Q_OS_WIN // Windows systems - helpFilePath=qApp->applicationDirPath()+"/index.html"; - #endif --- /home/makc/porting/ports/math/qtiplot/pkg-plist Mon Sep 25 22:58:02 2006 +++ /home/makc/porting/ports/math/qtiplot/pkg-plist Sat Dec 9 19:46:22 2006 @@ -1,10 +1,14 @@ bin/qtiplot +%%DATADIR%%/fitPlugins/libfitRational0.so +%%DATADIR%%/fitPlugins/libfitRational1.so %%DATADIR%%/qtiplot -%%DATADIR%%/qtiplotrc.py +%%PYTHON%%%%DATADIR%%/qtiplotrc.py +%%PYTHON%%%%DATADIR%%/qtiplotrc.pyc %%NLS%%%%DATADIR%%/translations/qtiplot_de.qm %%NLS%%%%DATADIR%%/translations/qtiplot_es.qm %%NLS%%%%DATADIR%%/translations/qtiplot_fr.qm %%NLS%%%%DATADIR%%/translations/qtiplot_ru.qm %%NLS%%%%DATADIR%%/translations/qtiplot_sv.qm %%NLS%%@dirrm %%DATADIR%%/translations +@dirrm %%DATADIR%%/fitPlugins @dirrmtry %%DATADIR%%