nvclock-0.8_p20110102-r2.ebuild 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. # Copyright 1999-2013 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="4"
  4. inherit autotools eutils
  5. DESCRIPTION="NVIDIA Overclocking Utility"
  6. HOMEPAGE="http://www.linuxhardware.org/nvclock/"
  7. SRC_URI="mirror://gentoo/${P}.tar.bz2"
  8. LICENSE="GPL-2"
  9. SLOT="0"
  10. KEYWORDS="amd64 ppc x86"
  11. IUSE="gtk nvcontrol"
  12. RDEPEND="
  13. gtk? (
  14. x11-libs/gtk+:2
  15. x11-libs/libX11
  16. )
  17. nvcontrol? ( x11-libs/libX11 x11-libs/libXext )
  18. "
  19. DEPEND="${RDEPEND}"
  20. src_prepare() {
  21. epatch \
  22. "${FILESDIR}"/${P}-r1-make.patch \
  23. "${FILESDIR}"/${P}-usleep.patch \
  24. "${FILESDIR}"/${P}-desktop.patch \
  25. "${FILESDIR}"/${P}-buffers.patch
  26. eautoreconf
  27. }
  28. src_configure() {
  29. sed -i \
  30. -e "/^AR=ar/s:=.*:=$(tc-getAR):" \
  31. src/*/Makefile.in || die
  32. # Qt support would mean Qt 3.
  33. econf \
  34. --docdir=/usr/share/doc/${PF} \
  35. --disable-qt \
  36. $(use_enable gtk) \
  37. $(use_enable nvcontrol)
  38. }
  39. src_compile() {
  40. emake -C src/ nvclock smartdimmer
  41. use gtk && emake -C src/gtk/
  42. }
  43. src_install() {
  44. mkdir -p "${D}"/usr/bin || die
  45. default
  46. newinitd "${FILESDIR}"/nvclock_initd nvclock
  47. newconfd "${FILESDIR}"/nvclock_confd nvclock
  48. }
  49. pkg_postinst() {
  50. elog "To enable card overclocking at startup, edit your /etc/conf.d/nvclock"
  51. elog "accordingly and then run: rc-update add nvclock default"
  52. }