diff options
author | Gluzskiy Alexandr <sss@sss.chaoslab.ru> | 2018-08-01 09:41:48 +0300 |
---|---|---|
committer | Gluzskiy Alexandr <sss@sss.chaoslab.ru> | 2018-08-01 09:41:48 +0300 |
commit | dfde9e9f985b961f80c8e92fc24aa4fe1eb39748 (patch) | |
tree | 70f81f1f16bf3ec1bb198991dc5ad07cca16c10f | |
parent | e2319309d75e5ccec1d62d07628f99977b2f1ddc (diff) |
spectrum-scm: build fix
replaced complicated broken findjsoncpp.cmake by simple pkg-config based, with spectrum specific workaround
-rw-r--r-- | packages/net-im/spectrum/files/Findjsoncpp.cmake | 6 | ||||
-rw-r--r-- | packages/net-im/spectrum/spectrum.exlib | 13 |
2 files changed, 19 insertions, 0 deletions
diff --git a/packages/net-im/spectrum/files/Findjsoncpp.cmake b/packages/net-im/spectrum/files/Findjsoncpp.cmake new file mode 100644 index 0000000..0df562a --- /dev/null +++ b/packages/net-im/spectrum/files/Findjsoncpp.cmake @@ -0,0 +1,6 @@ +find_package(PkgConfig) + +pkg_search_module(JSONCPP REQUIRED jsoncpp) + +#hack for non-default variable name +set(JSONCPP_LIBRARY ${JSONCPP_LIBRARIES}) diff --git a/packages/net-im/spectrum/spectrum.exlib b/packages/net-im/spectrum/spectrum.exlib index bb3c572..8606612 100644 --- a/packages/net-im/spectrum/spectrum.exlib +++ b/packages/net-im/spectrum/spectrum.exlib @@ -65,6 +65,10 @@ if ! ever is_scm; then DEFAULT_SRC_PREPARE_PATCHES=( "${FILES}"/6d220b0a083b3adf7fd4ae65ca011b29488493b7.diff ) +#elif ever at_least 2.0.8; then +# DEFAULT_SRC_PREPARE_PATCHES=( +# "${FILES}"/cmake_jsoncpp.patch +# ) fi CMAKE_SRC_CONFIGURE_TESTS=( '-DENABLE_TESTS=ON -DENABLE_TESTS=OFF' ) @@ -82,3 +86,12 @@ CMAKE_SRC_CONFIGURE_OPTION_ENABLES=( CMAKE_SRC_CONFIGURE_PARAMS+=( -DENABLE_XMPP=TRUE ) +if ever at_least 2.0.8; then + export_exlib_phases src_prepare + spectrum_src_prepare() { + # replace complicated broken module by simple pkg-config search + # https://github.com/SpectrumIM/spectrum2/issues/300 + edo rm "${WORKBASE}/${PNV}"/cmake_modules/Findjsoncpp.cmake + edo cp "${FILES}"/Findjsoncpp.cmake "${WORKBASE}/${PNV}"/cmake_modules/Findjsoncpp.cmake + } +fi |