-
-
Save dasJ/790d600902631950b7a1 to your computer and use it in GitHub Desktop.
icu fix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- 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; \ | |
} \ | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# $Id: PKGBUILD 255196 2015-12-10 04:47:31Z foutrelis $ | |
# Maintainer: Andreas Radke <andyrtr@archlinux.org> | |
# Contributor: Art Gramlich <art@gramlich-net.com> | |
pkgname=icu | |
pkgver=56.1 | |
pkgrel=2 | |
pkgdesc="International Components for Unicode library" | |
arch=(i686 x86_64) | |
url="http://www.icu-project.org/" | |
license=('custom:icu') | |
depends=('gcc-libs>=4.7.1-5' 'sh') | |
#makedepends=('clang') | |
source=(#http://download.icu-project.org/files/${pkgname}4c/${pkgver}/${pkgname}4c-${pkgver/./_}-src.tgz | |
http://download.icu-project.org/files/${pkgname}4c/${pkgver}/${pkgname}4c-${pkgver//./_}-src.tgz | |
icu.8198.revert.icu5431.patch | |
closenull.patch) | |
md5sums=('c4a2d71ff56aec5ebfab2a3f059be99d' | |
'ebd5470fc969c75e52baf4af94a9ee82' | |
'3a2c817edbb46edb8ce8670cb5f98064') | |
prepare() { | |
cd icu/source | |
# fix Malayalam encoding https://bugzilla.redhat.com/show_bug.cgi?id=654200 | |
patch -Rp3 -i ${srcdir}/icu.8198.revert.icu5431.patch | |
patch -p2 -i ${srcdir}/closenull.patch | |
} | |
build() { | |
cd icu/source | |
./configure --prefix=/usr \ | |
--sysconfdir=/etc \ | |
--mandir=/usr/share/man \ | |
--sbindir=/usr/bin | |
make | |
} | |
check() { | |
cd icu/source | |
make -k check # passes all | |
} | |
package() { | |
cd icu/source | |
make -j1 DESTDIR=${pkgdir} install | |
# Install license | |
install -Dm644 ${srcdir}/icu/license.html ${pkgdir}/usr/share/licenses/icu/license.html | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment