mirror of
https://codeberg.org/guix/guix.git
synced 2026-01-25 03:55:08 -06:00
gnu: nextpnr: Update to 0.9-1.d8117e3.
* gnu/packages/electronics.scm (nextpnr): Update to 0.9-1.d8117e3. * gnu/packages/patches/nextpnr-gtest.patch: Remove file. * gnu/local.mk (dist_patch_DATA): Unregister file. [source]<#:patches>: Remove nextpnr-gtest.patch. <#:snippet>: Use G-Expressions. [inputs]: Remove apycula, corrosion, boost-1.83 and python; add boost-1.88. [native-inputs]: Add apycula and python-minimal-wrapper. [arguments]<#:phases>: Add unbundle-googletest. [synopsis]: Update [description]: Update Change-Id: Id8fb37b6bed6a131040ee31d27099b31d93ae98d
This commit is contained in:
parent
86c783b5ed
commit
0d09502184
3 changed files with 41 additions and 62 deletions
|
|
@ -1940,7 +1940,6 @@ dist_patch_DATA = \
|
|||
%D%/packages/patches/netsurf-system-utf8proc.patch \
|
||||
%D%/packages/patches/netsurf-y2038-tests.patch \
|
||||
%D%/packages/patches/netsurf-longer-test-timeout.patch \
|
||||
%D%/packages/patches/nextpnr-gtest.patch \
|
||||
%D%/packages/patches/nextpnr-imgui.patch \
|
||||
%D%/packages/patches/nhc98-c-update.patch \
|
||||
%D%/packages/patches/nix-dont-build-html-doc.diff \
|
||||
|
|
|
|||
|
|
@ -1391,8 +1391,8 @@ coverage.")
|
|||
(license license:isc)))
|
||||
|
||||
(define-public nextpnr
|
||||
(let ((commit "ad76625d4d828cb093b55aa9f5aae59b7ba9724f")
|
||||
(revision "0"))
|
||||
(let ((commit "d8117e3cadaa4f4db606b64a465b7638b05dac68")
|
||||
(revision "1"))
|
||||
(package
|
||||
(name "nextpnr")
|
||||
(version (git-version "0.9" revision commit))
|
||||
|
|
@ -1407,29 +1407,28 @@ coverage.")
|
|||
;; no longer have their original upstream.
|
||||
(recursive? #t)))
|
||||
(file-name (git-file-name name version))
|
||||
(modules '((guix build utils)
|
||||
(ice-9 ftw)
|
||||
(srfi srfi-26)))
|
||||
(snippet
|
||||
'(begin
|
||||
;; XXX: 'delete-all-but' is copied from the turbovnc package.
|
||||
(define (delete-all-but directory . preserve)
|
||||
(with-directory-excursion directory
|
||||
(let* ((pred (negate (cut member <>
|
||||
(cons* "." ".." preserve))))
|
||||
(items (scandir "." pred)))
|
||||
(for-each (cut delete-file-recursively <>) items))))
|
||||
(delete-all-but "3rdparty"
|
||||
;; The following sources have all been patched, so
|
||||
;; cannot easily be unbundled.
|
||||
"QtPropertyBrowser"
|
||||
"json11"
|
||||
"python-console"
|
||||
"oourafft")))
|
||||
(patches (search-patches "nextpnr-gtest.patch"
|
||||
"nextpnr-imgui.patch"))
|
||||
#~(begin
|
||||
(use-modules (guix build utils)
|
||||
(ice-9 ftw)
|
||||
(srfi srfi-26))
|
||||
;; XXX: 'delete-all-but' is copied from the turbovnc package.
|
||||
(define (delete-all-but directory . preserve)
|
||||
(with-directory-excursion directory
|
||||
(let* ((pred (negate (cut member <>
|
||||
(cons* "." ".." preserve))))
|
||||
(items (scandir "." pred)))
|
||||
(for-each (cut delete-file-recursively <>) items))))
|
||||
(delete-all-but "3rdparty"
|
||||
;; The following sources have all been patched, so
|
||||
;; cannot easily be unbundled.
|
||||
"QtPropertyBrowser"
|
||||
"json11"
|
||||
"python-console"
|
||||
"oourafft")))
|
||||
(patches (search-patches "nextpnr-imgui.patch"))
|
||||
(sha256
|
||||
(base32 "1zjxvkycg5xx605d4ark8gd10w4xni1wd10chmhv983dvyv875br"))))
|
||||
(base32 "0668adviwh8n9c5xy7k3qiyfn77rrzd79b403i3m19hhy8vq907p"))))
|
||||
(outputs '("out" "bba"))
|
||||
(build-system qt-build-system)
|
||||
(arguments
|
||||
|
|
@ -1457,6 +1456,16 @@ coverage.")
|
|||
#$(this-package-native-input "prjtrellis")))
|
||||
#:phases
|
||||
#~(modify-phases %standard-phases
|
||||
(add-after 'unpack 'unbundle-googletest
|
||||
(lambda _
|
||||
(substitute* "CMakeLists.txt"
|
||||
(("add_subdirectory\\(3rdparty\\/googletest.*")
|
||||
(string-append "find_package(GTest)\n"
|
||||
"add_library(gtest_main ALIAS "
|
||||
"GTest::gtest_main)\n"))
|
||||
(("\\$\\{CMAKE_SOURCE_DIR}/3rdparty/googletest.*")
|
||||
(string-append
|
||||
#$(this-package-native-input "googletest") "/include)")))))
|
||||
(add-after 'unpack 'unbundle-sanitizers-cmake
|
||||
(lambda _
|
||||
(substitute* "CMakeLists.txt"
|
||||
|
|
@ -1494,27 +1503,28 @@ coverage.")
|
|||
(string-append
|
||||
"NPNR=" #$output "/bin/nextpnr-ecp5")))))))))
|
||||
(native-inputs
|
||||
(list icestorm
|
||||
iverilog
|
||||
(list apycula
|
||||
googletest
|
||||
icestorm
|
||||
iverilog
|
||||
gzip
|
||||
prjbeyond-db
|
||||
`(,prjpeppercorn "db")
|
||||
prjtrellis
|
||||
python-minimal-wrapper
|
||||
sanitizers-cmake
|
||||
yosys))
|
||||
(inputs
|
||||
(list apycula
|
||||
boost-1.83
|
||||
corrosion
|
||||
(list boost-1.88
|
||||
eigen
|
||||
pybind11
|
||||
python
|
||||
qtbase-5
|
||||
qtwayland-5
|
||||
qtimgui))
|
||||
(synopsis "Place-and-Route tool for FPGAs")
|
||||
(description "Nextpnr is a portable FPGA place and route tool.")
|
||||
(synopsis
|
||||
"Place-and-Route tool for @acronym{FPGA, Field Programmable Gate Array}")
|
||||
(description "@code{nextpnr} is an @acronym{EDA, Electronic Design
|
||||
Automation}, portable and vendor neutral FPGA place and route tool.")
|
||||
(home-page "https://github.com/YosysHQ/nextpnr/")
|
||||
(license license:isc))))
|
||||
|
||||
|
|
|
|||
|
|
@ -1,30 +0,0 @@
|
|||
Upstream-status: https://github.com/YosysHQ/nextpnr/pull/1478
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 47d60330..88463984 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -217,7 +217,13 @@ set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/3rdparty/sanitizers-cmake/cmake" ${CM
|
||||
find_package(Sanitizers)
|
||||
|
||||
if (BUILD_TESTS)
|
||||
- add_subdirectory(3rdparty/googletest/googletest EXCLUDE_FROM_ALL)
|
||||
+ find_package(GTest)
|
||||
+ if(GTest_FOUND)
|
||||
+ add_library(gtest_main ALIAS GTest::gtest_main)
|
||||
+ else()
|
||||
+ add_subdirectory(3rdparty/googletest/googletest EXCLUDE_FROM_ALL)
|
||||
+ set(gtest_include_dir ${CMAKE_SOURCE_DIR}/3rdparty/googletest/googletest/include)
|
||||
+ endif()
|
||||
enable_testing()
|
||||
endif()
|
||||
|
||||
@@ -366,7 +372,7 @@ function(add_nextpnr_architecture target)
|
||||
add_executable(nextpnr-${target}-test ${arg_TEST_SOURCES})
|
||||
set_property(TARGET nextpnr-${target}-test PROPERTY RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
|
||||
|
||||
- target_include_directories(nextpnr-${target}-test PRIVATE ${CMAKE_SOURCE_DIR}/3rdparty/googletest/googletest/include)
|
||||
+ target_include_directories(nextpnr-${target}-test PRIVATE gtest_include_dir)
|
||||
|
||||
target_link_libraries(nextpnr-${target}-test PRIVATE gtest_main nextpnr-${target}-core)
|
||||
if (BUILD_GUI)
|
||||
Loading…
Add table
Reference in a new issue