From: Uwe Köcher Date: Mon, 23 Oct 2017 10:42:39 +0000 (+0200) Subject: opencascade / oce: add patch for glibc >= 2.26 with missing xlocale.h X-Git-Tag: v8.5.1~12^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=52c697c2c68120c3fefb1a6605825c15b2e54773;p=candi.git opencascade / oce: add patch for glibc >= 2.26 with missing xlocale.h --- diff --git a/deal.II-toolchain/packages/opencascade.package b/deal.II-toolchain/packages/opencascade.package index 070d113..ba32c7e 100644 --- a/deal.II-toolchain/packages/opencascade.package +++ b/deal.II-toolchain/packages/opencascade.package @@ -48,6 +48,12 @@ CONFOPTS="-D OCE_INSTALL_PREFIX=${INSTALL_PATH} \ -D OCE_DISABLE_X11=ON \ " +package_specific_patch () { + cd ${UNPACK_PATH}/${EXTRACTSTO} + cecho ${WARN} "applying patch for missing xlocale.h for glibc v2.26 and above" + patch -p0 --forward < ${ORIG_DIR}/${PROJECT}/patches/oce-xlocale.patch || true +} + package_specific_register () { export OPENCASCADE_DIR=${INSTALL_PATH} } diff --git a/deal.II-toolchain/patches/oce-xlocale.patch b/deal.II-toolchain/patches/oce-xlocale.patch new file mode 100644 index 0000000..fc63531 --- /dev/null +++ b/deal.II-toolchain/patches/oce-xlocale.patch @@ -0,0 +1,17 @@ +diff -u -r -N src.patched/Standard/Standard_CLocaleSentry.hxx src/Standard/Standard_CLocaleSentry.hxx +--- src.patched/Standard/Standard_CLocaleSentry.hxx 2017-08-11 07:51:11.000000000 +0200 ++++ src/Standard/Standard_CLocaleSentry.hxx 2017-10-23 10:53:43.571058000 +0200 +@@ -29,9 +29,11 @@ + #define HAVE_XLOCALE_H + #endif + +- //! We check _GNU_SOURCE for glibc extensions here and it is always defined by g++ compiler. ++ //! We check _GNU_SOURCE for glibc <= v2.25 extensions here and it is always defined by g++ compiler. + #if defined(_GNU_SOURCE) && !defined(__ANDROID__) +- #define HAVE_XLOCALE_H ++ #if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ <= 25 ++ #define HAVE_XLOCALE_H ++ #endif + #endif + #endif // ifndef HAVE_LOCALE_H +