development/gtest: Added (Google C++ Testing Framework)

Signed-off-by: Erik Hanson <erik@slackbuilds.org>
This commit is contained in:
Bernski Comadizo 2013-02-12 23:14:17 -06:00 committed by Erik Hanson
parent d2f4275f17
commit feba97c81c
4 changed files with 138 additions and 0 deletions

21
development/gtest/README Normal file
View file

@ -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

View file

@ -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}

View file

@ -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"

View file

@ -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