--- /usr/portage/net-im/licq/licq-1.3.5-r1.ebuild 2008-07-05 19:06:41.000000000 +0200 +++ licq-1.3.6.ebuild 2008-10-11 22:07:21.000000000 +0200 @@ -2,6 +2,7 @@ # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/net-im/licq/licq-1.3.5-r1.ebuild,v 1.6 2008/07/05 16:48:39 armin76 Exp $ +EAPI="1" WANT_AUTOMAKE=1.9 inherit autotools eutils kde-functions multilib @@ -12,49 +13,38 @@ LICENSE="GPL-2" SLOT="2" -KEYWORDS="alpha amd64 ia64 ppc sparc x86 ~x86-fbsd" -IUSE="ssl socks5 qt3 kde ncurses crypt msn debug" +KEYWORDS="~amd64 ~x86" +IUSE="crypt debug kde msn ncurses nls pic qt3 qt4 socks5 ssl" -# we can't have conditional dependencies so "use kde && inherit kde" -# won't work -- messes up dep caching. - -# need-kde and their eclass friends inject things into DEPEND. But we only -# want them enabled if the kde USE flag is set. We get around this in the -# following dep lines: -RDEPEND="kde? ( >=kde-base/kdelibs-3.0 )" -DEPEND="kde? ( >=kde-base/kdelibs-3.0 ) - ssl? ( >=dev-libs/openssl-0.9.6 ) - qt3? ( =x11-libs/qt-3* ) - ncurses? ( sys-libs/ncurses >=dev-libs/cdk-4.9.11.20031210-r1 ) - crypt? ( >=app-crypt/gpgme-1.0.0 )" +# we use kde as KDE4 +RDEPEND="kde? ( kde-base/kdelibs:4.1 ) + ssl? ( dev-libs/openssl ) + qt3? ( x11-libs/qt:3 ) + qt4? ( || ( x11-libs/qt-gui:4 x11-libs/qt:4 ) ) + nls? ( sys-devel/gettext ) + ncurses? ( sys-libs/ncurses =dev-libs/cdk-5* ) + crypt? ( app-crypt/gpgme:1 )" +DEPEND="${RDEPEND}" src_unpack() { unpack ${A} - cd "${S}" - - epatch "${FILESDIR}"/${P}-logonfix.patch - epatch "${FILESDIR}"/${P}-prevent-dos.patch - epatch "${FILESDIR}"/${P}-gcc43.patch + cd "${S}" - use ncurses && epatch "${FILESDIR}"/1.3.0-suse_bool.patch - - if use kde - then + if use kde; then # fix for #12436 ebegin "Setting kde plugin as default" - cp "${S}"/src/licq.conf.h "${T}" - sed "s:Plugin1 = qt-gui:Plugin1 = kde-gui:" \ - "${T}"/licq.conf.h > "${S}"/src/licq.conf.h + cp "${S}"/src/licq.conf.h "${T}" + sed "s:Plugin1 = qt4-gui:Plugin1 = kde-gui:" \ + "${T}"/licq.conf.h > "${S}"/src/licq.conf.h eend $? - else - if ! use qt3 - then + else + if ! use qt3; then ebegin "Setting console plugin as default..." - cp "${S}"/src/licq.conf.h "${T}" + cp "${S}"/src/licq.conf.h "${T}" sed "s:Plugin1 = qt-gui:Plugin1 = console:" \ "${T}"/licq.conf.h > "${S}"/src/licq.conf.h - eend $? - fi + eend $? + fi fi # Install plugins in the correct libdir @@ -88,40 +78,19 @@ use ssl || myconf="${myconf} --disable-openssl" use socks5 && myconf="${myconf} --enable-socks5" use debug && myconf="${myconf} --enable-debug" - - myconf="${myconf} $(use_enable crypt gpgme)" - - cd "${S}" - - # bug #21009 - find . -name 'configure' -exec sed -e "s:sed 's/-g:sed 's/^-g:" -i {} \; + use nls || myconf="${myconf} --disable-nls" + myconf="${myconf} $(use_enable crypt gpgme) $(use_with pic)" econf ${myconf} || die "econf failed" - - use crypt && { - # workaround for gpgme's headers inclusion path - sed \ - -e "s:FAULT_INCLUDES =:FAULT_INCLUDES = -I/usr/include/gpgme:" \ - -i "${S}"/src/Makefile - } - emake || die "emake failed" - - # Create the various plug-ins - - # First, the Qt plug-in - if use qt3 - then + if use qt3; then set-qtdir 3 - set-kdedir 3 - - use kde && myconf="${myconf} --with-kde" # Problems finding qt on multilib systems myconf="${myconf} --with-qt-libraries=${QTDIR}/$(get_libdir)" # note! watch the --prefix=/usr placement; - # licq itself installs into /usr, but the + # licq itself installs into /usr, but the # optional kde/qt interface (to which second_conf belogns) # installs its files in $KDE3DIR/{lib,share}/licq @@ -130,7 +99,12 @@ econf ${myconf} || die emake || die fi - + if use qt4; then + cd "${S}"/plugins/qt4-gui + einfo "Compiling Qt4 GUI plug-in" + cmake . -DCMAKE_INSTALL_PREFIX=/usr -DWITH_KDE=1 || die "cmake failed" + emake || die "emake failed" + fi # Now the console plug-in if use ncurses then @@ -140,7 +114,7 @@ emake || die fi - for plugin in auto-reply rms msn email ; do + for plugin in auto-reply rms msn email osd; do cd "${S}"/plugins/${plugin} einfo "Compiling '${plugin}' plug-in" econf || die "econf failed for ${plugin} plugin" @@ -154,25 +128,27 @@ dodoc ChangeLog INSTALL README* doc/* # Install the plug-ins - if use qt3 - then + if use qt3; then cd "${S}"/plugins/qt-gui emake DESTDIR="${D}" install || die docinto plugins/qt-gui dodoc README* fi - - if use ncurses - then + if use qt4; then + cd "${S}"/plugins/qt4-gui + emake DESTDIR="${D}" install || die + docinto plugins/qt4-gui + dodoc README + fi + if use ncurses; then cd "${S}"/plugins/console emake DESTDIR="${D}" install || die docinto plugins/console dodoc README fi - if use msn - then + if use msn; then cd "${S}"/plugins/msn make DESTDIR="${D}" install || die docinto plugins/msn @@ -189,6 +165,11 @@ docinto plugins/rms dodoc README licq_rms.conf + cd "${S}"/plugins/osd + make DESTDIR="${D}" install || die + docinto plugins/osd + dodoc README licq_osd.conf + exeinto /usr/share/${PN}/upgrade doexe "${S}"/upgrade/* @@ -196,12 +177,3 @@ rm -fR "${D}"/var } -pkg_postinst() { - echo - ewarn - ewarn "If you're upgrading from <=licq-1.3.0 - you have to manually " - ewarn "upgrade your existing licq installation. Please backup your " - ewarn "settings and look into: /usr/share/licq/upgrade for scripts." - ewarn - echo -}