diff options
Diffstat (limited to 'net-im/psi/psi-9999.ebuild')
-rw-r--r-- | net-im/psi/psi-9999.ebuild | 222 |
1 files changed, 97 insertions, 125 deletions
diff --git a/net-im/psi/psi-9999.ebuild b/net-im/psi/psi-9999.ebuild index 11222802e666..d08ddf5a62cb 100644 --- a/net-im/psi/psi-9999.ebuild +++ b/net-im/psi/psi-9999.ebuild @@ -1,81 +1,81 @@ # Copyright 1999-2017 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -EAPI="4" +EAPI=6 -LANGS="be bg ca cs de en eo es et fi fr hu it ja mk nl pl pt pt_BR ru sk sl sr@latin sv sw uk ur_PK vi zh_CN zh_TW" +PLOCALES="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" +PLOCALE_BACKUP="en" -EGIT_REPO_URI="https://github.com/psi-im/${PN}.git" -EGIT_HAS_SUBMODULES=1 -LANGS_REPO_URI="https://github.com/psi-plus/psi-plus-l10n.git" +inherit l10n git-r3 qmake-utils -PSI_PLUS_URI="https://github.com/psi-plus/main.git" -PSI_PLUS_RESOURCES_URI="https://github.com/psi-plus/resources.git" - -inherit eutils gnome2-utils qt4-r2 multilib git-2 subversion - -DESCRIPTION="Qt4 Jabber client, with Licq-like interface" +DESCRIPTION="Qt XMPP client" HOMEPAGE="http://psi-im.org/" + +PSI_URI="https://github.com/psi-im" +PSI_PLUS_URI="https://github.com/psi-plus" +EGIT_REPO_URI="${PSI_URI}/${PN}.git" +PSI_LANGS_URI="${PSI_URI}/psi-l10n.git" +PSI_PLUS_LANGS_URI="${PSI_PLUS_URI}/psi-plus-l10n.git" +EGIT_MIN_CLONE_TYPE="single" LICENSE="GPL-2" SLOT="0" KEYWORDS="" -IUSE="crypt dbus debug doc enchant extras jingle iconsets spell ssl xscreensaver powersave -plugins whiteboarding" +IUSE="aspell crypt dbus debug doc enchant extras +hunspell iconsets sql ssl xscreensaver +whiteboarding webengine webkit" + +# qconf generates not quite compatible configure scripts +QA_CONFIGURE_OPTIONS=".*" REQUIRED_USE=" + ?? ( aspell enchant hunspell ) iconsets? ( extras ) - plugins? ( extras ) - powersave? ( extras ) + sql? ( extras ) + webengine? ( !webkit ) " RDEPEND=" - app-arch/unzip - >=app-crypt/qca-2.0.2:2[qt4(+)] - dev-qt/qtcore:4 - dev-qt/qtgui:4 - >=sys-libs/zlib-1.2.5.1-r2[minizip] - x11-libs/libX11 - dbus? ( dev-qt/qtdbus:4 ) - spell? ( - enchant? ( >=app-text/enchant-1.3.0 ) - !enchant? ( app-text/aspell ) + app-crypt/qca:2[qt5] + dev-qt/qtgui:5 + dev-qt/qtxml:5 + dev-qt/qtconcurrent:5 + dev-qt/qtmultimedia:5 + dev-qt/qtx11extras:5 + net-dns/libidn + sys-libs/zlib[minizip] + aspell? ( app-text/aspell ) + dbus? ( dev-qt/qtdbus:5 ) + enchant? ( >=app-text/enchant-1.3.0 ) + extras? ( + sql? ( dev-qt/qtsql:5 ) ) - whiteboarding? ( dev-qt/qtsvg:4 ) + hunspell? ( app-text/hunspell:= ) + webengine? ( >=dev-qt/qtwebengine-5.7:5[widgets] ) + webkit? ( dev-qt/qtwebkit:5 ) + whiteboarding? ( dev-qt/qtsvg:5 ) xscreensaver? ( x11-libs/libXScrnSaver ) " DEPEND="${RDEPEND} + dev-qt/linguist-tools + virtual/pkgconfig + doc? ( app-doc/doxygen ) extras? ( - ${SUBVERSION_DEPEND} - sys-devel/qconf[qt4(+)] + >=sys-devel/qconf-2.3 ) - doc? ( app-doc/doxygen ) - virtual/pkgconfig " PDEPEND=" - crypt? ( app-crypt/qca:2[gpg] ) - jingle? ( - net-im/psimedia - app-crypt/qca:2[ssl] - ) + crypt? ( app-crypt/qca[gpg] ) ssl? ( app-crypt/qca:2[ssl] ) " -RESTRICT="test" +RESTRICT="test iconsets? ( bindist )" pkg_setup() { MY_PN=psi if use extras; then MY_PN=psi-plus echo - ewarn "You're about to build heavily patched version of Psi called Psi+." - ewarn "It has really nice features but still is under heavy development." - ewarn "Take a look at homepage for more info: https://code.google.com/p/psi-dev" - ewarn "If you wish to disable some patches just put" - ewarn "MY_EPATCH_EXCLUDE=\"list of patches\"" - ewarn "into /etc/portage/env/${CATEGORY}/${PN} file." - echo - ewarn "Note: some patches depend on other. So if you disabled some patch" - ewarn "and other started to fail to apply, you'll have to disable patches" - ewarn "that fail too." + ewarn "You're about to build patched version of Psi called Psi+." + ewarn "It has new nice features not yet included to Psi." + ewarn "Take a look at homepage for more info: http://psi-plus.com/" echo if use iconsets; then @@ -88,124 +88,96 @@ pkg_setup() { } src_unpack() { - git-2_src_unpack - unset EGIT_HAS_SUBMODULES EGIT_NONBARE + git-r3_src_unpack # fetch translations - mkdir "${WORKDIR}/psi-l10n" - unset EGIT_MASTER EGIT_BRANCH EGIT_COMMIT - EGIT_REPO_URI="${LANGS_REPO_URI}" \ - EGIT_SOURCEDIR="${WORKDIR}/psi-l10n" git-2_src_unpack + unset EGIT_BRANCH EGIT_COMMIT + EGIT_REPO_URI=$(usex extras "${PSI_PLUS_LANGS_URI}" "${PSI_LANGS_URI}") + EGIT_CHECKOUT_DIR="${WORKDIR}/psi-l10n" + git-r3_src_unpack if use extras; then - EGIT_DIR="${EGIT_STORE_DIR}/psi-plus/main" \ - EGIT_SOURCEDIR="${WORKDIR}/psi-plus" \ - EGIT_REPO_URI="${PSI_PLUS_URI}" git-2_src_unpack + unset EGIT_BRANCH EGIT_COMMIT + EGIT_CHECKOUT_DIR="${WORKDIR}/psi-plus" \ + EGIT_REPO_URI="${PSI_PLUS_URI}/main.git" \ + git-r3_src_unpack + if use iconsets; then - EGIT_DIR="${EGIT_STORE_DIR}/psi-plus/resources" \ - EGIT_SOURCEDIR="${WORKDIR}/resources" \ - EGIT_REPO_URI="${PSI_PLUS_RESOURCES_URI}" git-2_src_unpack + unset EGIT_BRANCH EGIT_COMMIT + EGIT_CHECKOUT_DIR="${WORKDIR}/resources" \ + EGIT_REPO_URI="${PSI_PLUS_URI}/resources.git" \ + git-r3_src_unpack fi fi } src_prepare() { + default if use extras; then cp -a "${WORKDIR}/psi-plus/iconsets" "${S}" || die "failed to copy iconsets" - use iconsets && { cp -a "${WORKDIR}/resources/iconsets" "${S}" || \ - die "failed to copy additional iconsets"; } - EPATCH_EXCLUDE="${MY_EPATCH_EXCLUDE} " \ - EPATCH_SOURCE="${WORKDIR}/psi-plus/patches/" EPATCH_SUFFIX="diff" EPATCH_FORCE="yes" epatch + if use iconsets; then + cp -a "${WORKDIR}/resources/iconsets" "${S}" || die "failed to copy additional iconsets" + fi - use powersave && epatch "${WORKDIR}/psi-plus/patches/dev/psi-reduce-power-consumption.patch" + eapply "${WORKDIR}/psi-plus/patches"/*.diff + use sql && eapply "${PATCHES_DIR}/dev/psi-new-history.patch" - sed -e "s/.xxx/.$(cd "${WORKDIR}/psi-plus"; echo $((`git describe --tags | \ - cut -d - -f 2`+5000)))/" -i src/applicationinfo.cpp || die "sed failed" + vergen="${WORKDIR}/psi-plus/admin/psi-plus-nightly-version" + features="$(use webkit && echo '--webkit') $(use webengine && echo '--webengine') $(use sql && echo '--sql')" + NIGHTLY_VER=$("${vergen}" ./ $features) + elog "Prepared version: ${NIGHTLY_VER}" + echo "${NIGHTLY_VER}" > version || die "Failed to write version file" qconf || die "Failed to create ./configure." fi } src_configure() { - # unable to use econf because of non-standard configure script - # disable growl as it is a MacOS X extension only - local myconf=" - --prefix="${EPREFIX}"/usr - --qtdir="${EPREFIX}"/usr - --disable-growl + CONF=( --no-separate-debug-info - " - use dbus || myconf+=" --disable-qdbus" - use debug && myconf+=" --debug" - if use spell; then - use enchant && myconf+=" --disable-aspell" || myconf+=" --disable-enchant" - else - myconf+=" --disable-aspell --disable-enchant" - fi - use whiteboarding && myconf+=" --enable-whiteboarding" - use xscreensaver || myconf+=" --disable-xss" - if use extras; then - use plugins && myconf+=" --enable-plugins" - fi + --qtdir="$(qt5_get_bindir)/.." + $(use_enable aspell) + $(use_enable dbus qdbus) + $(use_enable enchant) + $(use_enable hunspell) + $(use_enable xscreensaver xss) + $(use_enable whiteboarding) + ) + + use debug && CONF+=("--debug") + use webengine && CONF+=("--enable-webkit" "--with-webkit=qtwebengine") + use webkit && CONF+=("--enable-webkit" "--with-webkit=qwebkit") - einfo "./configure ${myconf}" - ./configure ${myconf} || die + econf "${CONF[@]}" - eqmake4 + eqmake5 psi.pro } src_compile() { emake - - if use doc; then - cd doc - mkdir -p api # 259632 - make api_public || die "make api_public failed" - fi + use doc && emake -C doc api_public } src_install() { emake INSTALL_ROOT="${D}" install # this way the docs will be installed in the standard gentoo dir - rm -f "${ED}"/usr/share/${MY_PN}/{COPYING,README} + rm "${ED}"/usr/share/${MY_PN}/{COPYING,README} || die "Installed file set seems to be changed by upstream" newdoc iconsets/roster/README README.roster newdoc iconsets/system/README README.system newdoc certs/README README.certs dodoc README - if use extras && use plugins; then - insinto /usr/share/${MY_PN}/plugins - doins src/plugins/plugins.pri - doins src/plugins/psiplugin.pri - doins -r src/plugins/include - sed -i -e "s:target.path.*:target.path = /usr/$(get_libdir)/${MY_PN}/plugins:" \ - "${ED}"/usr/share/${MY_PN}/plugins/psiplugin.pri \ - || die "sed failed" - fi - - use doc && dohtml -r doc/api + local HTML_DOCS=( doc/api ) + einstalldocs # install translations - cd "${WORKDIR}/psi-l10n/translations" + local mylrelease="$(qt5_get_bindir)"/lrelease + cd "${WORKDIR}/psi-l10n" || die insinto /usr/share/${MY_PN} - for x in ${LANGS}; do - if use linguas_${x}; then - lrelease "${PN}_${x}.ts" || die "lrelease ${x} failed" - doins "${PN}_${x}.qm" - fi - done -} - -pkg_preinst() { - gnome2_icon_savelist -} - -pkg_postinst() { - readme.gentoo_pkg_postinst - gnome2_icon_cache_update -} - -pkg_postrm() { - gnome2_icon_cache_update + install_locale() { + "${mylrelease}" "translations/${PN}_${1}.ts" || die "lrelease ${1} failed" + doins "translations/${PN}_${1}.qm" + } + l10n_for_each_locale_do install_locale } |