commit:     0edb37e414acc66b9155a0f4dfeb7052aee83861
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 18 10:03:28 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Apr 18 10:03:28 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0edb37e4

sys-fs/android-file-transfer-linux: sync live; fix build w/ gcc 13

Closes: https://bugs.gentoo.org/894788
Closes: https://bugs.gentoo.org/897300
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../android-file-transfer-linux-4.2.ebuild         | 15 +++++++-------
 .../android-file-transfer-linux-9999.ebuild        |  9 ++-------
 .../android-file-transfer-linux-4.2-gcc13.patch    | 23 ++++++++++++++++++++++
 3 files changed, 32 insertions(+), 15 deletions(-)

diff --git 
a/sys-fs/android-file-transfer-linux/android-file-transfer-linux-4.2.ebuild 
b/sys-fs/android-file-transfer-linux/android-file-transfer-linux-4.2.ebuild
index f4e8daa14678..33a9407c95aa 100644
--- a/sys-fs/android-file-transfer-linux/android-file-transfer-linux-4.2.ebuild
+++ b/sys-fs/android-file-transfer-linux/android-file-transfer-linux-4.2.ebuild
@@ -1,9 +1,9 @@
 # Copyright 1999-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=7
+EAPI=8
 
-PYTHON_COMPAT=( python3_{9..10} )
+PYTHON_COMPAT=( python3_{9..11} )
 
 inherit cmake python-single-r1 xdg
 
@@ -54,15 +54,14 @@ BDEPEND="
        qt5? ( dev-qt/linguist-tools:5 )
 "
 
+PATCHES=(
+       "${FILESDIR}"/${PN}-4.2-gcc13.patch
+)
+
 pkg_setup() {
        use python && python-single-r1_pkg_setup
 }
 
-# required to override src_prepare from xdg eclass
-src_prepare() {
-       cmake_src_prepare
-}
-
 src_configure() {
        local mycmakeargs=(
                -DBUILD_FUSE="$(usex fuse)"
@@ -73,7 +72,7 @@ src_configure() {
                -DBUILD_TAGLIB="$(usex taglib)"
                # Upstream recommends to keep this off as libusb is broken
                -DUSB_BACKEND_LIBUSB="OFF"
-               $(usex qt5 '-DDESIRED_QT_VERSION=5' '')
+               $(usev qt5 '-DDESIRED_QT_VERSION=5')
        )
        cmake_src_configure
 }

diff --git 
a/sys-fs/android-file-transfer-linux/android-file-transfer-linux-9999.ebuild 
b/sys-fs/android-file-transfer-linux/android-file-transfer-linux-9999.ebuild
index 1d7bc08fa5cd..6e72c38e8220 100644
--- a/sys-fs/android-file-transfer-linux/android-file-transfer-linux-9999.ebuild
+++ b/sys-fs/android-file-transfer-linux/android-file-transfer-linux-9999.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=8
 
-PYTHON_COMPAT=( python3_{9..10} )
+PYTHON_COMPAT=( python3_{9..11} )
 
 inherit cmake python-single-r1 xdg
 
@@ -58,11 +58,6 @@ pkg_setup() {
        use python && python-single-r1_pkg_setup
 }
 
-# required to override src_prepare from xdg eclass
-src_prepare() {
-       cmake_src_prepare
-}
-
 src_configure() {
        local mycmakeargs=(
                -DBUILD_FUSE="$(usex fuse)"
@@ -73,7 +68,7 @@ src_configure() {
                -DBUILD_TAGLIB="$(usex taglib)"
                # Upstream recommends to keep this off as libusb is broken
                -DUSB_BACKEND_LIBUSB="OFF"
-               $(usex qt5 '-DDESIRED_QT_VERSION=5' '')
+               $(usev qt5 '-DDESIRED_QT_VERSION=5')
        )
        cmake_src_configure
 }

diff --git 
a/sys-fs/android-file-transfer-linux/files/android-file-transfer-linux-4.2-gcc13.patch
 
b/sys-fs/android-file-transfer-linux/files/android-file-transfer-linux-4.2-gcc13.patch
new file mode 100644
index 000000000000..d1b957cd4df8
--- /dev/null
+++ 
b/sys-fs/android-file-transfer-linux/files/android-file-transfer-linux-4.2-gcc13.patch
@@ -0,0 +1,23 @@
+https://github.com/whoozle/android-file-transfer-linux/pull/330
+
+From 4e3df60538ac047d6ab2bd030d0da47e6e630a88 Mon Sep 17 00:00:00 2001
+From: Sam James <[email protected]>
+Date: Tue, 18 Apr 2023 11:00:58 +0100
+Subject: [PATCH] Fix build with GCC 13
+
+GCC 13 (as usual for new compiler releases) shuffles around some internal 
includes so some
+are no longer transitively included.
+
+See https://gnu.org/software/gcc/gcc-13/porting_to.html.
+
+Bug: https://bugs.gentoo.org/894788
+--- a/mtp/types.h
++++ b/mtp/types.h
+@@ -27,6 +27,7 @@
+ #include <memory>
+ #include <mutex>
+ #include <exception>
++#include <stdexcept>
+ #include <string>
+ 
+ namespace mtp

Reply via email to