view net-im/psi-plus/psi-plus-1.4.574.ebuild @ 555:bfa37ca24eec

Fixes für nicht mehr existierende eclasses
author Dirk Olmes <dirk.olmes@codedo.de>
date Sun, 12 Sep 2021 11:52:04 +0200
parents 452cbe2f0c48
children
line wrap: on
line source


EAPI=5

inherit eutils multilib gnome2-utils

DESCRIPTION="Qt5 Jabber client, with Licq-like interface"
HOMEPAGE="https://github.com/psi-plus/psi-plus-snapshots/"
SRC_URI="https://github.com/psi-plus/psi-plus-snapshots/archive/${PV}.tar.gz -> ${P}.tar.gz"

S="${WORKDIR}/psi-plus-snapshots-${PV}"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="autoreplyplugin crypt dbus debug doc jingle otrplugin spell ssl xscreensaver watcherplugin whiteboarding"
#RESTRICT="test"

RDEPEND="app-arch/unzip
	dev-qt/qtgui:5
	>=app-crypt/qca-2.1.3:2[qt5(+)]
	x11-libs/libX11
	dbus? ( dev-qt/qtdbus:5 )
	spell? ( >=app-text/enchant-1.3.0 )
	xscreensaver? ( x11-libs/libXScrnSaver )
	whiteboarding? ( dev-qt/qtsvg:5 )
	|| ( >=sys-libs/zlib-1.2.5.1-r2[minizip] <sys-libs/zlib-1.2.5.1-r1 )"

DEPEND="${RDEPEND}
	sys-devel/qconf
	doc? ( app-doc/doxygen )"

PDEPEND="crypt? ( app-crypt/qca:2[gpg] )
	jingle? ( net-im/psimedia
	app-crypt/qca:2[ssl] )
	ssl? ( app-crypt/qca:2[ssl] )
	otrplugin? ( net-libs/libotr app-text/htmltidy )"

src_prepare() {
	epatch_user
}

src_configure() {
	# unable to use econf because of non-standard configure script
	local confcmd="./configure
		--qtselect=5
		--prefix=/usr
		--datadir=/usr/share
		--libdir=/usr/lib64
		--disable-growl
		--with-qca-inc=/usr/include/QtCrypto
		--with-qca-lib=/usr/lib64
		$(use dbus || echo '--disable-qdbus')
		$(use debug && echo '--debug')
		$(use spell || echo '--disable-aspell')
		$(use spell || echo '--disable-enchant')
		$(use xscreensaver || echo '--disable-xss')
		$(use whiteboarding && echo '--enable-whiteboarding')"

	echo ${confcmd}
	${confcmd} || die "configure failed"
	## Makefile is not always created...
	#[[ ! -f Makefile ]] && die "configure failed"
}

src_compile() {
	emake || die "emake failed"
	
	if use autoreplyplugin; then
		cd src/plugins/generic/autoreplyplugin
		qmake
		make
		cd ../../../..
	fi

	if use otrplugin; then
		cd src/plugins/generic/otrplugin
		qmake
		make
		cd ../../../..
	fi
	
	if use watcherplugin; then
		cd src/plugins/generic/watcherplugin
		qmake
		make
		cd ../../../..
	fi
}

src_install() {
	emake DESTDIR="${D}" INSTALL_ROOT="${D}" install
	dodoc README TODO
	
	local plugindir="/usr/share/psi-plus/plugins"
	if use autoreplyplugin; then
		cd src/plugins/generic/autoreplyplugin

		strip --strip-unneeded libautoreplyplugin.so

		dodir "${plugindir}"
		insinto "${plugindir}"
		doins libautoreplyplugin.so

		cd ../../../..
	fi

	if use otrplugin; then
		cd src/plugins/generic/otrplugin

		strip --strip-unneeded libotrplugin.so

		dodir "${plugindir}"
		insinto "${plugindir}"
		doins libotrplugin.so

		cd ../../../..
	fi

	if use watcherplugin; then
		cd src/plugins/generic/watcherplugin

		strip --strip-unneeded libwatcherplugin.so

		dodir "${plugindir}"
		insinto "${plugindir}"
		doins libwatcherplugin.so

		cd ../../../..
	fi
}

pkg_preinst() {
	gnome2_icon_savelist
}

pkg_postinst() {
	gnome2_icon_cache_update
}

pkg_postrm() {
	gnome2_icon_cache_update
}