From dfd0f98dbcf15cd3643e3a1f9f8fd458623b9552 Mon Sep 17 00:00:00 2001 From: Jerome Duval Date: Mon, 1 Oct 2018 08:10:13 +0200 Subject: [PATCH] beshare: upstream patchset. --- haiku-apps/beshare/beshare-2.35.recipe | 12 +- .../beshare/patches/beshare-2.35.patchset | 210 ------------------ 2 files changed, 6 insertions(+), 216 deletions(-) delete mode 100644 haiku-apps/beshare/patches/beshare-2.35.patchset diff --git a/haiku-apps/beshare/beshare-2.35.recipe b/haiku-apps/beshare/beshare-2.35.recipe index 30aa867b4..4f57f98d8 100644 --- a/haiku-apps/beshare/beshare-2.35.recipe +++ b/haiku-apps/beshare/beshare-2.35.recipe @@ -17,14 +17,14 @@ HOMEPAGE="https://github.com/HaikuArchives/BeShare" COPYRIGHT="1999-2012 Jeremy Friesner" LICENSE="Public Domain libsanta" -REVISION="2" -SOURCE_URI="https://github.com/HaikuArchives/BeShare/archive/v$portVersion.tar.gz" -CHECKSUM_SHA256="b936e4de10a555204521747f48de8fadf22530fa5186bdc06eecaa26bf97ae6f" -SOURCE_FILENAME="beshare-$portVersion.tar.gz" -SOURCE_DIR="BeShare-$portVersion" +REVISION="3" +srcGitRev="58031882f15a724e8c946ed80bc0d10541b8f645" +SOURCE_URI="https://github.com/HaikuArchives/BeShare/archive/$srcGitRev.tar.gz" +CHECKSUM_SHA256="7cc736acbdc6d6f9a0298323fc58d043ff0cf44a272912d332839060f905b040" +SOURCE_FILENAME="beshare-$srcGitRev.tar.gz" +SOURCE_DIR="BeShare-$srcGitRev" SOURCE_URI_2="https://public.msli.com/lcs/muscle/muscle6.11.zip" CHECKSUM_SHA256_2="7cf3c92095f46e5a0858852e7d387d11fdf8e1e95a4de26b5e68e8319a373340" -PATCHES="beshare-2.35.patchset" PATCHES_2="muscle-6.11.patchset" ARCHITECTURES="!x86_gcc2 x86 x86_64" diff --git a/haiku-apps/beshare/patches/beshare-2.35.patchset b/haiku-apps/beshare/patches/beshare-2.35.patchset deleted file mode 100644 index 1caa76ae9..000000000 --- a/haiku-apps/beshare/patches/beshare-2.35.patchset +++ /dev/null @@ -1,210 +0,0 @@ -From 1ff8d4b8809bde8b3f359577fd4fd47f08ad1a3f Mon Sep 17 00:00:00 2001 -From: Jerome Duval -Date: Sat, 29 Sep 2018 23:28:05 +0200 -Subject: support for x86_64. - - -diff --git a/source/ResultsView.cpp b/source/ResultsView.cpp -index 186e5ed..7d6b434 100644 ---- a/source/ResultsView.cpp -+++ b/source/ResultsView.cpp -@@ -67,7 +67,7 @@ void - ResultsView::MouseDown(BPoint where) - { - BPoint pt; -- ulong buttons; -+ uint32 buttons; - - GetMouse(&pt, &buttons); - -diff --git a/source/ShareFileTransfer.cpp b/source/ShareFileTransfer.cpp -index b0bdf58..00c1074 100644 ---- a/source/ShareFileTransfer.cpp -+++ b/source/ShareFileTransfer.cpp -@@ -197,7 +197,7 @@ public: - && (offset > 0)) { - off_t uploadOffset = 0LL; // default to starting the upload at the beginning of the file - const uint8 * hisDigest; -- size_t numBytes; -+ uint32 numBytes; - if ((msg->FindData("md5", B_RAW_TYPE, i, (const void **) &hisDigest, &numBytes) == B_NO_ERROR) - && (numBytes == MD5_DIGEST_SIZE)) { - // Okay, the requestor has told us enough so that we can check our local file... -@@ -1098,7 +1098,7 @@ ShareFileTransfer::MessageReceived(const MessageRef& msgRef) - fieldName = iter.GetFieldName(); - if (strncmp(fieldName(), "beshare:", 8)) { // don't save our attributes, they aren't necessary - const void * attrData; -- size_t attrSize; -+ uint32 attrSize; - uint32 c; - type_code type; - -@@ -1134,7 +1134,7 @@ ShareFileTransfer::MessageReceived(const MessageRef& msgRef) - { - TRACE_SHAREFILETRANFER(("%s::%s : TRANSFER_COMMAND_FILE_DATA\n",CLASSNAME, __func__)); - uint8 * data; -- size_t numBytes; -+ uint32 numBytes; - if ((_uploadSession == false) - && (msg->FindDataPointer("data", B_RAW_TYPE, (void **) &data, &numBytes) == B_NO_ERROR)) { - bool abortSession = false; -diff --git a/source/TransferListView.cpp b/source/TransferListView.cpp -index e3a421f..f4f7314 100644 ---- a/source/TransferListView.cpp -+++ b/source/TransferListView.cpp -@@ -95,7 +95,7 @@ TransferListView::MouseDown(BPoint where) - { - TRACE_TRANSFERLISTVIEW(("TransferListView::MouseDown begin\n")); - BPoint pt; -- ulong buttons; -+ uint32 buttons; - - GetMouse(&pt, &buttons); - -diff --git a/source/UserListView.cpp b/source/UserListView.cpp -index 2b5d653..75ce507 100644 ---- a/source/UserListView.cpp -+++ b/source/UserListView.cpp -@@ -30,7 +30,7 @@ void - UserListView::MouseDown(BPoint where) - { - BPoint pt; -- ulong buttons; -+ uint32 buttons; - - GetMouse(&pt, &buttons); - if (buttons & B_SECONDARY_MOUSE_BUTTON) { --- -2.19.0 - - -From 9275676095dc243ddc58fa3cbd6a073c1f676070 Mon Sep 17 00:00:00 2001 -From: Jerome Duval -Date: Sat, 29 Sep 2018 23:57:07 +0200 -Subject: fix gcc7 warnings. - - -diff --git a/source/ChatWindow.cpp b/source/ChatWindow.cpp -index e56bb7b..8510311 100644 ---- a/source/ChatWindow.cpp -+++ b/source/ChatWindow.cpp -@@ -1178,7 +1178,7 @@ ChatWindow::GetAppSubdir(const char * subDirName, BDirectory & subDir, bool crea - // If the directory is already there, use it - if ((error = subDir.SetTo(path.Path())) != B_OK) { - //This one we need to create, it's the "main" diretory -- if (error = subDir.CreateDirectory(path.Path(), &subDir) != B_OK) -+ if ((error = subDir.CreateDirectory(path.Path(), &subDir)) != B_OK) - return error; - } - -diff --git a/source/RemoteUserItem.cpp b/source/RemoteUserItem.cpp -index 04cbb6c..fea1eac 100644 ---- a/source/RemoteUserItem.cpp -+++ b/source/RemoteUserItem.cpp -@@ -128,9 +128,9 @@ RemoteUserItem::SetNumSharedFiles(int32 bw) - char temp[100] = "?"; - if (_numSharedFiles >= 0) { - if ((_firewalled)&&(_shareWindow->GetFirewalled())) -- sprintf(temp, "(%li)", _numSharedFiles); -+ sprintf(temp, "(%" B_PRIi32 ")", _numSharedFiles); - else -- sprintf(temp, "%li", _numSharedFiles); -+ sprintf(temp, "%" B_PRIi32, _numSharedFiles); - } - SetColumnContent(REMOTE_USER_COLUMN_FILES, temp, false, true); - _shareWindow->RefreshUserItem(this); -@@ -147,9 +147,9 @@ RemoteUserItem::SetUploadStats(uint32 cu, uint32 mu) - char temp[128]; - if (_curUploads < NO_FILE_LIMIT) { - if (_maxUploads >= NO_FILE_LIMIT) -- sprintf(temp, "(%lu) 0%%", _curUploads); -+ sprintf(temp, "(%" B_PRIu32 ") 0%%", _curUploads); - else -- sprintf(temp, "(%lu/%lu) %.0f%%", _curUploads, _maxUploads, GetLoadFactor()*100.0f); -+ sprintf(temp, "(%" B_PRIu32 "/%" B_PRIu32 ") %.0f%%", _curUploads, _maxUploads, GetLoadFactor()*100.0f); - } else - strcpy(temp, "?"); - -diff --git a/source/ResultsView.cpp b/source/ResultsView.cpp -index 7d6b434..d43e8c6 100644 ---- a/source/ResultsView.cpp -+++ b/source/ResultsView.cpp -@@ -131,7 +131,7 @@ ResultsView::InitiateDrag(BPoint /*point*/, int32 /*index*/, bool /*wasSelected* - RemoteUserItem * owner = item->GetOwner(); - uint64 ID = owner->GetInstallID(); - char strbuf[17]; -- sprintf(strbuf,"%Lx", ID); -+ sprintf(strbuf,"%" B_PRIx64, ID); - - String URL; - URL << "beshare://" -diff --git a/source/ShareColumn.cpp b/source/ShareColumn.cpp -index bee53ee..2016e7a 100644 ---- a/source/ShareColumn.cpp -+++ b/source/ShareColumn.cpp -@@ -76,7 +76,7 @@ GetFileCellText(const RemoteFileItem * item) const - if (msg.FindInt64(attrName, &v) == B_NO_ERROR) - { - if (strcmp(attrName, "beshare:File Size") == 0) GetByteSizeString(v, _buf); -- else sprintf(_buf, "%Li", v); -+ else sprintf(_buf, "%" B_PRIi64, v); - } - } - break; -diff --git a/source/ShareWindow.cpp b/source/ShareWindow.cpp -index 2c6b05e..c364438 100644 ---- a/source/ShareWindow.cpp -+++ b/source/ShareWindow.cpp -@@ -2169,7 +2169,7 @@ ShareWindow::MessageReceived(BMessage* msg) - MessageRef pmsg = GetMessageFromPool(); - if (pmsg()) - { -- pmsg()->AddString(PR_NAME_TEXT_LINE, "GET /servers.txt HTTP/1.1\nUser-Agent: BeShare/"VERSION_STRING"\nHost: "AUTO_UPDATER_SERVER"\n\n"); -+ pmsg()->AddString(PR_NAME_TEXT_LINE, "GET /servers.txt HTTP/1.1\nUser-Agent: BeShare/" VERSION_STRING "\nHost: " AUTO_UPDATER_SERVER "\n\n"); - _checkServerListThread.SendMessageToSessions(pmsg); - } - } -@@ -2756,7 +2756,7 @@ UpdateConnectStatus(bool titleToo) - - char buf[200]; - strcpy(buf, str(STR_CONNECT_TO)); -- strncat(buf, sname, sizeof(buf)); -+ strncat(buf, sname, sizeof(buf) - 1); - buf[sizeof(buf)-1] = '\0'; - _connectMenuItem->SetLabel(buf); - -diff --git a/source/TransferListView.cpp b/source/TransferListView.cpp -index f4f7314..13e0348 100644 ---- a/source/TransferListView.cpp -+++ b/source/TransferListView.cpp -@@ -278,11 +278,12 @@ TransferListView::MouseDown(BPoint where) - for (int i = 0; (idx = CurrentSelection(i)) >= 0; i++) { - ShareFileTransfer* xfr = (ShareFileTransfer *) ItemAt(idx); - if (xfr->IsUploadSession()) { -- if (xfr->IsWaitingOnLocal() == false) -+ if (xfr->IsWaitingOnLocal() == false) { - xfr->RequeueTransfer(); - xfr->SetBeginTransferEnabled(false); -- }else -+ } else - xfr->AbortSession(true, true); -+ } - } - win->DequeueTransferSessions(); - } else if (result == resumeDownload) { -diff --git a/source/md5.cpp b/source/md5.cpp -index 26c1ddf..548d8dc 100644 ---- a/source/md5.cpp -+++ b/source/md5.cpp -@@ -136,7 +136,7 @@ MD5Final(md5byte digest[16], struct MD5Context *ctx) - - byteSwap(ctx->buf, 4); - memcpy(digest, ctx->buf, 16); -- memset(ctx, 0, sizeof(ctx)); /* In case it's sensitive */ -+ memset(ctx, 0, sizeof(*ctx)); /* In case it's sensitive */ - } - - /* The four core functions - F1 is optimized somewhat */ --- -2.19.0 -