From a2fcd74232de65b61cfe566ab58586be4673db0e Mon Sep 17 00:00:00 2001 From: Fridrich von Stauffenberg Date: Mon, 12 Dec 2011 08:22:31 -0200 Subject: academic/qucs: Added (circuit simulator) Signed-off-by: Niels Horn --- academic/qucs/README | 6 +++ academic/qucs/doinst.sh | 4 ++ academic/qucs/qucs-disable-tr1.patch | 10 ++++ academic/qucs/qucs.SlackBuild | 98 +++++++++++++++++++++++++++++++++++ academic/qucs/qucs.desktop | 10 ++++ academic/qucs/qucs.info | 10 ++++ academic/qucs/qucs.png | Bin 0 -> 17288 bytes academic/qucs/slack-desc | 19 +++++++ 8 files changed, 157 insertions(+) create mode 100644 academic/qucs/README create mode 100644 academic/qucs/doinst.sh create mode 100644 academic/qucs/qucs-disable-tr1.patch create mode 100644 academic/qucs/qucs.SlackBuild create mode 100644 academic/qucs/qucs.desktop create mode 100644 academic/qucs/qucs.info create mode 100644 academic/qucs/qucs.png create mode 100644 academic/qucs/slack-desc (limited to 'academic/qucs') diff --git a/academic/qucs/README b/academic/qucs/README new file mode 100644 index 0000000000..39d14c1496 --- /dev/null +++ b/academic/qucs/README @@ -0,0 +1,6 @@ +Qucs is an integrated circuit simulator which aims to support all +kinds of circuit simulation types, e.g. DC, AC, S-parameter, +harmonic balance analysis, noise analysis, etc. + +This requires qt3. +If the build fails, make sure that QTDIR is set properly. diff --git a/academic/qucs/doinst.sh b/academic/qucs/doinst.sh new file mode 100644 index 0000000000..4e8ba7071d --- /dev/null +++ b/academic/qucs/doinst.sh @@ -0,0 +1,4 @@ +if [ -x /usr/bin/update-desktop-database ]; then + /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1 +fi + diff --git a/academic/qucs/qucs-disable-tr1.patch b/academic/qucs/qucs-disable-tr1.patch new file mode 100644 index 0000000000..0be7ae00eb --- /dev/null +++ b/academic/qucs/qucs-disable-tr1.patch @@ -0,0 +1,10 @@ +--- qucs-core/configure.orig 2011-07-03 07:34:09.069218113 -0500 ++++ qucs-core/configure 2011-07-03 07:34:46.618990497 -0500 +@@ -5884,7 +5884,6 @@ + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +-#include + using namespace std; + using namespace std::tr1; + int diff --git a/academic/qucs/qucs.SlackBuild b/academic/qucs/qucs.SlackBuild new file mode 100644 index 0000000000..51b60ec484 --- /dev/null +++ b/academic/qucs/qucs.SlackBuild @@ -0,0 +1,98 @@ +#!/bin/bash + +# Slackware build script for Qucs + +# Copyright 2011 Fridrich von Stauffenberg +# 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. + +PRGNAM=qucs +VERSION=${VERSION:-0.0.16} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i486 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -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 $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION +chown -R root:root . + +# This is vital! +( cd $PRGNAM-core + patch -p1 < $CWD/$PRGNAM-disable-tr1.patch +) + +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --mandir=/usr/man + +make +make install-strip DESTDIR=$PKG + +find $PKG/usr/man -type f -exec gzip -9 {} \; +for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done + +mkdir -p $PKG/usr/share/applications +cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop + +mkdir -p $PKG/usr/share/pixmaps +cat $CWD/$PRGNAM.png > $PKG/usr/share/pixmaps/$PRGNAM.png + +mkdir -p $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 +cat $CWD/doinst.sh > $PKG/install/doinst.sh + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/academic/qucs/qucs.desktop b/academic/qucs/qucs.desktop new file mode 100644 index 0000000000..badf646a3d --- /dev/null +++ b/academic/qucs/qucs.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Encoding=UTF-8 +Version=1.0 +Type=Application +Name=Qucs +GenericName=Circuit simulator +Comment= +Icon=qucs +Exec=qucs +Categories=Education;Electronics; diff --git a/academic/qucs/qucs.info b/academic/qucs/qucs.info new file mode 100644 index 0000000000..0962b17a5b --- /dev/null +++ b/academic/qucs/qucs.info @@ -0,0 +1,10 @@ +PRGNAM="qucs" +VERSION="0.0.16" +HOMEPAGE="http://qucs.sourceforge.net" +DOWNLOAD="http://dfn.dl.sourceforge.net/project/qucs/qucs/0.0.16/qucs-0.0.16.tar.gz" +MD5SUM="c916502171d422ab168fe5fc681b29d8" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +MAINTAINER="Fridrich von Stauffenberg" +EMAIL="cancellor2@gmail.com" +APPROVED="Niels Horn" diff --git a/academic/qucs/qucs.png b/academic/qucs/qucs.png new file mode 100644 index 0000000000..33dd123409 Binary files /dev/null and b/academic/qucs/qucs.png differ diff --git a/academic/qucs/slack-desc b/academic/qucs/slack-desc new file mode 100644 index 0000000000..f2eb7afced --- /dev/null +++ b/academic/qucs/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------------------------------------------------------| +qucs: Qucs (circuit simulator) +qucs: +qucs: Qucs is an integrated circuit simulator which aims to support all +qucs: kinds of circuit simulation types, e.g. DC, AC, S-parameter, +qucs: harmonic balance analysis, noise analysis, etc. +qucs: +qucs: Homepage: http://qucs.sourceforge.net +qucs: +qucs: +qucs: +qucs: -- cgit v1.2.3