From nobody Mon Nov 28 21:08:41 2022 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NLdP56Vmcz4hwZd; Mon, 28 Nov 2022 21:08:41 +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 4NLdP55Ggbz3N7w; Mon, 28 Nov 2022 21:08:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1669669721; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IuwaDynmwX5oxISX8S1sW6lagjd1uMv8xg+E5iIX2/M=; b=g/CwOoHi9O3fFUHfUeR1N5frrYowmTYQXj6v2Yrib18uagyKeE1I/X/SZWwzjpzO1Ips5l nl1ItXZ/PKmoBL4FZHSqE+D7pNm78MHDJLXiBjXuAJtQZFGgJ6VWAyTURBCfPqWuAmLLzV ZOpUxWpd/H2UVk0KNrUJk5bBYFGfbojPpIVadNBts8hzzYOj09gLZksRL0JGgK7rE49hpt QO+19xdN/OzPY14BOK7QnkkacZz3se8HmmQ9g+viYwD0aWNx6NBGgnShZ5T7FwTzvBhz21 tzNG/JWofeTAgFWuqhV4w1OcvmoIhOFdTWHUcTovUkwmEqkFQS/CS6N0HrRazQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1669669721; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IuwaDynmwX5oxISX8S1sW6lagjd1uMv8xg+E5iIX2/M=; b=PbEyj8Dz/y85dSY7hAQA/1HTDfvT1fwp4p4QqHQlGifpt6QXEb1FJd9nkygsaTVrf9A90D 5LCm2eIQyR5X9kX4VuE0CspqAU3zfDjpzbPPdeBbiqfsF4llfK6aGsCYPdj1tCMWE6qFUD Pd/oMfKDBXoo8fDHQgO7qarnZKjvd/3f7w3bOiplOvmDaJzWLHRoy7BwY2wvaoCxsbmc1x QQOu23xbAysgcS5CD+Sck1OFZvFlDmLlswqgzM43Kp50X130UIxHW2Tjm9MAJd7+erYsNg jPGd3574RO79/Y1bHgkzzuYfe5DUPCT2JXyRRAS+0lgYvHnUDCvTpgC/1qvzdg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1669669721; a=rsa-sha256; cv=none; b=TPLpGnDkDwYAl57vQITFGNyFVkWIBUYaU7NMitIeHZntpp5I1qoTrEeF09K0DAVuC123By SgE63BUf7em0gl7BCo1Lf6qo1vXdTn6azNhXkTpCO41uzxzKHe8QG02o7fkfeFh+QXy7Um KEc3gsridS9s8HIrV8y9bioK0Tj/1LHDQCW/nA1iTdlcrsqgoDmliH3nWCiE1TfchnUwv0 Ilt/r2yYw8gNDl+VtqMusk8J2zgy6EALr7dh4V6R2hiYNPKg6mMAEA5IsWeIlfTxSx1Om5 xki9MXvbhpm2UHcQERpejdr6olexK30o13+oe3jxCkuiuke7/RgM+Vm2JUM9GQ== 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 4NLdP54MKXzrVy; Mon, 28 Nov 2022 21:08:41 +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 2ASL8fDc095004; Mon, 28 Nov 2022 21:08:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2ASL8f5I095003; Mon, 28 Nov 2022 21:08:41 GMT (envelope-from git) Date: Mon, 28 Nov 2022 21:08:41 GMT Message-Id: <202211282108.2ASL8f5I095003@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Kevin Bowling Subject: git: 0453380c15a5 - main - sysutils/qflipper: New port List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0453380c15a58b9384f199e492133ba7f79e071a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/ports/commit/?id=0453380c15a58b9384f199e492133ba7f79e071a commit 0453380c15a58b9384f199e492133ba7f79e071a Author: Kevin Bowling AuthorDate: 2022-11-28 21:08:08 +0000 Commit: Kevin Bowling CommitDate: 2022-11-28 21:08:08 +0000 sysutils/qflipper: New port PC support for Flipper Zero --- sysutils/Makefile | 1 + sysutils/qflipper/Makefile | 28 ++++++++++++++++ sysutils/qflipper/distinfo | 3 ++ .../files/patch-application_application.pro | 13 ++++++++ .../files/patch-application_applicationupdater.cpp | 38 ++++++++++++++++++++++ ...backend_flipperzero_helper_deviceinfohelper.cpp | 12 +++++++ .../patch-backend_flipperzero_protobufsession.cpp | 11 +++++++ sysutils/qflipper/files/patch-cli_cli.pro | 18 ++++++++++ .../files/patch-dfu_device_stm32wb55_infotable.h | 10 ++++++ .../patch-plugins_flipperproto0_flipperproto0.pro | 26 +++++++++++++++ sysutils/qflipper/files/patch-qFlipper.pro | 15 +++++++++ sysutils/qflipper/files/patch-qflipper__common.pri | 35 ++++++++++++++++++++ sysutils/qflipper/pkg-descr | 3 ++ sysutils/qflipper/pkg-message | 8 +++++ 14 files changed, 221 insertions(+) diff --git a/sysutils/Makefile b/sysutils/Makefile index 21824f164767..e0ee3a33413b 100644 --- a/sysutils/Makefile +++ b/sysutils/Makefile @@ -1137,6 +1137,7 @@ SUBDIR += pydf SUBDIR += qchroot SUBDIR += qdirstat + SUBDIR += qflipper SUBDIR += qjail SUBDIR += qjail54 SUBDIR += qlogtools diff --git a/sysutils/qflipper/Makefile b/sysutils/qflipper/Makefile new file mode 100644 index 000000000000..93b2a4242abc --- /dev/null +++ b/sysutils/qflipper/Makefile @@ -0,0 +1,28 @@ +PORTNAME= qFlipper +PORTVERSION= 1.2.1 +CATEGORIES= sysutils + +MAINTAINER= kbowling@FreeBSD.org +COMMENT= Application for updating Flipper Zero firmware +WWW= https://github.com/flipperdevices/qFlipper + +LICENSE= GPLv3 +LICENSE_FILE= ${WRKSRC}/LICENSE + +LIB_DEPENDS= libprotobuf-nanopb.so:devel/nanopb + +USES= compiler:c++11-lang desktop-file-utils gl qmake qt:5 + +USE_GITHUB= yes +GH_ACCOUNT= flipperdevices +USE_GL= gl +USE_QT= concurrent core declarative gui linguisttools network \ + quickcontrols2 serialport svg widgets buildtools:build + +PLIST_FILES= bin/qFlipper \ + bin/qFlipper-cli \ + lib/qt5/plugins/libflipperproto0.so \ + share/applications/qFlipper.desktop \ + share/icons/hicolor/512x512/apps/qFlipper.png + +.include diff --git a/sysutils/qflipper/distinfo b/sysutils/qflipper/distinfo new file mode 100644 index 000000000000..d4d1e2f3e2a7 --- /dev/null +++ b/sysutils/qflipper/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1669525166 +SHA256 (flipperdevices-qFlipper-1.2.1_GH0.tar.gz) = 3780c77c09e3837e01af8bdc12ea55e052b2f540812736421224112e66a06f00 +SIZE (flipperdevices-qFlipper-1.2.1_GH0.tar.gz) = 1282416 diff --git a/sysutils/qflipper/files/patch-application_application.pro b/sysutils/qflipper/files/patch-application_application.pro new file mode 100644 index 000000000000..eeea07ecc370 --- /dev/null +++ b/sysutils/qflipper/files/patch-application_application.pro @@ -0,0 +1,13 @@ +--- application/application.pro.orig 2022-11-27 22:12:16 UTC ++++ application/application.pro +@@ -100,8 +100,8 @@ unix:!macx { + iconfiles.files = $$PWD/assets/icons/$${TARGET}.png + iconfiles.path = $$PREFIX/share/icons/hicolor/512x512/apps + +- udevfiles.files = $$PWD/../installer-assets/udev/42-flipperzero.rules +- udevfiles.path = $$PREFIX/lib/udev/rules.d ++ #udevfiles.files = $$PWD/../installer-assets/udev/42-flipperzero.rules ++ #udevfiles.path = $$PREFIX/lib/udev/rules.d + + INSTALLS += target desktopfiles iconfiles udevfiles + diff --git a/sysutils/qflipper/files/patch-application_applicationupdater.cpp b/sysutils/qflipper/files/patch-application_applicationupdater.cpp new file mode 100644 index 000000000000..2dbc1d0f5d33 --- /dev/null +++ b/sysutils/qflipper/files/patch-application_applicationupdater.cpp @@ -0,0 +1,38 @@ +--- application/applicationupdater.cpp.orig 2022-11-27 21:54:15 UTC ++++ application/applicationupdater.cpp +@@ -57,6 +57,9 @@ void ApplicationUpdater::installUpdate(const Flipper:: + + void ApplicationUpdater::installUpdate(const Flipper::Updates::VersionInfo &versionInfo) + { ++#ifdef Q_OS_UNIX ++ return; ++#else + #ifdef Q_OS_WINDOWS + const auto fileInfo = versionInfo.fileInfo(QStringLiteral("installer"), QStringLiteral("windows/amd64")); + #elif defined(Q_OS_MAC) +@@ -64,7 +67,7 @@ void ApplicationUpdater::installUpdate(const Flipper:: + #elif defined(Q_OS_LINUX) + const auto fileInfo = versionInfo.fileInfo(QStringLiteral("AppImage"), QStringLiteral("linux/amd64")); + #else +-#error "Unsupported OS" ++ #error "Unsupported OS" + #endif + + const auto fileName = QFileInfo(fileInfo.url()).fileName(); +@@ -145,6 +148,7 @@ void ApplicationUpdater::installUpdate(const Flipper:: + qCWarning(CATEGORY_SELFUPDATES) << "Downloading the application update package..."; + setState(State::Downloading); + } ++#endif + } + + void ApplicationUpdater::setState(State state) +@@ -207,6 +211,7 @@ bool ApplicationUpdater::performUpdate(const QString & + return success; + + #else +-#error "Unsupported OS" ++#warning "Unsupported OS" ++ return 1; + #endif + } diff --git a/sysutils/qflipper/files/patch-backend_flipperzero_helper_deviceinfohelper.cpp b/sysutils/qflipper/files/patch-backend_flipperzero_helper_deviceinfohelper.cpp new file mode 100644 index 000000000000..345b565e6b74 --- /dev/null +++ b/sysutils/qflipper/files/patch-backend_flipperzero_helper_deviceinfohelper.cpp @@ -0,0 +1,12 @@ +--- backend/flipperzero/helper/deviceinfohelper.cpp.orig 2022-11-28 05:07:31 UTC ++++ backend/flipperzero/helper/deviceinfohelper.cpp +@@ -97,7 +97,8 @@ void VCPDeviceInfoHelper::findSerialPort() + + void VCPDeviceInfoHelper::findSerialPort() + { +- auto *finder = new SerialFinder(m_deviceInfo.usbInfo.serialNumber(), this); ++ QString serialBsd = QString(m_deviceInfo.usbInfo.serialNumber()).remove(QString("_")); ++ auto *finder = new SerialFinder(serialBsd, this); + + connect(finder, &SerialFinder::finished, this, [=](const QSerialPortInfo &portInfo) { + if(portInfo.isNull()) { diff --git a/sysutils/qflipper/files/patch-backend_flipperzero_protobufsession.cpp b/sysutils/qflipper/files/patch-backend_flipperzero_protobufsession.cpp new file mode 100644 index 000000000000..ebf09f12f3d9 --- /dev/null +++ b/sysutils/qflipper/files/patch-backend_flipperzero_protobufsession.cpp @@ -0,0 +1,11 @@ +--- backend/flipperzero/protobufsession.cpp.orig 2022-11-27 21:43:32 UTC ++++ backend/flipperzero/protobufsession.cpp +@@ -426,7 +426,7 @@ const QString ProtobufSession::protobufPluginFileName( + return QStringLiteral("flipperproto%1.dll").arg(versionMajor); + #elif defined(Q_OS_MAC) + return QStringLiteral("libflipperproto%1.dylib").arg(versionMajor); +-#elif defined(Q_OS_LINUX) ++#elif defined(Q_OS_LINUX) || defined(Q_OS_UNIX) + return QStringLiteral("libflipperproto%1.so").arg(versionMajor); + #else + #error "Unsupported OS" diff --git a/sysutils/qflipper/files/patch-cli_cli.pro b/sysutils/qflipper/files/patch-cli_cli.pro new file mode 100644 index 000000000000..3ecb5467b0bf --- /dev/null +++ b/sysutils/qflipper/files/patch-cli_cli.pro @@ -0,0 +1,18 @@ +--- cli/cli.pro.orig 2022-11-27 06:21:50 UTC ++++ cli/cli.pro +@@ -11,13 +11,13 @@ unix|win32 { + + unix|win32 { + LIBS += \ +- -L$$OUT_PWD/../3rdparty/ -l3rdparty \ ++ -lprotobuf-nanopb \ + -L$$OUT_PWD/../plugins/ -lflipperproto0 \ + -L$$OUT_PWD/../backend/ -lbackend \ + -L$$OUT_PWD/../dfu/ -ldfu + + contains(CONFIG, static): LIBS += \ +- -L$$OUT_PWD/../3rdparty/ -l3rdparty \ ++ -lprotobuf-nanopb \ + -L$$OUT_PWD/../plugins/ -lflipperproto0 + } + diff --git a/sysutils/qflipper/files/patch-dfu_device_stm32wb55_infotable.h b/sysutils/qflipper/files/patch-dfu_device_stm32wb55_infotable.h new file mode 100644 index 000000000000..9e22d3f21fe9 --- /dev/null +++ b/sysutils/qflipper/files/patch-dfu_device_stm32wb55_infotable.h @@ -0,0 +1,10 @@ +--- dfu/device/stm32wb55/infotable.h.orig 2022-11-27 21:57:44 UTC ++++ dfu/device/stm32wb55/infotable.h +@@ -52,6 +52,7 @@ struct FUSDeviceInfoTable + uint32_t reserved2; + uint64_t UID64; + uint16_t deviceID; ++ uint32_t padding_ /* padding for 32 bit build */; + }; + + struct DeviceInfoTable { diff --git a/sysutils/qflipper/files/patch-plugins_flipperproto0_flipperproto0.pro b/sysutils/qflipper/files/patch-plugins_flipperproto0_flipperproto0.pro new file mode 100644 index 000000000000..f37f9ff2978e --- /dev/null +++ b/sysutils/qflipper/files/patch-plugins_flipperproto0_flipperproto0.pro @@ -0,0 +1,26 @@ +--- plugins/flipperproto0/flipperproto0.pro.orig 2022-10-03 15:15:41 UTC ++++ plugins/flipperproto0/flipperproto0.pro +@@ -13,7 +13,6 @@ INCLUDEPATH += $$PWD/../protobufinterface \ + VERSION = 0.0.0 + + INCLUDEPATH += $$PWD/../protobufinterface \ +- $$PWD/../../3rdparty/nanopb + + HEADERS += \ + guirequest.h \ +@@ -59,13 +58,13 @@ unix|win32 { + systemresponse.cpp + + unix|win32 { +- LIBS += -L$$OUT_PWD/../../3rdparty/ -l3rdparty ++ LIBS += -lprotobuf-nanopb + } + + DEFINES += PB_ENABLE_MALLOC + + unix:!macx { +- target.path = $$PREFIX/lib/$$NAME/plugins ++ target.path = $$PREFIX/lib/qt5/plugins + } else:macx { + target.path = $$DESTDIR/../$${NAME}.app/Contents/PlugIns + } else:win32 { diff --git a/sysutils/qflipper/files/patch-qFlipper.pro b/sysutils/qflipper/files/patch-qFlipper.pro new file mode 100644 index 000000000000..0c6310092aa8 --- /dev/null +++ b/sysutils/qflipper/files/patch-qFlipper.pro @@ -0,0 +1,15 @@ +--- qFlipper.pro.orig 2022-11-27 06:24:58 UTC ++++ qFlipper.pro +@@ -1,7 +1,6 @@ SUBDIRS += \ + TEMPLATE = subdirs + + SUBDIRS += \ +- 3rdparty \ + application \ + backend \ + dfu \ +@@ -11,4 +10,3 @@ cli.depends = backend + backend.depends = dfu plugins + application.depends = backend + cli.depends = backend +-plugins.depends = 3rdparty diff --git a/sysutils/qflipper/files/patch-qflipper__common.pri b/sysutils/qflipper/files/patch-qflipper__common.pri new file mode 100644 index 000000000000..c7b70517a74b --- /dev/null +++ b/sysutils/qflipper/files/patch-qflipper__common.pri @@ -0,0 +1,35 @@ +--- qflipper_common.pri.orig 2022-11-27 18:49:46 UTC ++++ qflipper_common.pri +@@ -5,7 +5,7 @@ unix:!macx { + unix:!macx { + DEFINES += USB_BACKEND_LIBUSB + CONFIG += link_pkgconfig +- PKGCONFIG += libusb-1.0 zlib ++ LIBS += -lusb -lz + + isEmpty(PREFIX): PREFIX = /usr + +@@ -27,20 +27,11 @@ unix:!macx { + error("Unsupported OS or compiler") + } + +-GIT_VERSION = $$system("git describe --tags --abbrev=0","lines", HAS_VERSION) +-!equals(HAS_VERSION, 0) { +- GIT_VERSION = unknown +-} ++GIT_VERSION = 1.2.1 + +-GIT_COMMIT = $$system("git rev-parse --short=8 HEAD","lines", HAS_COMMIT) +-!equals(HAS_COMMIT, 0) { +- GIT_COMMIT = unknown +-} ++GIT_COMMIT = 3ec0fd9d + +-GIT_TIMESTAMP = $$system("git log -1 --pretty=format:%ct","lines", HAS_TIMESTAMP) +-!equals(HAS_TIMESTAMP, 0) { +- GIT_TIMESTAMP = 0 +-} ++GIT_TIMESTAMP = 1664810141 + + DEFINES += APP_NAME=\\\"$$NAME\\\" \ + APP_VERSION=\\\"$$GIT_VERSION\\\" \ diff --git a/sysutils/qflipper/pkg-descr b/sysutils/qflipper/pkg-descr new file mode 100644 index 000000000000..268de2596b34 --- /dev/null +++ b/sysutils/qflipper/pkg-descr @@ -0,0 +1,3 @@ +Graphical desktop application for updating Flipper Zero firmware via PC + +This utility allows updating firmware, repair, remote control, and backup. diff --git a/sysutils/qflipper/pkg-message b/sysutils/qflipper/pkg-message new file mode 100644 index 000000000000..14c300202d57 --- /dev/null +++ b/sysutils/qflipper/pkg-message @@ -0,0 +1,8 @@ +[ +{ type: install + message: <