From 1a53fc57e8b5cd2de571ad5f1119c90ac8082f7a Mon Sep 17 00:00:00 2001
From: Mario Limonciello <superm1@gmail.com>
Date: Tue, 15 Jun 2021 08:10:06 -0500
Subject: [PATCH 1/2] Revert "meson.build: Change python version check order"

This reverts commit 1b396215d9396680b1b6b5c14c6f57f2226ff0a9.
---
 meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meson.build b/meson.build
index 1f89e6070..0ae12a1a7 100644
--- a/meson.build
+++ b/meson.build
@@ -252,7 +252,7 @@ libm = cc.find_library('m', required: false)
 libgcab = dependency('libgcab-1.0', version : '>= 1.0', fallback : ['gcab', 'gcab_dep'])
 gcab = find_program('gcab', required : get_option('tests'))
 bashcomp = dependency('bash-completion', required: false)
-python3 = find_program('python3.8', 'python3', 'python3.9')
+python3 = find_program('python3')
 
 if get_option('gnutls')
   gnutls = dependency('gnutls', version : '>= 3.6.0')

From f4ef486da80a3b5916f8a58f10a70f30cf05f756 Mon Sep 17 00:00:00 2001
From: Mario Limonciello <superm1@gmail.com>
Date: Tue, 15 Jun 2021 08:13:17 -0500
Subject: [PATCH 2/2] trivial: fix a regression in Gentoo detecting python
 versions

---
 meson.build | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/meson.build b/meson.build
index 0ae12a1a7..6e09ac69b 100644
--- a/meson.build
+++ b/meson.build
@@ -252,7 +252,11 @@ libm = cc.find_library('m', required: false)
 libgcab = dependency('libgcab-1.0', version : '>= 1.0', fallback : ['gcab', 'gcab_dep'])
 gcab = find_program('gcab', required : get_option('tests'))
 bashcomp = dependency('bash-completion', required: false)
-python3 = find_program('python3')
+if host_machine.system() != 'freebsd'
+  python3 = find_program('python3')
+else
+  python3 = find_program('python3.8', 'python3', 'python3.9')
+endif
 
 if get_option('gnutls')
   gnutls = dependency('gnutls', version : '>= 3.6.0')
