[arch-commits] Commit in opensubdiv/repos (4 files)

Konstantin Gizdov kgizdov at gemini.archlinux.org
Sun Jan 30 13:39:38 UTC 2022


    Date: Sunday, January 30, 2022 @ 13:39:38
  Author: kgizdov
Revision: 1120234

archrelease: copy trunk to community-testing-x86_64

Added:
  opensubdiv/repos/community-testing-x86_64/
  opensubdiv/repos/community-testing-x86_64/PKGBUILD
    (from rev 1120233, opensubdiv/trunk/PKGBUILD)
  opensubdiv/repos/community-testing-x86_64/cuda11.patch
    (from rev 1120233, opensubdiv/trunk/cuda11.patch)
  opensubdiv/repos/community-testing-x86_64/python3.patch
    (from rev 1120233, opensubdiv/trunk/python3.patch)

---------------+
 PKGBUILD      |   51 ++++++++++++++++++++
 cuda11.patch  |   17 ++++++
 python3.patch |  139 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 207 insertions(+)

Copied: opensubdiv/repos/community-testing-x86_64/PKGBUILD (from rev 1120233, opensubdiv/trunk/PKGBUILD)
===================================================================
--- community-testing-x86_64/PKGBUILD	                        (rev 0)
+++ community-testing-x86_64/PKGBUILD	2022-01-30 13:39:38 UTC (rev 1120234)
@@ -0,0 +1,51 @@
+# Maintainer: Sven-Hendrik Haase <svenstaro at gmail.com>
+pkgname=opensubdiv
+pkgver=3.4.4
+pkgrel=9
+pkgdesc="An Open-Source subdivision surface library"
+arch=(x86_64)
+url="http://graphics.pixar.com/opensubdiv"
+license=('APACHE')
+depends=('ptex' 'intel-tbb' 'libxcursor' 'xorg-xrandr' 'libxinerama')
+makedepends=('cmake' 'doxygen' 'glfw' 'glew' 'python' 'python-pygments' 'python-docutils' 'opencl-headers' 'cuda')
+source=("https://github.com/PixarAnimationStudios/OpenSubdiv/archive/v${pkgver//./_}.tar.gz"
+        python3.patch
+        cuda11.patch
+        opensubdiv-tbb2021.patch::https://github.com/PixarAnimationStudios/OpenSubdiv/commit/9079a517.patch)
+sha512sums=('fc8f28b79347015c8991150535c1339e695d96947c72fadd4fa27b546a0813c1125cd175ee03bed5aacdb3609f74c4e526ef70103d1195ba9f7df041e73ea9fb'
+            '10f1f63e07d59deb4d91ba04448bb360efff0e41202bb6737caffbce09ba244efb349fe25b24880420b80fdadb268aed84923464af0d66ee1a36e4ba8f96cfd5'
+            '9006762976c15a57d30607189d52d0e620b5024da478dcd41a79a88b350740144a88c1a4f455bfb1b79a9f605e0587c1c828a9b0813301acec8bbb516c2bb292'
+            'c65770d3e65a63c88aa1061e10c5dd6be8616a2479bd5f6d3928c97a5895cfa7d0aac455121db7ee610b9731bfbf07c3f8a26e9cd47623cd1baa046d9aa68cdf')
+options=(!lto)
+
+prepare() {
+  cd "OpenSubdiv-${pkgver//./_}"
+
+  patch -Np1 -i "${srcdir}"/python3.patch
+  patch -Np1 -i "${srcdir}"/cuda11.patch
+  patch -Np1 -i "${srcdir}"/opensubdiv-tbb2021.patch # Support TBB 2021
+  mkdir build
+}
+
+build() {
+  cd "OpenSubdiv-${pkgver//./_}"/build
+
+  # wtf
+  mkdir -p CMakeFiles/osd_static_gpu.dir/osd
+
+  cmake .. \
+      -DCMAKE_BUILD_TYPE=Release \
+      -DOSD_CUDA_NVCC_FLAGS='--gpu-architecture=compute_53' \
+      -DCUDA_HOST_COMPILER=/usr/bin/g++ \
+      -DCMAKE_INSTALL_PREFIX=/usr
+
+  make
+}
+
+package() {
+  cd "OpenSubdiv-${pkgver//./_}"/build
+
+  DESTDIR="$pkgdir/" make install
+
+  rm -rf "${pkgdir}"/usr/bin
+}

Copied: opensubdiv/repos/community-testing-x86_64/cuda11.patch (from rev 1120233, opensubdiv/trunk/cuda11.patch)
===================================================================
--- community-testing-x86_64/cuda11.patch	                        (rev 0)
+++ community-testing-x86_64/cuda11.patch	2022-01-30 13:39:38 UTC (rev 1120234)
@@ -0,0 +1,17 @@
+diff --color -aur OpenSubdiv-3_4_4-old/CMakeLists.txt OpenSubdiv-3_4_4-new/CMakeLists.txt
+--- OpenSubdiv-3_4_4-old/CMakeLists.txt	2021-06-14 16:59:54.699746298 +0300
++++ OpenSubdiv-3_4_4-new/CMakeLists.txt	2021-06-14 17:01:32.976412136 +0300
+@@ -586,8 +586,12 @@
+         if (NOT DEFINED OSD_CUDA_NVCC_FLAGS)
+             if (CUDA_VERSION_MAJOR LESS 6)
+                 set( OSD_CUDA_NVCC_FLAGS --gpu-architecture compute_11 )
+-            else()
++            elseif (CUDA_VERSION_MAJOR LESS 9)
+                 set( OSD_CUDA_NVCC_FLAGS --gpu-architecture compute_20 )
++            elseif (CUDA_VERSION_MAJOR LESS 11)
++                set( OSD_CUDA_NVCC_FLAGS --gpu-architecture compute_35 )
++            else()
++                set( OSD_CUDA_NVCC_FLAGS --gpu-architecture compute_53 )
+             endif()
+         endif()
+     endif()

Copied: opensubdiv/repos/community-testing-x86_64/python3.patch (from rev 1120233, opensubdiv/trunk/python3.patch)
===================================================================
--- community-testing-x86_64/python3.patch	                        (rev 0)
+++ community-testing-x86_64/python3.patch	2022-01-30 13:39:38 UTC (rev 1120234)
@@ -0,0 +1,139 @@
+diff --git a/documentation/CMakeLists.txt b/documentation/CMakeLists.txt
+index 32b12a3d..581159ca 100644
+--- a/documentation/CMakeLists.txt
++++ b/documentation/CMakeLists.txt
+@@ -54,7 +54,7 @@ else()
+ 
+ endif()
+ 
+-find_package(PythonInterp 2.6)
++find_package(PythonInterp 3.8)
+ 
+ # ReST - HTML documentation
+ if (DOCUTILS_FOUND AND PYTHONINTERP_FOUND)
+diff --git a/documentation/processHtml.py b/documentation/processHtml.py
+index 1a81df59..5e610ea8 100755
+--- a/documentation/processHtml.py
++++ b/documentation/processHtml.py
+@@ -25,9 +25,8 @@
+ 
+ import os
+ import sys
+-import string
+ import re
+-import HTMLParser
++import html.parser as HTMLParser
+ 
+ class HtmlToTextParser(HTMLParser.HTMLParser):
+     def __init__(self):
+@@ -89,10 +88,10 @@ def ReadNavigationTemplate( filePath ):
+     try:
+         navFile = open( filePath, "r")
+     except IOError:
+-        print "Could not open file \'"+filePath+"\'"
++        print("Could not open file \'"+filePath+"\'")
+     
+     with navFile:
+-        print "Navigation template: \'"+filePath+"\'"
++        print("Navigation template: \'"+filePath+"\'")
+         navHtml = navFile.read()
+         navHtml = StripHTMLComments(navHtml)
+         navFile.close()
+@@ -109,7 +108,7 @@ def WriteIndexFile( outputFile, content ):
+     except:
+         pass
+ 
+-    print "Creating Search-Index File : \""+outputFile+"\""
++    print("Creating Search-Index File : \""+outputFile+"\"")
+ 
+     f = open(outputFile, "w")
+     f.write(content)
+@@ -117,7 +116,7 @@ def WriteIndexFile( outputFile, content ):
+ 
+ #-------------------------------------------------------------------------------
+ def Usage():
+-    print str(sys.argv[0])+" <input directory> <output directory> <html template>"
++    print(str(sys.argv[0])+" <input directory> <output directory> <html template>")
+     exit(1);
+ 
+ 
+@@ -132,7 +131,7 @@ navTemplate = str(sys.argv[2])
+     
+ navHtml = ReadNavigationTemplate( navTemplate )
+ 
+-print "Scanning : \'"+rootDir+"\'"
++print("Scanning : \'"+rootDir+"\'")
+ 
+ searchIndex = 'var tipuesearch = { "pages": [ '
+ 
+@@ -172,22 +171,22 @@ for root, dirs, files in os.walk(rootDir):
+ 
+             # if necessary, insert navigation html
+             if (not parser.HasNavigationSection()):
+-                loc = string.find(html,"<body>")
++                loc = html.find("<body>")
+                 html = html[:loc+6] + navHtml + html[loc+6:]
+ 
+                 msg += "added navigation"
+ 
+             # replace the article title placeholder with the real title
+             if title:
+-                html = string.replace(html,"OSD_ARTICLE_TITLE", title)
++                html = html.replace("OSD_ARTICLE_TITLE", title)
+             else:
+-                html = string.replace(html,"OSD_ARTICLE_TITLE", "")
++                html = html.replace("OSD_ARTICLE_TITLE", "")
+ 
+             f.seek(0)
+             f.write(html)
+             f.close()
+ 
+-            print msg
++            print(msg)
+ 
+ searchIndex = searchIndex + "]};"
+ 
+diff --git a/documentation/processTutorials.py b/documentation/processTutorials.py
+index e6329152..30d3e714 100755
+--- a/documentation/processTutorials.py
++++ b/documentation/processTutorials.py
+@@ -33,7 +33,7 @@ def ReadFile(inputfile):
+     try:
+         f = open( inputfile, "r")
+     except IOError:
+-        print "Could not read file \'"+inputfile+"\'"
++        print("Could not read file \'"+inputfile+"\'")
+     content = f.read()
+     f.close()
+     return content
+@@ -48,7 +48,7 @@ def WriteToFile(outputfile, content):
+     try:
+         f = open(outputfile, "w")
+     except IOError:
+-        print "Could not write file \'"+outputfile+"\'"
++        print("Could not write file \'"+outputfile+"\'")
+     f.write(content)
+     f.close()
+ 
+@@ -85,7 +85,7 @@ def Process(srcfile, title):
+ 
+ #-------------------------------------------------------------------------------
+ def Usage():
+-    print str(sys.argv[0])+" <input file> <output file> <title>"
++    print(str(sys.argv[0])+" <input file> <output file> <title>")
+     exit(1);
+ 
+ 
+diff --git a/regression/far_regression/example_createMesh.py b/regression/far_regression/example_createMesh.py
+index 86bfcb37..ba1c6cf7 100644
+--- a/regression/far_regression/example_createMesh.py
++++ b/regression/far_regression/example_createMesh.py
+@@ -121,7 +121,7 @@ def readPolyFile(path):
+             for line in f.readlines():
+                 polys += line.rstrip()
+     except:
+-        print 'Cannot read '+str(path)
++        print('Cannot read '+str(path))
+ 
+     polys = eval(polys)
+ 



More information about the arch-commits mailing list