mirror of
https://github.com/yann64/haikuports.git
synced 2026-03-19 01:46:00 +01:00
@@ -1,4 +1,4 @@
|
||||
resource app_signature "application/x-vnd.qt5-gitqlient";
|
||||
resource app_signature "@APP_SIGNATURE@";
|
||||
|
||||
resource app_flags B_MULTIPLE_LAUNCH;
|
||||
|
||||
@@ -11,7 +11,7 @@ resource app_version {
|
||||
internal = 0,
|
||||
|
||||
short_info = "Graphical Git client",
|
||||
long_info = "A multi-platform Git client"
|
||||
long_info = "@LONG_INFO"
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -20,35 +20,19 @@ suposed to be."
|
||||
HOMEPAGE="https://francescmm.github.io/GitQlient/"
|
||||
COPYRIGHT="2020 Francesc Martinez"
|
||||
LICENSE="GNU LGPL v2.1"
|
||||
REVISION="2"
|
||||
REVISION="1"
|
||||
baseUrl="https://codeload.github.com/francescmm"
|
||||
bmtCommitHash="44dde32d9e79c075a03190bc86753102b14ac663"
|
||||
qlCommitHash="049bf73c50ceeadd5de989f76258d94d97b1dce8"
|
||||
qpwCommitHash="4a9d3af084194b803dc8e2b89640b9a97043dab7"
|
||||
SOURCE_URI="https://github.com/francescmm/GitQlient/archive/v1.2.0-rc.tar.gz"
|
||||
CHECKSUM_SHA256="2bfd11994c89961c7af4b5cfd90e7d112c38898e60555fc694f9e057ddf51e5e"
|
||||
SOURCE_DIR="GitQlient-1.2.0-rc"
|
||||
SOURCE_URI_2="$baseUrl/BenchmarkTool/zip/$bmtCommitHash"
|
||||
SOURCE_DIR_2="BenchmarkTool-$bmtCommitHash"
|
||||
SOURCE_FILE_2="BenchmarkTool.zip"
|
||||
CHECKSUM_SHA256_2="3ced0371b1380787141eb8e382dc38ccc978891c6f2796a1c92d8d7633d120d2"
|
||||
SOURCE_URI_3="$baseUrl/QLogger/zip/$qlCommitHash"
|
||||
SOURCE_DIR_3="QLogger-$qlCommitHash"
|
||||
SORUCE_FILE_3="QLogger.zip"
|
||||
CHECKSUM_SHA256_3="170dc02d91e9e17c8b900e4fc693fc38fe9dad1aba4602da821ce8d81f135666"
|
||||
SOURCE_URI_4="$baseUrl/QPinnableTabWidget/zip/$qpwCommitHash"
|
||||
SOURCE_DIR_4="QPinnableTabWidget-$qpwCommitHash"
|
||||
SOURCE_FILE_4="QPinnableTabWidget.zip"
|
||||
CHECKSUM_SHA256_4="ebde7f5c0ff92050a660b85af02d1aee988b7054e78bc1ba1eb3a70e5dbc4d22"
|
||||
SOURCE_URI="https://github.com/francescmm/GitQlient/releases/download/v$portVersion/gitqlient_$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="4d412813a2addba7befc6099c49798ece4e98e16159de98db3994f5fe2330770"
|
||||
SOURCE_DIR="gitqlient_$portVersion"
|
||||
ADDITIONAL_FILES="gitqlient.rdef.in"
|
||||
PATCHES="gitqlient-1.2.0.patchset"
|
||||
|
||||
ARCHITECTURES="all !x86_gcc2 ?arm ?ppc"
|
||||
ARCHITECTURES="all !x86_gcc2"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
PROVIDES="
|
||||
gitqlient$secondaryArchSuffix = $portVersion
|
||||
app:GitQlient
|
||||
app:GitQlient = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
@@ -57,6 +41,7 @@ REQUIRES="
|
||||
lib:libGL$secondaryArchSuffix
|
||||
lib:libQt5Core$secondaryArchSuffix
|
||||
lib:libQt5Gui$secondaryArchSuffix
|
||||
lib:libQt5Network$secondaryArchSuffix
|
||||
lib:libQt5Widgets$secondaryArchSuffix
|
||||
"
|
||||
|
||||
@@ -64,15 +49,16 @@ BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libQt5Core$secondaryArchSuffix
|
||||
devel:libQt5Gui$secondaryArchSuffix
|
||||
devel:libQt5Network$secondaryArchSuffix
|
||||
devel:libQt5Widgets$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:ld$secondaryArchSuffix
|
||||
cmd:make
|
||||
cmd:sed
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
cmd:qmake$secondaryArchSuffix >= 5
|
||||
cmd:sed
|
||||
"
|
||||
|
||||
defineDebugInfoPackage gitqlient$secondaryArchSuffix \
|
||||
@@ -80,12 +66,6 @@ defineDebugInfoPackage gitqlient$secondaryArchSuffix \
|
||||
|
||||
BUILD()
|
||||
{
|
||||
cd $sourceDir
|
||||
|
||||
cp -rf /$sourceDir2/* $sourceDir/BenchmarkTool
|
||||
cp -rf /$sourceDir3/* $sourceDir/QLogger
|
||||
cp -rf /$sourceDir4/* $sourceDir/QPinnableTabWidget
|
||||
|
||||
qmake GitQlient.pro
|
||||
make $jobArgs
|
||||
}
|
||||
@@ -93,16 +73,20 @@ BUILD()
|
||||
INSTALL()
|
||||
{
|
||||
mkdir -p $appsDir
|
||||
cp GitQlient $appsDir
|
||||
cp gitqlient $appsDir/GitQlient
|
||||
|
||||
local APP_SIGNATURE="application/x-vnd.qt5-gitqlient"
|
||||
local MAJOR="`echo "$portVersion" | cut -d. -f1`"
|
||||
local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
|
||||
local MINOR="`echo "$portVersion" | cut -d. -f3 | cut -d~ -f1`"
|
||||
local LONG_INFO="$SUMMARY"
|
||||
|
||||
sed \
|
||||
-e "s|@APP_SIGNATURE@|$APP_SIGNATURE|" \
|
||||
-e "s|@MAJOR@|$MAJOR|" \
|
||||
-e "s|@MIDDLE@|$MIDDLE|" \
|
||||
-e "s|@MINOR@|$MINOR|" \
|
||||
-e "s|@LONG_INFO@|$LONG_INFO|" \
|
||||
$portDir/additional-files/gitqlient.rdef.in > gitqlient.rdef
|
||||
|
||||
addResourcesToBinaries gitqlient.rdef $appsDir/GitQlient
|
||||
@@ -1,117 +0,0 @@
|
||||
From d211437ffb404f24d7ed19b82b3afaa1bffd6afe Mon Sep 17 00:00:00 2001
|
||||
From: cyrusbuilt <cyrusbuilt@gmail.com>
|
||||
Date: Fri, 31 Jul 2020 19:31:45 -0400
|
||||
Subject: Adding Haiku OS support
|
||||
|
||||
|
||||
diff --git a/src/big_widgets/Controls.cpp b/src/big_widgets/Controls.cpp
|
||||
index 14e11d8..6e92312 100644
|
||||
--- a/src/big_widgets/Controls.cpp
|
||||
+++ b/src/big_widgets/Controls.cpp
|
||||
@@ -319,14 +319,19 @@ void Controls::pullCurrentBranch()
|
||||
const auto ret = git->pull();
|
||||
QApplication::restoreOverrideCursor();
|
||||
|
||||
+ const auto msg = ret.output.toString();
|
||||
+
|
||||
if (ret.success)
|
||||
- emit signalRepositoryUpdated();
|
||||
+ {
|
||||
+ if (msg.toLower().contains("merge conflict"))
|
||||
+ emit signalPullConflict();
|
||||
+ else
|
||||
+ emit signalRepositoryUpdated();
|
||||
+ }
|
||||
else
|
||||
{
|
||||
- const auto errorMsg = ret.output.toString();
|
||||
-
|
||||
- if (errorMsg.contains("error: could not apply", Qt::CaseInsensitive)
|
||||
- && errorMsg.contains("causing a conflict", Qt::CaseInsensitive))
|
||||
+ if (msg.contains("error: could not apply", Qt::CaseInsensitive)
|
||||
+ && msg.contains("causing a conflict", Qt::CaseInsensitive))
|
||||
{
|
||||
emit signalPullConflict();
|
||||
}
|
||||
@@ -336,7 +341,7 @@ void Controls::pullCurrentBranch()
|
||||
QString("There were problems during the pull operation. Please, see the detailed "
|
||||
"description for more information."),
|
||||
QMessageBox::Ok, this);
|
||||
- msgBox.setDetailedText(errorMsg);
|
||||
+ msgBox.setDetailedText(msg);
|
||||
msgBox.setStyleSheet(GitQlientStyles::getStyles());
|
||||
msgBox.exec();
|
||||
}
|
||||
@@ -515,16 +520,19 @@ void Controls::processUpdateFile()
|
||||
mLatestGitQlient = json["latest-version"].toString();
|
||||
const auto changeLogUrl = json["changelog"].toString();
|
||||
|
||||
+ QJsonObject os;
|
||||
+ auto platformSupported = true;
|
||||
#if defined(Q_OS_WIN)
|
||||
- const auto os = json["windows"].toObject();
|
||||
+ os = json["windows"].toObject();
|
||||
#elif defined(Q_OS_LINUX)
|
||||
- const auto os = json["linux"].toObject();
|
||||
+ os = json["linux"].toObject();
|
||||
#elif defined(Q_OS_OSX)
|
||||
- const auto os = json["osx"].toObject();
|
||||
+ os = json["osx"].toObject();
|
||||
+#else
|
||||
+ platformSupported = false;
|
||||
+ QLog_Error("Ui", QString("Platform not supported for updates"));
|
||||
#endif
|
||||
|
||||
- mGitQlientDownloadUrl = os["download-url"].toString();
|
||||
-
|
||||
const auto newVersion = mLatestGitQlient.split(".");
|
||||
const auto nv = newVersion.at(0).toInt() * 10000 + newVersion.at(1).toInt() * 100 + newVersion.at(2).toInt();
|
||||
const auto curVersion = QString("%1").arg(VER).split(".");
|
||||
@@ -532,20 +540,33 @@ void Controls::processUpdateFile()
|
||||
|
||||
if (nv > cv)
|
||||
{
|
||||
- mVersionCheck->setVisible(true);
|
||||
+ if (!platformSupported)
|
||||
+ {
|
||||
+ QMessageBox::information(
|
||||
+ this, tr("New version available!"),
|
||||
+ tr("There is a new version of GitQlient available but your OS doesn't have a binary built. If you want to "
|
||||
+ "get the latest version, pleas <a href='https://github.com/francescmm/GitQlient/releases/tag/v%1'>get "
|
||||
+ "the source code from GitHub</a>.")
|
||||
+ .arg(mLatestGitQlient));
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ mGitQlientDownloadUrl = os["download-url"].toString();
|
||||
+ mVersionCheck->setVisible(true);
|
||||
|
||||
- QTimer::singleShot(200, this, [this, changeLogUrl] {
|
||||
- QNetworkRequest request;
|
||||
- request.setRawHeader("User-Agent", "GitQlient");
|
||||
- request.setRawHeader("X-Custom-User-Agent", "GitQlient");
|
||||
- request.setRawHeader("Content-Type", "application/json");
|
||||
- request.setAttribute(QNetworkRequest::FollowRedirectsAttribute, true);
|
||||
- request.setUrl(QUrl(changeLogUrl));
|
||||
+ QTimer::singleShot(200, this, [this, changeLogUrl] {
|
||||
+ QNetworkRequest request;
|
||||
+ request.setRawHeader("User-Agent", "GitQlient");
|
||||
+ request.setRawHeader("X-Custom-User-Agent", "GitQlient");
|
||||
+ request.setRawHeader("Content-Type", "application/json");
|
||||
+ request.setAttribute(QNetworkRequest::FollowRedirectsAttribute, true);
|
||||
+ request.setUrl(QUrl(changeLogUrl));
|
||||
|
||||
- const auto reply = mManager->get(request);
|
||||
+ const auto reply = mManager->get(request);
|
||||
|
||||
- connect(reply, &QNetworkReply::finished, this, &Controls::processChangeLog);
|
||||
- });
|
||||
+ connect(reply, &QNetworkReply::finished, this, &Controls::processChangeLog);
|
||||
+ });
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
2.27.0
|
||||
|
||||
Reference in New Issue
Block a user