From b6b256c666df261d52ea395c8981e615d558c5f6 Mon Sep 17 00:00:00 2001 From: dsomero Date: Tue, 25 May 2010 19:04:50 -0400 Subject: network/dansguardian: Miscellaneous cleanups and patch. Cleaned up build and patched to build with gcc4.4. --- .../dansguardian/dansguardian-2.10.1.1-gcc44.patch | 55 ++++++++++++++++++++++ network/dansguardian/dansguardian.SlackBuild | 17 ++++++- 2 files changed, 71 insertions(+), 1 deletion(-) create mode 100644 network/dansguardian/dansguardian-2.10.1.1-gcc44.patch (limited to 'network/dansguardian') diff --git a/network/dansguardian/dansguardian-2.10.1.1-gcc44.patch b/network/dansguardian/dansguardian-2.10.1.1-gcc44.patch new file mode 100644 index 0000000000..3cdef6e487 --- /dev/null +++ b/network/dansguardian/dansguardian-2.10.1.1-gcc44.patch @@ -0,0 +1,55 @@ +diff -ruN dansguardian-2.10.1.1.orig/src/ConnectionHandler.cpp dansguardian-2.10.1.1/src/ConnectionHandler.cpp +--- dansguardian-2.10.1.1.orig/src/ConnectionHandler.cpp 2009-02-25 12:36:22.000000000 +0100 ++++ dansguardian-2.10.1.1/src/ConnectionHandler.cpp 2009-07-15 12:02:09.801533048 +0200 +@@ -45,6 +45,7 @@ + + #ifdef ENABLE_ORIG_IP + #include ++#include + #include + #endif + +diff -ruN dansguardian-2.10.1.1.orig/src/contentscanners/clamav.cpp dansguardian-2.10.1.1/src/contentscanners/clamav.cpp +--- dansguardian-2.10.1.1.orig/src/contentscanners/clamav.cpp 2008-11-18 12:27:04.000000000 +0100 ++++ dansguardian-2.10.1.1/src/contentscanners/clamav.cpp 2009-07-15 11:59:12.316495912 +0200 +@@ -26,6 +26,7 @@ + #include "../ContentScanner.hpp" + #include "../OptionContainer.hpp" + ++#include + #include + #include + #include +diff -ruN dansguardian-2.10.1.1.orig/src/contentscanners/commandlinescan.cpp dansguardian-2.10.1.1/src/contentscanners/commandlinescan.cpp +--- dansguardian-2.10.1.1.orig/src/contentscanners/commandlinescan.cpp 2008-11-18 12:27:04.000000000 +0100 ++++ dansguardian-2.10.1.1/src/contentscanners/commandlinescan.cpp 2009-07-15 11:59:12.317495697 +0200 +@@ -28,6 +28,7 @@ + #include "../OptionContainer.hpp" + #include "../RegExp.hpp" + ++#include + #include + #include + #include +diff -ruN dansguardian-2.10.1.1.orig/src/contentscanners/icapscan.cpp dansguardian-2.10.1.1/src/contentscanners/icapscan.cpp +--- dansguardian-2.10.1.1.orig/src/contentscanners/icapscan.cpp 2008-11-18 12:27:04.000000000 +0100 ++++ dansguardian-2.10.1.1/src/contentscanners/icapscan.cpp 2009-07-15 11:59:12.318495062 +0200 +@@ -29,6 +29,7 @@ + #include "../ContentScanner.hpp" + #include "../OptionContainer.hpp" + ++#include + #include + #include + #include +diff -ruN dansguardian-2.10.1.1.orig/src/downloadmanagers/fancy.cpp dansguardian-2.10.1.1/src/downloadmanagers/fancy.cpp +--- dansguardian-2.10.1.1.orig/src/downloadmanagers/fancy.cpp 2008-11-18 12:27:04.000000000 +0100 ++++ dansguardian-2.10.1.1/src/downloadmanagers/fancy.cpp 2009-07-15 11:59:12.319495964 +0200 +@@ -26,6 +26,7 @@ + #include "../HTMLTemplate.hpp" + #include "../ConnectionHandler.hpp" + ++#include + #include + #include + #include diff --git a/network/dansguardian/dansguardian.SlackBuild b/network/dansguardian/dansguardian.SlackBuild index ef83b9b509..8b2717441b 100644 --- a/network/dansguardian/dansguardian.SlackBuild +++ b/network/dansguardian/dansguardian.SlackBuild @@ -51,10 +51,19 @@ PRGNAM=dansguardian VERSION=${VERSION:-2.10.1.1} -ARCH=${ARCH:-i486} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +# Automatically determine the architecture we're building on: +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) export ARCH=i486 ;; + arm*) export ARCH=arm ;; + # Unless $ARCH is already set, use uname -m for all other archs: + *) export ARCH=$( uname -m ) ;; + esac +fi + CWD=$(pwd) TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM @@ -84,6 +93,9 @@ elif [ "$ARCH" = "i686" ]; then elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" fi set -e @@ -101,6 +113,9 @@ find . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; +# Fix building with gcc4.4. +patch -p1 < $CWD/dansguardian-2.10.1.1-gcc44.patch + CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ -- cgit v1.2.3