From ad97c00f6e0ff9648075945f1405e37d77b075d1 Mon Sep 17 00:00:00 2001 From: Sasha Krassovsky Date: Thu, 29 Oct 2020 22:49:36 -0700 Subject: [PATCH] verilator: create package --- common/build-style/autoconf.sh | 40 ++++++++++++++++++++++ common/environment/build-style/autoconf.sh | 1 + srcpkgs/verilator/template | 12 +++++++ 3 files changed, 53 insertions(+) create mode 100644 common/build-style/autoconf.sh create mode 100644 common/environment/build-style/autoconf.sh create mode 100644 srcpkgs/verilator/template diff --git a/common/build-style/autoconf.sh b/common/build-style/autoconf.sh new file mode 100644 index 00000000000..8bb4a2f5a9a --- /dev/null +++ b/common/build-style/autoconf.sh @@ -0,0 +1,40 @@ +# +# THis helper is for templates using autoconf. +# +do_configure() { + autoconf + ./configure ${configure_args} --prefix /usr +} + +do_build() { + : ${make_cmd:=make} + + ${make_cmd} ${makejobs} ${make_build_args} ${make_build_target} +} + +do_check() { + if [ -z "$make_cmd" ] && [ -z "$make_check_target" ]; then + if make -q check 2>/dev/null; then + : + else + if [ $? -eq 2 ]; then + msg_warn 'No target to "make check".\n' + return 0 + fi + fi + fi + + : ${make_cmd:=make} + : ${make_check_target:=check} + + ${make_cmd} ${make_check_args} ${make_check_target} +} + +do_install() { + : ${make_cmd:=make} + : ${make_install_target:=install} + + ${make_cmd} DESTDIR=${DESTDIR} ${make_install_args} ${make_install_target} +} + + diff --git a/common/environment/build-style/autoconf.sh b/common/environment/build-style/autoconf.sh new file mode 100644 index 00000000000..881f67e0e1f --- /dev/null +++ b/common/environment/build-style/autoconf.sh @@ -0,0 +1 @@ +hostmakedepends+=" autoconf" diff --git a/srcpkgs/verilator/template b/srcpkgs/verilator/template new file mode 100644 index 00000000000..1d527973075 --- /dev/null +++ b/srcpkgs/verilator/template @@ -0,0 +1,12 @@ +# Template file for 'foo' +pkgname=verilator +version=4.102 +revision=1 +build_style=autoconf +makedepends="flex" +short_desc="C++ Library for RTL emulation" +maintainer="krassovskysasha@gmail.com" +license="GPL-3.0" +homepage="https://veripool.org/wiki/verilator" +distfiles="https://github.com/verilator/verilator/archive/v${version}.tar.gz" +checksum="4e4f4aff00af9a15a61c94b67ed070cd6312ddcc0f0d340a6df2199480064cef"