Description: Fix build issues with modern Boost versions
Author: Anton Gladky <gladk@debian.org>
Bug-Debian: https://bugs.debian.org/1110620
Forwarded: no
Last-Update: 2026-03-21

Index: ncmpcpp/m4/boost.m4
===================================================================
--- ncmpcpp.orig/m4/boost.m4
+++ ncmpcpp/m4/boost.m4
@@ -1136,9 +1136,11 @@ BOOST_DEFUN([String_Algo],
 # documentation of BOOST_FIND_LIB above.  This library was introduced in Boost
 # 1.35.0.
 BOOST_DEFUN([System],
-[BOOST_FIND_LIB([system], [$1],
-                [boost/system/error_code.hpp],
-                [boost::system::error_code e; e.clear();])
+[BOOST_FIND_HEADER([boost/system/error_code.hpp])
+BOOST_SYSTEM_LIBS=
+BOOST_SYSTEM_LDFLAGS=
+AC_SUBST([BOOST_SYSTEM_LIBS])
+AC_SUBST([BOOST_SYSTEM_LDFLAGS])
 ])# BOOST_SYSTEM
 
 
Index: ncmpcpp/src/curses/menu.h
===================================================================
--- ncmpcpp.orig/src/curses/menu.h
+++ ncmpcpp/src/curses/menu.h
@@ -22,6 +22,7 @@
 #define NCMPCPP_MENU_H
 
 #include <boost/iterator/transform_iterator.hpp>
+#include <boost/type_traits/add_const.hpp>
 #include <boost/range/detail/any_iterator.hpp>
 #include <cassert>
 #include <functional>
Index: ncmpcpp/src/song_list.h
===================================================================
--- ncmpcpp.orig/src/song_list.h
+++ ncmpcpp/src/song_list.h
@@ -21,6 +21,7 @@
 #ifndef NCMPCPP_SONG_LIST_H
 #define NCMPCPP_SONG_LIST_H
 
+#include <boost/type_traits/add_const.hpp>
 #include <boost/range/detail/any_iterator.hpp>
 #include "curses/menu.h"
 #include "song.h"
Index: ncmpcpp/src/interfaces.h
===================================================================
--- ncmpcpp.orig/src/interfaces.h
+++ ncmpcpp/src/interfaces.h
@@ -21,6 +21,7 @@
 #ifndef NCMPCPP_INTERFACES_H
 #define NCMPCPP_INTERFACES_H
 
+#include <boost/type_traits/add_const.hpp>
 #include <boost/range/detail/any_iterator.hpp>
 #include <boost/tuple/tuple.hpp>
 #include <string>
Index: ncmpcpp/src/screens/search_engine.cpp
===================================================================
--- ncmpcpp.orig/src/screens/search_engine.cpp
+++ ncmpcpp/src/screens/search_engine.cpp
@@ -19,6 +19,7 @@
  ***************************************************************************/
 
 #include <array>
+#include <boost/type_traits/add_const.hpp>
 #include <boost/range/detail/any_iterator.hpp>
 #include <iomanip>
 
