git: 059c350cc889 - main - astro/indiwebmanagerapp: make port more FreeBSD friendly

Jose Alonso Cardenas Marquez acm at FreeBSD.org
Sun Sep 5 21:31:36 UTC 2021


The branch main has been updated by acm:

URL: https://cgit.FreeBSD.org/ports/commit/?id=059c350cc88917aae09082bc1020d143e52eaf70

commit 059c350cc88917aae09082bc1020d143e52eaf70
Author:     Jose Alonso Cardenas Marquez <acm at FreeBSD.org>
AuthorDate: 2021-09-05 21:23:30 +0000
Commit:     Jose Alonso Cardenas Marquez <acm at FreeBSD.org>
CommitDate: 2021-09-05 21:31:20 +0000

    astro/indiwebmanagerapp: make port more FreeBSD friendly
    
    PR:             256129 256130
    Reported by:    Alfredo Amaya <alfre2.as  __at__ gmail.com>
---
 astro/indiwebmanagerapp/Makefile                   |  8 +++-
 .../files/patch-src_mainwindow.cpp                 | 55 ++++++++++++++++++++++
 2 files changed, 62 insertions(+), 1 deletion(-)

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 at 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();
+ }
+ 


More information about the dev-commits-ports-all mailing list