git: ea54bf4ceadd - main - science/scidavis: update to 2.4.0
Max Brazhnikov
makc at FreeBSD.org
Sat May 8 21:29:44 UTC 2021
The branch main has been updated by makc:
URL: https://cgit.FreeBSD.org/ports/commit/?id=ea54bf4ceaddba5b829938d619358a80eae4bef1
commit ea54bf4ceaddba5b829938d619358a80eae4bef1
Author: Max Brazhnikov <makc at FreeBSD.org>
AuthorDate: 2021-05-08 17:52:31 +0000
Commit: Max Brazhnikov <makc at FreeBSD.org>
CommitDate: 2021-05-08 21:25:59 +0000
science/scidavis: update to 2.4.0
- Switch to cmake build system
- Remove stale patches
- Enable Python support by default
---
science/scidavis/Makefile | 60 ++++++----------------
science/scidavis/distinfo | 6 +--
science/scidavis/files/patch-config.pri | 20 --------
.../scidavis/files/patch-libscidavis_python.pri | 11 ----
.../patch-libscidavis_src_ApplicationWindow.cpp | 34 ++++++------
.../scidavis/files/patch-scidavis_CMakeLists.txt | 11 ++++
science/scidavis/pkg-plist | 25 ++-------
7 files changed, 51 insertions(+), 116 deletions(-)
diff --git a/science/scidavis/Makefile b/science/scidavis/Makefile
index ce3598f8f431..b6e91ea9420c 100644
--- a/science/scidavis/Makefile
+++ b/science/scidavis/Makefile
@@ -1,6 +1,5 @@
PORTNAME= scidavis
-PORTVERSION= 2.2.0
-PORTREVISION= 1
+PORTVERSION= 2.4.0
CATEGORIES= science
MAINTAINER= makc at FreeBSD.org
@@ -16,60 +15,31 @@ LIB_DEPENDS= libgsl.so:math/gsl \
libqwtplot3d-qt5.so:math/qwtplot3d \
liborigin.so:math/liborigin
-USES= compiler:c++11-lang desktop-file-utils gl qmake qt:5 \
- shared-mime-info
+USES= cmake compiler:c++17-lang desktop-file-utils gl pkgconfig \
+ qt:5 shared-mime-info
USE_GL= gl glu
-USE_QT= core gui network opengl printsupport svg widgets xml \
- buildtools_build linguisttools_build
+USE_QT= core gui opengl printsupport svg widgets xml \
+ buildtools_build linguisttools_build qmake_build
USE_GITHUB= yes
GH_ACCOUNT= highperformancecoder
-
-QMAKE_ARGS= INSTALLBASE=${PREFIX} \
- CONFIG+=liborigin \
- LIBS+="-L${LOCALBASE}/${QT_LIBDIR_REL} -L${LOCALBASE}/lib" \
- LIBS+="-lqwt5-qt5 -lqwtplot3d-qt5" \
- INCLUDEPATH+=${LOCALBASE}/${QT_INCDIR_REL}/qwt5-qt5 \
- INCLUDEPATH+=${LOCALBASE}/${QT_INCDIR_REL}/qwtplot3d-qt5
+CMAKE_ON= ORIGIN_IMPORT
+CMAKE_OFF= DOWNLOAD_LINKS \
+ SEARCH_FOR_UPDATES
OPTIONS_DEFINE= DOCS NLS PYTHON
+OPTIONS_DEFAULT= PYTHON
OPTIONS_SUB= yes
PYTHON_DESC= Python scripting support
-PYTHON_USES= pyqt:5 python
-PYTHON_USE= pyqt=core,gui,printsupport,sip,widgets python=py3kplist
-PYTHON_QMAKE_ON= PYTHON=${PYTHON_CMD} CONFIG+=python \
- PYQT_SIPDIR=${LOCALBASE}/${_SIPDIR_REL}
-
-post-patch:
- ${REINPLACE_CMD} '/target.path/s,/usr/lib,${PREFIX}/lib,' \
- ${WRKSRC}/fitPlugins/*/*.pro
- ${REINPLACE_CMD} 's,share/man,man,' \
- ${WRKSRC}/config.pri \
- ${WRKSRC}/scidavis/scidavis.pro
-
-post-install-NLS-on:
- ${MKDIR} ${STAGEDIR}${DATADIR}/translations
- ${INSTALL_DATA} ${WRKSRC}/scidavis/translations/*.qm \
- ${STAGEDIR}${DATADIR}/translations
-
-.include <bsd.port.pre.mk>
-
-.if ${PORT_OPTIONS:MPYTHON}
-.if ${PYTHON_REL} < 3200
-PYCACHE_DIR= # none
-PYCACHE_FILE= scidavisUtil.pyc
-.else
-PYCACHE_DIR= __pycache__/
-PYCACHE_FILE= scidavisUtil.cpython-${PYTHON_SUFFIX}.pyc
-.endif
-.endif
+PYTHON_USES= pyqt:5 python:3.6+
+PYTHON_USE= pyqt=core,gui,printsupport,sip,widgets
+PYTHON_CMAKE_ON= -DPython3_EXECUTABLE=${PYTHON_CMD} \
+ -DSCRIPTING_PYTHON=True
+PYTHON_CMAKE_OFF= -DSCRIPTING_PYTHON=False
post-install-PYTHON-on:
${MV} ${STAGEDIR}${PREFIX}/etc/scidavisrc.py \
${STAGEDIR}${PREFIX}/etc/scidavisrc.py.sample
- ${MKDIR} ${STAGEDIR}${DATADIR}/${PYCACHE_DIR}
- ${INSTALL_DATA} ${WRKSRC}/scidavis/${PYCACHE_DIR}${PYCACHE_FILE} \
- ${STAGEDIR}${DATADIR}/${PYCACHE_DIR}
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/science/scidavis/distinfo b/science/scidavis/distinfo
index e3e51a341474..6da60afd6da7 100644
--- a/science/scidavis/distinfo
+++ b/science/scidavis/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1589881662
-SHA256 (highperformancecoder-scidavis-2.2.0_GH0.tar.gz) = 58e88a0f538b4bc22376069dccaa343ce2fc179b1d00d6a4f4bd27fbbab8a3f2
-SIZE (highperformancecoder-scidavis-2.2.0_GH0.tar.gz) = 9820993
+TIMESTAMP = 1620493271
+SHA256 (highperformancecoder-scidavis-2.4.0_GH0.tar.gz) = 55de7c3bf2271aada293cf16d284edae95c1a26bdda78976d0e9fc0b089acdf5
+SIZE (highperformancecoder-scidavis-2.4.0_GH0.tar.gz) = 9244613
diff --git a/science/scidavis/files/patch-config.pri b/science/scidavis/files/patch-config.pri
deleted file mode 100644
index 97c850d3a7aa..000000000000
--- a/science/scidavis/files/patch-config.pri
+++ /dev/null
@@ -1,20 +0,0 @@
---- config.pri.orig 2018-10-17 03:28:35 UTC
-+++ config.pri
-@@ -61,7 +61,7 @@ unix:message(Building with preset $$PRES
-
- ### Linux Desktop integration
- !contains(PRESET, self_contained) {
-- unix:INSTALLS += desktop_entry mime_package mime_link icons man_page appdata
-+ unix:INSTALLS += desktop_entry mime_package icons man_page appdata
- }
-
- ################################################################################
-@@ -120,7 +120,7 @@ unix {# Linux / MacOS X
- ### directory specified here or somewhere else in the python path (sys.path) where "import" can find it
-
- ### where scidavisrc.py is searched for at runtime
-- pythonconfig.path = "$$INSTALLBASE/../etc"
-+ pythonconfig.path = "$$INSTALLBASE/etc"
- ### where the scidavisUtil python module is searched for at runtime
- pythonutils.path = "$$INSTALLBASE/share/scidavis"
-
diff --git a/science/scidavis/files/patch-libscidavis_python.pri b/science/scidavis/files/patch-libscidavis_python.pri
deleted file mode 100644
index 00e07543b571..000000000000
--- a/science/scidavis/files/patch-libscidavis_python.pri
+++ /dev/null
@@ -1,11 +0,0 @@
---- libscidavis/python.pri.orig 2020-05-10 23:27:36 UTC
-+++ libscidavis/python.pri
-@@ -28,7 +28,7 @@
- }
- SIP_FAILURE = TRUE
- system(mkdir -p $${SIP_DIR})
-- system($$system($$PYTHONBIN python-sipcmd.py PyQt$$QT_MAJOR_VERSION) $$system($$PYTHONBIN-config --includes) -c $${SIP_DIR} src/scidavis.sip): SIP_FAILURE = FALSE
-+ system($$system($$PYTHONBIN python-sipcmd.py PyQt$$QT_MAJOR_VERSION) -I $$PYQT_SIPDIR $$system($$PYTHONBIN-config --includes) -c $${SIP_DIR} src/scidavis.sip): SIP_FAILURE = FALSE
- equals(SIP_FAILURE, "TRUE") {
- error(`$$PYTHONBIN python-sipcmd.py PyQt$$QT_MAJOR_VERSION` `$$PYTHONBIN-config --includes` -c $${SIP_DIR} src/scidavis.sip FAILED in $$PWD)
- }
diff --git a/science/scidavis/files/patch-libscidavis_src_ApplicationWindow.cpp b/science/scidavis/files/patch-libscidavis_src_ApplicationWindow.cpp
index d7a4205ccc4d..1f5e4682f973 100644
--- a/science/scidavis/files/patch-libscidavis_src_ApplicationWindow.cpp
+++ b/science/scidavis/files/patch-libscidavis_src_ApplicationWindow.cpp
@@ -1,31 +1,31 @@
---- libscidavis/src/ApplicationWindow.cpp.orig 2020-05-10 23:27:36 UTC
+--- libscidavis/src/ApplicationWindow.cpp.orig 2021-05-05 01:51:49 UTC
+++ libscidavis/src/ApplicationWindow.cpp
-@@ -4253,7 +4253,7 @@ void ApplicationWindow::readSettings()
- settings.endGroup(); // Colors
+@@ -4200,7 +4200,7 @@ void ApplicationWindow::readSettings()
+ settings.endGroup(); // Colors
- settings.beginGroup("/Paths");
-- workingDir = settings.value("/WorkingDir", qApp->applicationDirPath()).toString();
-+ workingDir = settings.value("/WorkingDir", QDir::homePath()).toString();
+ settings.beginGroup("/Paths");
+- workingDir = settings.value("/WorkingDir", qApp->applicationDirPath()).toString();
++ workingDir = settings.value("/WorkingDir", QDir::homePath()).toString();
helpFilePath = settings.value("/HelpFile", "").toString();
#ifdef PLUGIN_PATH
- QString defaultFitPluginsPath = PLUGIN_PATH;
-@@ -8211,6 +8211,10 @@ void ApplicationWindow::showWindowTitleBarMenu()
+ QString defaultFitPluginsPath = PLUGIN_PATH;
+@@ -8062,6 +8062,10 @@ void ApplicationWindow::showWindowTitleBarMenu()
void ApplicationWindow::chooseHelpFolder()
{
- // TODO: move all paths & location handling to anothor class
+ // TODO: move all paths & location handling to anothor class
+#ifdef DOC_PATH
-+ const QString locateDefaultHelp = DOC_PATH +
-+ QDir::toNativeSeparators("/manual/index.html");
++ const QString locateDefaultHelp = DOC_PATH +
++ QDir::toNativeSeparators("/manual/index.html");
+#else // defined DOC_PATH
#if defined(Q_OS_WIN)
- const QString locateDefaultHelp = qApp->applicationDirPath() +
- QDir::toNativeSeparators("/manual/index.html");
-@@ -8218,6 +8222,8 @@ void ApplicationWindow::chooseHelpFolder()
const QString locateDefaultHelp =
- QDir::toNativeSeparators("/usr/share/doc/scidavis/manual/index.html");
+ qApp->applicationDirPath() + QDir::toNativeSeparators("/manual/index.html");
+@@ -8069,6 +8073,8 @@ void ApplicationWindow::chooseHelpFolder()
+ const QString locateDefaultHelp =
+ QDir::toNativeSeparators("/usr/share/doc/scidavis/manual/index.html");
#endif
+#endif // defined DOC_PATH
+
- if (QFile(locateDefaultHelp).exists())
- {
+ if (QFile(locateDefaultHelp).exists()) {
helpFilePath = locateDefaultHelp;
+ } else {
diff --git a/science/scidavis/files/patch-scidavis_CMakeLists.txt b/science/scidavis/files/patch-scidavis_CMakeLists.txt
new file mode 100644
index 000000000000..b3dc6db30676
--- /dev/null
+++ b/science/scidavis/files/patch-scidavis_CMakeLists.txt
@@ -0,0 +1,11 @@
+--- scidavis/CMakeLists.txt.orig 2021-05-05 01:51:49 UTC
++++ scidavis/CMakeLists.txt
+@@ -135,7 +135,7 @@ if (NOT CMAKE_CROSS_COMPILING)
+ if( MULTI_CONFIG )
+ install( FILES scidavisrc.py ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/scidavisrc.pyc DESTINATION etc )
+ else()
+- install( FILES scidavisrc.py ${CMAKE_CURRENT_BINARY_DIR}/scidavisrc.pyc DESTINATION etc )
++ install( FILES scidavisrc.py DESTINATION etc )
+ endif()
+ install( FILES scidavisUtil.py DESTINATION share/scidavis )
+ endif()
diff --git a/science/scidavis/pkg-plist b/science/scidavis/pkg-plist
index c58762ba639d..9f1aa93ac47a 100644
--- a/science/scidavis/pkg-plist
+++ b/science/scidavis/pkg-plist
@@ -1,32 +1,16 @@
bin/scidavis
%%PYTHON%%@sample etc/scidavisrc.py.sample
lib/scidavis/plugins/libexp_saturation.so
-lib/scidavis/plugins/libexp_saturation.so.1
-lib/scidavis/plugins/libexp_saturation.so.1.0
-lib/scidavis/plugins/libexp_saturation.so.1.0.0
lib/scidavis/plugins/libexplin.so
-lib/scidavis/plugins/libexplin.so.1
-lib/scidavis/plugins/libexplin.so.1.0
-lib/scidavis/plugins/libexplin.so.1.0.0
lib/scidavis/plugins/libfitRational0.so
-lib/scidavis/plugins/libfitRational0.so.1
-lib/scidavis/plugins/libfitRational0.so.1.0
-lib/scidavis/plugins/libfitRational0.so.1.0.0
lib/scidavis/plugins/libfitRational1.so
-lib/scidavis/plugins/libfitRational1.so.1
-lib/scidavis/plugins/libfitRational1.so.1.0
-lib/scidavis/plugins/libfitRational1.so.1.0.0
lib/scidavis/plugins/libplanck_wavelength.so
-lib/scidavis/plugins/libplanck_wavelength.so.1
-lib/scidavis/plugins/libplanck_wavelength.so.1.0
-lib/scidavis/plugins/libplanck_wavelength.so.1.0.0
-man/man1/scidavis.1.gz
share/appdata/scidavis.appdata.xml
share/applications/scidavis.desktop
+%%PORTDOCS%%%%DOCSDIR%%/ChangeLog.md
+%%PORTDOCS%%%%DOCSDIR%%/README.md
%%PORTDOCS%%%%DOCSDIR%%/gpl.txt
-%%PORTDOCS%%%%DOCSDIR%%/manual/index.html
-%%PORTDOCS%%%%DOCSDIR%%/scidavis-logo.png
-%%PORTDOCS%%%%DOCSDIR%%/scidavis.css
+%%PORTDOCS%%%%DOCSDIR%%/license.rtf
share/icons/hicolor/128x128/apps/scidavis.png
share/icons/hicolor/16x16/apps/scidavis.png
share/icons/hicolor/22x22/apps/scidavis.png
@@ -37,9 +21,10 @@ share/icons/hicolor/scalable/apps/scidavis.svg
share/icons/locolor/16x16/apps/scidavis.png
share/icons/locolor/22x22/apps/scidavis.png
share/icons/locolor/32x32/apps/scidavis.png
+share/man/man1/scidavis.1.gz
share/mime/packages/scidavis.xml
+share/mimelnk/application/x-sciprj.desktop
%%PYTHON%%%%DATADIR%%/scidavisUtil.py
-%%PYTHON%%%%DATADIR%%/scidavisUtil.pyc
%%NLS%%%%DATADIR%%/translations/scidavis_cs-alt.qm
%%NLS%%%%DATADIR%%/translations/scidavis_cs.qm
%%NLS%%%%DATADIR%%/translations/scidavis_de.qm
More information about the dev-commits-ports-all
mailing list