mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 19:50:05 +02:00
Dukto: add recipe (#5120)
This commit is contained in:
67
net-misc/dukto/dukto-6.0.0.recipe
Normal file
67
net-misc/dukto/dukto-6.0.0.recipe
Normal file
@@ -0,0 +1,67 @@
|
||||
SUMMARY="Easy and multi-platform file transfer tool"
|
||||
DESCRIPTION="Dukto is an easy file transfer tool designed for LAN use. \
|
||||
Transfer files from one PC (or other device) to another, without worrying \
|
||||
about users, permissions, operating systems, protocols, clients, servers and \
|
||||
so on… Just start Dukto on the two PCs and transfer files and folders by \
|
||||
dragging onto it’s window. That’s all."
|
||||
HOMEPAGE="https://www.msec.it/blog/dukto/"
|
||||
COPYRIGHT="2011 Emanuele Colombo"
|
||||
LICENSE="GNU GPL v2"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://codeload.github.com/ttys3/dukto/zip/00301800b3a645b80361a59de911839bf49ee32e"
|
||||
CHECKSUM_SHA256="599e808fb9206f24386afb32ee96766797d4354b5f34838d8b4dae65f446fe5a"
|
||||
SOURCE_DIR="dukto-00301800b3a645b80361a59de911839bf49ee32e"
|
||||
PATCHES="dukto-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="!x86_gcc2 x86 x86_64"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
PROVIDES="
|
||||
dukto$secondaryArchSuffix = $portVersion
|
||||
app:Dukto
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libGL$secondaryArchSuffix
|
||||
lib:libQt5Core$secondaryArchSuffix
|
||||
lib:libQt5Gui$secondaryArchSuffix
|
||||
lib:libQt5Network$secondaryArchSuffix
|
||||
lib:libQt5Qml$secondaryArchSuffix
|
||||
lib:libQt5QmlModels$secondaryArchSuffix
|
||||
lib:libQt5Quick$secondaryArchSuffix
|
||||
lib:libQt5QuickWidgets$secondaryArchSuffix
|
||||
lib:libQt5Widgets$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libGL$secondaryArchSuffix
|
||||
devel:libQt5Core$secondaryArchSuffix
|
||||
devel:libQt5Gui$secondaryArchSuffix
|
||||
devel:libQt5Network$secondaryArchSuffix
|
||||
devel:libQt5Qml$secondaryArchSuffix
|
||||
devel:libQt5QmlModels$secondaryArchSuffix
|
||||
devel:libQt5Quick$secondaryArchSuffix
|
||||
devel:libQt5QuickWidgets$secondaryArchSuffix
|
||||
devel:libQt5Widgets$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:g++$secondaryArchSuffix
|
||||
cmd:make
|
||||
cmd:qmake$secondaryArchSuffix >= 5
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
qmake -r
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
mkdir $appsDir
|
||||
cp dukto $appsDir/Dukto
|
||||
|
||||
mkdir -p $dataDir/deskbar/menu/Applications
|
||||
addAppDeskbarSymlink "$appsDir/Dukto"
|
||||
}
|
||||
245
net-misc/dukto/patches/dukto-6.0.0.patchset
Normal file
245
net-misc/dukto/patches/dukto-6.0.0.patchset
Normal file
@@ -0,0 +1,245 @@
|
||||
From 6b50cc2e133cc7bab8dbcc0781eedeed5d25e828 Mon Sep 17 00:00:00 2001
|
||||
From: X512 <danger_mail@list.ru>
|
||||
Date: Tue, 16 Jun 2020 21:58:19 +0900
|
||||
Subject: platform: add Haiku
|
||||
|
||||
---
|
||||
platform.cpp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/platform.cpp b/platform.cpp
|
||||
index fb99670..98acbcb 100644
|
||||
--- a/platform.cpp
|
||||
+++ b/platform.cpp
|
||||
@@ -169,7 +169,7 @@ QString Platform::getDefaultPath()
|
||||
return QString(getenv("USERPROFILE")) + "\\Desktop";
|
||||
#elif defined(Q_OS_MAC)
|
||||
return QString(getenv("HOME")) + "/Desktop";
|
||||
-#elif defined(Q_OS_LINUX)
|
||||
+#elif defined(Q_OS_LINUX) || defined(Q_OS_HAIKU)
|
||||
return QString(getenv("HOME"));
|
||||
#else
|
||||
#error "Unknown default path for this platform"
|
||||
--
|
||||
2.27.0
|
||||
|
||||
|
||||
From e0cfa8174613515541327e2c41bc36d9cb5ad91b Mon Sep 17 00:00:00 2001
|
||||
From: X512 <danger_mail@list.ru>
|
||||
Date: Tue, 16 Jun 2020 22:03:22 +0900
|
||||
Subject: QML: Qt5 fixes
|
||||
|
||||
---
|
||||
qml/dukto/Dukto.qml | 12 ++++++------
|
||||
qml/dukto/DuktoOverlay.qml | 14 ++++++++++++++
|
||||
2 files changed, 20 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/qml/dukto/Dukto.qml b/qml/dukto/Dukto.qml
|
||||
index ecf6311..4c044fc 100644
|
||||
--- a/qml/dukto/Dukto.qml
|
||||
+++ b/qml/dukto/Dukto.qml
|
||||
@@ -40,15 +40,15 @@ Rectangle {
|
||||
|
||||
Connections {
|
||||
target: guiBehind
|
||||
- onTransferStart: duktoOverlay.state = "progress"
|
||||
- onReceiveCompleted: {
|
||||
+ function onTransferStart() {duktoOverlay.state = "progress";}
|
||||
+ function onReceiveCompleted() {
|
||||
duktoOverlay.state = ""
|
||||
duktoInner.gotoPage("recent");
|
||||
}
|
||||
- onGotoTextSnippet: duktoOverlay.state = "showtext"
|
||||
- onGotoSendPage: duktoOverlay.state = "send";
|
||||
- onGotoMessagePage: duktoOverlay.state = "message";
|
||||
- onHideAllOverlays: duktoOverlay.state = "";
|
||||
+ function onGotoTextSnippet() {duktoOverlay.state = "showtext";}
|
||||
+ function onGotoSendPage() {duktoOverlay.state = "send";}
|
||||
+ function onGotoMessagePage() {duktoOverlay.state = "message";}
|
||||
+ function onHideAllOverlays() {duktoOverlay.state = "";}
|
||||
}
|
||||
|
||||
DuktoInner {
|
||||
diff --git a/qml/dukto/DuktoOverlay.qml b/qml/dukto/DuktoOverlay.qml
|
||||
index 34238da..7920718 100644
|
||||
--- a/qml/dukto/DuktoOverlay.qml
|
||||
+++ b/qml/dukto/DuktoOverlay.qml
|
||||
@@ -47,6 +47,7 @@ Rectangle {
|
||||
width: parent.width
|
||||
x: -50
|
||||
opacity: 0
|
||||
+ visible: false
|
||||
onBack: parent.state = ""
|
||||
}
|
||||
|
||||
@@ -58,6 +59,7 @@ Rectangle {
|
||||
width: parent.width
|
||||
x: -50
|
||||
opacity: 0
|
||||
+ visible: false
|
||||
}
|
||||
|
||||
ShowTextPage {
|
||||
@@ -67,6 +69,7 @@ Rectangle {
|
||||
width: parent.width
|
||||
x: -50
|
||||
opacity: 0
|
||||
+ visible: false
|
||||
onBack: parent.state = ""
|
||||
onBackOnSend: {
|
||||
sendPage.setDestinationFocus();
|
||||
@@ -80,6 +83,7 @@ Rectangle {
|
||||
height: parent.height
|
||||
x: -50
|
||||
opacity: 0
|
||||
+ visible: false
|
||||
onBack: parent.state = ""
|
||||
}
|
||||
|
||||
@@ -91,6 +95,7 @@ Rectangle {
|
||||
height: parent.height
|
||||
x: -50
|
||||
opacity: 0
|
||||
+ visible: false
|
||||
onBack: parent.state = ""
|
||||
onShowTextPage: {
|
||||
showTextPage.setTextEditFocus();
|
||||
@@ -106,6 +111,7 @@ Rectangle {
|
||||
width: parent.width
|
||||
x: -50
|
||||
opacity: 0
|
||||
+ visible: false
|
||||
onBack: parent.state = backState
|
||||
}
|
||||
|
||||
@@ -116,6 +122,7 @@ Rectangle {
|
||||
width: parent.width
|
||||
x: -50
|
||||
opacity: 0
|
||||
+ visible: false
|
||||
onOk: {
|
||||
guiBehind.showTermsOnStart = false;
|
||||
parent.state = ""
|
||||
@@ -128,6 +135,7 @@ Rectangle {
|
||||
PropertyChanges {
|
||||
target: ipPage
|
||||
opacity: 1
|
||||
+ visible: true
|
||||
x: 0
|
||||
}
|
||||
PropertyChanges {
|
||||
@@ -141,6 +149,7 @@ Rectangle {
|
||||
PropertyChanges {
|
||||
target: progressPage
|
||||
opacity: 1
|
||||
+ visible: true
|
||||
x: 0
|
||||
}
|
||||
PropertyChanges {
|
||||
@@ -154,6 +163,7 @@ Rectangle {
|
||||
PropertyChanges {
|
||||
target: showTextPage
|
||||
opacity: 1
|
||||
+ visible: true
|
||||
x: 0
|
||||
}
|
||||
},
|
||||
@@ -162,6 +172,7 @@ Rectangle {
|
||||
PropertyChanges {
|
||||
target: settingsPage
|
||||
opacity: 1
|
||||
+ visible: true
|
||||
x: 0
|
||||
}
|
||||
},
|
||||
@@ -170,6 +181,7 @@ Rectangle {
|
||||
PropertyChanges {
|
||||
target: sendPage
|
||||
opacity: 1
|
||||
+ visible: true
|
||||
x: 0
|
||||
}
|
||||
},
|
||||
@@ -178,6 +190,7 @@ Rectangle {
|
||||
PropertyChanges {
|
||||
target: messagePage
|
||||
opacity: 1
|
||||
+ visible: true
|
||||
x: 0
|
||||
}
|
||||
PropertyChanges {
|
||||
@@ -191,6 +204,7 @@ Rectangle {
|
||||
PropertyChanges {
|
||||
target: termsPage
|
||||
opacity: 1
|
||||
+ visible: true
|
||||
x: 0
|
||||
}
|
||||
}
|
||||
--
|
||||
2.27.0
|
||||
|
||||
|
||||
From 95baa0cb0a7332de48ede1f6eeef5044cc4ce3a0 Mon Sep 17 00:00:00 2001
|
||||
From: X512 <danger_mail@list.ru>
|
||||
Date: Tue, 16 Jun 2020 21:57:40 +0900
|
||||
Subject: DuktoProtocol: Qt5 fixes
|
||||
|
||||
---
|
||||
duktoprotocol.cpp | 25 +++++--------------------
|
||||
1 file changed, 5 insertions(+), 20 deletions(-)
|
||||
|
||||
diff --git a/duktoprotocol.cpp b/duktoprotocol.cpp
|
||||
index c83b8b9..6d6f6c5 100644
|
||||
--- a/duktoprotocol.cpp
|
||||
+++ b/duktoprotocol.cpp
|
||||
@@ -56,11 +56,11 @@ DuktoProtocol::~DuktoProtocol()
|
||||
void DuktoProtocol::initialize()
|
||||
{
|
||||
mSocket = new QUdpSocket(this);
|
||||
- mSocket->bind(QHostAddress::Any, mLocalUdpPort);
|
||||
+ mSocket->bind(QHostAddress::AnyIPv4, mLocalUdpPort);
|
||||
connect(mSocket, SIGNAL(readyRead()), this, SLOT(newUdpData()));
|
||||
|
||||
mTcpServer = new QTcpServer(this);
|
||||
- mTcpServer->listen(QHostAddress::Any, mLocalTcpPort);
|
||||
+ mTcpServer->listen(QHostAddress::AnyIPv4, mLocalTcpPort);
|
||||
connect(mTcpServer, SIGNAL(newConnection()), this, SLOT(newIncomingConnection()));
|
||||
}
|
||||
|
||||
@@ -822,23 +822,8 @@ qint64 DuktoProtocol::computeTotalSize(QStringList *e)
|
||||
// Invia un pacchetto a tutti gli indirizzi broadcast del PC
|
||||
void DuktoProtocol::sendToAllBroadcast(QByteArray *packet, qint16 port)
|
||||
{
|
||||
- // Elenco interfacce disponibili
|
||||
- QList<QNetworkInterface> ifaces = QNetworkInterface::allInterfaces();
|
||||
-
|
||||
- // Iterazione sulle interfacce
|
||||
- for (int i = 0; i < ifaces.size(); i++)
|
||||
- {
|
||||
- // Iterazione per tutti gli IP dell'interfaccia
|
||||
- QList<QNetworkAddressEntry> addrs = ifaces[i].addressEntries();
|
||||
-
|
||||
- // Invio pacchetto per ogni IP di broadcast
|
||||
- for (int j = 0; j < addrs.size(); j++)
|
||||
- if ((addrs[j].ip().protocol() == QAbstractSocket::IPv4Protocol) && (addrs[j].broadcast().toString() != ""))
|
||||
- {
|
||||
- mSocket->writeDatagram(packet->data(), packet->length(), addrs[j].broadcast(), port);
|
||||
- mSocket->flush();
|
||||
- }
|
||||
- }
|
||||
+ mSocket->writeDatagram(packet->data(), packet->length(), QHostAddress::Broadcast, port);
|
||||
+ mSocket->flush();
|
||||
}
|
||||
|
||||
// Interrompe un trasferimento in corso (utilizzabile solo lato invio)
|
||||
@@ -859,5 +844,5 @@ void DuktoProtocol::updateBuddyName()
|
||||
sayGoodbye();
|
||||
|
||||
// Invio pacchetto di annuncio con il nuovo nome
|
||||
- sayHello(QHostAddress::Broadcast, true);
|
||||
+ sayHello(QHostAddress::Broadcast);
|
||||
}
|
||||
--
|
||||
2.27.0
|
||||
|
||||
Reference in New Issue
Block a user