File libime-1.1.11-boost166.patch of Package libime

Index: libime-1.1.11/CMakeLists.txt
===================================================================
--- libime-1.1.11.orig/CMakeLists.txt
+++ libime-1.1.11/CMakeLists.txt
@@ -41,7 +41,20 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CM
 
 include("${FCITX_INSTALL_CMAKECONFIG_DIR}/Fcitx5Utils/Fcitx5CompilerSettings.cmake")
 
-find_package(Boost 1.61 CONFIG REQUIRED COMPONENTS iostreams)
+#find_package(Boost 1.61 CONFIG REQUIRED COMPONENTS iostreams)
+find_path(Boost_INCLUDE_DIR NAMES boost/iostreams/stream.hpp HINTS ${CMAKE_INSTALL_PREFIX}/include)
+find_library(Boost_LIBRARY NAMES libboost_iostreams.so HINTS ${CMAKE_INSTALL_PREFIX}/lib64 ${CMAKE_INSTALL_PREFIX}/lib)
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(Boost DEFAULT_MSG Boost_INCLUDE_DIR Boost_LIBRARY)
+if(Boost_FOUND)
+  set(Boost_INCLUDE_DIRS ${CMAKE_INSTALL_PREFIX}/include)
+  set(Boost_LIBRARIES ${Boost_LIBRARY})
+endif()
+if(Boost_FOUND AND NOT TARGET Boost::boost)
+  add_library(Boost::boost SHARED IMPORTED)
+  set_target_properties(Boost::boost PROPERTIES IMPORTED_LOCATION "${Boost_LIBRARY}" INTERFACE_INCLUDE_DIRECTORIES "${Boost_INCLUDE_DIRS}")
+  add_library(Boost::iostreams ALIAS Boost::boost)
+endif()
 
 set(LIBIME_INSTALL_PKGDATADIR "${CMAKE_INSTALL_FULL_DATADIR}/libime")
 set(LIBIME_INSTALL_LIBDATADIR "${CMAKE_INSTALL_FULL_LIBDIR}/libime")
Index: libime-1.1.11/src/libime/core/decoder.cpp
===================================================================
--- libime-1.1.11.orig/src/libime/core/decoder.cpp
+++ libime-1.1.11/src/libime/core/decoder.cpp
@@ -12,7 +12,6 @@
 #include "utils.h"
 #include "utils_p.h"
 #include <algorithm>
-#include <boost/container_hash/hash.hpp>
 #include <boost/functional/hash.hpp>
 #include <boost/ptr_container/ptr_vector.hpp>
 #include <cassert>
Index: libime-1.1.11/src/libime/core/lrucache.h
===================================================================
--- libime-1.1.11.orig/src/libime/core/lrucache.h
+++ libime-1.1.11/src/libime/core/lrucache.h
@@ -6,7 +6,6 @@
 #ifndef _FCITX_LIBIME_CORE_LRU_H_
 #define _FCITX_LIBIME_CORE_LRU_H_
 
-#include <boost/container_hash/hash.hpp>
 #include <boost/unordered_map.hpp>
 #include <cstddef>
 #include <list>
Index: libime-1.1.11/src/libime/pinyin/pinyindata.h
===================================================================
--- libime-1.1.11.orig/src/libime/pinyin/pinyindata.h
+++ libime-1.1.11/src/libime/pinyin/pinyindata.h
@@ -6,7 +6,6 @@
 #ifndef _FCITX_LIBIME_PINYIN_PINYINDATA_H_
 #define _FCITX_LIBIME_PINYIN_PINYINDATA_H_
 
-#include <boost/container_hash/hash.hpp>
 #include <boost/multi_index/hashed_index.hpp>
 #include <boost/multi_index/indexed_by.hpp>
 #include <boost/multi_index/mem_fun.hpp>
Index: libime-1.1.11/src/libime/pinyin/pinyindictionary.cpp
===================================================================
--- libime-1.1.11.orig/src/libime/pinyin/pinyindictionary.cpp
+++ libime-1.1.11/src/libime/pinyin/pinyindictionary.cpp
@@ -21,7 +21,6 @@
 #include "pinyinencoder.h"
 #include "pinyinmatchstate_p.h"
 #include <algorithm>
-#include <boost/container_hash/hash.hpp>
 #include <cassert>
 #include <cmath>
 #include <cstddef>
Index: libime-1.1.11/src/libime/pinyin/pinyinmatchstate_p.h
===================================================================
--- libime-1.1.11.orig/src/libime/pinyin/pinyinmatchstate_p.h
+++ libime-1.1.11/src/libime/pinyin/pinyinmatchstate_p.h
@@ -8,7 +8,6 @@
 
 #include "libime/core/languagemodel.h"
 #include "libime/core/segmentgraph.h"
-#include <boost/container_hash/hash.hpp>
 #include <cstddef>
 #include <cstdint>
 #include <fcitx-utils/macros.h>
openSUSE Build Service is sponsored by