From nobody Mon Jan 10 18:02:18 2022 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id E5FCB19369AA; Mon, 10 Jan 2022 18:02:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JXhVf4qP8z4mBy; Mon, 10 Jan 2022 18:02:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8561D1BFF; Mon, 10 Jan 2022 18:02:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 20AI2I2A059763; Mon, 10 Jan 2022 18:02:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 20AI2I0V059748; Mon, 10 Jan 2022 18:02:18 GMT (envelope-from git) Date: Mon, 10 Jan 2022 18:02:18 GMT Message-Id: <202201101802.20AI2I0V059748@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Li-Wen Hsu Subject: git: 885796f15ae9 - main - Add emulators/ripes: Graphical RISC-V simulator List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: lwhsu X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 885796f15ae920cfa2a400e42fd1e2bdb209d7b2 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1641837738; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FmHXmwLe3VpnyuVvQr6t/aQX4vlj8gyRql93yv51vig=; b=Qsn83U8TUL8Ey7C2flNT7T66XC9SVXdgX9nsmbrNNcLfMhIhvhsxpyuDiEpOW6dq4NNBwe r4LQuxW0sCotZI7rYktcNwYnEsNk3c3z4SL9uo2hdxMEiYgedgZe+YnSqRbsj77fgmIhTF 5024Cb5WI/JuBOI1+XSewqgGHfjX2T4ywi4O3XHP9dfnqfmXHOcTMLYU/skEbX6yeptFR0 lN9PgmZz4lAP1cy+w/ytSv56oiXs3FFul6kNG16WZVXD9BQMi6H5k1c2d03hfFLPz8hGFK 0oa5N0xJlrcdXT+kNlRpaeUnYok/mrOucV5nJCWXSvOxKfLQZeZVxHUeWIG/yw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1641837738; a=rsa-sha256; cv=none; b=WVmKGlLybv+kOv+L+rGk4fUOimB1kIATDA5+tHjtsPdk1ESLoLhWIVtWQeYm50skDWgCKK ZQkDgoStJqADnzu0a2bYEpMFiKSA6zHcPkV3JwpNPZbEWpYPfTTFs+q02vkeZG9llp4maB HwQEgMRiG6z2F0Vw6k/5lD1++oYbuCE78OdFfS1FDguYW3Z7NxNKsVcT22pyEm/dnuT0ac QzMF5tztxNnJAT28JcVKLJXiMilfRyjkCLE3G60S7MeUIRIsv6pCxE+Iqu8CAx81ZcfFNl PGeYuHIHhcp+8FjnQ+7D2LQy2PTO9+S0URcMymWuVtt00YyZ0qEW4suElKRmCg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by lwhsu: URL: https://cgit.FreeBSD.org/ports/commit/?id=885796f15ae920cfa2a400e42fd1e2bdb209d7b2 commit 885796f15ae920cfa2a400e42fd1e2bdb209d7b2 Author: Mitchell Clay AuthorDate: 2022-01-10 17:59:51 +0000 Commit: Li-Wen Hsu CommitDate: 2022-01-10 17:59:51 +0000 Add emulators/ripes: Graphical RISC-V simulator PR: 260124 --- emulators/Makefile | 1 + emulators/ripes/Makefile | 26 ++++++++++ emulators/ripes/distinfo | 13 +++++ emulators/ripes/files/patch-CMakeLists.txt | 83 ++++++++++++++++++++++++++++++ emulators/ripes/pkg-descr | 11 ++++ emulators/ripes/pkg-plist | 11 ++++ 6 files changed, 145 insertions(+) diff --git a/emulators/Makefile b/emulators/Makefile index 0575b24bfe1e..68eac809d3c3 100644 --- a/emulators/Makefile +++ b/emulators/Makefile @@ -111,6 +111,7 @@ SUBDIR += qemu5 SUBDIR += qmc2 SUBDIR += quasi88 + SUBDIR += ripes SUBDIR += riscv-isa-sim SUBDIR += rpcs3 SUBDIR += rtc diff --git a/emulators/ripes/Makefile b/emulators/ripes/Makefile new file mode 100644 index 000000000000..352049b8aaa9 --- /dev/null +++ b/emulators/ripes/Makefile @@ -0,0 +1,26 @@ +PORTNAME= ripes +DISTVERSIONPREFIX= v +DISTVERSION= 2.2.3 +CATEGORIES= emulators + +MAINTAINER= mclay@astate.edu +COMMENT= Graphical processor simulator and assembly editor for the RISC-V ISA + +LICENSE= MIT + +USES= cmake qmake qt:5 + +USE_QT= buildtools_build charts concurrent core gui svg testlib widgets + +CMAKE_INSTALL_PREFIX= ${STAGEDIR}${PREFIX} + +USE_GITHUB= yes +GH_ACCOUNT= mortbopet +GH_PROJECT= Ripes +GH_TUPLE= mortbopet:VSRTL:65ac251:VSRTL/external/VSRTL \ + serge1:ELFIO:79fcd11:ELFIO/external/ELFIO \ + pbhogan:Signals:17881fb:Signals/external/VSRTL/external/Signals \ + USCiLab:cereal:51cbda5:cereal/external/VSRTL/external/cereal \ + mortbopet:better-enums:52a694b:better_enums/external/VSRTL/external/better-enums + +.include diff --git a/emulators/ripes/distinfo b/emulators/ripes/distinfo new file mode 100644 index 000000000000..d34b74de4f63 --- /dev/null +++ b/emulators/ripes/distinfo @@ -0,0 +1,13 @@ +TIMESTAMP = 1638160024 +SHA256 (mortbopet-Ripes-v2.2.3_GH0.tar.gz) = 321dbe3884a339d859e36c6d5fd1c402c616916c72fba5ead544eef64075e7ca +SIZE (mortbopet-Ripes-v2.2.3_GH0.tar.gz) = 14150373 +SHA256 (mortbopet-VSRTL-65ac251_GH0.tar.gz) = 872b619e5c6f590d94a0ab6fec5e037cc3c948fefe3d3e59f7b5ba3bf9bfe8cc +SIZE (mortbopet-VSRTL-65ac251_GH0.tar.gz) = 14500229 +SHA256 (serge1-ELFIO-79fcd11_GH0.tar.gz) = 2f2478e48dc20b30fd705e9ae7208ea8ab175b5aa9195d0705142ad6e9054e55 +SIZE (serge1-ELFIO-79fcd11_GH0.tar.gz) = 4229577 +SHA256 (pbhogan-Signals-17881fb_GH0.tar.gz) = 7d2c420dc34471519306dd4070c571c74cb129cac782cb0a38ba07f0ba8488f8 +SIZE (pbhogan-Signals-17881fb_GH0.tar.gz) = 38528 +SHA256 (USCiLab-cereal-51cbda5_GH0.tar.gz) = efa214cfc850a4a2360baf4419b88c93be2a08b09ff5f9bac604a18498b83cfb +SIZE (USCiLab-cereal-51cbda5_GH0.tar.gz) = 335754 +SHA256 (mortbopet-better-enums-52a694b_GH0.tar.gz) = 6fe24b59328a174eae7b4d755d606615a5bc0397a2b9846079a931486bf94cd3 +SIZE (mortbopet-better-enums-52a694b_GH0.tar.gz) = 136663 diff --git a/emulators/ripes/files/patch-CMakeLists.txt b/emulators/ripes/files/patch-CMakeLists.txt new file mode 100644 index 000000000000..4ab4097a9a80 --- /dev/null +++ b/emulators/ripes/files/patch-CMakeLists.txt @@ -0,0 +1,83 @@ +--- CMakeLists.txt.orig 2022-01-05 13:44:44.993511000 -0600 ++++ CMakeLists.txt 2022-01-05 14:10:26.330330000 -0600 +@@ -1,4 +1,4 @@ +-cmake_minimum_required(VERSION 3.9) ++cmake_minimum_required(VERSION 3.13) + set(CMAKE_CXX_STANDARD 17) + set(CMAKE_CXX_STANDARD_REQUIRED ON) + set(CMAKE_POSITION_INDEPENDENT_CODE ON) +@@ -9,19 +9,27 @@ + set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}") + endif() + +-project(Ripes CXX) ++project(Ripes ++ LANGUAGES CXX ++ DESCRIPTION "A graphical processor simulator and assembly editor for the RISC-V ISA" ++ HOMEPAGE_URL "https://github.com/mortbopet/Ripes" ++) + ++if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Windows") ++ include(GNUInstallDirs) #Must exist after declaring a project ++endif() ++ + # Error flags on everything but MSVC + if(NOT MSVC) + set(CMAKE_CXX_FLAGS "-Wextra -Wall \ +- -Werror=switch -Werror=return-type -Werror=shadow \ ++ -Werror=switch -Werror=return-type \ + -Werror=unreachable-code") + endif() + + if(MSVC) + add_definitions(/bigobj) # Allow big object + elseif(MINGW) +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wa,-mbig-obj") # Allow big object ++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mbig-obj") # Allow big object + endif() + + ###################################################################### +@@ -62,6 +70,7 @@ + include_directories(${RIPES_LIB} PUBLIC external/VSRTL/external) + include_directories(SYSTEM external/ELFIO) + include_directories(SYSTEM external/VSRTL/external/Signals) ++include_directories(external/libelfin_cmake) + include_directories(external) + + option(RIPES_BUILD_VERILATOR_PROCESSORS "Build verilator processors" OFF) +@@ -89,6 +98,9 @@ + endif() + + add_subdirectory(external) ++ ++# Fix the name of the ripes library. ++set(RIPES_LIB ripes_lib) + add_subdirectory(src) + + option(RIPES_BUILD_TESTS "Build Ripes tests" OFF) +@@ -102,4 +114,24 @@ + # Link Qt libraries + target_link_libraries(${APP_NAME} Qt5::Core Qt5::Widgets) + # Link Ripes library +-target_link_libraries(${APP_NAME} ripes_lib) ++target_link_libraries(${APP_NAME} ${RIPES_LIB}) ++ ++if(UNIX AND NOT APPLE) #Define the LINUX variable before testing it ++ set(LINUX TRUE) ++endif() ++ ++if(${LINUX}) ++ install(TARGETS ${APP_NAME} ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++ ) ++elseif(${APPLE}) ++ install(TARGETS ${APP_NAME} ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++ BUNDLE DESTINATION ${CMAKE_INSTALL_BINDIR} ++ ) ++endif() ++ ++install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/appdir/usr/ ++ DESTINATION ${CMAKE_INSTALL_PREFIX} ++) ++ diff --git a/emulators/ripes/pkg-descr b/emulators/ripes/pkg-descr new file mode 100644 index 000000000000..e05e5a24cd18 --- /dev/null +++ b/emulators/ripes/pkg-descr @@ -0,0 +1,11 @@ +Ripes is a graphical processor simulator and assembly code editor built +for the RISC-V instruction set architecture, suitable for teaching how +assembly level code is executed on various microarchitectures. + +Ripes may be used to explore concepts such as how machine code is executed +on a variety of microarchitectures (RV32IMC/RV64IMC based), how different +cache designs influence performance, how C and assembly code is compiled +and assembled to executable machine code, and how a processor interacts +with memory-mapped I/O. + +WWW: https://github.com/mortbopet/ripes diff --git a/emulators/ripes/pkg-plist b/emulators/ripes/pkg-plist new file mode 100644 index 000000000000..dbef8e2e1369 --- /dev/null +++ b/emulators/ripes/pkg-plist @@ -0,0 +1,11 @@ +/usr/local/bin/Ripes +/usr/local/share/applications/Ripes.desktop +/usr/local/share/icons/hicolor/48x48/apps/Ripes.png +/usr/local/share/icons/hicolor/64x64/apps/Ripes.png +/usr/local/share/icons/hicolor/512x512/apps/Ripes.png +/usr/local/share/icons/hicolor/256x256/apps/Ripes.png +/usr/local/share/icons/hicolor/24x24/apps/Ripes.png +/usr/local/share/icons/hicolor/128x128/apps/Ripes.png +/usr/local/share/icons/hicolor/22x22/apps/Ripes.png +/usr/local/share/icons/hicolor/32x32/apps/Ripes.png +/usr/local/share/icons/hicolor/16x16/apps/Ripes.png