GCC-11 compatibility for xc3sprog
This commit is contained in:
@@ -2,10 +2,10 @@
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: $
|
||||
|
||||
EAPI=5
|
||||
EAPI=7
|
||||
|
||||
ESVN_REPO_URI="svn://svn.code.sf.net/p/xc3sprog/code/trunk"
|
||||
inherit subversion cmake-utils
|
||||
EGIT_REPO_URI="https://github.com/matrix-io/xc3sprog.git"
|
||||
inherit git-r3 cmake-utils toolchain-funcs
|
||||
|
||||
DESCRIPTION="A suite of utilities for programming Xilinx FPGAs, CPLDs, and EEPROMs"
|
||||
HOMEPAGE="http://xc3sprog.sourceforge.net/"
|
||||
@@ -22,12 +22,24 @@ RDEPEND="${DEPEND}"
|
||||
|
||||
src_prepare() {
|
||||
sed -i -e '/if(EXISTS/a set(VERSION_STRING "Gentoo")' \
|
||||
-e '/if(EXISTS/,/endif(EXISTS/d' CMakeLists.txt || die
|
||||
-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
|
||||
|
||||
if [ $(gcc-major-version) -gt "10" ]; then
|
||||
eapply "${FILESDIR}/${P}-gcc-11.patch"
|
||||
fi
|
||||
|
||||
cmake-utils_src_prepare
|
||||
default
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local mycmakeargs=(
|
||||
$(cmake-utils_use_use ftd2xx)
|
||||
-DLIBFTDI_INCLUDE_DIR=/usr/include/libftdi1
|
||||
-DLIBFTDI_LIBRARIES=/usr/$(get_libdir)/libftdi1.so
|
||||
-DUSE_FTD2XX="$(usex ftd2xx)"
|
||||
)
|
||||
cmake-utils_src_configure
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user