# Distributed under the terms of the GNU General Public License v2 # Copyright 1999-2018 Gentoo Foundation # Copyright 2018-2020 Gluzskiy Alexandr SCM_REPOSITORY="https://github.com/psi-im/psi.git" SCM_EXTERNAL_REFS=" src/libpsi:libpsi iris:iris 3rdparty/qhttp:qhttp 3rdparty/http-parser:httpparser 3rdparty/qite:qite " SCM_SECONDARY_REPOSITORIES=" iris libpsi qhttp httpparser psiplus resources psiplusl10n qite " SCM_iris_REPOSITORY="https://github.com/psi-im/iris.git" SCM_libpsi_REPOSITORY="https://github.com/psi-im/libpsi.git" SCM_qhttp_REPOSITORY="https://github.com/psi-im/qhttp.git" SCM_httpparser_REPOSITORY="https://github.com/nodejs/http-parser.git" SCM_qite_REPOSITORY="https://github.com/Ri0n/qite.git" SCM_psiplus_REPOSITORY="https://github.com/psi-plus/main.git" SCM_resources_REPOSITORY="https://github.com/psi-plus/resources.git" SCM_psiplusl10n_REPOSITORY="https://github.com/psi-plus/psi-plus-l10n.git" require scm-git require cmake [ api=2 ] DOWNLOADS="" SLOT="0" PLATFORMS="~amd64 ~x86" SUMMARY="Qt XMPP client" HOMEPAGE="http://psi-im.org/" LICENCES="GPL-2" LANGS="be bg ca cs de en eo es et fa fi fr he hu it ja kk mk nl pl pt pt_BR ru sk sl sr@latin sv sw uk ur_PK vi zh_CN zh_TW" MYOPTIONS=" debug doc sql [[ description = [ support sql backend for data storage ] ]] whiteboarding [[ description = [ Build whiteboarding plugin ] ]] xscreensaver [[ description = [ support xscrinsaver (preventing) ] ]] linguas: ( ${LANGS} ) ( providers: hunspell [[ description = [ spell checking support ] ]] enchant [[ description = [ spell checking support ] ]] ) [[ number-selected = at-most-one ]] ( providers: webengine [[ description = [ support html/js rendering via qtwebengine ] ]] webkit [[ description = [ support html/js rendering via qtwebkit (deprecated) ] ]] ) [[ number-selected = at-most-one ]] " DEPENDENCIES=" build+run: net-dns/libidn sys-libs/zlib x11-libs/qtbase:5[gui][sql][sqlite] x11-libs/qtmultimedia:5 x11-libs/qtx11extras:5 x11-libs/libX11 x11-libs/libxcb whiteboarding? ( x11-libs/qtsvg:5 ) xscreensaver? ( x11-libs/libXScrnSaver ) providers:enchant? ( app-spell/enchant ) providers:hunspell? ( app-spell/hunspell ) providers:webengine? ( x11-libs/qtwebengine:5 x11-libs/qtwebchannel:5 net-libs/http-parser ) providers:webkit? ( x11-libs/qtwebkit:5 ) build: doc? ( app-doc/doxygen ) suggestion: x11-libs/qtimageformats [[ description = [ for webp image format support ] ]] " #TODO: fix problem, disabled for now # 'extras BUILD_PSIMEDIA' CMAKE_SRC_CONFIGURE_OPTIONS=( 'providers:webkit IS_WEBKIT' 'providers:webengine IS_WEBENGINE' ) CMAKE_SRC_CONFIGURE_OPTION_USES=( 'providers:enchant ENCHANT' 'providers:hunspell HUNSPELL' ) CMAKE_SRC_CONFIGURE_PARAMS+=( -DBUNDLED_IRIS=ON -DBUNDLED_QCA=ON -DBUNDLED_USRSCTP=ON -DUSE_CCACHE=OFF -DBUILD_PSIMEDIA=OFF -DCHAT_TYPE=BASIC -DPSI_PLUS=ON -DINSTALL_PLUGINS_SDK=1 ) pkg_setup() { MY_PN=psi-plus } src_prepare() { cd "${WORKBASE}/${PNV}" edo mv ../psiplus psi-plus edo mv ../psiplusl10n psi-l10n edo mv ../resources resources vergen="${WORKBASE}/${PNV}/psi-plus/admin/psi-plus-nightly-version" local features=() option providers:webkit && features+="--webkit" option providers:webengine && features+="--webengine" option sql && features+="--sql" features="$(option providers:webkit && echo '--webkit') $(option providers:webengine && echo '--webengine') $(option sql && echo '--sql')" NIGHTLY_VER=$("${vergen}" ./ $features) elog "Prepared version: ${NIGHTLY_VER}" echo "${NIGHTLY_VER}" > version || die "Failed to write version file" edo sed -e "s/pkg-config/$(exhost --target)-pkg-config/g" -i "${WORKBASE}/${PNV}"/configure edo sed -e "s/pkg-config/$(exhost --target)-pkg-config/g" -i "${WORKBASE}/${PNV}"/iris/configure cd "${WORK}" default } src_install() { cmake_src_install # rm "${ED}"/usr/share/${MY_PN}/{COPYING,README.html} || die "Installed file set seems to be changed by upstream" # newdoc certs/README README.certs # dodoc README.html option doc && HTML_DOCS=( doc/api/. ) emagicdocs mylrelease=lrelease-qt5 cd "${WORKBASE}/${PNV}"/psi-l10n insinto /usr/$(exhost --target)/share/${MY_PN} for lang in ${LANGS}; do if option "linguas:${lang}"; then edo "${mylrelease}" "translations/${PN}_${lang}.ts" doins "translations/${PN}_${lang}.qm" fi done }