tkurbad-overlay/dev-embedded/xc3sprog/xc3sprog-9999.ebuild
2022-09-05 11:21:09 +02:00

48 lines
1.1 KiB
Bash

# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI=8
EGIT_REPO_URI="https://github.com/matrix-io/xc3sprog.git"
inherit git-r3 cmake toolchain-funcs
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")' \
-e '/if(EXISTS/,/endif(EXISTS/d' \
-e 's/"Use WiringPi" ON/"Use WiringPi" OFF/' \
CMakeLists.txt || die
sed -i -e 's#usr/lib#opt/lib64#' FindlibFTD2XX.cmake || die
cmake_src_prepare
default
}
src_configure() {
local mycmakeargs=(
-DLIBFTDI_INCLUDE_DIR=/usr/include/libftdi1
-DLIBFTDI_LIBRARIES=/usr/$(get_libdir)/libftdi1.so
-DUSE_FTD2XX="$(usex ftd2xx)"
)
cmake_src_configure
}
src_install() {
cmake_src_install
insinto /usr/share/${PF}/
doins -r bscan_spi
}