mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-28 22:57:37 +00:00
added community/opensubdiv
This commit is contained in:
parent
6f57a3cf9e
commit
8d9b0c1853
3 changed files with 282 additions and 0 deletions
46
community/opensubdiv/PKGBUILD
Normal file
46
community/opensubdiv/PKGBUILD
Normal file
|
@ -0,0 +1,46 @@
|
|||
# Maintainer: Sven-Hendrik Haase <svenstaro@gmail.com>
|
||||
|
||||
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
# - remove makedepend on cuda
|
||||
|
||||
pkgname=opensubdiv
|
||||
pkgver=3.4.0
|
||||
pkgrel=3
|
||||
pkgdesc="An Open-Source subdivision surface library"
|
||||
arch=(x86_64)
|
||||
url="http://graphics.pixar.com/opensubdiv"
|
||||
license=('apache')
|
||||
depends=(zlib ptex intel-tbb libxcursor xorg-xrandr libxinerama)
|
||||
makedepends=(cmake doxygen glfw glew python python-pygments python-docutils opencl-headers)
|
||||
source=("https://github.com/PixarAnimationStudios/OpenSubdiv/archive/v${pkgver//./_}.tar.gz"
|
||||
python3.patch
|
||||
cuda9.patch)
|
||||
sha512sums=('b80311aebd74e0c5ce4d185e1baf3626b2a14e9ca113ce7346f06d7506832a7ccdc0e3731c468fa1ebe890099847e808981dfe051bd2ee85fd4dc53c1f10c28c'
|
||||
'035a6691080e9ec1a6eb5e4a7746f3f0ba6caea4b74c1bfededdc477b701431456b026ee75dbf7ca03fabd6526f62e9181c616a62304f26e614474577b96fcc7'
|
||||
'2aa815acdb873274afb5629c7604ad2586c460a32a7b141c04f71313d03c768798461439cd1b66db565170ca21c7b05a3f8456ab7635b5eb73b1762bea312f4b')
|
||||
|
||||
prepare() {
|
||||
cd "OpenSubdiv-${pkgver//./_}"
|
||||
|
||||
patch -Np1 -i "${srcdir}"/python3.patch
|
||||
patch -Np1 -i "${srcdir}"/cuda9.patch
|
||||
mkdir build
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "OpenSubdiv-${pkgver//./_}"/build
|
||||
|
||||
cmake .. \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr
|
||||
|
||||
make
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "OpenSubdiv-${pkgver//./_}"/build
|
||||
|
||||
DESTDIR="$pkgdir/" make install
|
||||
|
||||
rm -rf ${pkgdir}/usr/bin
|
||||
}
|
25
community/opensubdiv/cuda9.patch
Normal file
25
community/opensubdiv/cuda9.patch
Normal file
|
@ -0,0 +1,25 @@
|
|||
From 7b9157bca7138480c387ef3d5b69b6cf1eb498e5 Mon Sep 17 00:00:00 2001
|
||||
From: "Daniel M. Weeks" <dan@danweeks.net>
|
||||
Date: Fri, 15 Dec 2017 22:45:55 -0500
|
||||
Subject: [PATCH] CUDA 9 compatible gpu-architecture default
|
||||
|
||||
---
|
||||
CMakeLists.txt | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 4f3cd9d40..fa438b461 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -513,8 +513,10 @@ if(CUDA_FOUND)
|
||||
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 )
|
||||
+ else()
|
||||
+ set( OSD_CUDA_NVCC_FLAGS --gpu-architecture compute_30 )
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
211
community/opensubdiv/python3.patch
Normal file
211
community/opensubdiv/python3.patch
Normal file
|
@ -0,0 +1,211 @@
|
|||
diff --git a/build_scripts/build_osd.py b/build_scripts/build_osd.py
|
||||
index e8ebef88..4b2b6fb9 100644
|
||||
--- a/build_scripts/build_osd.py
|
||||
+++ b/build_scripts/build_osd.py
|
||||
@@ -38,7 +38,7 @@ import shutil
|
||||
import subprocess
|
||||
import sys
|
||||
import tarfile
|
||||
-import urllib2
|
||||
+import urllib.request, urllib.error, urllib.parse
|
||||
import zipfile
|
||||
|
||||
# Helpers for printing output
|
||||
@@ -46,26 +46,26 @@ verbosity = 1
|
||||
|
||||
def Print(msg):
|
||||
if verbosity > 0:
|
||||
- print msg
|
||||
+ print(msg)
|
||||
|
||||
def PrintWarning(warning):
|
||||
if verbosity > 0:
|
||||
- print "WARNING:", warning
|
||||
+ print("WARNING:", warning)
|
||||
|
||||
def PrintStatus(status):
|
||||
if verbosity >= 1:
|
||||
- print "STATUS:", status
|
||||
+ print("STATUS:", status)
|
||||
|
||||
def PrintInfo(info):
|
||||
if verbosity >= 2:
|
||||
- print "INFO:", info
|
||||
+ print("INFO:", info)
|
||||
|
||||
def PrintCommandOutput(output):
|
||||
if verbosity >= 3:
|
||||
sys.stdout.write(output)
|
||||
|
||||
def PrintError(error):
|
||||
- print "ERROR:", error
|
||||
+ print("ERROR:", error)
|
||||
|
||||
# Helpers for determining platform
|
||||
def Windows():
|
||||
@@ -290,7 +290,7 @@ def DownloadFileWithPowershell(url, outputFilename):
|
||||
Run(cmd,logCommandOutput=False)
|
||||
|
||||
def DownloadFileWithUrllib(url, outputFilename):
|
||||
- r = urllib2.urlopen(url)
|
||||
+ r = urllib.request.urlopen(url)
|
||||
with open(outputFilename, "wb") as outfile:
|
||||
outfile.write(r.read())
|
||||
|
||||
@@ -329,7 +329,7 @@ def DownloadURL(url, context, force, dontExtract = None):
|
||||
if os.path.exists(tmpFilename):
|
||||
os.remove(tmpFilename)
|
||||
|
||||
- for i in xrange(maxRetries):
|
||||
+ for i in range(maxRetries):
|
||||
try:
|
||||
context.downloader(url, tmpFilename)
|
||||
break
|
||||
@@ -993,7 +993,7 @@ if context.buildArgs:
|
||||
|
||||
def FormatBuildArguments(buildArgs):
|
||||
s = ""
|
||||
- for depName in sorted(buildArgs.iterkeys()):
|
||||
+ for depName in sorted(buildArgs.keys()):
|
||||
args = buildArgs[depName]
|
||||
s += """
|
||||
{name}: {args}""".format(
|
||||
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)
|
||||
|
Loading…
Reference in a new issue