From: Pyry Haulos Date: Mon, 14 Dec 2015 18:57:29 +0000 (-0800) Subject: Update glslang revision X-Git-Tag: upstream/0.1.0~812^2~452^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1022741f3e173d4ca0dd9ddbf8086911919a8000;p=platform%2Fupstream%2FVK-GL-CTS.git Update glslang revision Change-Id: Iad3db5ed9787e77eb0bb76da60dbd833b58efbbe --- diff --git a/external/fetch_sources.py b/external/fetch_sources.py index 437ce68..46de4d2 100644 --- a/external/fetch_sources.py +++ b/external/fetch_sources.py @@ -134,10 +134,11 @@ class SourcePackage (Source): self.postExtract(dstPath) class GitRepo (Source): - def __init__(self, url, revision, baseDir, extractDir = "src"): + def __init__(self, url, revision, baseDir, extractDir = "src", postCheckout = None): Source.__init__(self, baseDir, extractDir) - self.url = url - self.revision = revision + self.url = url + self.revision = revision + self.postCheckout = postCheckout def update (self): fullDstPath = os.path.join(EXTERNAL_DIR, self.baseDir, self.extractDir) @@ -149,6 +150,9 @@ class GitRepo (Source): try: execute(["git", "fetch", self.url, "+refs/heads/*:refs/remotes/origin/*"]) execute(["git", "checkout", self.revision]) + + if self.postCheckout: + self.postCheckout(fullDstPath) finally: popWorkingDir() @@ -156,6 +160,12 @@ def postExtractLibpng (path): 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", @@ -174,8 +184,9 @@ PACKAGES = [ "spirv-tools"), GitRepo( "git@gitlab.khronos.org:GLSL/glslang.git", - "9e1d1465801ace8edd95c951a3d4a9ada75306ed", - "glslang"), + "41daec718f4868d956ca7d339a15aebe65879442", + "glslang", + postCheckout = postCheckoutGlslang), ] def parseArgs ():