Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sci-electronics/systemc: Bump version to 2.3.2
This version of systemc attempts to do its own compile-time detection of what C++ standard the current C++ compiler is capable of. Overwriting this is possible by setting certain macros at compile-time. Those macros are toggled by the cxx03,11,14,17 USE flags. Bug: https://bugs.gentoo.org/637952 Package-Manager: Portage-2.3.14, Repoman-2.3.6
- Loading branch information
Showing
3 changed files
with
81 additions
and
0 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,2 +1,3 @@ | ||
DIST systemc-2.3.0a.tar.gz 7084178 SHA256 b9da6e78e960543eb531b7bfaf65809320f53832744ee22af4431300e81bf8c5 SHA512 3af3c0c96a95ee75e0a6c046fdd94ee822b8fbbc1c79e7bbf9b905e7a2d3689282e6d97cfa56c93094155d79126e74f052c0f0e12f31bf4321b28a03aae347ab WHIRLPOOL b5b3fe7ab3dcf523e5b26177a787649b2793002544cf35c97aec34d1fcc9e5481f47ec8c031cb1a7ad4390876c549e2145283a31551129bde2aecb9a66209fee | ||
DIST systemc-2.3.1a.tar.gz 7050669 SHA256 3e9d0afb5b76f5435305c2f0481b203041373d4a24776c301204c87b3e0f5c81 SHA512 cd52eb6e413c8b852e19c8387766eacbddf85e9b2f4d137f3d82d0d4025f13a44216a2e6cacf7b9e2b972584912a4a1c75cdb37a568330ce66a6bf909ca1b723 WHIRLPOOL 678b655dcf63c0d201a7be3827775baa4a79761411a5643a4132842e576fc92502b166ff876c97a546c2ed78503b2ecb4fc2319b8b651dfcc3437dd9baae26f8 | ||
DIST systemc-2.3.2.tar.gz 7128068 SHA256 a28eeee00189f0e39f51461dcd7dbed7fb38e4e07dbd9e723473000ce6ef73c5 SHA512 050e99a50997a6a9594d6083d1d990540026fa4ab5985ec2923602c40cc4f55a2b099cd71b681ba52e5ed745ce016133244d0dc061b79676804c3c07568e60e9 WHIRLPOOL 33a6d59dc6fc571bff0e68355f421eb2d43672ee3183a3a4bff3e3d719340e313d683b5e7d10124c35e4350ca88fd83bfc528c5c6f39fd1a3c16bd7cf47bb222 |
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
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,74 @@ | ||
# Copyright 1999-2017 Gentoo Foundation | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI=5 | ||
|
||
inherit eutils toolchain-funcs flag-o-matic | ||
MY_P="${P}" | ||
|
||
DESCRIPTION="A C++ based modeling platform for VLSI and system-level co-design" | ||
HOMEPAGE="http://accellera.org/community/systemc" | ||
SRC_URI="http://www.accellera.org/images/downloads/standards/${PN}/${MY_P}.tar.gz" | ||
|
||
SLOT="0" | ||
LICENSE="Apache-2.0" | ||
IUSE="doc static-libs cxx03 cxx11 +cxx14 cxx17" | ||
KEYWORDS="~amd64 ~x86" | ||
|
||
REQUIRED_USE="^^ ( cxx03 cxx11 cxx14 cxx17 )" | ||
|
||
RESTRICT="test" | ||
|
||
AUTOTOOLS_IN_SOURCE_BUILD=1 | ||
|
||
S="${WORKDIR}/${MY_P}" | ||
|
||
src_configure() { | ||
if use cxx17 ; then | ||
if ! test-flag-CXX -std=c++17; then | ||
eerror "${P} requires C++17-capable C++ compiler. Your current compiler" | ||
eerror "does not seem to support -std=c++17 option. Please upgrade your compiler" | ||
eerror "to gcc-7 or an equivalent version supporting C++17." | ||
die "Currently active compiler does not support -std=c++17" | ||
fi | ||
append-cxxflags -std=c++17 | ||
append-cxxflags -DSC_CPLUSPLUS=201703L | ||
elif use cxx14 ; then | ||
if ! test-flag-CXX -std=c++14; then | ||
eerror "${P} requires C++14-capable C++ compiler. Your current compiler" | ||
eerror "does not seem to support -std=c++14 option. Please upgrade your compiler" | ||
eerror "to gcc-4.9 or an equivalent version supporting C++14." | ||
die "Currently active compiler does not support -std=c++14" | ||
fi | ||
append-cxxflags -std=c++14 | ||
append-cxxflags -DSC_CPLUSPLUS=201402L | ||
elif use cxx11 ; then | ||
append-cxxflags -std=c++11 | ||
append-cxxflags -DSC_CPLUSPLUS=201103L | ||
elif use cxx03 ; then | ||
append-cxxflags -std=c++03 | ||
append-cxxflags -DSC_CPLUSPLUS=199701L | ||
fi | ||
econf $(use_enable static-libs static) CXX=$(tc-getCXX) \ | ||
--with-unix-layout | ||
} | ||
|
||
src_install() { | ||
dodoc AUTHORS ChangeLog INSTALL NEWS README RELEASENOTES | ||
rm docs/Makefile* || die | ||
use doc && dodoc -r docs/* | ||
cd src | ||
default | ||
} | ||
|
||
pkg_postinst() { | ||
elog "If you want to run the examples, you need to :" | ||
elog " tar xvfz ${PORTAGE_ACTUAL_DISTDIR}/${A}" | ||
elog " cd ${MY_P}" | ||
elog " find examples -name 'Makefile.*' -exec sed -i -e 's/-lm/-lm -lpthread/' '{}' \;" | ||
elog " ./configure" | ||
elog " cd examples" | ||
elog " make check" | ||
elog "Code linked against SystemC must use the same C++ standard as SystemC, which is $(get-flag -std)" | ||
elog "You can control which standard is used to build SystemC via the cxx03,cxx11,cxx14 and cxx17 USE flags." | ||
} |