Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add uhdm #23614

Merged
merged 2 commits into from
Sep 12, 2023
Merged

add uhdm #23614

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions recipes/uhdm/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#! /bin/bash

set -e
set -x

export CXXFLAGS="${CXXFLAGS} -D_LIBCPP_DISABLE_AVAILABILITY"

cmake -B build \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_STANDARD=17 \
-DCMAKE_INSTALL_PREFIX=$PREFIX \
-DBUILD_SHARED_LIBS=ON \
-DUHDM_BUILD_TESTS=OFF \
-DUHDM_USE_HOST_CAPNP=ON \
-DCMAKE_MACOSX_RPATH=1 \
-DCMAKE_INSTALL_RPATH=$PREFIX/lib \
-DPYTHON_EXECUTABLE="$PYTHON" \
-DPython3_EXECUTABLE="$PYTHON" \
-DCMAKE_FIND_FRAMEWORK=NEVER \
-DCMAKE_FIND_APPBUNDLE=NEVER

cmake --build build --config Release
cmake --install build --config Release
56 changes: 56 additions & 0 deletions recipes/uhdm/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{% set name = "UHDM" %}
{% set version = "1.68" %}
{% set sha256 = "60637ea9304444114c7d8b7dfe3f19ca7640b3ade77615d9b4bebe904f9090fd" %}

package:
name: {{ name|lower }}
version: {{ version }}

source:
fn: {{ name }}-{{ version }}.tar.gz
url: https://github.com/chipsalliance/{{ name }}/archive/refs/tags/v{{ version }}.tar.gz
sha256: {{ sha256 }}
patches:
- patches/0001-move-lib-from-namespace.patch

build:
number: 0
skip: true # [win]
run_exports:
- {{ pin_subpackage('uhdm', max_pin='x') }}

requirements:
build:
- {{ compiler('c') }}
- {{ compiler('cxx') }}
- cmake
- make
- orderedmultidict
timkpaine marked this conversation as resolved.
Show resolved Hide resolved
- pkg-config
- python
host:
- capnproto
- swig
run:
- python

test:
commands:
- test -f $PREFIX/bin/uhdm-cmp
- test -f $PREFIX/bin/uhdm-dump
- test -f $PREFIX/bin/uhdm-hier
- test -f $PREFIX/bin/uhdm-lint

about:
home: https://github.com/chipsalliance/UHDM
license: Apache-2.0
license_family: Apache
license_file: LICENSE
summary: Universal Hardware Data Model. A complete modeling of the IEEE SystemVerilog Object Model with VPI Interface, Elaborator, Serialization, Visitor and Listener. Used as a compiled interchange format in between SystemVerilog tools. Compiles on Linux gcc, Windows msys2-gcc & msvc, OsX
description: |
Universal Hardware Data Model. A complete modeling of the IEEE SystemVerilog Object Model with VPI Interface, Elaborator, Serialization, Visitor and Listener. Used as a compiled interchange format in between SystemVerilog tools. Compiles on Linux gcc, Windows msys2-gcc & msvc, OsX
dev_url: https://github.com/chipsalliance/UHDM

extra:
recipe-maintainers:
- timkpaine
70 changes: 70 additions & 0 deletions recipes/uhdm/patches/0001-move-lib-from-namespace.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
From d4b20db3b47726516d9fda4bccb527edf4cef714 Mon Sep 17 00:00:00 2001
From: Tim Paine <3105306+timkpaine@users.noreply.github.com>
Date: Sat, 8 Jul 2023 13:07:10 -0400
Subject: [PATCH] move lib from namespace

---
CMakeLists.txt | 10 +++++-----
cmake/configs/UHDM.pc.in | 2 +-
cmake/configs/UHDMConfig.cmake.in | 2 +-
3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4a634e7..61e8b53 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -346,8 +346,8 @@ if(NOT UHDM_USE_HOST_CAPNP)
install(
TARGETS capnp kj
EXPORT uhdmTargets
- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/uhdm
- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/uhdm
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_PREFIX}/include/uhdm)
endif()

@@ -355,13 +355,13 @@ endif()
install(
TARGETS uhdm uhdm-cmp uhdm-dump uhdm-hier uhdm-lint
EXPORT uhdmTargets
- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/uhdm
- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/uhdm
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_PREFIX}/include/uhdm)
install(DIRECTORY ${GENDIR}/uhdm/
DESTINATION ${CMAKE_INSTALL_PREFIX}/include/uhdm/)
install(FILES ${GENDIR}/src/UHDM.capnp
- DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/uhdm)
+ DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)

# Generate cmake config files for reuse by downstream packages
include(CMakePackageConfigHelpers)
diff --git a/cmake/configs/UHDM.pc.in b/cmake/configs/UHDM.pc.in
index 04539f3..4702fcb 100644
--- a/cmake/configs/UHDM.pc.in
+++ b/cmake/configs/UHDM.pc.in
@@ -1,6 +1,6 @@
prefix="@CMAKE_INSTALL_PREFIX@"
exec_prefix="${prefix}"
-libdir="@CMAKE_INSTALL_FULL_LIBDIR@/uhdm"
+libdir="@CMAKE_INSTALL_FULL_LIBDIR@"
includedir="@CMAKE_INSTALL_FULL_INCLUDEDIR@"

Name: @PROJECT_NAME@
diff --git a/cmake/configs/UHDMConfig.cmake.in b/cmake/configs/UHDMConfig.cmake.in
index d005bbe..68b1e7a 100644
--- a/cmake/configs/UHDMConfig.cmake.in
+++ b/cmake/configs/UHDMConfig.cmake.in
@@ -7,6 +7,6 @@ include(${CMAKE_CURRENT_LIST_DIR}/UHDMTargets.cmake)
set_and_check(UHDM_BIN_DIR @CMAKE_INSTALL_PREFIX@/bin)
set_and_check(UHDM_INCLUDE_DIR @CMAKE_INSTALL_FULL_INCLUDEDIR@)
set_and_check(UHDM_INCLUDE_DIRS @CMAKE_INSTALL_FULL_INCLUDEDIR@)
-set_and_check(UHDM_LIB_DIR @CMAKE_INSTALL_FULL_LIBDIR@/uhdm)
+set_and_check(UHDM_LIB_DIR @CMAKE_INSTALL_FULL_LIBDIR@)

check_required_components(UHDM)
--
2.41.0