]> https://gitweb.dealii.org/ - candi.git/commitdiff
opencascade / oce: add patch for glibc >= 2.26 with missing xlocale.h
authorUwe Köcher <koecher@hsu-hamburg.de>
Mon, 23 Oct 2017 10:42:39 +0000 (12:42 +0200)
committerUwe Köcher <koecher@hsu-hamburg.de>
Mon, 23 Oct 2017 10:42:39 +0000 (12:42 +0200)
deal.II-toolchain/packages/opencascade.package
deal.II-toolchain/patches/oce-xlocale.patch [new file with mode: 0644]

index 070d1138872f522d8f4ffb6e07a80d7a4dd08b0c..ba32c7e85bb4db05ffb89bd6093cf76e5baf555c 100644 (file)
@@ -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 (file)
index 0000000..fc63531
--- /dev/null
@@ -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

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.