diff options
author | William PC <w_calandrini[at]hotmail[dot]com> | 2022-10-20 15:33:29 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2022-10-20 15:33:29 +0700 |
commit | fe7e0bf0c9680a5ecb3d87fa74f734e68fb57e09 (patch) | |
tree | 3212561445dcd67bb3ec9e57f25caae73d74f52a /development/SystemC | |
parent | 4f444956d8cafe89e6032bf0d6593b7dff47d1b3 (diff) |
development/SystemC: Added (SystemC Class Library).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'development/SystemC')
-rw-r--r-- | development/SystemC/README | 17 | ||||
-rw-r--r-- | development/SystemC/SystemC.SlackBuild | 136 | ||||
-rw-r--r-- | development/SystemC/SystemC.info | 10 | ||||
-rw-r--r-- | development/SystemC/slack-desc | 19 |
4 files changed, 182 insertions, 0 deletions
diff --git a/development/SystemC/README b/development/SystemC/README new file mode 100644 index 0000000000000..e34ed3437aebf --- /dev/null +++ b/development/SystemC/README @@ -0,0 +1,17 @@ + SystemC addresses the need for a system design and verification +language that spans hardware and software. It is a language built +in standard C++ by extending the language with the use of class +libraries. The language is particularly suited to model system's +partitioning, to evaluate and verify the assignment of blocks to +either hardware or software implementations, and to architect and +measure the interactions between and among functional blocks. Leading +companies in the intellectual property (IP), electronic design +automation (EDA), semiconductor, electronic systems, and embedded +software industries currently use SystemC for architectural +exploration, to deliver high-performance hardware blocks at various +levels of abstraction and to develop virtual platforms for +hardware/software co-design. SystemC has been standardized by +the Open SystemC Initiative (OSCI) and Accellera Systems Initiative +and ratified as IEEE Std. 1666-2011. + +For enabling pthreads set the environment variable PTHREAD=yes. diff --git a/development/SystemC/SystemC.SlackBuild b/development/SystemC/SystemC.SlackBuild new file mode 100644 index 0000000000000..a06cc8cabb0e4 --- /dev/null +++ b/development/SystemC/SystemC.SlackBuild @@ -0,0 +1,136 @@ +#!/bin/bash + +# Slackware build script for SystemC + +# Copyright 2022 William PC - Seattle, USA +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +cd $(dirname $0) ; CWD=$(pwd) + +PRGNAM=SystemC +VERSION=${VERSION:-2.3.3} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} + +SRCNAM=${PRGNAM,,} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $SRCNAM-$VERSION +tar xvf $CWD/$SRCNAM-$VERSION.tar.gz +cd $SRCNAM-$VERSION + +chown -R root:root . +find -L . \ + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + + +if [ "${PTHREADS:-no}" == "yes" ]; then + OPTS="-enable-pthreads" +fi + +# fix for installing examples at /usr/share/$PRGNAM-$VERSION +sed -i.orig 's#${rootdocdir}/examples#${prefix}/share/${PACKAGE_NAME}-${PACKAGE_VERSION}/examples#' configure + +# fix installation path for building examples +sed -i 's#^\(SYSTEMC_HOME?=\).*#\1/usr#' examples/build-unix/Makefile.config +sed -i 's#libsystemc.a#libsystemc.so#' examples/build-unix/Makefile.rules +sed -i 's/^SYSTEMC_HOME/#&/' examples/sysc/{2.1,2.3}/*/Makefile + +mkdir -p build +cd build +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +../configure \ + --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --mandir=/usr/man \ + --docdir=/usr/doc/$PRGNAM-$VERSION \ + --disable-static \ + --with-arch-suffix=no \ + $OPTS \ + --build=$ARCH-slackware-linux + +make +make install DESTDIR=$PKG +cd .. + +# remove install doc +rm $PKG/usr/doc/$PRGNAM-$VERSION/INSTALL + + +# Don't ship .la files: +rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la + +find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + +find $PKG -depth -type d -empty -delete || true + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a AUTHORS ChangeLog LICENSE NEWS \ + NOTICE RELEASENOTES $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE diff --git a/development/SystemC/SystemC.info b/development/SystemC/SystemC.info new file mode 100644 index 0000000000000..ac0d885f67dc5 --- /dev/null +++ b/development/SystemC/SystemC.info @@ -0,0 +1,10 @@ +PRGNAM="SystemC" +VERSION="2.3.3" +HOMEPAGE="https://systemc.org" +DOWNLOAD="https://github.com/accellera-official/systemc/archive/2.3.3/systemc-2.3.3.tar.gz" +MD5SUM="589d313f3477f42d259607e5dbd316b4" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="William PC" +EMAIL="w_calandrini[at]hotmail[dot]com" diff --git a/development/SystemC/slack-desc b/development/SystemC/slack-desc new file mode 100644 index 0000000000000..ca5bc3d4e2b43 --- /dev/null +++ b/development/SystemC/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +SystemC: SystemC (SystemC Class Library for design and verification HW/SW) +SystemC: +SystemC: SystemC addresses the need for a system design and verification +SystemC: language that spans hardware and software. It is a language built as +SystemC: an ANSI C++ class library created for design and verification. Users +SystemC: worldwide are applying SystemC to system-level modeling, abstract +SystemC: analog/mixed-signal modeling, architectural exploration, performance +SystemC: modeling, software development, functional verification, and high- +SystemC: level synthesis. The SystemC API and its semantics are developed +SystemC: by the Accellera Systems Initiative and formally standardized +SystemC: and governed by the IEEE in the IEEE Std. 1666-2011 standard. |