gperiodic-3.0.1.ebuild 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils toolchain-funcs
  5. DESCRIPTION="Periodic table application for Linux"
  6. HOMEPAGE="http://www.frantz.fi/software/gperiodic.php"
  7. SRC_URI="http://downloads.sourceforge.net/project/${PN}/${P}.tar.gz"
  8. KEYWORDS="~amd64 ~x86"
  9. SLOT="0"
  10. LICENSE="GPL-2"
  11. IUSE="nls"
  12. MY_AVAILABLE_LINGUAS=" be bg cs da de es fi fr gl id is it lt ms nl pl pt_BR pt ru sv tr uk"
  13. IUSE="${IUSE} ${MY_AVAILABLE_LINGUAS// / linguas_}"
  14. RDEPEND="
  15. sys-libs/ncurses:0
  16. x11-libs/gtk+:2
  17. x11-libs/cairo[X]
  18. nls? ( sys-devel/gettext )"
  19. DEPEND="${RDEPEND}
  20. virtual/pkgconfig"
  21. src_prepare() {
  22. epatch \
  23. "${FILESDIR}"/${P}-makefile.patch \
  24. "${FILESDIR}"/${P}-nls.patch
  25. for lang in ${MY_AVAILABLE_LINGUAS}; do
  26. if ! use linguas_${lang}; then
  27. einfo "Cleaning translation for ${lang}"
  28. rm po/${lang}.po || die
  29. fi
  30. done
  31. }
  32. src_compile() {
  33. local myopts
  34. use nls && myopts="enable_nls=1" || myopts="enable_nls=0"
  35. emake \
  36. CFLAGS="${CFLAGS}" \
  37. LDFLAGS="${LDFLAGS}" \
  38. CC=$(tc-getCC) ${myopts}
  39. }
  40. src_install() {
  41. local myopts
  42. use nls && myopts="enable_nls=1" || myopts="enable_nls=0"
  43. emake DESTDIR="${D}" ${myopts} install
  44. dodoc AUTHORS ChangeLog README
  45. newdoc po/README README.translation
  46. }