diff options
Diffstat (limited to 'source/l/icu4c')
-rwxr-xr-x | source/l/icu4c/icu4c.SlackBuild | 12 | ||||
-rw-r--r-- | source/l/icu4c/icu4c.closenull.patch | 48 |
2 files changed, 55 insertions, 5 deletions
diff --git a/source/l/icu4c/icu4c.SlackBuild b/source/l/icu4c/icu4c.SlackBuild index 1465a286e..823e4a04b 100755 --- a/source/l/icu4c/icu4c.SlackBuild +++ b/source/l/icu4c/icu4c.SlackBuild @@ -3,7 +3,7 @@ # Slackware build script for icu4c # Copyright 2007-2013 Heinz Wiesinger, Amsterdam, The Netherlands -# Copyright 2012, 2013 Patrick J. Volkerding, Sebeka, MN, USA +# Copyright 2012, 2013, 2015, 2016 Patrick J. Volkerding, Sebeka, MN, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -26,12 +26,12 @@ PKGNAM=icu4c SRCVER=${SRCVER:-$(echo $PKGNAM-*.tar.xz | rev | cut -f 2- -d . | cut -f 2 -d - | rev)} VERSION=$(echo $SRCVER | tr _ .) -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} # Automatically determine the architecture we're building on: if [ -z "$ARCH" ]; then case "$( uname -m )" in - i?86) ARCH=i486 ;; + i?86) ARCH=i586 ;; arm*) ARCH=arm ;; # Unless $ARCH is already set, use uname -m for all other archs: *) ARCH=$( uname -m ) ;; @@ -44,8 +44,8 @@ CWD=$(pwd) TMP=${TMP:-/tmp} PKG=$TMP/package-icu4c -if [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "s390" ]; then SLKCFLAGS="-O2" @@ -71,6 +71,8 @@ find . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 \ -o -perm 400 \) -exec chmod 644 {} \; +zcat $CWD/icu4c.closenull.patch.gz | patch -p1 --verbose || exit 1 + cd source/ CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ diff --git a/source/l/icu4c/icu4c.closenull.patch b/source/l/icu4c/icu4c.closenull.patch new file mode 100644 index 000000000..3cc0b7f64 --- /dev/null +++ b/source/l/icu4c/icu4c.closenull.patch @@ -0,0 +1,48 @@ +--- icu/source/common/unicode/localpointer.h.orig 2016-02-21 21:40:54.346007093 +0100 ++++ icu/source/common/unicode/localpointer.h 2016-02-21 21:46:25.455090792 +0100 +@@ -508,12 +508,12 @@ + : LocalPointerBase<Type>(src.ptr) { \ + src.ptr=NULL; \ + } \ +- ~LocalPointerClassName() { closeFunction(ptr); } \ ++ ~LocalPointerClassName() { if (ptr != NULL) closeFunction(ptr); } \ + LocalPointerClassName &operator=(LocalPointerClassName &&src) U_NOEXCEPT { \ + return moveFrom(src); \ + } \ + LocalPointerClassName &moveFrom(LocalPointerClassName &src) U_NOEXCEPT { \ +- closeFunction(ptr); \ ++ if (ptr != NULL) closeFunction(ptr); \ + LocalPointerBase<Type>::ptr=src.ptr; \ + src.ptr=NULL; \ + return *this; \ +@@ -527,7 +527,7 @@ + p1.swap(p2); \ + } \ + void adoptInstead(Type *p) { \ +- closeFunction(ptr); \ ++ if (ptr != NULL) closeFunction(ptr); \ + ptr=p; \ + } \ + } +@@ -536,9 +536,9 @@ + class LocalPointerClassName : public LocalPointerBase<Type> { \ + public: \ + explicit LocalPointerClassName(Type *p=NULL) : LocalPointerBase<Type>(p) {} \ +- ~LocalPointerClassName() { closeFunction(ptr); } \ ++ ~LocalPointerClassName() { if (ptr != NULL) closeFunction(ptr); } \ + LocalPointerClassName &moveFrom(LocalPointerClassName &src) U_NOEXCEPT { \ +- closeFunction(ptr); \ ++ if (ptr != NULL) closeFunction(ptr); \ + LocalPointerBase<Type>::ptr=src.ptr; \ + src.ptr=NULL; \ + return *this; \ +@@ -552,7 +552,7 @@ + p1.swap(p2); \ + } \ + void adoptInstead(Type *p) { \ +- closeFunction(ptr); \ ++ if (ptr != NULL) closeFunction(ptr); \ + ptr=p; \ + } \ + } + |