From owner-dev-commits-ports-all@freebsd.org Sun Sep 5 21:31:36 2021 Return-Path: Delivered-To: dev-commits-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 42F2A662039; Sun, 5 Sep 2021 21:31:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H2l8m1FGGz3KdN; Sun, 5 Sep 2021 21:31:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F24C912E99; Sun, 5 Sep 2021 21:31:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 185LVZuV092240; Sun, 5 Sep 2021 21:31:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 185LVZdk092239; Sun, 5 Sep 2021 21:31:35 GMT (envelope-from git) Date: Sun, 5 Sep 2021 21:31:35 GMT Message-Id: <202109052131.185LVZdk092239@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Jose Alonso Cardenas Marquez Subject: git: 059c350cc889 - main - astro/indiwebmanagerapp: make port more FreeBSD friendly MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: acm X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 059c350cc88917aae09082bc1020d143e52eaf70 Auto-Submitted: auto-generated X-BeenThere: dev-commits-ports-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the ports repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Sep 2021 21:31:36 -0000 The branch main has been updated by acm: URL: https://cgit.FreeBSD.org/ports/commit/?id=059c350cc88917aae09082bc1020d143e52eaf70 commit 059c350cc88917aae09082bc1020d143e52eaf70 Author: Jose Alonso Cardenas Marquez AuthorDate: 2021-09-05 21:23:30 +0000 Commit: Jose Alonso Cardenas Marquez CommitDate: 2021-09-05 21:31:20 +0000 astro/indiwebmanagerapp: make port more FreeBSD friendly PR: 256129 256130 Reported by: Alfredo Amaya --- 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@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 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(); + } +