mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
gnu: nextpnr-ice40: Update to 0.8.
* gnu/packages/fpga.scm (nextpnr-ice40): Update to 0.8. [snippet]: Use 'delete-all-but' defensive idiom and update comment. [patches]: Apply unbundling patches. [arguments] <:cmake>: New argument. <#:configure-flags>: Add -DUSE_OPENMP=ON flag. Adjust version string used with -DCURRENT_GIT_VERSION. <#:phases> {patch-source}: Streamline phase. [inputs]: Remove imgui-1.86, which is now propagated by qtimgui. [home-page]: Add trailing '/'. [description]: Streamline description. 'FOSS' is implied by being part of the Guix packages collection. [license]: Correct to ISC license. * gnu/packages/patches/nextpnr-gtest.patch: New file. * gnu/packages/patches/nextpnr-imgui.patch: Likewise. * gnu/local.mk (dist_patch_DATA): Register them. Co-authored-by: Cayetano Santos <csantosb@inventati.org> Change-Id: Ied1178c26ed0ba96021a3d5961441c23f0ac508e
This commit is contained in:
parent
e8525e84ce
commit
221899c202
4 changed files with 192 additions and 94 deletions
75
gnu/packages/patches/nextpnr-imgui.patch
Normal file
75
gnu/packages/patches/nextpnr-imgui.patch
Normal file
|
@ -0,0 +1,75 @@
|
|||
Uptream-status: https://github.com/YosysHQ/nextpnr/pull/1480
|
||||
|
||||
diff --git a/gui/CMakeLists.txt b/gui/CMakeLists.txt
|
||||
index ff5d9208..c554cc96 100644
|
||||
--- a/gui/CMakeLists.txt
|
||||
+++ b/gui/CMakeLists.txt
|
||||
@@ -46,12 +46,42 @@ target_include_directories(nextpnr-${target}-gui PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
|
||||
+# Detect whether imgui/qtimgui packages are available from the system.
|
||||
+find_path(IMGUI_INCLUDE_DIR NAMES imgui.h PATH_SUFFIXES imgui)
|
||||
+find_path(QTIMGUI_INCLUDE_DIR NAMES QtImGui.h PATH_SUFFIXES qtimgui)
|
||||
+find_library(IMGUI_LIB NAMES imgui)
|
||||
+find_library(QTIMGUI_LIB NAMES qt_imgui_widgets)
|
||||
+if (IMGUI_INCLUDE_DIR AND IMGUI_LIB)
|
||||
+ message("Using system imgui library:
|
||||
+ IMGUI_INCLUDE_DIR=${IMGUI_INCLUDE_DIR}
|
||||
+ IMGUI_LIB=${IMGUI_LIB}")
|
||||
+else()
|
||||
+ message("Using bundled imgui library")
|
||||
+ set(IMGUI_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/3rdparty/imgui)
|
||||
+ set(IMGUI_SOURCES
|
||||
+ ../3rdparty/imgui/imgui_widgets.cpp
|
||||
+ ../3rdparty/imgui/imgui_draw.cpp
|
||||
+ ../3rdparty/imgui/imgui.cpp
|
||||
+ ../3rdparty/imgui/imgui_demo.cpp)
|
||||
+endif()
|
||||
+if (QTIMGUI_INCLUDE_DIR AND QTIMGUI_LIB)
|
||||
+ message("Using system qtimgui library:
|
||||
+ QTIMGUI_INCLUDE_DIR=${QTIMGUI_INCLUDE_DIR}
|
||||
+ QTIMGUI_LIB=${QTIMGUI_LIB}")
|
||||
+else()
|
||||
+ message("Using bundled qtimgui library")
|
||||
+ set(QTIMGUI_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/3rdparty/qtimgui)
|
||||
+ set(QTIMGUI_SOURCES
|
||||
+ ../3rdparty/qtimgui/ImGuiRenderer.cpp
|
||||
+ ../3rdparty/qtimgui/QtImGui.cpp)
|
||||
+endif()
|
||||
+
|
||||
target_include_directories(nextpnr-${target}-gui PRIVATE
|
||||
${CMAKE_SOURCE_DIR}/frontend
|
||||
${CMAKE_SOURCE_DIR}/json
|
||||
${CMAKE_SOURCE_DIR}/3rdparty/QtPropertyBrowser/src
|
||||
- ${CMAKE_SOURCE_DIR}/3rdparty/imgui
|
||||
- ${CMAKE_SOURCE_DIR}/3rdparty/qtimgui
|
||||
+ ${IMGUI_INCLUDE_DIR}
|
||||
+ ${QTIMGUI_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
target_link_libraries(nextpnr-${target}-gui PUBLIC
|
||||
@@ -77,14 +107,17 @@ if (BUILD_PYTHON)
|
||||
../3rdparty/python-console/ParseMessage.cpp
|
||||
../3rdparty/python-console/modified/pyredirector.cc
|
||||
../3rdparty/python-console/modified/pyinterpreter.cc
|
||||
- ../3rdparty/imgui/imgui_widgets.cpp
|
||||
- ../3rdparty/imgui/imgui_draw.cpp
|
||||
- ../3rdparty/imgui/imgui.cpp
|
||||
- ../3rdparty/imgui/imgui_demo.cpp
|
||||
- ../3rdparty/qtimgui/ImGuiRenderer.cpp
|
||||
- ../3rdparty/qtimgui/QtImGui.cpp
|
||||
+ ${IMGUI_SOURCES}
|
||||
+ ${QTIMGUI_SOURCES}
|
||||
)
|
||||
|
||||
+ if (IMGUI_LIB)
|
||||
+ target_link_libraries(nextpnr-${target}-gui PRIVATE ${IMGUI_LIB})
|
||||
+ endif()
|
||||
+ if (QTIMGUI_LIB)
|
||||
+ target_link_libraries(nextpnr-${target}-gui PRIVATE ${QTIMGUI_LIB})
|
||||
+ endif()
|
||||
+
|
||||
target_include_directories(nextpnr-${target}-gui PRIVATE
|
||||
../3rdparty/python-console
|
||||
../3rdparty/python-console/modified
|
Loading…
Add table
Add a link
Reference in a new issue