1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 inherit eutils multilib toolchain-funcs autotools-utils
9 DESCRIPTION="A C++ based modeling platform for VLSI and system-level co-design"
10 HOMEPAGE="http://accellera.org/community/systemc"
11 SRC_URI="http://accellera.org/images/downloads/standards/${PN}/${MY_P}.tar.gz"
15 IUSE="doc static-libs"
16 KEYWORDS="~amd64 ~x86"
20 AUTOTOOLS_IN_SOURCE_BUILD=1
22 S="${WORKDIR}/${MY_P}"
25 # drop compiler check to enable use of CXX
26 epatch "${FILESDIR}"/${P}-config.patch
28 sed -i -e "s:OPT_CXXFLAGS=\"-O3\":OPT_CXXFLAGS=\"\":g" configure.in || die "Patching configure.in failed"
30 sed -i -e "s:lib-\$(TARGET_ARCH):$(get_libdir):g" $(find . -name Makefile.am) || die "Patching Makefile.am failed"
33 sed -i -e "s:\$(prefix):\$(DESTDIR)\$(prefix):g" $(find . -name Makefile.am) || die "Patching Makefile.am failed"
37 sed -i -e "s:\$(DESTDIR)\$(libdir):\$(libdir):g" src/sysc/Makefile.in || die
39 for sfile in src/sysc/qt/md/*.s ; do
41 #if defined(__linux__) && defined(__ELF__) \
42 .section .note.GNU-stack,"",%progbits \
43 #endif' "${sfile}" || die "Patching ${sfile} failed"
48 econf $(use_enable static-libs static) CXX=$(tc-getCXX)
57 dodoc AUTHORS ChangeLog INSTALL NEWS README RELEASENOTES
58 use doc && dodoc -r docs/*
60 autotools-utils_src_install
64 elog "If you want to run the examples, you need to :"
65 elog " tar xvfz ${PORTAGE_ACTUAL_DISTDIR}/${A}"
67 elog " find examples -name 'Makefile.*' -exec sed -i -e 's/-lm/-lm -lpthread/' '{}' \;"