pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/parallel/opencl-clang opencl-clang: explicitly set GIT...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/9bbd3accc068
branches:  trunk
changeset: 383309:9bbd3accc068
user:      tnn <tnn%pkgsrc.org@localhost>
date:      Wed Aug 17 16:21:25 2022 +0000

description:
opencl-clang: explicitly set GITHUB_PROJECT

This works around a subtle bug in github.mk.

Long story short is GITHUB_PROJECT is used to infer WRKSRC when github.mk
is in use. In addition, GITHUB_PROJECT is inferred from DISTNAME when
not explicitly set by the package.
If one wants to reference WRKSRC in a BUILDLINK_TRANSFORM, that breaks
because cwrappers.mk is evaluated before bsd.fetch.mk and GITHUB_PROJECT
is not yet known at that point, leading to an invalid WRKSRC expansion.

diffstat:

 parallel/opencl-clang/Makefile |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (26 lines):

diff -r c432c4923165 -r 9bbd3accc068 parallel/opencl-clang/Makefile
--- a/parallel/opencl-clang/Makefile    Wed Aug 17 16:14:01 2022 +0000
+++ b/parallel/opencl-clang/Makefile    Wed Aug 17 16:21:25 2022 +0000
@@ -1,8 +1,9 @@
-# $NetBSD: Makefile,v 1.8 2022/08/17 15:34:36 tnn Exp $
+# $NetBSD: Makefile,v 1.9 2022/08/17 16:21:25 tnn Exp $
 
 DISTNAME=      opencl-clang-14.0.0
 CATEGORIES=    parallel
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=intel/}
+GITHUB_PROJECT=        opencl-clang    # do not remove this, it breaks cwrappers
 GITHUB_TAG=    v${PKGVERSION_NOREV}
 
 MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
@@ -16,9 +17,8 @@
 # C++14
 GCC_REQD+=     7 # sync with llvm/clang
 
-.for os in Darwin SunOS
-BUILDLINK_TRANSFORM.${os}+=    rm:-Wl,--version-script=${WRKDIR}/${DISTNAME}/common_clang.map
-.endfor
+BUILDLINK_TRANSFORM.Darwin+=   rm:-Wl,--version-script=${WRKSRC}/common_clang.map
+BUILDLINK_TRANSFORM.SunOS+=    rm:-Wl,--version-script=${WRKSRC}/common_clang.map
 
 .include "../../parallel/spirv-llvm-translator/buildlink3.mk"
 .include "../../lang/clang/buildlink3.mk"



Home | Main Index | Thread Index | Old Index