From patchwork Sun May 5 16:27:16 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: alexandros.frantzis@linaro.org X-Patchwork-Id: 16712 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-gh0-f197.google.com (mail-gh0-f197.google.com [209.85.160.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 98148238FE for ; Sun, 5 May 2013 16:27:34 +0000 (UTC) Received: by mail-gh0-f197.google.com with SMTP id r20sf4988489ghr.0 for ; Sun, 05 May 2013 09:27:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-beenthere:x-received:received-spf:x-received :x-forwarded-to:x-forwarded-for:delivered-to:x-received:received-spf :mime-version:x-launchpad-project:x-launchpad-branch :x-launchpad-message-rationale:x-launchpad-branch-revision-number :x-launchpad-notification-type:to:from:subject:message-id:date :reply-to:sender:errors-to:precedence:x-generated-by :x-launchpad-hash:x-gm-message-state:x-original-sender :x-original-authentication-results:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe :content-type; bh=TnUjnF9mUgUXsJtZFpYMKMp9o8HEIJ5OdrH/oqg9mRo=; b=Ojf3iC2F+k/+7ZNcvY45KDIMSiDavchuncGSnHSJ81tXAleCilDvndFTrho8hTjNtd OE7zTnZNF7XbWaVmAZ2ckqnVFw5pA6AIFa9CdLqm5duHVELZ3ZiQqX5Z2P21h0b3TB0K xniLGIEE6WWaF5GDEDT6Jm/AW6RvrbdR8S2BNtwQJmXKhSjIvX/ofMxk12hM0Ye/y+lW ASpTy2oiIzPUl9M72VI8Q98GBHxX5VnhP/nOJ059XSm1gSP7Lmb2hkaRpV+pWOexofJ6 aHmSS9qKOCz9+XINaKzRlMdK9kt7O/eKd95wqJy/5cLrHdzAHy/UCXU2lfu2Tbyibj+1 yWPg== X-Received: by 10.236.72.129 with SMTP id t1mr1668359yhd.45.1367771239792; Sun, 05 May 2013 09:27:19 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.48.131 with SMTP id l3ls2612854qen.54.gmail; Sun, 05 May 2013 09:27:19 -0700 (PDT) X-Received: by 10.52.70.206 with SMTP id o14mr5136786vdu.63.1367771239450; Sun, 05 May 2013 09:27:19 -0700 (PDT) Received: from mail-ve0-x231.google.com (mail-ve0-x231.google.com [2607:f8b0:400c:c01::231]) by mx.google.com with ESMTPS id tq4si7532917vdc.27.2013.05.05.09.27.19 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 05 May 2013 09:27:19 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c01::231 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=2607:f8b0:400c:c01::231; Received: by mail-ve0-f177.google.com with SMTP id jw11so2626487veb.8 for ; Sun, 05 May 2013 09:27:19 -0700 (PDT) X-Received: by 10.52.228.71 with SMTP id sg7mr4737987vdc.51.1367771239105; Sun, 05 May 2013 09:27:19 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.58.127.98 with SMTP id nf2csp15671veb; Sun, 5 May 2013 09:27:18 -0700 (PDT) X-Received: by 10.180.83.199 with SMTP id s7mr5219233wiy.19.1367771237447; Sun, 05 May 2013 09:27:17 -0700 (PDT) Received: from indium.canonical.com (indium.canonical.com. [91.189.90.7]) by mx.google.com with ESMTPS id a12si1551307wik.63.2013.05.05.09.27.16 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Sun, 05 May 2013 09:27:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.7 as permitted sender) client-ip=91.189.90.7; Received: from ackee.canonical.com ([91.189.89.26]) by indium.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1UZ1mO-0004bD-QZ for ; Sun, 05 May 2013 16:27:16 +0000 Received: from ackee.canonical.com (localhost [127.0.0.1]) by ackee.canonical.com (Postfix) with ESMTP id A135BE00DD for ; Sun, 5 May 2013 16:27:16 +0000 (UTC) MIME-Version: 1.0 X-Launchpad-Project: glmark2 X-Launchpad-Branch: ~glmark2-dev/glmark2/trunk X-Launchpad-Message-Rationale: Subscriber X-Launchpad-Branch-Revision-Number: 270 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~glmark2-dev/glmark2/trunk] Rev 270: Replace the logic used previously to check for libpng12. Check for supported Message-Id: <20130505162716.22444.35446.launchpad@ackee.canonical.com> Date: Sun, 05 May 2013 16:27:16 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: list X-Generated-By: Launchpad (canonical.com); Revision="16598"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: d36fcc2bf77114805b8315eb7b55d97d524d16e1 X-Gm-Message-State: ALoCoQkOlz+bNqHKUs3QSXRQBmYrW28anc9WsiAX2HTzEXtOLU1K7BBKx+I1e+sSHGhxY5yIOG5h X-Original-Sender: noreply@launchpad.net X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c01::231 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , ------------------------------------------------------------ revno: 270 author: Joe Konno committer: Alexandros Frantzis branch nick: trunk timestamp: Sun 2013-05-05 19:23:53 +0300 message: Replace the logic used previously to check for libpng12. Check for supported libpng versions -- as of writing, 1.2.x and 1.5.x. This logic assumes each subsequent major release of libpng comes with a libpngXY .pc file. Stop checking when a supported version is found. More may be added to the "supp_png_pkgs" iterable as they are tested. Each addition is a 2-tuple, the first element being the expected pkg-config file, the second the minimum supported version of that major release. modified: src/wscript_build wscript --- lp:glmark2 https://code.launchpad.net/~glmark2-dev/glmark2/trunk You are subscribed to branch lp:glmark2. To unsubscribe from this branch go to https://code.launchpad.net/~glmark2-dev/glmark2/trunk/+edit-subscription === modified file 'src/wscript_build' --- src/wscript_build 2013-04-03 16:29:31 +0000 +++ src/wscript_build 2013-05-05 16:23:53 +0000 @@ -3,7 +3,7 @@ f.name.find('android') == -1 and f.name.find('native-state-') == -1 and f.name.find('gl-state-') == -1] -common_uselibs = ['libpng12'] +common_uselibs = ['libpng'] common_defines = ['USE_EXCEPTIONS'] libmatrix_sources = [f for f in bld.path.ant_glob('libmatrix/*.cc') === modified file 'wscript' --- wscript 2013-04-03 16:29:31 +0000 +++ wscript 2013-05-05 16:23:53 +0000 @@ -93,11 +93,21 @@ ctx.check_cxx(function_name = func, header_name = header, uselib = uselib, mandatory = True) - # Check required packages - req_pkgs = [('libpng12', 'libpng12')] - for (pkg, uselib) in req_pkgs: - ctx.check_cfg(package = pkg, uselib_store = uselib, - args = '--cflags --libs', mandatory = True) + # Check for a supported version of libpng + supp_png_pkgs = (('libpng12', '1.2'), ('libpng15', '1.5'),) + have_png = False + for (pkg, atleast) in supp_png_pkgs: + try: + pkg_ver = ctx.check_cfg(package=pkg, uselib_store='libpng', atleast_version=atleast, + args = ['--cflags', '--libs']) + except: + continue + else: + have_png = True + break + + if not have_png: + ctx.fatal('You need to install a supported version of libpng: ' + str(supp_png_pkgs)) # Check optional packages opt_pkgs = [('x11', 'x11', list_contains(Options.options.flavors, 'x11')),