--- acroread-7.0.ebuild 2005-04-06 16:26:02.000000000 +0200 +++ /usr/portage/app-text/acroread/acroread-7.0.ebuild 2005-04-06 16:24:29.000000000 +0200 @@ -2,7 +2,7 @@ # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/app-text/acroread/acroread-7.0.ebuild,v 1.7 2005/03/28 15:54:53 usata Exp $ -inherit nsplugins eutils +inherit nsplugins eutils versionator DESCRIPTION="Adobe's PDF reader" HOMEPAGE="http://www.adobe.com/products/acrobat/" @@ -33,6 +33,8 @@ cd ${S} tar xf COMMON.TAR --no-same-owner tar xf ILINXR.TAR --no-same-owner + + cp ${FILESDIR}/fix_firefox_plugin.sh . } src_install() { @@ -73,6 +75,17 @@ dodir /usr/bin dosym ${INSTALLDIR}/acroread /usr/bin/acroread + + local installed_gtk=`etcat -v gtk+ | grep 'I[]].*(2)' | awk {'print $3'}` + gtkminor=`get_version_components ${installed_gtk} | awk '{print $2}'` + gtkrelease=`get_version_components ${installed_gtk} | awk '{print $3}'` + + if portageq has_version ${ROOT} www-client/mozilla-firefox && + test ${gtkminor} -gt 4 -o ${gtkminor} -eq 4 -a ${gtkrelease} -gt 9 && ! use noplugin ; then + exeinto ${INSTALLDIR} + exeopts -m0744 + doexe fix_firefox_plugin.sh + fi } pkg_postinst () { @@ -82,4 +95,13 @@ einfo "The Acrobat(TM) Security Plugin will be enabled with USE=ldap, it" einfo "does not work with amd64 because there is no x86 ldap-emulation" einfo "package available in portage." + + if portageq has_version ${ROOT} www-client/mozilla-firefox && + test ${gtkminor} -gt 4 -o ${gtkminor} -eq 4 -a ${gtkrelease} -gt 9 && ! use noplugin ; then + echo + einfo "Detected >=x11-libs/gtk+-2.4.10 and www-client/mozilla-firefox." + einfo "To use the acroread plugin with firefox it's necessary to install" + einfo "locally a version of the gtk+-2.4.9: execute, as root, the script" + einfo "${INSTALLDIR}/fix_firefox_plugin.sh to solve this problem" + fi }