astro/indiwebmanagerapp: make port more FreeBSD friendly
PR: 256129 256130 Reported by: Alfredo Amaya <alfre2.as __at__ gmail.com>
This commit is contained in:
parent
db049d8e8d
commit
059c350cc8
@ -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>
|
||||
|
55
astro/indiwebmanagerapp/files/patch-src_mainwindow.cpp
Normal file
55
astro/indiwebmanagerapp/files/patch-src_mainwindow.cpp
Normal file
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user