diff options
author | Jose Alonso Cardenas Marquez <acm@FreeBSD.org> | 2021-09-05 16:23:30 -0500 |
---|---|---|
committer | Jose Alonso Cardenas Marquez <acm@FreeBSD.org> | 2021-09-05 16:31:20 -0500 |
commit | 059c350cc88917aae09082bc1020d143e52eaf70 (patch) | |
tree | cba2039a2fba2e32f34db896ad2a02b84d633547 /astro | |
parent | astro/stellarsolver: update to 1.8 (diff) |
astro/indiwebmanagerapp: make port more FreeBSD friendly
PR: 256129 256130
Reported by: Alfredo Amaya <alfre2.as __at__ gmail.com>
Diffstat (limited to 'astro')
-rw-r--r-- | astro/indiwebmanagerapp/Makefile | 8 | ||||
-rw-r--r-- | astro/indiwebmanagerapp/files/patch-src_mainwindow.cpp | 55 |
2 files changed, 62 insertions, 1 deletions
diff --git a/astro/indiwebmanagerapp/Makefile b/astro/indiwebmanagerapp/Makefile index 5ff7ece5d02c..56539e012cd8 100644 --- a/astro/indiwebmanagerapp/Makefile +++ b/astro/indiwebmanagerapp/Makefile @@ -1,6 +1,6 @@ PORTNAME= indiwebmanagerapp DISTVERSION= 1.6 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= astro MAINTAINER= acm@FreeBSD.org @@ -21,4 +21,10 @@ USE_GITHUB= yes GH_ACCOUNT= rlancaste GH_PROJECT= INDIWebManagerApp +post-patch: + ${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' -e \ + 's|python3|${PYTHON_VERSION}|g' ${WRKSRC}/src/mainwindow.cpp + ${REINPLACE_CMD} -e 's|On Linux|On Linux\/FreeBSD|g' \ + ${WRKSRC}/src/opsconfiguration.cpp + .include <bsd.port.mk> diff --git a/astro/indiwebmanagerapp/files/patch-src_mainwindow.cpp b/astro/indiwebmanagerapp/files/patch-src_mainwindow.cpp new file mode 100644 index 000000000000..8120cbb74158 --- /dev/null +++ b/astro/indiwebmanagerapp/files/patch-src_mainwindow.cpp @@ -0,0 +1,55 @@ +--- src/mainwindow.cpp 2021-09-04 23:55:40.427687000 -0500 ++++ src/mainwindow.cpp 2021-09-05 00:10:09.774435000 -0500 +@@ -295,6 +295,8 @@ + #ifdef Q_OS_OSX + //Note this is the Path where python3 gets symlinked by homebrew. + return "/usr/local/opt/python/libexec/bin"; ++ #elif defined(Q_OS_FREEBSD) ++ return "%%LOCALBASE%%/bin"; + #endif + if (flat.isEmpty() == false) + return flat + "/bin/"; +@@ -307,6 +309,8 @@ + { + #ifdef Q_OS_OSX + return "/usr/local/bin/indi-web"; ++ #elif defined(Q_OS_FREEBSD) ++ return "%%LOCALBASE%%/bin/indi-web"; + #endif + return QDir::homePath() + "/.local/bin/indi-web"; + } +@@ -316,6 +320,8 @@ + { + #ifdef Q_OS_OSX + return QStandardPaths::locate(QStandardPaths::GenericDataLocation, QString(), QStandardPaths::LocateDirectory) + "INDIWebManagerApp/gsc"; ++ #elif defined(Q_OS_FREEBSD) ++ return "%%LOCALBASE%%/share/gsc"; + #endif + if (flat.isEmpty() == false) + return flat + "/share/GSC"; +@@ -339,6 +345,8 @@ + #ifdef Q_OS_OSX + QString appPath = QCoreApplication::applicationDirPath(); + return QDir(appPath + "/indi").absolutePath(); ++ #elif defined(Q_OS_FREEBSD) ++ return "%%LOCALBASE%%/bin/"; + #endif + if (flat.isEmpty() == false) + return flat + "/bin/"; +@@ -352,6 +360,8 @@ + #ifdef Q_OS_OSX + QString appPath = QCoreApplication::applicationDirPath(); + return QDir(appPath + "/../Resources/DriverSupport").absolutePath(); ++ #elif defined(Q_OS_FREEBSD) ++ return "%%LOCALBASE%%/share/indi"; + #elif defined(Q_OS_LINUX) + if (flat.isEmpty() == false) + return flat + "/share/indi"; +@@ -544,7 +554,6 @@ + */ + bool MainWindow::pythonInstalled(QString pythonExecFolder) + { +- + return QFileInfo(pythonExecFolder + "/python").exists() || QFileInfo(pythonExecFolder + "/python2").exists() || QFileInfo(pythonExecFolder + "/python3").exists(); + } + |