-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d3522c9
commit 44248dd
Showing
10 changed files
with
127 additions
and
264 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,72 +1,72 @@ | ||
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 | ||
|
||
PortSystem 1.0 | ||
PortGroup cmake 1.1 | ||
|
||
name simulavr | ||
version 1.0.0 | ||
revision 2 | ||
version 1.1.0 | ||
revision 0 | ||
checksums rmd160 6654189a7da966ff31ae859fef4eb753329c17e5 \ | ||
sha256 8d46a9cf05eb651c3258f720dfc3b967567cdb1a0279f55365e4203eabff9c27 \ | ||
size 1109235 | ||
|
||
categories emulators devel | ||
maintainers nomaintainer | ||
license GPL-2+ MIT | ||
|
||
description Simulator for Atmel AVR microcontrollers | ||
long_description The SimulAVR program is a simulator for the Atmel AVR family \ | ||
of microcontrollers. (ATtiny and ATmega) SimulAVR can be used \ | ||
either standalone or as a remote target for avr-gdb. | ||
|
||
homepage https://www.nongnu.org/simulavr/ | ||
platforms darwin | ||
master_sites https://savannah.nongnu.org/download/simulavr/ | ||
# No distfile on normal download server: | ||
# https://savannah.nongnu.org/bugs/?65923 | ||
master_sites http://git.savannah.nongnu.org/cgit/simulavr.git/snapshot/ | ||
distname ${name}-release-${version} | ||
|
||
checksums rmd160 0e9eb32f398943449b564e919765348c32f4c600 \ | ||
sha256 39d93faa3eeae2bee15f682dd6a48fb4d4366addd12a2abebb04c99f87809be7 | ||
depends_build-append \ | ||
bin:gzip:gzip \ | ||
port:help2man \ | ||
bin:makeinfo:texinfo | ||
|
||
depends_build bin:makeinfo:texinfo | ||
depends_lib port:avr-binutils \ | ||
port:swig-python \ | ||
port:swig-tcl | ||
depends_lib port:avr-gcc | ||
|
||
patchfiles patch-src_systemclock.cpp \ | ||
patch-msleep \ | ||
patch-src_Makefile.in \ | ||
patch-at90can-ivs \ | ||
patch-at90can-elpm | ||
patchfiles doc.patch \ | ||
include.patch \ | ||
no-git.patch \ | ||
no-python.patch | ||
|
||
post-patch { | ||
# Hack the swig macro into detecting a modern version of swig | ||
reinplace "s|required=1.3.18|required=3.0.8|g" ${worksrcpath}/configure | ||
# https://savannah.nongnu.org/bugs/index.php?65943 | ||
reinplace "s/0\.0\.0/${version}/g" ${worksrcpath}/cmake/get_git_version.sh | ||
# https://savannah.nongnu.org/bugs/index.php?65947 | ||
delete ${worksrcpath}/include/elfio/VERSION | ||
} | ||
|
||
# Apply changes from https://savannah.nongnu.org/bugs/?35737 to fix building | ||
# against the later avr-libc releases | ||
set regexps { | ||
"s/SIG_INTERRUPT0/INT0_vect/" | ||
"s/SIG_INTERRUPT1/INT1_vect/" | ||
"s/SIG_INTERRUPT2/INT2_vect/" | ||
"s/SIG_OUTPUT_COMPARE2/TIMER2_COMP_vect/" | ||
"s/SIG_OUTPUT_COMPARE2A/TIMER2_COMPA_vect/" | ||
"s/SIG_OUTPUT_COMPARE3B/TIMER3_COMPB_vect/" | ||
"s/SIG_UART0_RECV/USART0_RX_vect/" | ||
"s/SIG_UART0_DATA/USART0_UDRE_vect/" | ||
"s/__attribute__((progmem))/PROGMEM/" | ||
"s/__attribute__ ((progmem))/PROGMEM/" | ||
} | ||
compiler.cxx_standard 2011 | ||
|
||
fs-traverse fpath ${worksrcpath} { | ||
set ext [file extension "${fpath}"] | ||
if {[file isfile "${fpath}"] && ($ext == ".c" || $ext == ".h" || $ext == ".cpp")} { | ||
foreach r $regexps { | ||
reinplace -locale C $r $fpath | ||
} | ||
} | ||
} | ||
configure.args -DCMAKE_DISABLE_FIND_PACKAGE_PythonInterp=ON \ | ||
-DDOT=DOT-NOTFOUND \ | ||
-DDOXYGEN=DOXYGEN-NOTFOUND \ | ||
-DDPKG=DPKG-NOTFOUND \ | ||
-DFAKEROOT=FAKEROOT-NOTFOUND \ | ||
-DVALGRIND=VALGRIND-NOTFOUND | ||
|
||
reinplace "s|^static char unshifted|static const char unshifted|" ${worksrcpath}/examples/atmel_key/scancodes.h | ||
reinplace {s|prog_char shifted\[\]\[2\]|static const char shifted\[\]\[2\] PROGMEM|g} ${worksrcpath}/examples/atmel_key/scancodes.h | ||
} | ||
# https://savannah.nongnu.org/bugs/index.php?58231 | ||
build.target-append doc | ||
|
||
# https://savannah.nongnu.org/bugs/index.php?65948 | ||
build.env DYLD_LIBRARY_PATH=${build.dir}/libsim | ||
test.env DYLD_LIBRARY_PATH=${build.dir}/libsim | ||
|
||
# avr-binutils' libbfd.a can't find gettext and zlib (#41106) | ||
configure.ldflags-append -lintl -lz | ||
configure.args --with-bfd="${prefix}/avr/host" \ | ||
--with-libiberty="${prefix}/avr/host" | ||
#configure.args --mandir=${prefix}/share/man | ||
# Tests require python, but allowing python to be found can cause unwanted | ||
# documentation to be built. | ||
# https://savannah.nongnu.org/bugs/index.php?65945 | ||
test.run no | ||
test.target check | ||
|
||
livecheck.type regex | ||
livecheck.url [lindex ${master_sites} 0] | ||
livecheck.regex ${name}-(\[0-9.\]+)${extract.suffix} | ||
livecheck.url https://git.savannah.nongnu.org/cgit/simulavr.git/refs/ | ||
livecheck.regex release-(\[0-9.\]+)[quotemeta ${extract.suffix}] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
Fix documentation install directory. | ||
https://savannah.nongnu.org/bugs/index.php?65952 | ||
--- app/CMakeLists.txt.orig 2019-12-20 07:13:39.000000000 -0600 | ||
+++ app/CMakeLists.txt 2024-07-03 17:58:45.000000000 -0500 | ||
@@ -21,6 +21,6 @@ | ||
${docDir}/README.gdb | ||
${docDir}/SUPPORT | ||
${docDir}/TODO) | ||
-install(FILES ${docSrcs} DESTINATION "share/doc/common") | ||
+install(FILES ${docSrcs} DESTINATION "share/doc/simulavr") | ||
|
||
# EOF | ||
\ No newline at end of file | ||
--- doc/CMakeLists.txt.orig 2019-12-20 07:13:39.000000000 -0600 | ||
+++ doc/CMakeLists.txt 2024-07-03 17:58:17.000000000 -0500 | ||
@@ -63,7 +63,7 @@ | ||
add_custom_target(doc-changelog DEPENDS ${DOC_CHANGELOG}) | ||
add_dependencies(progdoc doc-changelog) | ||
|
||
- install(FILES ${DOC_CHANGELOG} DESTINATION "share/doc/common") | ||
+ install(FILES ${DOC_CHANGELOG} DESTINATION "share/doc/simulavr") | ||
endif() | ||
|
||
add_custom_target(doc COMMENT "create simulavr documentation" DEPENDS progdoc) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
Install headers into subdirectory. | ||
https://savannah.nongnu.org/bugs/?65950 | ||
--- libsim/CMakeLists.txt.orig 2019-12-20 07:13:39.000000000 -0600 | ||
+++ libsim/CMakeLists.txt 2024-07-03 18:05:54.000000000 -0500 | ||
@@ -42,12 +42,12 @@ | ||
file(GLOB files_elfio "${CMAKE_SOURCE_DIR}/include/elfio/elfio/*.hpp") | ||
|
||
install(TARGETS sim DESTINATION "lib") | ||
-install(FILES ${files_common} DESTINATION "include") | ||
-install(FILES ${files_hwtimer} DESTINATION "include/hwtimer") | ||
-install(FILES ${files_gdb} DESTINATION "include/gdb") | ||
-install(FILES ${files_ui} DESTINATION "include/ui") | ||
-install(FILES ${files_cmd} DESTINATION "include/cmd") | ||
-install(FILES ${files_elfio} DESTINATION "include/elfio/elfio") | ||
+install(FILES ${files_common} DESTINATION "include/simulavr") | ||
+install(FILES ${files_hwtimer} DESTINATION "include/simulavr/hwtimer") | ||
+install(FILES ${files_gdb} DESTINATION "include/simulavr/gdb") | ||
+install(FILES ${files_ui} DESTINATION "include/simulavr/ui") | ||
+install(FILES ${files_cmd} DESTINATION "include/simulavr/cmd") | ||
+install(FILES ${files_elfio} DESTINATION "include/simulavr/elfio/elfio") | ||
|
||
if(BUILD_VERILOG) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
Do not try to get version information from git. It will not work because we are | ||
using a tarball not a git clone. | ||
https://savannah.nongnu.org/bugs/index.php?65943 | ||
--- cmake/get_git_version.sh.orig 2019-12-20 07:13:39.000000000 -0600 | ||
+++ cmake/get_git_version.sh 2024-07-03 12:28:33.000000000 -0500 | ||
@@ -1,5 +1,5 @@ | ||
#!/bin/sh | ||
-if which git > /dev/null 2> /dev/null; then | ||
+if false; then | ||
H=$(git log --pretty=format:'%h' -n 1) | ||
D=$(git diff --quiet --exit-code || echo "+") | ||
T=$(git describe --abbrev=0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
Don't fail if python isn't found. | ||
https://savannah.nongnu.org/bugs/index.php?65945 | ||
--- CMakeLists.txt.orig 2019-12-20 07:13:39.000000000 -0600 | ||
+++ CMakeLists.txt 2024-07-03 16:19:04.000000000 -0500 | ||
@@ -26,11 +26,15 @@ | ||
# find tools | ||
# find python executable, for Python3 you need a virtual env, which links python to python3 executable! | ||
find_package(PythonInterp 3.5) | ||
+if(PythonInterp_FOUND) | ||
execute_process(COMMAND ${PYTHON_EXECUTABLE} | ||
-c "import sys; print('%s.%s' % (sys.version_info.major, sys.version_info.minor))" | ||
OUTPUT_VARIABLE PYTHON_VERSION | ||
OUTPUT_STRIP_TRAILING_WHITESPACE) | ||
string(REGEX MATCH "[0-9]" PYTHON_MAJOR_VERSION ${PYTHON_VERSION}) | ||
+else() | ||
+ set(PYTHON_MAJOR_VERSION 0) | ||
+endif() | ||
|
||
# SWIG | ||
if(BUILD_TCL OR BUILD_PYTHON) |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.