Added yosys and friends

This commit is contained in:
Torsten Kurbad
2025-05-30 14:53:24 +02:00
parent a5821f61c9
commit 0434a0ac5c
18 changed files with 536 additions and 0 deletions
+3
View File
@@ -0,0 +1,3 @@
AUX nextpnr-0.8-no-tests-gui.patch 1949 BLAKE2B 00d236c17d5739681771fa12177060e4007b6f57255b0f60afdc8d765370856e77e1ed6f25af34cc2907a9a8c1fae9de99deb3ca98043454303a4b45488faefa SHA512 ab6d63e5aaf73828180344b4960546afffee33e774f5bc6cb94a3e74773ed71a4c2406062cf47133a241b6ecc7e75c0aa9a00efc6ea39955676ed912a04f6f34
DIST nextpnr-0.8.tar.gz 4665005 BLAKE2B 7fffc704bdf8aa735b67beba29a95be07abf338cf33c6848f15bb95e0b10218991e3f6b833fb1e4212d5ec09cea224fc08eecc8ac673fcebb56341703c1da5e1 SHA512 6a05b6a8c8d378dc2309fbbaf96b49601472e8f56056774f936cbe353fa40c2a560642dbaff96af807469ff328f27d75630538f805a39122a94410405974fa48
EBUILD nextpnr-0.8.ebuild 1354 BLAKE2B a3b419ca4b4364d1f2b91d9288d6523251646eaf5ff18f6482b9b07541e0098b9f61e124d8681a2e06ecd88cf3c324c3df3448ebaa5309463a97e9568d39cd07 SHA512 464a305e86fca1cef51387c285c4851ae9cd13fdca061abc7cf123a5d0130a1201f3b836d30fdef49542435925483103f38760e975f209ee14b1d08ce0101e35
@@ -0,0 +1,51 @@
diff '--color=auto' -ur nextpnr-nextpnr-0.8.orig/3rdparty/imgui/examples/example_glfw_vulkan/CMakeLists.txt nextpnr-nextpnr-0.8/3rdparty/imgui/examples/example_glfw_vulkan/CMakeLists.txt
--- nextpnr-nextpnr-0.8.orig/3rdparty/imgui/examples/example_glfw_vulkan/CMakeLists.txt 2025-03-20 09:07:37.000000000 +0100
+++ nextpnr-nextpnr-0.8/3rdparty/imgui/examples/example_glfw_vulkan/CMakeLists.txt 2025-05-30 14:06:32.589813761 +0200
@@ -2,7 +2,7 @@
project(imgui_example_glfw_vulkan C CXX)
if(NOT CMAKE_BUILD_TYPE)
- set(CMAKE_BUILD_TYPE Debug CACHE STRING "" FORCE)
+#_cmake_modify_IGNORE set(CMAKE_BUILD_TYPE Debug CACHE STRING "" FORCE)
endif()
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DVK_PROTOTYPES")
diff '--color=auto' -ur nextpnr-nextpnr-0.8.orig/CMakeLists.txt nextpnr-nextpnr-0.8/CMakeLists.txt
--- nextpnr-nextpnr-0.8.orig/CMakeLists.txt 2025-03-20 09:07:37.000000000 +0100
+++ nextpnr-nextpnr-0.8/CMakeLists.txt 2025-05-30 14:08:00.623119637 +0200
@@ -40,7 +40,7 @@
endif()
if (NOT CMAKE_BUILD_TYPE)
- set(CMAKE_BUILD_TYPE Release)
+#_cmake_modify_IGNORE set(CMAKE_BUILD_TYPE Release)
endif()
if (USE_IPO)
@@ -176,7 +176,7 @@
if (BUILD_PYTHON)
# TODO: sensible minimum Python version
- find_package(Python3 3.5 REQUIRED COMPONENTS Interpreter Development.Embed)
+ find_package(Python3 3.13 REQUIRED COMPONENTS Interpreter Development.Embed)
find_package(pybind11 CONFIG)
if (NOT pybind11_FOUND)
message(STATUS "Using built-in pybind11")
@@ -184,7 +184,7 @@
endif()
include_directories(${Python3_INCLUDE_DIRS})
else()
- find_package(Python3 3.5 REQUIRED COMPONENTS Interpreter)
+ find_package(Python3 3.13 REQUIRED COMPONENTS Interpreter)
add_definitions("-DNO_PYTHON")
endif()
@@ -239,8 +239,6 @@
add_subdirectory(json)
add_subdirectory(rust)
-add_subdirectory(tests/gui)
-
add_custom_target(nextpnr-all-bba)
function(add_nextpnr_architecture target)
@@ -0,0 +1,45 @@
EAPI=8
inherit cmake
S=$WORKDIR/nextpnr-$P
DESCRIPTION="portable FPGA place and route tool"
HOMEPAGE="https://github.com/YosysHQ/nextpnr"
SRC_URI="https://github.com/YosysHQ/nextpnr/archive/$P.tar.gz"
LICENSE=ISC
SLOT=0
KEYWORDS="amd64"
#IUSE="ice40 ecp5 machxo2 nexus gowin gui"
IUSE="ice40 ecp5 machxo2 nexus gui"
DEPEND="ice40? ( sci-electronics/icestorm )
ecp5? ( sci-electronics/prjtrellis )
machxo2? ( sci-electronics/prjtrellis )
nexus? ( sci-electronics/prjoxide )
>=sci-electronics/yosys-0.8
gui? ( dev-qt/qtcore:5
virtual/opengl )
dev-libs/boost
dev-cpp/eigen"
# gowin? ( sci-electronics/apicula )
PATCHES="${FILESDIR}/${P}-no-tests-gui.patch"
src_unpack() {
unpack $P.tar.gz
rmdir $S/3rdparty/fpga-interchange-schema # $S/3rdparty/abseil-cpp
}
src_configure() {
#-DARCH=generic$(usex ice40 ";ice40" "")$(usex ecp5 ";ecp5" "")$(usex machxo2 ";machxo2" "")$(usex nexus ";nexus" "")$(usex gowin ";gowin" "")
local mycmakeargs=(
-DARCH=generic$(usex ice40 ";ice40" "")$(usex ecp5 ";ecp5" "")$(usex machxo2 ";machxo2" "")$(usex nexus ";nexus" "")
$(usex ice40 "-DICESTORM_INSTALL_PREFIX=/usr" "")
$(usex ecp5 "-DTRELLIS_INSTALL_PREFIX=/usr" "")
$(usex machxo2 "-DTRELLIS_INSTALL_PREFIX=/usr" "")
$(usex nexus "-DOXIDE_INSTALL_PREFIX=/usr" "")
$(usex gui -DBUILD_GUI=ON "")
)
cmake_src_configure
}