eselect-java-0.2.0-r1.ebuild 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit autotools
  5. DESCRIPTION="A set of eselect modules for Java"
  6. HOMEPAGE="https://wiki.gentoo.org/wiki/Project:Java"
  7. SRC_URI="https://gitweb.gentoo.org/proj/${PN}.git/snapshot/${P}.tar.bz2"
  8. LICENSE="GPL-2"
  9. SLOT="0"
  10. KEYWORDS="~amd64 ~arm ~ppc64 ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
  11. IUSE=""
  12. RDEPEND="
  13. !app-eselect/eselect-ecj
  14. !app-eselect/eselect-maven
  15. !<dev-java/java-config-2.2
  16. app-admin/eselect"
  17. src_prepare() {
  18. eautoreconf
  19. # Bug 549498: "eselect XXX show" should never send output to stderr.
  20. sed -i \
  21. -e '/^do_show.. {$/,/^}$/{ /echo/s,>&2$,, }' \
  22. "${S}"/src/modules/maven.eselect.in \
  23. "${S}"/src/modules/ecj.eselect.in
  24. }
  25. pkg_postinst() {
  26. local REMOVED=0
  27. rm -v "${EROOT}"usr/lib*/nsbrowser/plugins/javaplugin.so 2>/dev/null && REMOVED=1
  28. rm -v "${EROOT}"etc/java-config-2/current-icedtea-web-vm 2>/dev/null && REMOVED=1
  29. if [[ "${REMOVED}" = 1 ]]; then
  30. elog "The eselect java-nsplugin module has been removed and your configuration"
  31. elog "has been cleaned up. From now on, you may only install either Oracle or"
  32. elog "IcedTea's plugin but not both. Note you can use IcedTea's plugin with an"
  33. elog "Oracle VM. See the README installed with icedtea-web for more details."
  34. fi
  35. }