self.postExtract(dstPath)
class GitRepo (Source):
- def __init__(self, url, revision, baseDir, extractDir = "src", postCheckout = None):
+ def __init__(self, url, revision, baseDir, extractDir = "src"):
Source.__init__(self, baseDir, extractDir)
- self.url = url
- self.revision = revision
- self.postCheckout = postCheckout
+ self.url = url
+ self.revision = revision
def update (self):
fullDstPath = os.path.join(EXTERNAL_DIR, self.baseDir, self.extractDir)
try:
execute(["git", "fetch", self.url, "+refs/heads/*:refs/remotes/origin/*"])
execute(["git", "checkout", self.revision])
-
- if self.postCheckout:
- self.postCheckout(fullDstPath)
finally:
popWorkingDir()
shutil.copy(os.path.join(path, "scripts", "pnglibconf.h.prebuilt"),
os.path.join(path, "pnglibconf.h"))
-def postCheckoutGlslang (path):
- srcPath = os.path.join(path, "SPIRV", "SpvBuilder.cpp");
- origSrc = readFile(srcPath)
- patched = origSrc.replace("exit(1)", "throw std::runtime_error(fun)")
- writeFile(srcPath, patched)
-
PACKAGES = [
SourcePackage(
"http://zlib.net/zlib-1.2.8.tar.gz",
"spirv-tools"),
GitRepo(
"git@gitlab.khronos.org:GLSL/glslang.git",
- "41daec718f4868d956ca7d339a15aebe65879442",
- "glslang",
- postCheckout = postCheckoutGlslang),
+ "1288bc18d66566e16d50ff36377bea130fd55fdf",
+ "glslang"),
]
def parseArgs ():