git: 437113a92135 - main - sysutils/android-file-transfer: update to 4.3

From: Zsolt Udvari <uzsolt_at_FreeBSD.org>
Date: Tue, 23 Jul 2024 05:04:02 UTC
The branch main has been updated by uzsolt:

URL: https://cgit.FreeBSD.org/ports/commit/?id=437113a921358bf4903d84921ced729d173ec2c6

commit 437113a921358bf4903d84921ced729d173ec2c6
Author:     gatekeeper <tiago.gasiba@gmail.com>
AuthorDate: 2024-07-23 04:56:41 +0000
Commit:     Zsolt Udvari <uzsolt@FreeBSD.org>
CommitDate: 2024-07-23 05:03:26 +0000

    sysutils/android-file-transfer: update to 4.3
    
    Submitter takes maintainership.
    Remove Python option because this port install files under
    PYTHON_SITELIBDIR (must use pyXY prefix).
    Disable libusb debug option in code: this makes the software much more
    clean and usable in the command line.
    Pet portfmt.
    
    PR:             279895
---
 sysutils/android-file-transfer/Makefile            | 49 +++++++++-------------
 sysutils/android-file-transfer/distinfo            |  6 +--
 .../files/patch-mtp_backend_libusb_usb_Context.cpp | 11 +++++
 3 files changed, 33 insertions(+), 33 deletions(-)

diff --git a/sysutils/android-file-transfer/Makefile b/sysutils/android-file-transfer/Makefile
index fd5c896a9bdc..becda6a9eba7 100644
--- a/sysutils/android-file-transfer/Makefile
+++ b/sysutils/android-file-transfer/Makefile
@@ -1,53 +1,47 @@
 PORTNAME=	android-file-transfer
 DISTVERSIONPREFIX=	v
-DISTVERSION=	4.2
-PORTREVISION?=	1
+DISTVERSION=	4.3
 CATEGORIES=	sysutils
 
-MAINTAINER=	ports@FreeBSD.org
+MAINTAINER=	tiago.gasiba@gmail.com
 COMMENT=	Android MTP client with minimalistic UI
 WWW=		https://github.com/whoozle/android-file-transfer-linux
 
 LICENSE=	GPLv3+
 
+USES=		cmake compiler:c++11-lib pkgconfig
 USE_GITHUB=	yes
 GH_ACCOUNT=	whoozle
 GH_PROJECT=	${PORTNAME}-linux
 
-USES=		cmake compiler:c++11-lib pkgconfig
 CMAKE_ON=	USB_BACKEND_LIBUSB
+CMAKE_OFF=	BUILD_PYTHON
 PLIST_FILES=	"@comment lib/libmtp-ng-static.a"
 
-OPTIONS_DEFINE=	CLI FUSE OPENSSL PYTHON QT5 TAGLIB
-OPTIONS_DEFAULT=CLI FUSE OPENSSL PYTHON QT5 TAGLIB
+OPTIONS_DEFINE=		CLI FUSE OPENSSL QT5 TAGLIB
+OPTIONS_DEFAULT=	CLI OPENSSL TAGLIB
 OPTIONS_EXCLUDE?=	QT5 # enslaved until subpackaging
 
-CLI_DESC=	CLI (Command-Line Interface) support
-CLI_USES=	readline
-CLI_PLIST_FILES=bin/aft-mtp-cli
+CLI_DESC=		CLI (Command-Line Interface) support
+TAGLIB_DESC=		Reading audio metadata via taglib
+CLI_PLIST_FILES=	bin/aft-mtp-cli
 
-FUSE_USES=	fuse
-FUSE_CMAKE_BOOL=BUILD_FUSE
-FUSE_PLIST_FILES=bin/aft-mtp-mount
+FUSE_USES=		fuse
+FUSE_CMAKE_BOOL=	BUILD_FUSE
+FUSE_PLIST_FILES=	bin/aft-mtp-mount
 
 OPENSSL_USES=		ssl
 OPENSSL_CMAKE_BOOL=	BUILD_MTPZ
 
-PYTHON_BUILD_DEPENDS=	pybind11>0:devel/pybind11
-PYTHON_USES=		python
-PYTHON_CMAKE_BOOL=	BUILD_PYTHON
-PYTHON_PLIST_FILES=	%%PYTHON_SITELIBDIR%%/aftl%%PYTHON_EXT_SUFFIX%%.so
-
-QT5_USES=	qt:5
-QT5_USE=	QT=qmake:build,buildtools:build,linguisttools:build,core,gui,network,widgets
-QT5_CMAKE_BOOL=	BUILD_QT_UI
-QT5_CMAKE_ON=	-DDESIRED_QT_VERSION:STRING=5
+QT5_USES=		qt:5
+QT5_USE=		QT=core,gui,network,widgets,buildtools:build,linguisttools:build,qmake:build
+QT5_CMAKE_BOOL=		BUILD_QT_UI
+QT5_CMAKE_ON=		-DDESIRED_QT_VERSION:STRING=5
 QT5_PLIST_FILES=	bin/android-file-transfer \
-		share/applications/android-file-transfer.desktop \
-		share/icons/hicolor/512x512/apps/android-file-transfer.png \
-		share/metainfo/android-file-transfer.appdata.xml
+			share/applications/android-file-transfer.desktop \
+			share/icons/hicolor/512x512/apps/android-file-transfer.png \
+			share/metainfo/android-file-transfer.appdata.xml
 
-TAGLIB_DESC=		Reading audio metadata via taglib
 TAGLIB_LIB_DEPENDS=	libtag.so:audio/taglib
 TAGLIB_CMAKE_BOOL=	BUILD_TAGLIB
 
@@ -58,9 +52,4 @@ post-patch:
 post-patch-CLI-off:
 	@${REINPLACE_CMD} '/subdirectory(cli)/d' ${WRKSRC}/CMakeLists.txt
 
-post-install-PYTHON-on:
-	${MKDIR} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}
-	${INSTALL_LIB} ${BUILD_WRKSRC}/python/aftl${PYTHON_EXT_SUFFIX}.so \
-		${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}
-
 .include <bsd.port.mk>
diff --git a/sysutils/android-file-transfer/distinfo b/sysutils/android-file-transfer/distinfo
index 050eff6461ac..3b39495a69f4 100644
--- a/sysutils/android-file-transfer/distinfo
+++ b/sysutils/android-file-transfer/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1609258228
-SHA256 (whoozle-android-file-transfer-linux-v4.2_GH0.tar.gz) = cc607d68e8a18273c9b56975a70a0e68fbdf9d5b903b2727a345a605ff48a19f
-SIZE (whoozle-android-file-transfer-linux-v4.2_GH0.tar.gz) = 823609
+TIMESTAMP = 1721159585
+SHA256 (whoozle-android-file-transfer-linux-v4.3_GH0.tar.gz) = 8ff658630fc820a7ca0b70025aa47d235b7fb64f5cb6a72ca76a7acbf3435128
+SIZE (whoozle-android-file-transfer-linux-v4.3_GH0.tar.gz) = 827232
diff --git a/sysutils/android-file-transfer/files/patch-mtp_backend_libusb_usb_Context.cpp b/sysutils/android-file-transfer/files/patch-mtp_backend_libusb_usb_Context.cpp
new file mode 100644
index 000000000000..15479c5cd002
--- /dev/null
+++ b/sysutils/android-file-transfer/files/patch-mtp_backend_libusb_usb_Context.cpp
@@ -0,0 +1,11 @@
+--- mtp/backend/libusb/usb/Context.cpp.orig	2024-07-16 19:25:15 UTC
++++ mtp/backend/libusb/usb/Context.cpp
+@@ -27,7 +27,7 @@ namespace mtp { namespace usb
+ 	Context::Context(int debugLevel)
+ 	{
+ 		USB_CALL(libusb_init(&_ctx));
+-		libusb_set_debug(_ctx, debugLevel);
++		//libusb_set_debug(_ctx, debugLevel);
+ 		libusb_device **devs;
+ 		int count = libusb_get_device_list(_ctx, &devs);
+ 		if (count < 0)