ch341eepromtool-0.5.0-r3.ebuild 782 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. # Copyright 1999-2023 Gentoo Authors
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=8
  4. inherit toolchain-funcs
  5. DESCRIPTION="An i2c serial EEPROM programming tool for the WCH CH341A"
  6. HOMEPAGE="https://github.com/stefanct/ch341eepromtool"
  7. SRC_URI="https://github.com/stefanct/${PN}/archive/refs/heads/master.tar.gz -> ${P}.tar.gz"
  8. LICENSE="GPL-3"
  9. SLOT="0"
  10. KEYWORDS="amd64 x86"
  11. IUSE="doc"
  12. RESTRICT="mirror"
  13. DEPEND=">=dev-libs/libusb-1.0.0"
  14. PATCHES=(
  15. "${FILESDIR}/libusb_set_option.patch"
  16. "${FILESDIR}/extern_readbuf.patch"
  17. )
  18. DOCS=( README )
  19. S="${WORKDIR}/${PN}-master"
  20. src_compile() {
  21. $(tc-getCC) ${CFLAGS} -o ch341eeprom ch341eeprom.c ch341funcs.c -lusb-1.0 || die
  22. }
  23. src_install() {
  24. insinto /usr/bin
  25. dobin "${S}"/ch341eeprom
  26. use doc && dodoc
  27. }