aboutsummaryrefslogtreecommitdiff
path: root/astro
diff options
context:
space:
mode:
authorJose Alonso Cardenas Marquez <acm@FreeBSD.org>2021-09-05 21:23:30 +0000
committerJose Alonso Cardenas Marquez <acm@FreeBSD.org>2021-09-05 21:31:20 +0000
commit059c350cc88917aae09082bc1020d143e52eaf70 (patch)
treecba2039a2fba2e32f34db896ad2a02b84d633547 /astro
parentdb049d8e8d59c8a03d92b750edbd7eadd1841974 (diff)
downloadports-059c350cc88917aae09082bc1020d143e52eaf70.tar.gz
ports-059c350cc88917aae09082bc1020d143e52eaf70.zip
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/Makefile8
-rw-r--r--astro/indiwebmanagerapp/files/patch-src_mainwindow.cpp55
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();
+ }
+