Browse Source

l/cairomm: Added.

slackware-14.2
Damien Goutte-Gattat 13 years ago
parent
commit
43a60a1459
  1. 1
      l/cairomm/cairomm-1.4.8.tar.gz.sha1
  2. 114
      l/cairomm/cairomm.SlackBuild
  3. 19
      l/cairomm/slack-desc

1
l/cairomm/cairomm-1.4.8.tar.gz.sha1

@ -0,0 +1 @@
6ff150e2380a334e78e80b88edbcc9ad9ddb77fd ./cairomm-1.4.8.tar.gz

114
l/cairomm/cairomm.SlackBuild

@ -0,0 +1,114 @@
#!/bin/sh
# Build script for Slackware
# by: Parein Nicolas "_Hitek_" http://www.slackbuilds.net < hitek at slackbuilds dot net >
#
# Copyright: See COPYING file at http://www.slackbuilds.net/COPYING
#
# Latest cairomm sourcecode is available at:
# http://cairographics.org/cairomm/
## Fill these variables to your needs ##
NAMESRC=${NAMESRC:-cairomm}
VERSION=${VERSION:-1.4.8}
EXT=${EXT:-tar.gz}
NAMETGZ=${NAMETGZ:-cairomm}
BUILD=${BUILD:-1_SBn}
TMP=${TMP:-/tmp}
OUT=${OUT:-$TMP/build}
ARCH=${ARCH:-i486}
TARGET=${TARGET:-i486}
WGET=${WGET:-http://cairographics.org/releases/$NAMESRC-$VERSION.$EXT}
########################################
set -e
if [ ! -r $NAMESRC-$VERSION.$EXT ]; then
rm -f $NAMESRC-$VERSION.$EXT.part
wget -vc $WGET -O $NAMESRC-$VERSION.$EXT.part
mv $NAMESRC-$VERSION.$EXT.part $NAMESRC-$VERSION.$EXT
fi
sha1sum -c $NAMESRC-$VERSION.$EXT.sha1
CWD=$(pwd)
PKG=$TMP/build/$NAMETGZ
NAME=$(tar ft $NAMESRC-$VERSION.$EXT | head -n 1 | awk -F/ '{ print $1 }')
if [ "$ARCH" = "i386" ]; then
SLKCFLAGS="-O2 -march=i386 -mtune=i686"
elif [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
elif [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
fi
if [ "$(id -u)" = "0" ]; then
echo "You shouldn't run this SlackBuild as ROOT !"
exit 1
fi
if [ ! -d $TMP ]; then
echo "$TMP doesn't exist or is not a directory !"
exit 1
fi
# Build the software
cd $TMP
echo "Building $NAMESRC-$VERSION.$EXT..."
tar xf $CWD/$NAMESRC-$VERSION.$EXT
cd $NAME
CFLAGS=$SLKCFLAGS \
CXXFLAGS=$SLKCFLAGS \
./configure \
--prefix=/usr \
--disable-static \
--build=$TARGET-slackware-linux
make -j3
make install DESTDIR=$PKG
# Install a slack-desc
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
# Install a doinst.sh, if it exists
if [ -r $CWD/doinst.sh ]; then
cat $CWD/doinst.sh > $PKG/install/doinst.sh
fi
# Install the documentation
mkdir -p $PKG/usr/doc/$NAMETGZ-$VERSION
install -p -m 644 \
AUTHORS COPYING MAINTAINERS README \
$PKG/usr/doc/$NAMETGZ-$VERSION
mv $PKG/usr/share/doc/libcairomm-1.0 $PKG/usr/doc/$NAMETGZ-$VERSION
rm -rf $PKG/usr/share
# Strip binaries and libraries
find $PKG -type f | xargs file | grep "LSB executable" | cut -f 1 -d : | xargs \
strip --strip-unneeded 2> /dev/null || echo "No binaries to strip"
find $PKG -type f | xargs file | grep "shared object" | cut -f 1 -d : | xargs \
strip --strip-unneeded 2> /dev/null || echo "No shared objects to strip"
find $PKG -type f | xargs file | grep "current ar archive" | cut -f 1 -d : | \
xargs strip -g 2> /dev/null || echo "No archives to strip"
# Build the package
cd $PKG
mkdir -p $OUT
PACKAGING="
chown root:root . -R
/sbin/makepkg -l y -c n $OUT/$NAMETGZ-$VERSION-$ARCH-$BUILD.tgz
rm -rf $PKG
rm -rf $TMP/$NAME
"
if [ "$(which fakeroot 2> /dev/null)" ]; then
echo "$PACKAGING" | fakeroot
else
su -c "$PACKAGING"
fi

19
l/cairomm/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------------------------------------------------------|
cairomm: cairomm (a C++ wrapper for cairo)
cairomm:
cairomm: Cairomm is a C++ wrapper for the cairo graphics library. It offers
cairomm: all the power of cairo with an interface familiar to C++ developers,
cairomm: including use of the Standard Template Library where it makes sense.
cairomm:
cairomm: For more information, see: http://cairographics.org/cairomm/
cairomm:
cairomm:
cairomm:
cairomm:
Loading…
Cancel
Save