Updated Android File Transfer to version 4.2 (#6989)

* Updated Android File Transfer to version 4.2

* Bumped to latest git version (renamed as 4.3), some fixes in the recipe/patchset

* Added OpenSSL requirement to build with MTPZ support.
* Dropped libusb requirement and changed cmake option accordingly since now we're using Haiku's native backend
* Fixed a CMakeLists.txt that was using an unset variable when Readline was not detected (should that go upstream?)
This commit is contained in:
Javier Steinaker
2022-12-13 16:52:41 +10:00
committed by GitHub
parent 045245391e
commit aae3cd421b
3 changed files with 36 additions and 29 deletions

View File

@@ -9,10 +9,11 @@ HOMEPAGE="https://whoozle.github.io/android-file-transfer-linux/"
COPYRIGHT="2015-2019 Vladimir Menshakov"
LICENSE="GNU LGPL v2.1"
REVISION="1"
SOURCE_URI="https://github.com/whoozle/android-file-transfer-linux/archive/v$portVersion.tar.gz"
CHECKSUM_SHA256="26aa21683ae34aceaf83747fec693a15b996017a857014931ef3c5b50115971a"
SOURCE_DIR="android-file-transfer-linux-$portVersion"
PATCHES="android_file_transfer-$portVersion.patchset"
srcGitRev="a64c8bec89c2795b09d1ba868c179d4d22e562ec"
SOURCE_URI="https://github.com/whoozle/android-file-transfer-linux/archive/$srcGitRev.tar.gz"
CHECKSUM_SHA256="056bef1821701f863791b85f9e8c92f71bc6b2fe41829b68c61f7632b3f4c1b8"
SOURCE_DIR="android-file-transfer-linux-$srcGitRev"
PATCHES="android_file_transfer-4.3.patchset"
ADDITIONAL_FILES="android-file-transfer.rdef.in"
ARCHITECTURES="all !x86_gcc2"
@@ -24,18 +25,18 @@ PROVIDES="
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libcrypto$secondaryArchSuffix
lib:libQt5Core$secondaryArchSuffix
lib:libQt5Gui$secondaryArchSuffix
lib:libQt5Widgets$secondaryArchSuffix
lib:libusb_1.0$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libcrypto$secondaryArchSuffix
devel:libQt5Core$secondaryArchSuffix
devel:libQt5Gui$secondaryArchSuffix
devel:libQt5Widgets$secondaryArchSuffix
devel:libusb_1.0$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cmake
@@ -53,7 +54,7 @@ BUILD()
cmake .. \
-DBUILD_FUSE=OFF \
-DBUILD_QT_UI=ON \
-DUSB_BACKEND_LIBUSB=ON
-DCMAKE_BUILD_TYPE=Release
make $jobArgs
}

View File

@@ -1,22 +0,0 @@
From e492c7b7aa7217b747660d6bafd98112081cfc9d Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Sat, 17 Aug 2019 00:52:54 +1000
Subject: Fix build for Haiku
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c6627da..3cf966b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -53,7 +53,7 @@ if (USB_BACKEND_LIBUSB)
message(WARNING "WARNING! You're using libusb, this is known to be broken -- large memory consumption, violating kernel memory limits and bugs. Continue at your own risk")
endif()
-add_definitions(-Wall -pthread)
+add_definitions(-Wall)
if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
--
2.21.0

View File

@@ -0,0 +1,28 @@
From ea6462037c6bfa69496b3a35173a6d09e8347e7a Mon Sep 17 00:00:00 2001
From: Javier Steinaker <jsteinaker@gmail.com>
Date: Sat, 3 Sep 2022 09:12:54 +1000
Subject: Fix build: readline env variables should only be used when readline
is detected
diff --git a/cli/CMakeLists.txt b/cli/CMakeLists.txt
index b82248c..dd75599 100644
--- a/cli/CMakeLists.txt
+++ b/cli/CMakeLists.txt
@@ -49,7 +49,12 @@ else()
endif()
add_executable(aft-mtp-cli ${CLI_SOURCES})
-target_include_directories(aft-mtp-cli SYSTEM PRIVATE ${Readline_INCLUDE_DIR})
+if (READLINE_FOUND)
+ target_include_directories(aft-mtp-cli SYSTEM PRIVATE ${Readline_INCLUDE_DIR})
+else()
+ target_include_directories(aft-mtp-cli SYSTEM PRIVATE)
+endif()
+
target_link_libraries(aft-mtp-cli ${MTP_LIBRARIES} ${CLI_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
install(TARGETS aft-mtp-cli RUNTIME DESTINATION bin)
--
2.36.1