gnome/glibmm: Upgraded to glibmm-2.21.5.

This commit is contained in:
Damien Goutte-Gattat 2009-12-31 20:19:29 +01:00
parent 743c7fd9c4
commit 47537077c0
4 changed files with 105 additions and 142 deletions

View File

@ -1 +0,0 @@
5f6790bdafd4963219d5a60a8617c9ca89c98ef5 glibmm-2.16.4.tar.bz2

View File

@ -0,0 +1 @@
3bab56fe4b8fdcca047b89c7b2e0deebe6b1faa8 glibmm-2.21.5.tar.bz2

View File

@ -1,155 +1,125 @@
#! /bin/sh
#!/bin/bash
# Build script for Slackware
# Copyright (C) 2009 Damien Goutte-Gattat
#
# by: H4kTeUr - http://www.slackbuilds.net < h4kteur at slackbuilds dot net >
# Copyright 2007, 2008 H4kTeUr. All rights reserved.
# Redistribution and use of this script, with or without modifications,
# is permitted provided that the following conditions are met:
#
# Redistribution and use of this software, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this software must retain the above copyright
# 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.
# 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.
#
# Latest glibmm sourcecode is available at http://www.gtkmm.org
# Depends: gnome/libsigc++
# Contact: Damien Goutte-Gattat <dgouttegattat@incenp.org>
#
# Latest glibmm sourcecode is available at: <http://www.gtkmm.org/>.
#
# Depends: gnome/libsigc++, l/glib2
#
# Note: This version of glibmm needs a more recent version of glib2
# than the one provided in Slackware-13.0.
set -e
CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=${PKG:-$TMP/package-glibmm}
OUT=${OUT:-$TMP/build}
# Source package infos
NAMESRC=${NAMESRC:-glibmm}
VERSION=${VERSION:-2.21.5}
ARCHIVE=${ARCHIVE:-$NAMESRC-$VERSION.tar.bz2}
WGET=${WGET:-ftp://ftp.gnome.org/pub/gnome/sources/glibmm/2.21/$ARCHIVE}
# version on the tarball
VERSION=${VERSION:-2.16.4}
# version used in the source directory to cd into
DIRVER=${DIRVER:-2.16.4}
# version used for the Slackware package
PKGVER=${PKGVER:-2.16.4}
# target
# Built package infos
NAMEPKG=${NAMEPKG:-glibmm}
BUILD=${BUILD:-1GGD}
ARCH=${ARCH:-i486}
TARGET=${TARGET:-i486}
BUILD=${BUILD:-1_SBn}
JOBS=${JOBS:-1}
EXT=${EXT:-txz}
# set tarball download link
SOURCE=${SOURCE:-ftp://ftp.gnome.org/pub/GNOME/sources/glibmm/2.16/glibmm-$VERSION.tar.bz2}
ARCHIVE=$(basename $SOURCE)
# Directories
TMP=${TMP:-/tmp}
OUT=${OUT:-$TMP/build}
PKG=${PKG:-$OUT/$NAMEPKG}
CWD=$(pwd)
# sanity checks
if [ "$(id -u)" = "0" ]; then
echo "Do not run this SlackBuild as ROOT !"
set -e # Quit if a command returns non-zero
# Sanity checks
if [ $UID -eq 0 ]; then
echo "You should NOT run this script as ROOT!"
exit 1
fi
if [ ! -d $TMP ]; then
echo "$TMP does not exist or is not a directory!"
exit 1
fi
if [ ! -d $TMP ]; then
mkdir -p $TMP
fi
# Compilation flags
LIBDIRSUFFIX=""
case "$ARCH" in
i?86)
CPUOPT="-O2 -march=$ARCH -mtune=i686"
;;
x86_64)
CPUOPT="-O2 -fPIC"
LIBDIRSUFFIX="64"
;;
*)
CPUOPT="-O2"
;;
esac
# download the tarball if it's not found
# Get and verify the source archive
if [ ! -r $ARCHIVE ]; then
echo "Downloading $ARCHIVE..."
rm -f $ARCHIVE.part
wget -vc $SOURCE -O $ARCHIVE.part
wget -c -O $ARCHIVE.part "$WGET"
mv $ARCHIVE.part $ARCHIVE
fi
sha1sum -c $ARCHIVE.sha1
NAME=$(tar ft $ARCHIVE | head -n 1 | cut -d / -f 1)
# check SHA1 sums
if [ -r $ARCHIVE.sha1 ]; then
sha1sum -c $ARCHIVE.sha1
else
echo "$ARCHIVE.sha1 SHA1 sums not found !"
exit 1
fi
if [ "$ARCH" = "i386" ]; then
SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
elif [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2"
fi
# cleanup
rm -rf $PKG
mkdir -p $PKG
# extraction
# Compile
cd $TMP
rm -rf glibmm-$DIRVER
tar -xvf $CWD/glibmm-$VERSION.tar.bz2
cd glibmm-$DIRVER
# make sure ownerships and permissions are sane
chmod -R a-s,u+rw,go-w+r .
# configure
CFLAGS=$SLKCFLAGS \
CXXFLAGS=$SLKCFLAGS \
echo "Building $ARCHIVE..."
tar xf $CWD/$ARCHIVE
cd $NAME
CFLAGS=$CPUOPT \
CXXFLAGS=$CPUOPT \
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--build=$TARGET-slackware-linux
--prefix=/usr \
--libdir=/usr/lib$LIBDIRSUFFIX
make -j $JOBS
make install-strip DESTDIR=$PKG
# build and install
make -j3
make DESTDIR=$PKG install
# Install the documentation
mkdir -p $PKG/usr/doc/$NAME
install -m 644 AUTHORS COPYING ChangeLog* NEWS README* $PKG/usr/doc/$NAME
# strip binaries
echo "Stripping binaries..."
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..."
# Move HTML documentation to the right place
mv $PKG/usr/share/doc/glibmm-2.4 $PKG/usr/doc/$NAME/docs
rmdir $PKG/usr/share/doc
sed -i "s,base=\"[^\"]\+\",base=\"/usr/doc/$NAME/docs/reference/html\"," \
$PKG/usr/share/devhelp/books/glibmm-2.4/glibmm-2.4.devhelp2
# add a documentation directory
echo "Adding documentation package..."
mkdir -p $PKG/usr/doc/glibmm-$PKGVER
install -p -m 644 \
AUTHORS ChangeLog COPYING INSTALL NEWS README \
$PKG/usr/doc/glibmm-$PKGVER
# Copy slack-desc file
install -D -m 644 $CWD/slack-desc $PKG/install/slack-desc
# adjust docs to traditional Slackware location
mv $PKG/usr/share/doc/glibmm-2.4/* $PKG/usr/doc/glibmm-$VERSION
rm -rf $PKG/usr/share/doc
# build the package
mkdir -p $PKG/install
if [ -r $CWD/slack-desc ]; then
install -m 644 $CWD/slack-desc $PKG/install
fi
if [ -r $CWD/doinst.sh ]; then
install -m 755 $CWD/doinst.sh $PKG/install
fi
# Package the tree
cd $PKG
mkdir -p $OUT
PACKAGING="
chown -R root.root .
find . -perm 664 -exec chmod 644 {} \;
find . -perm 777 -exec chmod 755 {} \;
mkdir -p $OUT
rm -f $OUT/glibmm-$PKGVER-$ARCH-$BUILD.tgz
/sbin/makepkg -l y -c n $OUT/glibmm-$PKGVER-$ARCH-$BUILD.tgz
rm -rf $PKG
rm -rf $TMP/glibmm-$DIRVER
chown root:root . -R
/sbin/makepkg -l y -c n $OUT/$NAMEPKG-$VERSION-$ARCH-$BUILD.$EXT
rm -rf $PKG
rm -rf $TMP/$NAME
"
if [ "$(which fakeroot 2> /dev/null)" ]; then
if type -p fakeroot ; then
echo "$PACKAGING" | fakeroot
else
su -c "$PACKAGING"
fi
exit 0

View File

@ -1,20 +1,13 @@
# 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------------------------------------------------------|
glibmm: glibmm (gtkmm companion library)
glibmm:
glibmm: GLibmm is a companion library of GTKmm which includes support
glibmm: routines (UTF8 strings, threading, etc...).
glibmm:
glibmm:
glibmm:
glibmm:
glibmm:
glibmm:
glibmm:
glibmm:
glibmm: This is glibmm, a C++ API for parts of glib that are usefull for C++.
glibmm:
glibmm: See <http://www.gtkmm.org/>.
glibmm:
glibmm:
glibmm:
glibmm:
glibmm:
glibmm: