# 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 ] require cmake [ api=2 ] LICENCES="GPL-2" SLOT="0" SUMMARY="Spectrum is an XMPP transport/gateway" HOMEPAGE="http://spectrum.im" MYOPTIONS=" doc frotz [[ description = [ Allows playing interactive-fiction games ] ]] irc [[ description = [ support IRC protocol ] ]] mysql postgres [[ description = [ support PostgreSQL backend for database ] ]] smstools [[ description = [ SMS using connected mobile phone ] ]] sqlite twitter [[ description = [ support twitter protocol ] ]] ( providers: libressl openssl ) [[ number-selected = exactly-one ]] " DEPENDENCIES+=" build: sys-devel/gettext doc? ( app-doc/doxygen ) build+run: dev-libs/jsoncpp:= dev-libs/popt dev-libs/protobuf:= dev-libs/libev dev-libs/log4cxx net-im/pidgin net-im/swiften frotz? ( dev-libs/protobuf ) irc? ( dev-libs/protobuf net-im/libcommuni ) mysql? ( virtual/mysql ) postgres? ( dev-db/libpqxx ) sqlite? ( dev-db/sqlite:3 ) providers:libressl? ( dev-libs/libressl:= ) providers:openssl? ( dev-libs/openssl ) test: dev-cpp/cppunit " if ! ever is_scm; then CMAKE_SOURCE="${WORKBASE}/spectrum2-${PV}" 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() { cmake_src_prepare # replace complicated broken module by simple pkg-config search # https://github.com/SpectrumIM/spectrum2/issues/300 if ever is_scm; then edo rm "${CMAKE_SOURCE}"/cmake_modules/FindJsonCpp.cmake edo cp "${FILES}"/Findjsoncpp.cmake "${CMAKE_SOURCE}"/cmake_modules/FindJsonCpp.cmake else edo rm "${CMAKE_SOURCE}"/cmake_modules/Findjsoncpp.cmake edo cp "${FILES}"/Findjsoncpp.cmake "${CMAKE_SOURCE}"/cmake_modules/Findjsoncpp.cmake fi } fi