diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-07-10 13:27:24 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-07-10 13:27:24 +0100 |
commit | 0d7aefa5885e7552b4c2221df9f54e5930696228 (patch) | |
tree | b7f05f240bfd3bc81f87edba206e78a8dc1a664b /dev-embedded/avrdude/avrdude-7.0.ebuild | |
parent | 34d9839f7e484ac761071da50298470aa5ef5123 (diff) |
gentoo auto-resync : 10:07:2022 - 13:27:24
Diffstat (limited to 'dev-embedded/avrdude/avrdude-7.0.ebuild')
-rw-r--r-- | dev-embedded/avrdude/avrdude-7.0.ebuild | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/dev-embedded/avrdude/avrdude-7.0.ebuild b/dev-embedded/avrdude/avrdude-7.0.ebuild new file mode 100644 index 000000000000..be2345c4ae9f --- /dev/null +++ b/dev-embedded/avrdude/avrdude-7.0.ebuild @@ -0,0 +1,64 @@ +# Copyright 2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake + +DESCRIPTION="AVR Downloader/UploaDEr" +HOMEPAGE="https://avrdudes.github.io/avrdude https://github.com/avrdudes/avrdude" +SRC_URI="https://github.com/avrdudes/avrdude/archive/refs/tags/v${PV}.tar.gz -> avrdude-${PV}.tar.gz" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~amd64" +IUSE="ftdi readline" + +RDEPEND=" + dev-libs/hidapi + virtual/libelf:= + virtual/libusb:0 + virtual/libusb:1 + ftdi? ( dev-embedded/libftdi:1= ) + readline? ( sys-libs/readline:0= ) +" +DEPEND="${RDEPEND}" +BDEPEND=" + sys-devel/bison + sys-devel/flex +" + +src_prepare() { + cmake_src_prepare + + # CMAKE_INSTALL_LIBDIR is not respected. Fixed in the next release. + sed -i "s@DESTINATION lib@DESTINATION $(get_libdir)@g" \ + src/CMakeLists.txt || die + + # For some reason 'TYPE SYSCONF' and 'CMAKE_INSTALL_SYSCONFDIR' + # prepends '/usr' so the config ends up getting installed as + # '/usr/etc/avrdude.conf' which is not correct. + sed -i 's@TYPE SYSCONF@DESTINATION ${CMAKE_INSTALL_FULL_SYSCONFDIR}@' \ + src/CMakeLists.txt || die +} + +src_configure() { + # Optional libraries like libftdi aren't gated behind options and + # find_package calls, but find_library is called directly + # instead. + # + # Set the cache variable to an empty string if we do not want a + # library to be automatically detected. + local mycmakeargs=( + -DBUILD_DOC=OFF # This currently does nothing... + -DBUILD_SHARED_LIBS=ON + -DDEBUG_CMAKE=ON + -DHAVE_LIBFTDI='' + -DHAVE_LIBHID='' + -DHAVE_LINUXGPIO=ON # Seems like there is no reason to have this off. + -DHAVE_LINUXSPI=ON # Ditto. + ) + use ftdi || mycmakeargs+=( -DHAVE_LIBFTDI1='' ) + use readline || mycmakeargs+=( -DHAVE_LIBREADLINE='' ) + cmake_src_configure +} |