summaryrefslogtreecommitdiff
path: root/libraries/tinyxml/tinyxml.SlackBuild
diff options
context:
space:
mode:
authorLarry Hajali <larryhaja[at]gmail[dot]com>2010-06-13 03:22:18 -0500
committerRobby Workman <rworkman@slackbuilds.org>2010-06-13 14:52:38 -0500
commit5cb3e0727c82746bf3db23908980667b1f75d5d0 (patch)
treece8d1c69d89f407ffacd8c92ed3e214aa8a92d47 /libraries/tinyxml/tinyxml.SlackBuild
parent4ca2f8396f5b2b89783773c43593d98d999b344b (diff)
downloadslackbuilds-5cb3e0727c82746bf3db23908980667b1f75d5d0.tar.gz
libraries/tinyxml: Updated for version 2.6.1.
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'libraries/tinyxml/tinyxml.SlackBuild')
-rw-r--r--libraries/tinyxml/tinyxml.SlackBuild29
1 files changed, 11 insertions, 18 deletions
diff --git a/libraries/tinyxml/tinyxml.SlackBuild b/libraries/tinyxml/tinyxml.SlackBuild
index cdc5f1c064..49c6b79b38 100644
--- a/libraries/tinyxml/tinyxml.SlackBuild
+++ b/libraries/tinyxml/tinyxml.SlackBuild
@@ -5,16 +5,14 @@
# Written by Larry Hajali <larryhaja[at]gmail[dot]com>
PRGNAM=tinyxml
-VERSION=${VERSION:-2.5.3}
-BUILD=${BUILD:-2}
+VERSION=2.6.1
+BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
-# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i486 ;;
arm*) ARCH=arm ;;
- # Unless $ARCH is already set, use uname -m for all other archs:
*) ARCH=$( uname -m ) ;;
esac
fi
@@ -24,8 +22,6 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-SRCVER=$(echo "$VERSION" | tr . _)
-
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
LIBDIRSUFFIX=""
@@ -46,7 +42,7 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM
-tar xvf $CWD/${PRGNAM}_$SRCVER.tar.gz
+tar xvf $CWD/${PRGNAM}_${VERSION//./_}.tar.gz
cd $PRGNAM
chown -R root:root .
find . \
@@ -55,24 +51,21 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-# Always have TIXML_USE_STL defined.
-patch -p0 < $CWD/tinyxml-2.5.3-stl.patch
+# Define TINYXML_USE_STL to YES and use custom SLKCFLAGS.
+sed -i -e '/^TINYXML_USE_STL/s|=.*|= YES|' -e "s|-O3|$SLKCFLAGS|" Makefile
-for i in tinyxml.cpp tinystr.cpp tinyxmlerror.cpp tinyxmlparser.cpp; do
- g++ -v $SLKCFLAGS -fPIC -Wall -Wno-unknown-pragmas -Wno-format -o $i.o -c $i
-done
+make
-g++ -v $SLKCFLAGS -fPIC -Wall -Wno-unknown-pragmas -Wno-format -shared -o \
- lib${PRGNAM}.so.0.${VERSION} -Wl,-soname,lib${PRGNAM}.so.0 *.cpp.o
+g++ -v $SLKCFLAGS -Wall -Wno-unknown-pragmas -Wno-format -shared -o \
+ lib${PRGNAM}.so.0.${VERSION} -Wl,-soname,lib${PRGNAM}.so.0 *.o
install -d -m 0755 $PKG/usr/{include,lib${LIBDIRSUFFIX}}
install -m 0755 lib${PRGNAM}.so.0.${VERSION} $PKG/usr/lib${LIBDIRSUFFIX}
( cd $PKG/usr/lib${LIBDIRSUFFIX}
- ln -s lib${PRGNAM}.so.0.${VERSION} lib${PRGNAM}.so.0
- ln -s lib${PRGNAM}.so.0.${VERSION} lib${PRGNAM}.so
+ ln -s lib${PRGNAM}.so.0.${VERSION} lib${PRGNAM}.so.0
+ ln -s lib${PRGNAM}.so.0.${VERSION} lib${PRGNAM}.so
)
-install -m 0644 ${PRGNAM}.h $PKG/usr/include
-install -m 0644 tinystr.h $PKG/usr/include
+install -m 0644 $PRGNAM.h tinystr.h $PKG/usr/include
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true