From 52c697c2c68120c3fefb1a6605825c15b2e54773 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Uwe=20K=C3=B6cher?= Date: Mon, 23 Oct 2017 12:42:39 +0200 Subject: [PATCH] opencascade / oce: add patch for glibc >= 2.26 with missing xlocale.h --- deal.II-toolchain/packages/opencascade.package | 6 ++++++ deal.II-toolchain/patches/oce-xlocale.patch | 17 +++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 deal.II-toolchain/patches/oce-xlocale.patch 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 + -- 2.39.5