# Distributed under the terms of the GNU General Public License v2 # Copyright 2018 Gluzskiy Alexandr if ! ever at_least 2.0.7; then SCM_EXTERNAL_REFS=" msvc-deps/curl:curl " SCM_SECONDARY_REPOSITORIES="curl" SCM_curl_REPOSITORY="https://github.com/curl/curl.git" fi require github [ user=hanzz project=libtransport force_git_clone=true ] require cmake [ api=2 ] LICENCES="GPL-2" SLOT="0" SUMMARY="Spectrum is an XMPP transport/gateway" HOMEPAGE="http://spectrum.im" MYOPTIONS=" doc frotz irc mysql postgres purple smstools sqlite twitter ( providers: libressl openssl ) [[ number-selected = exactly-one ]] " DEPENDENCIES+=" build: sys-devel/gettext build+run: dev-libs/jsoncpp dev-libs/popt dev-libs/libev dev-libs/log4cxx net-im/swiften doc? ( app-doc/doxygen ) frotz? ( dev-libs/protobuf ) irc? ( dev-libs/protobuf net-im/libcommuni ) mysql? ( virtual/mysql ) postgres? ( dev-db/libpqxx ) purple? ( dev-libs/protobuf net-im/pidgin ) sqlite? ( dev-db/sqlite:3 ) providers:libressl? ( dev-libs/libressl:= ) providers:openssl? ( dev-libs/openssl ) test: dev-cpp/cppunit " 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' ) CMAKE_SRC_CONFIGURE_OPTION_ENABLES=( 'doc DOCS' FROTZ IRC MYSQL 'postgres PQXX' 'smstools SMSTOOLS3' 'sqlite SQLITE3' TWITTER ) 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