diff options
author | Pedro Mendes <pedro@gepasi.org> | 2016-10-27 06:25:45 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2016-10-27 06:25:45 +0700 |
commit | 3f9ddd95ec4146eea3855277f745e13c2d669418 (patch) | |
tree | 95e96758420ca1bc3419b21a20e4d7599b17a822 /libraries | |
parent | ab3d963c00ff9271df4980233320f809f0cf1a75 (diff) | |
download | slackbuilds-3f9ddd95ec4146eea3855277f745e13c2d669418.tar.gz |
libraries/log4cpp: Added (library of C++ classes for logging).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'libraries')
-rw-r--r-- | libraries/log4cpp/README | 3 | ||||
-rw-r--r-- | libraries/log4cpp/gcc43.patch | 26 | ||||
-rw-r--r-- | libraries/log4cpp/log4cpp.SlackBuild | 110 | ||||
-rw-r--r-- | libraries/log4cpp/log4cpp.info | 11 | ||||
-rw-r--r-- | libraries/log4cpp/slack-desc | 19 |
5 files changed, 169 insertions, 0 deletions
diff --git a/libraries/log4cpp/README b/libraries/log4cpp/README new file mode 100644 index 0000000000..be50a773ba --- /dev/null +++ b/libraries/log4cpp/README @@ -0,0 +1,3 @@ +Log4cpp is library of C++ classes for flexible logging to files, syslog, IDSA and other +destinations. It is modeled after the Log4j Java library, staying as close to their API +as is reasonable. diff --git a/libraries/log4cpp/gcc43.patch b/libraries/log4cpp/gcc43.patch new file mode 100644 index 0000000000..a60f986e9c --- /dev/null +++ b/libraries/log4cpp/gcc43.patch @@ -0,0 +1,26 @@ +Index: log4cpp-1.0/src/BasicLayout.cpp +=================================================================== +--- log4cpp-1.0.orig/src/BasicLayout.cpp 2008-03-14 16:06:57.000000000 -0400 ++++ log4cpp-1.0/src/BasicLayout.cpp 2008-03-14 16:07:11.000000000 -0400 +@@ -15,6 +15,8 @@ + #include <sstream> + #endif + ++#include <memory> ++ + namespace log4cpp { + + BasicLayout::BasicLayout() { +Index: log4cpp-1.0/src/PatternLayout.cpp +=================================================================== +--- log4cpp-1.0.orig/src/PatternLayout.cpp 2008-03-14 16:07:33.000000000 -0400 ++++ log4cpp-1.0/src/PatternLayout.cpp 2008-03-14 16:07:49.000000000 -0400 +@@ -370,7 +370,7 @@ + literal = ""; + } + if ((minWidth != 0) || (maxWidth != 0)) { +- component = new FormatModifierComponent(component, std::abs(minWidth), maxWidth, minWidth < 0); ++ component = new FormatModifierComponent(component, std::abs((float)minWidth), maxWidth, minWidth < 0); + minWidth = maxWidth = 0; + } + _components.push_back(component); diff --git a/libraries/log4cpp/log4cpp.SlackBuild b/libraries/log4cpp/log4cpp.SlackBuild new file mode 100644 index 0000000000..e517a94495 --- /dev/null +++ b/libraries/log4cpp/log4cpp.SlackBuild @@ -0,0 +1,110 @@ +#!/bin/sh + +# Slackware build script for log4cpp +# written by <pedro@gepasi.org> +# All rights reserved. +# +# based on a SlackBuild by Andrea Sciucca ( gohanz at infinito.it) +# Heavily based on the Slackware 13.37 SlackBuild +# http://log4cpp.sourceforge.net/ + +# +# 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=log4cpp +VERSION=${VERSION:-1.0} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -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 + +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 -L . \ + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + +# apply patches +patch -Np1 -i $CWD/gcc43.patch + +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --libdir=/usr/lib$LIBDIRSUFFIX \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --mandir=/usr/man \ + --disable-static \ + --disable-doxygen \ + --disable-dot \ + --without-idsa \ + --program-prefix= \ + --program-suffix= \ + --build=$ARCH-slackware-linux + +make +make install DESTDIR=$PKG + +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 + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a AUTHORS COPYING ChangeLog INSTALL NEWS README THANKS TODO $PKG/usr/doc/$PRGNAM-$VERSION +chmod 644 $PKG/usr/doc/$PRGNAM-$VERSION/* +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.${PKGTYPE:-tgz} diff --git a/libraries/log4cpp/log4cpp.info b/libraries/log4cpp/log4cpp.info new file mode 100644 index 0000000000..78573842af --- /dev/null +++ b/libraries/log4cpp/log4cpp.info @@ -0,0 +1,11 @@ +PRGNAM="log4cpp" +VERSION="1.0" +HOMEPAGE="http://log4cpp.sourceforge.net/" +DOWNLOAD="https://downloads.sourceforge.net/log4cpp/log4cpp-1.0.tar.gz" +MD5SUM="1face50ead0790d1297dfb04bacf273c" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="Pedro Mendes" +EMAIL="pedro@gepasi.org" + diff --git a/libraries/log4cpp/slack-desc b/libraries/log4cpp/slack-desc new file mode 100644 index 0000000000..4a5d22dd68 --- /dev/null +++ b/libraries/log4cpp/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 ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +log4cpp: log4cpp (library of C++ classes for flexible logging) +log4cpp: +log4cpp: Log4cpp is library of C++ classes for flexible logging to files, +log4cpp: syslog, IDSA and other destinations. It is modeled after the Log4j +log4cpp: Java library, staying as close to their API as is reasonable. +log4cpp: +log4cpp: http://log4cpp.sourceforge.net/ +log4cpp: +log4cpp: +log4cpp: +log4cpp: |