diff options
author | Mauro Giachero <mauro dot giachero at gmail dot com> | 2010-05-12 23:30:03 +0200 |
---|---|---|
committer | David Somero <xgizzmo@slackbuilds.org> | 2010-05-12 23:30:03 +0200 |
commit | d80d4c20dff27cb9642a1cd2af958d3e4f8daae8 (patch) | |
tree | 233d5ee47c796202467e54dfa249766b850d714e /libraries/commoncpp2 | |
parent | 0723c4440dd0bc93bd38f826754f72365890deaa (diff) | |
download | slackbuilds-d80d4c20dff27cb9642a1cd2af958d3e4f8daae8.tar.gz |
libraries/commoncpp2: Added to 12.2 repository
Diffstat (limited to 'libraries/commoncpp2')
-rw-r--r-- | libraries/commoncpp2/README | 8 | ||||
-rw-r--r-- | libraries/commoncpp2/commoncpp2.SlackBuild | 124 | ||||
-rw-r--r-- | libraries/commoncpp2/commoncpp2.info | 8 | ||||
-rw-r--r-- | libraries/commoncpp2/fix-netfilter.patch | 40 | ||||
-rw-r--r-- | libraries/commoncpp2/slack-desc | 20 |
5 files changed, 200 insertions, 0 deletions
diff --git a/libraries/commoncpp2/README b/libraries/commoncpp2/README new file mode 100644 index 0000000000..0939e23194 --- /dev/null +++ b/libraries/commoncpp2/README @@ -0,0 +1,8 @@ +GNU Common C++ is a portable and highly optimized class framework for +writing C++ applications that need to use threads. + +This framework offers a class foundation that hides platform +differences from your C++ application so that you need not write +platform specific code. GNU Common C++ has been ported to compile +natively on most platforms which support either posix threads, or on +Microsoft Windows.
\ No newline at end of file diff --git a/libraries/commoncpp2/commoncpp2.SlackBuild b/libraries/commoncpp2/commoncpp2.SlackBuild new file mode 100644 index 0000000000..8f4c5f8764 --- /dev/null +++ b/libraries/commoncpp2/commoncpp2.SlackBuild @@ -0,0 +1,124 @@ +#!/bin/sh + +# Slackware build script for commoncpp2 + +# Copyright 2008 Mauro Giachero (mauro dot giachero at gmail dot com) +# 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=commoncpp2 +VERSION=${VERSION:-1.7.3} +ARCH=${ARCH:-i486} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$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 -fPIC" +fi + +set -e + +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 {} \; + +# Apparently Linux 2.6.27.7 has an "include dependency" problem +# preventing netfilter from being detected by configure (this may +# very well be a configure problem). +# +# This patch works around the problem by replacing the relevant +# references to linux/netfilter_ipv[46].h with references to +# linux_netfilter_ipv[46].h. These two files are created by the +# patch and simply include some extra header before the original one. +# +# For this to work, the C(XX)FLAGS variables gain an extra "-I" +# option on configure time. +patch -p1 < $CWD/fix-netfilter.patch + +CFLAGS="$SLKCFLAGS -I." \ +CXXFLAGS="$SLKCFLAGS -I." \ +./configure \ + --prefix=/usr \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --infodir=/usr/info \ + --with-gnutls \ + --with-openssl + +# This package doesn't support parallel compilation. +# Explicitly force serial compilation for those of us having a +# MAKEFLAGS variable stating differently. +make -j1 +make install DESTDIR=$PKG + +# man pages aren't automatically installed +mv doc/man $PKG/usr + +# Remove static libraries +rm $PKG/usr/lib/*a + +( cd $PKG + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null || true + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null +) + +( cd $PKG/usr/man + find . -type f -exec gzip -9 {} \; + for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done +) + +rm -f $PKG/usr/info/dir +gzip -9 $PKG/usr/info/*.info* + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a doc/* demo [A-LN-Z]* $PKG/usr/doc/$PRGNAM-$VERSION + +# Remove stale Makefiles +rm -f $PKG/usr/doc/$PRGNAM-$VERSION/Makefile* + +# Fix documentation permissions +find $PKG/usr/doc/$PRGNAM-$VERSION -type f -exec chmod 644 {} \; +find $PKG/usr/doc/$PRGNAM-$VERSION -type d -exec chmod 755 {} \; +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +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.tgz diff --git a/libraries/commoncpp2/commoncpp2.info b/libraries/commoncpp2/commoncpp2.info new file mode 100644 index 0000000000..c5a347ad28 --- /dev/null +++ b/libraries/commoncpp2/commoncpp2.info @@ -0,0 +1,8 @@ +PRGNAM="commoncpp2" +VERSION="1.7.3" +HOMEPAGE="http://www.gnutelephony.org/" +DOWNLOAD="http://www.gnutelephony.org/dist/archive/commoncpp2-1.7.3.tar.gz" +MD5SUM="ca741179a728d264eb276ae471ebaf70" +MAINTAINER="Mauro Giachero" +EMAIL="mauro dot giachero at gmail dot com" +APPROVED="dsomero" diff --git a/libraries/commoncpp2/fix-netfilter.patch b/libraries/commoncpp2/fix-netfilter.patch new file mode 100644 index 0000000000..69c2bd6829 --- /dev/null +++ b/libraries/commoncpp2/fix-netfilter.patch @@ -0,0 +1,40 @@ +diff -urpN a/configure b/configure +--- a/configure 2008-08-20 20:02:59.000000000 +0200 ++++ b/configure 2008-12-11 13:48:35.000000000 +0100 +@@ -29178,7 +29178,7 @@ done + if test "$ost_cv_nat_detected" = "no" ; then + + +-for ac_header in linux/netfilter_ipv4.h linux/netfilter_ipv6.h ++for ac_header in linux_netfilter_ipv4.h linux_netfilter_ipv6.h + do + as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` + { echo "$as_me:$LINENO: checking for $ac_header" >&5 +diff -urpN a/linux_netfilter_ipv4.h b/linux_netfilter_ipv4.h +--- a/linux_netfilter_ipv4.h 1970-01-01 01:00:00.000000000 +0100 ++++ b/linux_netfilter_ipv4.h 2008-12-11 13:44:47.000000000 +0100 +@@ -0,0 +1,4 @@ ++#include <sys/socket.h> ++#include <linux/in.h> ++#include <linux/in6.h> ++#include <linux/netfilter_ipv4.h> +diff -urpN a/linux_netfilter_ipv6.h b/linux_netfilter_ipv6.h +--- a/linux_netfilter_ipv6.h 1970-01-01 01:00:00.000000000 +0100 ++++ b/linux_netfilter_ipv6.h 2008-12-11 13:44:58.000000000 +0100 +@@ -0,0 +1,4 @@ ++#include <sys/socket.h> ++#include <linux/in.h> ++#include <linux/in6.h> ++#include <linux/netfilter_ipv6.h> +diff -urpN a/m4/ost_socket.m4 b/m4/ost_socket.m4 +--- a/m4/ost_socket.m4 2008-06-23 15:02:07.000000000 +0200 ++++ b/m4/ost_socket.m4 2008-12-11 13:49:29.000000000 +0100 +@@ -92,7 +92,7 @@ AC_DEFUN([OST_SYS_SOCKET],[ + #endif]) + + if test "$ost_cv_nat_detected" = "no" ; then +- AC_CHECK_HEADERS([linux/netfilter_ipv4.h linux/netfilter_ipv6.h],,, ++ AC_CHECK_HEADERS([linux_netfilter_ipv4.h linux_netfilter_ipv6.h],,, + [#ifdef HAVE_LIMITS_H + #include <limits.h> + #endif]) diff --git a/libraries/commoncpp2/slack-desc b/libraries/commoncpp2/slack-desc new file mode 100644 index 0000000000..21813b6885 --- /dev/null +++ b/libraries/commoncpp2/slack-desc @@ -0,0 +1,20 @@ +# 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------------------------------------------------------| +commoncpp2: Common C++ (portable and highly optimized class framework for C++) +commoncpp2: +commoncpp2: GNU Common C++ is a portable and highly optimized class framework for +commoncpp2: writing C++ applications that need to use threads. +commoncpp2: This framework offers a class foundation that hides platform +commoncpp2: differences from your C++ application so that you need not write +commoncpp2: platform specific code. GNU Common C++ has been ported to compile +commoncpp2: natively on most platforms which support either posix threads, or on +commoncpp2: Microsoft Windows. +commoncpp2: +commoncpp2: Homepage: http://www.gnutelephony.org/ + |