diff options
author | Bernski Comadizo <bcomadizo@gmail.com> | 2013-02-12 23:14:17 -0600 |
---|---|---|
committer | Erik Hanson <erik@slackbuilds.org> | 2013-02-14 00:26:58 -0600 |
commit | feba97c81c1810e1259c23b559616418446df030 (patch) | |
tree | f758ecca92b865efea1a111818faf98155b3211f /development/gtest | |
parent | d2f4275f17b612ac446ec3243c840ba1af595e96 (diff) |
development/gtest: Added (Google C++ Testing Framework)
Signed-off-by: Erik Hanson <erik@slackbuilds.org>
Diffstat (limited to 'development/gtest')
-rw-r--r-- | development/gtest/README | 21 | ||||
-rw-r--r-- | development/gtest/gtest.SlackBuild | 87 | ||||
-rw-r--r-- | development/gtest/gtest.info | 11 | ||||
-rw-r--r-- | development/gtest/slack-desc | 19 |
4 files changed, 138 insertions, 0 deletions
diff --git a/development/gtest/README b/development/gtest/README new file mode 100644 index 0000000000000..094b0fb409470 --- /dev/null +++ b/development/gtest/README @@ -0,0 +1,21 @@ +gtest (Google C++ Testing Framework) + +Google's framework for writing C++ tests on a variety of platforms +(Linux, Mac OS X, Windows, Cygwin, Windows CE, and Symbian). Based +on the xUnit architecture. Supports automatic test discovery, a rich +set of assertions, user-defined assertions, death tests, fatal and +non-fatal failures, value- and type-parameterized tests, various +options for running the tests, and XML test report generation. + +Homepage: http://code.google.com/p/googletest + + +IMPORTANT NOTE: + +This build script builds a legacy version. A section on the FAQ pages +from the home site warns about the use of "make install" which is now +deprecated on the latest version. However, you can still continue to do +this if you know what you are doing. You can read more about this here: + +Why is it not recommended to install a pre-compiled copy of Google Test +http://code.google.com/p/googletest/wiki/FAQ diff --git a/development/gtest/gtest.SlackBuild b/development/gtest/gtest.SlackBuild new file mode 100644 index 0000000000000..05cceab60e9e9 --- /dev/null +++ b/development/gtest/gtest.SlackBuild @@ -0,0 +1,87 @@ +#!/bin/sh + +# Slackware build script for gtest +# 2013-02-12 Bernski Comadizo <bcomadizo@gmail.com> Cebu + +PRGNAM=gtest +VERSION=${VERSION:-1.5.0} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +# Automatically determine the architecture we're building on: +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i486 ;; + arm*) ARCH=arm ;; + # Unless $ARCH is already set, use uname -m for all other archs: + *) 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 # Exit on most errors + +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 . +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \; + +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 \ + --build=$ARCH-slackware-linux + +# Compile the application and install it into the $PKG directory +make +make install DESTDIR=$PKG + +# Strip binaries and libraries +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 + +# Remove 'special' files +find $PKG -name perllocal.pod \ + -o -name ".packlist" \ + -o -name "*.bs" \ + | xargs rm -f + +# Copy the slack-desc (and a custom doinst.sh if necessary) into ./install +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +# Make the package; be sure to leave it in $OUTPUT +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/development/gtest/gtest.info b/development/gtest/gtest.info new file mode 100644 index 0000000000000..28cbd13a5df11 --- /dev/null +++ b/development/gtest/gtest.info @@ -0,0 +1,11 @@ +PRGNAM="gtest" +VERSION="1.5.0" +HOMEPAGE="http://code.google.com/p/googletest" +DOWNLOAD="http://googletest.googlecode.com/files/gtest-1.5.0.tar.gz" +MD5SUM="7e27f5f3b79dd1ce9092e159cdbd0635" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="Bernski Comadizo" +EMAIL="bcomadizo@gmail.com" + diff --git a/development/gtest/slack-desc b/development/gtest/slack-desc new file mode 100644 index 0000000000000..f7ab1a8ad8b81 --- /dev/null +++ b/development/gtest/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 ':'. + + |-----handy-ruler------------------------------------------------------| +gtest: gtest (Google C++ Testing Framework) +gtest: +gtest: Google's framework for writing C++ tests on a variety of platforms +gtest: (Linux, Mac OS X, Windows, Cygwin, Windows CE, and Symbian). Based +gtest: on the xUnit architecture. Supports automatic test discovery, a rich +gtest: set of assertions, user-defined assertions, death tests, fatal and +gtest: non-fatal failures, value- and type-parameterized tests, various +gtest: options for running the tests, and XML test report generation. +gtest: +gtest: Homepage: http://code.google.com/p/googletest + |