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

48 lines
1.1 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: $
2022-09-05 11:21:09 +02:00
EAPI=8
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"
2022-09-05 11:21:09 +02:00
inherit git-r3 cmake 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
2022-09-05 11:21:09 +02:00
cmake_src_prepare
2021-05-18 11:08:43 +02:00
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
)
2022-09-05 11:21:09 +02:00
cmake_src_configure
2020-02-13 21:55:56 +01:00
}
src_install() {
2022-09-05 11:21:09 +02:00
cmake_src_install
2020-02-13 21:55:56 +01:00
insinto /usr/share/${PF}/
doins -r bscan_spi
}