tkurbad-overlay/dev-embedded/xc3sprog/xc3sprog-9999.ebuild

52 lines
1.2 KiB
Bash
Raw Normal View History

2020-02-13 21:55:56 +01:00
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
2021-05-18 11:08:43 +02:00
EAPI=7
2020-02-13 21:55:56 +01:00
2021-05-18 11:08:43 +02:00
EGIT_REPO_URI="https://github.com/matrix-io/xc3sprog.git"
inherit git-r3 cmake-utils toolchain-funcs
2020-02-13 21:55:56 +01:00
DESCRIPTION="A suite of utilities for programming Xilinx FPGAs, CPLDs, and EEPROMs"
HOMEPAGE="http://xc3sprog.sourceforge.net/"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS=""
IUSE="-ftd2xx"
DEPEND="!ftd2xx? ( dev-embedded/libftdi )
ftd2xx? ( dev-embedded/libftd2xx )
virtual/libusb:0"
RDEPEND="${DEPEND}"
src_prepare() {
sed -i -e '/if(EXISTS/a set(VERSION_STRING "Gentoo")' \
2021-05-18 11:08:43 +02:00
-e '/if(EXISTS/,/endif(EXISTS/d' \
-e 's/"Use WiringPi" ON/"Use WiringPi" OFF/' \
CMakeLists.txt || die
2020-02-13 21:55:56 +01:00
sed -i -e 's#usr/lib#opt/lib64#' FindlibFTD2XX.cmake || die
2021-05-18 11:08:43 +02:00
if [ $(gcc-major-version) -gt "10" ]; then
eapply "${FILESDIR}/${P}-gcc-11.patch"
fi
cmake-utils_src_prepare
default
2020-02-13 21:55:56 +01:00
}
2021-05-18 11:08:43 +02:00
2020-02-13 21:55:56 +01:00
src_configure() {
local mycmakeargs=(
2021-05-18 11:08:43 +02:00
-DLIBFTDI_INCLUDE_DIR=/usr/include/libftdi1
-DLIBFTDI_LIBRARIES=/usr/$(get_libdir)/libftdi1.so
-DUSE_FTD2XX="$(usex ftd2xx)"
2020-02-13 21:55:56 +01:00
)
cmake-utils_src_configure
}
src_install() {
cmake-utils_src_install
insinto /usr/share/${PF}/
doins -r bscan_spi
}