summaryrefslogtreecommitdiff
path: root/development/mockpp
diff options
context:
space:
mode:
authorManuel Argüelles <manuel.arguelles@gmail.com>2017-07-23 11:24:37 +0100
committerDavid Spencer <idlemoor@slackbuilds.org>2017-07-23 15:09:26 +0100
commit989c6465cf9c1c4b4da0d2b4818c324a0003929d (patch)
tree7bb100f88fb213ea48a7c80b113f2e63818caf5a /development/mockpp
parentc83e6c8f096a2664f111f376498a596bf0588aac (diff)
downloadslackbuilds-989c6465cf9c1c4b4da0d2b4818c324a0003929d.tar.gz
development/mockpp: Added (Unit testing framework for C++).
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
Diffstat (limited to 'development/mockpp')
-rw-r--r--development/mockpp/README8
-rw-r--r--development/mockpp/fixbuild.patch.gzbin0 -> 290 bytes
-rw-r--r--development/mockpp/mockpp.SlackBuild95
-rw-r--r--development/mockpp/mockpp.info10
-rw-r--r--development/mockpp/slack-desc19
5 files changed, 132 insertions, 0 deletions
diff --git a/development/mockpp/README b/development/mockpp/README
new file mode 100644
index 0000000000..427f455d33
--- /dev/null
+++ b/development/mockpp/README
@@ -0,0 +1,8 @@
+Mockpp is a platform independent generic unit testing framework for
+C++. It's goal is to facilitate developing unit tests in the spirit of
+Mock Objects for Java, EasyMock and jMock.
+
+Mock objects allow you to set up predictible behaviour to help you
+test your production code by emulating some functionality your code
+depends on. This might for example be a huge database which is too
+difficult and time consuming to maintain just for testing purposes.
diff --git a/development/mockpp/fixbuild.patch.gz b/development/mockpp/fixbuild.patch.gz
new file mode 100644
index 0000000000..8ac0d52718
--- /dev/null
+++ b/development/mockpp/fixbuild.patch.gz
Binary files differ
diff --git a/development/mockpp/mockpp.SlackBuild b/development/mockpp/mockpp.SlackBuild
new file mode 100644
index 0000000000..a7bca34fd8
--- /dev/null
+++ b/development/mockpp/mockpp.SlackBuild
@@ -0,0 +1,95 @@
+#!/bin/sh
+
+# Slackware build script for mockpp
+
+# Copyright 2017 Manuel Argüelles Panamá
+# 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=mockpp
+VERSION=${VERSION:-1.16.6}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+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
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION-src.tar.bz2
+cd $PRGNAM-$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 {} \;
+
+zcat $CWD/fixbuild.patch.gz | patch -p1
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --build=$ARCH-slackware-linux
+
+make
+make install DESTDIR=$PKG
+
+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
+
+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:-tgz}
diff --git a/development/mockpp/mockpp.info b/development/mockpp/mockpp.info
new file mode 100644
index 0000000000..9bbf0d8913
--- /dev/null
+++ b/development/mockpp/mockpp.info
@@ -0,0 +1,10 @@
+PRGNAM="mockpp"
+VERSION="1.16.6"
+HOMEPAGE="http://mockpp.sourceforge.net/"
+DOWNLOAD="https://downloads.sourceforge.net/project/mockpp/mockpp/1.16.6/mockpp-1.16.6-src.tar.bz2"
+MD5SUM="b1b66ff646619c38697f4da5440de584"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="cppunit"
+MAINTAINER="Manuel Argüelles"
+EMAIL="manuel.arguelles@gmail.com"
diff --git a/development/mockpp/slack-desc b/development/mockpp/slack-desc
new file mode 100644
index 0000000000..e946062390
--- /dev/null
+++ b/development/mockpp/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------------------------------------------------------|
+mockpp: mockpp (Unit testing framework for C++)
+mockpp:
+mockpp: Mockpp is a platform independent generic unit testing framework for
+mockpp: C++. It's goal is to facilitate developing unit tests in the spirit
+mockpp: of Mock Objects for Java, EasyMock and jMock.
+mockpp:
+mockpp: Mock objects allow you to set up predictible behaviour to help you
+mockpp: test your production code by emulating (mocking) some functionality
+mockpp: your code depends on.
+mockpp:
+mockpp: