amdcovc-9999.ebuild 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. # Copyright 1999-2020 Gentoo Authors
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=8
  4. inherit linux-info toolchain-funcs
  5. DESCRIPTION="Control AMD Overdrive settings with or without X."
  6. HOMEPAGE="https://github.com/matszpk/amdcovc"
  7. if [ ${PR} == "r0" ]; then
  8. PR=""
  9. fi
  10. if [ ${PV} == "9999" ] ; then
  11. inherit git-r3
  12. EGIT_REPO_URI="https://github.com/matszpk/${PN}"
  13. else
  14. SRC_URI="https://github.com/matszpk/${PN}/archive/${PV}${PR/r/.}.tar.gz -> ${P}.tar.gz"
  15. KEYWORDS="-* ~amd64"
  16. fi
  17. LICENSE="GPL-3"
  18. SLOT="0"
  19. IUSE="catalyst"
  20. RESTRICT="mirror"
  21. DEPEND="
  22. catalyst? ( x11-libs/amd-adl-sdk )
  23. sys-libs/ncurses
  24. sys-apps/pciutils
  25. "
  26. RDEPEND="${DEPEND}"
  27. BDEPEND="virtual/pkgconfig"
  28. S=${WORKDIR}/${P}${PR/r/.}
  29. src_compile() {
  30. local myemakeargs=(
  31. # it's a non-standard build system
  32. $(usex catalyst -DHAVE_ADLSDK=1 -DHAVE_ADLSDK=0)
  33. -DHAVE_TERMINFO=1
  34. )
  35. CC=$(tc-getCC) CFLAGS=\"${myemakeargs[@]}\" emake
  36. }
  37. src_install() {
  38. local DOCS=( README )
  39. insinto /usr/bin
  40. dobin ${PN}
  41. dodoc README.md
  42. }
  43. pkg_postinst() {
  44. elog "To enable overclocking support in amdgpu driver use following kernel cmdline: amdgpu.ppfeaturemask=0xffffffff"
  45. }