[arch-commits] Commit in usd/trunk (PKGBUILD demangle-fix.patch gcc11.patch)

Evangelos Foutras foutrelis at archlinux.org
Tue Jun 8 21:04:43 UTC 2021


    Date: Tuesday, June 8, 2021 @ 21:04:43
  Author: foutrelis
Revision: 959913

Fix build with GCC 11 (demangle-fix.patch from Fedora)

Added:
  usd/trunk/demangle-fix.patch
  usd/trunk/gcc11.patch
Modified:
  usd/trunk/PKGBUILD

--------------------+
 PKGBUILD           |   14 +++++++++++---
 demangle-fix.patch |   18 ++++++++++++++++++
 gcc11.patch        |   12 ++++++++++++
 3 files changed, 41 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2021-06-08 21:01:35 UTC (rev 959912)
+++ PKGBUILD	2021-06-08 21:04:43 UTC (rev 959913)
@@ -8,16 +8,24 @@
 url="https://graphics.pixar.com/usd/docs/index.html"
 license=('Apache')
 depends=('boost-libs' 'glew' 'openexr' 'opensubdiv' 'python' 'pyside2' 'python-opengl')
-makedepends=('boost' 'cmake' 'intel-tbb' 'ninja' 'qt5-base' 'gcc10')
+makedepends=('boost' 'cmake' 'intel-tbb' 'ninja' 'qt5-base')
 provides=("usd=${pkgver}")
 source=("$pkgname-$pkgver.tar.gz::https://github.com/PixarAnimationStudios/USD/archive/v${pkgver}.tar.gz"
+        'demangle-fix.patch'
+        'gcc11.patch'
         'pyside2-uic')
 sha256sums=('165d0e1e45385076121268eba0da2a0ba4a7e5c2b8eab9ab26fb2fcd81a1a478'
+            '99ea5fba92842d0215e5188662a066e0cc714ed4dea9c8663cb6239f6c1afbd0'
+            '663352c8932a0b48230087284f4f5c540876f6a5adab3d4d1a7ee7b3a4ad6462'
             'bf2d902eddd24d4c3498f05a89f0d867df8a6cbd921214131c14a28152e4ffbe')
 
+prepare() {
+  cd USD-${pkgver}
+  patch -Np1 -i ../demangle-fix.patch
+  patch -Np1 -i ../gcc11.patch
+}
+
 build() {
-  export CC=gcc-10
-  export CXX=g++-10
   cd USD-${pkgver}
   cmake \
     -B build \

Added: demangle-fix.patch
===================================================================
--- demangle-fix.patch	                        (rev 0)
+++ demangle-fix.patch	2021-06-08 21:04:43 UTC (rev 959913)
@@ -0,0 +1,18 @@
+--- USD-21.02/pxr/base/arch/demangle.cpp.orig   2021-01-20 09:13:57.000000000 +0900
++++ USD-21.02/pxr/base/arch/demangle.cpp        2021-02-05 16:37:27.154126908 +0900
+@@ -36,6 +36,7 @@ using std::string;
+ #if (ARCH_COMPILER_GCC_MAJOR == 3 && ARCH_COMPILER_GCC_MINOR >= 1) || \
+     ARCH_COMPILER_GCC_MAJOR > 3 || defined(ARCH_COMPILER_CLANG)
+ #define _AT_LEAST_GCC_THREE_ONE_OR_CLANG
++#include <cxxabi.h>
+ #endif
+ 
+ PXR_NAMESPACE_OPEN_SCOPE
+@@ -138,7 +139,6 @@ _StripPxrInternalNamespace(string* name)
+ #endif
+ 
+ #if defined(_AT_LEAST_GCC_THREE_ONE_OR_CLANG)
+-#include <cxxabi.h>
+ 
+ /*
+  * This routine doesn't work when you get to gcc3.4.

Added: gcc11.patch
===================================================================
--- gcc11.patch	                        (rev 0)
+++ gcc11.patch	2021-06-08 21:04:43 UTC (rev 959913)
@@ -0,0 +1,12 @@
+diff -upr USD-21.05.orig/pxr/base/work/singularTask.h USD-21.05/pxr/base/work/singularTask.h
+--- USD-21.05.orig/pxr/base/work/singularTask.h	2021-04-13 01:09:41.000000000 +0300
++++ USD-21.05/pxr/base/work/singularTask.h	2021-06-08 23:53:13.343073026 +0300
+@@ -120,7 +120,7 @@ private:
+                     // case we go again to ensure the task can do whatever it
+                     // was awakened to do.  Once we successfully take the count
+                     // to zero, we stop.
+-                    size_t old = count;
++                    std::size_t old = count;
+                     do { _fn(); } while (
+                         !count.compare_exchange_strong(old, 0));
+                 });



More information about the arch-commits mailing list