From 1aeba07078844e04c409bf94dcc29752a0022d8a Mon Sep 17 00:00:00 2001 From: Stefan Huber Date: Sat, 30 Jan 2021 23:24:52 +0100 Subject: [PATCH] Add dev-embedded/simulavr-1.1.0 --- dev-embedded/simulavr/Manifest | 4 + .../simulavr/files/fix-git-version.patch | 13 +++ .../simulavr/files/fix-installpath.patch | 86 +++++++++++++++++++ dev-embedded/simulavr/simulavr-1.1.0.ebuild | 47 ++++++++++ 4 files changed, 150 insertions(+) create mode 100644 dev-embedded/simulavr/Manifest create mode 100644 dev-embedded/simulavr/files/fix-git-version.patch create mode 100644 dev-embedded/simulavr/files/fix-installpath.patch create mode 100644 dev-embedded/simulavr/simulavr-1.1.0.ebuild diff --git a/dev-embedded/simulavr/Manifest b/dev-embedded/simulavr/Manifest new file mode 100644 index 0000000..fb6df4f --- /dev/null +++ b/dev-embedded/simulavr/Manifest @@ -0,0 +1,4 @@ +AUX fix-git-version.patch 395 BLAKE2B cf3ffb959df473b623cfe583b07adfc7a45015e617fff053a04eb9ba79818afb4a885b0e772f4874e4168297634fc3cb026e73c43366492d8c30f4ba8d568e17 SHA512 9b54de9253041dbdd481c19c200fe273de5ecbfcbf0466620391e223b5f931d4afc47fff531aaedb605627fedb166c60f93d80a1c890b9c265ba76c2d1a66db6 +AUX fix-installpath.patch 3774 BLAKE2B f6f5fb89e95fe8552d01bd6a19b59b0e43a640c28603f50294844c1bc7f24041f94033cac60176cec5546608a613b7f9a43942288ab71e6e76a2a713b2b8289b SHA512 6c85bde849d2f1db5156361dd2ed53ecde45a069848734770fc3c86bb4a44fd01820ac42a7a83d89cfe2a6c500c66ee856dfcb9f5f5e110c587a825dabc09417 +DIST simulavr-release-1.1.0.tar.gz 1109235 BLAKE2B 6155826d148cb0dc5165d7023abfe6e68fa678cff1fd59bd5ddd9f398e56eabd616c467c19f131d82cfea4a2f701131dacad2380c56eddeff5ff6a183979dbdd SHA512 6f7cd84aa4c3b42b76df2b325d7979706eb27d19598906977bbd63b277c2241e1ca1dc7fbc14157f20c10b27316820cdbd102d247b189cbaeb189bcb1a5f2ff6 +EBUILD simulavr-1.1.0.ebuild 1086 BLAKE2B 95a9c39cbc972b9f366e5c2463eda4d320a97500d8a7643f4023a63e3a865055ff3ceac5afdaf9e5e7dfcd87f88dc43d8ec2045f576fbb8611eeb668d21a02f2 SHA512 abe20f2462e4912252bdbc8cafe12f855dc6029151162c6a1815041c5f6b1a0779e9320475578c6b44b98b0279bb0fe48570d40ad44aefc92172f9b7b3dcba88 diff --git a/dev-embedded/simulavr/files/fix-git-version.patch b/dev-embedded/simulavr/files/fix-git-version.patch new file mode 100644 index 0000000..9532081 --- /dev/null +++ b/dev-embedded/simulavr/files/fix-git-version.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 98f80df..8b18ba1 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -12,8 +12,6 @@ include(FindPythonModule) + include(GetGitInfo) + + # get git info +-get_git_info() +-set(PACKAGE_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}") + + message(STATUS "version major ${VERSION_MAJOR} / minor ${VERSION_MINOR} / patch ${VERSION_PATCH}") + diff --git a/dev-embedded/simulavr/files/fix-installpath.patch b/dev-embedded/simulavr/files/fix-installpath.patch new file mode 100644 index 0000000..a1f6b4a --- /dev/null +++ b/dev-embedded/simulavr/files/fix-installpath.patch @@ -0,0 +1,86 @@ +diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt +index 5e8fa25..8304a0c 100644 +--- a/doc/CMakeLists.txt ++++ b/doc/CMakeLists.txt +@@ -14,11 +14,10 @@ add_custom_target(progdoc COMMENT "create program documentation files") + if(HELP2MAN AND GZIP) + message(STATUS "can create man page") + +- set(DOC_MAN ${CMAKE_CURRENT_BINARY_DIR}/simulavr.1.gz) ++ set(DOC_MAN ${CMAKE_CURRENT_BINARY_DIR}/simulavr.1) + + add_custom_command(OUTPUT ${DOC_MAN} +- COMMAND ${HELP2MAN} -o ${CMAKE_CURRENT_BINARY_DIR}/simulavr.1 "$" +- COMMAND ${GZIP} -n9 ${CMAKE_CURRENT_BINARY_DIR}/simulavr.1) ++ COMMAND ${HELP2MAN} -o ${CMAKE_CURRENT_BINARY_DIR}/simulavr.1 "$") + add_custom_target(doc-man DEPENDS ${DOC_MAN}) + add_dependencies(progdoc doc-man) + +@@ -36,11 +35,10 @@ endif() + if(MAKEINFO AND GZIP) + message(STATUS "can create info page") + +- set(DOC_INFO ${CMAKE_CURRENT_BINARY_DIR}/simulavr.info.gz) ++ set(DOC_INFO ${CMAKE_CURRENT_BINARY_DIR}/simulavr.info) + + add_custom_command(OUTPUT ${DOC_INFO} +- COMMAND ${MAKEINFO} ${CMAKE_CURRENT_BINARY_DIR}/simulavr.texi +- COMMAND ${GZIP} -n9 ${CMAKE_CURRENT_BINARY_DIR}/simulavr.info) ++ COMMAND ${MAKEINFO} ${CMAKE_CURRENT_BINARY_DIR}/simulavr.texi) + add_custom_target(doc-info DEPENDS ${DOC_INFO}) + add_dependencies(progdoc doc-info) + +@@ -56,14 +54,12 @@ else() + endif() + + if(GZIP) +- set(DOC_CHANGELOG ${CMAKE_CURRENT_BINARY_DIR}/changelog.gz) ++ set(DOC_CHANGELOG ${CMAKE_CURRENT_BINARY_DIR}/changelog) + +- add_custom_command(OUTPUT ${DOC_CHANGELOG} +- COMMAND ${GZIP} -n9 ${CMAKE_CURRENT_BINARY_DIR}/changelog) + 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-${PACKAGE_VERSION}") + endif() + + add_custom_target(doc COMMENT "create simulavr documentation" DEPENDS progdoc) +diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt +index 8c2f7c0..c23b06f 100644 +--- a/app/CMakeLists.txt ++++ b/app/CMakeLists.txt +@@ -21,6 +21,6 @@ set(docSrcs ${docDir}/AUTHORS + ${docDir}/README.gdb + ${docDir}/SUPPORT + ${docDir}/TODO) +-install(FILES ${docSrcs} DESTINATION "share/doc/common") ++install(FILES ${docSrcs} DESTINATION "share/doc/simulavr-${PACKAGE_VERSION}") + + EOF +diff --git a/libsim/CMakeLists.txt b/libsim/CMakeLists.txt +index c50f050..6175124 100644 +--- a/libsim/CMakeLists.txt ++++ b/libsim/CMakeLists.txt +@@ -41,13 +41,13 @@ file(GLOB files_ui "${CMAKE_SOURCE_DIR}/include/ui/*.h") + file(GLOB files_cmd "${CMAKE_SOURCE_DIR}/include/cmd/*.h") + 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(TARGETS sim LIBRARY) ++install(FILES ${files_common} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/") ++install(FILES ${files_hwtimer} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/hwtimer") ++install(FILES ${files_gdb} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/gdb") ++install(FILES ${files_ui} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/ui") ++install(FILES ${files_cmd} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/cmd") ++install(FILES ${files_elfio} DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/elfio/elfio") + + if(BUILD_VERILOG) + diff --git a/dev-embedded/simulavr/simulavr-1.1.0.ebuild b/dev-embedded/simulavr/simulavr-1.1.0.ebuild new file mode 100644 index 0000000..4b66d74 --- /dev/null +++ b/dev-embedded/simulavr/simulavr-1.1.0.ebuild @@ -0,0 +1,47 @@ +# Copyright 2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit cmake-utils git-r3 + +EGIT_REPO_URI="https://git.savannah.gnu.org/git/simulavr.git" +EGIT_COMMIT="release-${PV}" + +DESCRIPTION="A simulator for the Atmel AVR family of microcontrollers" +HOMEPAGE="https://www.nongnu.org/simulavr/" +MYPNV="${PN}-${EGIT_COMMIT}" +SRC_URI="https://git.savannah.nongnu.org/cgit/${PN}.git/snapshot/${MYPNV}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~x86 ~amd64" + +IUSE="verilog" +RDEPEND="" +DEPEND="sys-apps/sed + cross-avr/gcc + >=dev-lang/swig-2.0.0 + sys-apps/texinfo + >=dev-lang/python-3.5 + sys-libs/ncurses + verilog? ( dev-tcltk/itcl sci-electronics/iverilog )" +RDEPEND="${DEPEND}" +BDEPEND="" + +PATCHES="${FILESDIR}/fix-git-version.patch + ${FILESDIR}/fix-installpath.patch" + +src_configure() { + local mycmakeargs=( + -DCMAKE_INSTALL_INCLUDEDIR=include/${PN}-${PV} + -DPACKAGE_VERSION=${PV} + -DBUILD_VERILOG=$(usex verilog) + ) + + cmake-utils_src_configure ${mycmakeargs} +} + +src_compile() { + cmake-utils_src_compile + cmake-utils_src_make doc +} -- 2.39.5