From 1787aa5e000816eac4e9dfb8dd1a904fbf1d7dab Mon Sep 17 00:00:00 2001
From: Max Kellermann <max@musicpd.org>
Date: Tue, 5 May 2020 13:53:09 +0200
Subject: [PATCH] decoder/sidplay: drop support for libsidplayfp < 1.8

---
 src/decoder/plugins/SidplayDecoderPlugin.cxx | 8 --------
 src/decoder/plugins/meson.build              | 2 +-
 2 files changed, 1 insertion(+), 9 deletions(-)

diff --git a/src/decoder/plugins/SidplayDecoderPlugin.cxx b/src/decoder/plugins/SidplayDecoderPlugin.cxx
index 7fa9af10f..60de8fef3 100644
--- a/src/decoder/plugins/SidplayDecoderPlugin.cxx
+++ b/src/decoder/plugins/SidplayDecoderPlugin.cxx
@@ -60,10 +60,6 @@
 
 #include <string.h>
 
-#ifdef HAVE_SIDPLAYFP
-#define LIBSIDPLAYFP_VERSION GCC_MAKE_VERSION(LIBSIDPLAYFP_VERSION_MAJ, LIBSIDPLAYFP_VERSION_MIN, LIBSIDPLAYFP_VERSION_LEV)
-#endif
-
 #define SUBTUNE_PREFIX "tune_"
 
 static constexpr Domain sidplay_domain("sidplay");
@@ -365,11 +361,7 @@ sidplay_file_decode(DecoderClient &client, Path path_fs)
 #endif
 
 #ifdef HAVE_SIDPLAYFP
-#if LIBSIDPLAYFP_VERSION >= GCC_MAKE_VERSION(1,8,0)
 	const bool stereo = tune.getInfo()->sidChips() >= 2;
-#else
-	const bool stereo = tune.getInfo()->isStereo();
-#endif
 #else
 	const bool stereo = tune.isStereo();
 #endif
diff --git a/src/decoder/plugins/meson.build b/src/decoder/plugins/meson.build
index ee34c1bd2..016d6ee95 100644
--- a/src/decoder/plugins/meson.build
+++ b/src/decoder/plugins/meson.build
@@ -136,7 +136,7 @@ if wildmidi_dep.found()
 endif
 
 if not get_option('sidplay').disabled()
-  libsidplayfp_dep = dependency('libsidplayfp', required: false)
+  libsidplayfp_dep = dependency('libsidplayfp', version: '>= 1.8', required: false)
   conf.set('HAVE_SIDPLAYFP', libsidplayfp_dep.found())
 
   if libsidplayfp_dep.found()