From patchwork Sun Feb 21 06:34:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Milkey Mouse X-Patchwork-Id: 27176 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 7164027BC49; Sun, 21 Feb 2021 06:36:10 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 8EF4F27BC48 for ; Sun, 21 Feb 2021 06:36:09 +0000 (GMT) Received: from localhost ([::1]:53874 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lDiLg-0004sC-Ou for patchwork@mira.cbaines.net; Sun, 21 Feb 2021 01:36:08 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:47094) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lDiLb-0004rs-04 for guix-patches@gnu.org; Sun, 21 Feb 2021 01:36:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:41879) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lDiLa-0006ow-PI for guix-patches@gnu.org; Sun, 21 Feb 2021 01:36:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lDiLa-0003Fh-M6 for guix-patches@gnu.org; Sun, 21 Feb 2021 01:36:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#46676] [PATCH] gnu: opencl-headers: Update to 2020.12.18 Resent-From: Milkey Mouse Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 21 Feb 2021 06:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 46676 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 46676@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.161388930412427 (code B ref -1); Sun, 21 Feb 2021 06:36:02 +0000 Received: (at submit) by debbugs.gnu.org; 21 Feb 2021 06:35:04 +0000 Received: from localhost ([127.0.0.1]:53425 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lDiKd-0003EL-L0 for submit@debbugs.gnu.org; Sun, 21 Feb 2021 01:35:04 -0500 Received: from lists.gnu.org ([209.51.188.17]:55466) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lDiKY-0003Dp-SY for submit@debbugs.gnu.org; Sun, 21 Feb 2021 01:35:02 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:47048) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lDiKY-0004jI-Ly for guix-patches@gnu.org; Sun, 21 Feb 2021 01:34:58 -0500 Received: from sender4-of-o54.zoho.com ([136.143.188.54]:21463) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lDiKW-00068p-Fl for guix-patches@gnu.org; Sun, 21 Feb 2021 01:34:58 -0500 ARC-Seal: i=1; a=rsa-sha256; t=1613889291; cv=none; d=zohomail.com; s=zohoarc; b=SbA06yf0w87glTAe8sdRF7VoSc+mStMD6c634JA7XiOo2mkZobFQJ7ppl+CURCVc7MzhBvouu6XrgocSHs857XcTB5Y6ErWIpPLgs2+gefwI7paRws8ik61M7vQfxKmw8BBOpxXTs7gYiZlyUucwUkbAT2D076LOPW31ebyYhWE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1613889291; h=Content-Type:Content-Transfer-Encoding:Date:From:MIME-Version:Message-ID:Subject:To; bh=lpGw+AsI2tZdMZ0roxthXjBC2kkGEQMCHbD4AKwIc7c=; b=ALwy/r0Y69wIudfD6QB/MWJqa8GP57MhqAQ+Y2E6uEywMoOnSW8ePGjiB6/5yMl4q94hrN9SnxtJ9/bbqLFklBW0NBJuE3WndcmlWsoCM9rQYdhMHmTWuAlsQ8nCB6oThUra2gA8iHyLAwyCq5173H+N1KjszadK9moeWZ7reXk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=meme.institute; spf=pass smtp.mailfrom=milkeymouse@meme.institute; dmarc=pass header.from= header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1613889291; s=memelord; d=meme.institute; i=milkeymouse@meme.institute; h=From:To:Message-ID:Subject:Date:MIME-Version:Content-Transfer-Encoding:Content-Type; bh=lpGw+AsI2tZdMZ0roxthXjBC2kkGEQMCHbD4AKwIc7c=; b=GWc8fqGA032YIvlzeph8ZiHW1Vhu5ovhNY6Sb3u/z0tflEiG1Z/2JKRLj7QHsG0j slY+2lLGSD/ywP7z1jS8wvGDnlaz/HGr4K3G4zfVaBkwekooeRZJWrOQHMSHrvLhJAe O9Ye6M/qd7luE5l/E08ULfe9bhPiC/Kjscr7t3Do= Received: from jupiter.local (50.47.115.222 [50.47.115.222]) by mx.zohomail.com with SMTPS id 1613889287300131.62042281267418; Sat, 20 Feb 2021 22:34:47 -0800 (PST) From: Milkey Mouse Message-ID: <20210221063442.863940-1-milkeymouse@meme.institute> Date: Sat, 20 Feb 2021 22:34:42 -0800 X-Mailer: git-send-email 2.30.1 MIME-Version: 1.0 X-ZohoMailClient: External Received-SPF: pass client-ip=136.143.188.54; envelope-from=milkeymouse@meme.institute; helo=sender4-of-o54.zoho.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/opencl.scm (opencl-headers): Update to 2020.12.18. [version]: Use the latest tagged version, now that they exist. [arguments]: Replace all phases with trivial header copy. [license]: Change license to Apache 2.0 (happened in March 2020). --- Several things have changed since the opencl-headers package was last touched in 2018: - OpenCL 3.0 was released: it's now the default in upstream ocl-headers - The license was changed to Apache 2.0 as of commit 35deb75: https://github.com/KhronosGroup/OpenCL-Headers/pull/76 - Folder structure was changed: instead of separate folders for each OpenCL version, there is one set of headers, and the chosen OpenCL version can be selected by defining CL_TARGET_OPENCL_VERSION. The opencl-headers packages with specific versions *could* modify the headers by either wrapping each real header in one that first defines CL_TARGET_OPENCL_VERSION to the desired OpenCL version, or using unifdef(1) to remove the header altogether... but, building every package that depends on opencl-headers or opencl-headers-*.*, they all work fine with regular opencl-headers (they define for themselves CL_TARGET_OPENCL_VERSION, or they work fine with default OpenCL 3.0) so unless some out-of-tree package reallly needs a predefined wrapper package just to #define CL_TARGET_OPENCL_VERSION 220, it's probably OK to deprecate opencl-headers-2.2, opencl-headers-1.2, etc. gnu/packages/opencl.scm | 68 ++++++++++++++++++----------------------- 1 file changed, 29 insertions(+), 39 deletions(-) diff --git a/gnu/packages/opencl.scm b/gnu/packages/opencl.scm index ddc30ef037..e95d19db47 100644 --- a/gnu/packages/opencl.scm +++ b/gnu/packages/opencl.scm @@ -20,6 +20,7 @@ (define-module (gnu packages opencl) #:use-module (guix build-system gnu) #:use-module (guix build-system cmake) + #:use-module (guix build-system copy) #:use-module (guix build-system python) #:use-module (guix download) #:use-module (guix git-download) @@ -47,44 +48,35 @@ ;; tests that require such devices are all disabled. ;; Check https://lists.gnu.org/archive/html/guix-devel/2018-04/msg00293.html +(define-public opencl-headers + (package + (name "opencl-headers") + (version "2020.12.18") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/KhronosGroup/OpenCL-Headers") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1zslxfzvbb1mrzmsik4pjzj88ds8y3p94ry5nnrnkhv6qm4n4lw9")))) + (build-system copy-build-system) + (arguments + '(#:install-plan + '(("CL" "include/")))) ; TODO: add phase for tests + (synopsis "The Khronos OpenCL headers") + (description + "This package provides the C headers by Khronos for OpenCL programming.") + (home-page "https://www.khronos.org/registry/OpenCL/") + (license license:asl2.0))) + (define (make-opencl-headers major-version subversion) - (let ((commit "e986688daf750633898dfd3994e14a9e618f2aa5") - (revision "0")) - (package - (name "opencl-headers") - (version (git-version - (string-append major-version "." subversion ".0") - revision commit)) - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/KhronosGroup/OpenCL-Headers") - (commit commit))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "176ydpbyws5nr4av6hf8p41pkhc0rc4m4vrah9w6gp2fw2i32838")))) - (build-system gnu-build-system) - (arguments - `(#:phases - (modify-phases %standard-phases - (delete 'configure) - (delete 'build) - (delete 'check) - (replace 'install - (lambda* (#:key outputs #:allow-other-keys) - (copy-recursively (string-append "./opencl" (string-append - ,major-version - ,subversion) "/CL") - (string-append - (assoc-ref outputs "out") - "/include/CL"))))))) - (synopsis "The Khronos OpenCL headers") - (description - "This package provides the C headers by Khronos for OpenCL -programming.") - (home-page "https://www.khronos.org/registry/OpenCL/") - (license license:expat)))) + ;; The upstream OpenCL-Headers repository is no longer separating headers by + ;; version; instead, you are supposed to #define CL_TARGET_OPENCL_VERSION. + (deprecated-package (string-append "opencl-headers-" + major-version "." + subversion) opencl-headers)) (define-public opencl-headers-2.2 (make-opencl-headers "2" "2")) @@ -99,8 +91,6 @@ programming.") (define-public opencl-headers-1.0 (make-opencl-headers "1" "0")) -(define-public opencl-headers opencl-headers-2.2) - (define-public opencl-clhpp (package (name "opencl-clhpp")