| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | # $NetBSD: Makefile,v 1.4 2021/06/11 15:09:23 nia Exp $ | | 1 | # $NetBSD: Makefile,v 1.5 2021/09/20 09:05:30 nia Exp $ |
2 | | | 2 | |
3 | DISTNAME= pocl-1.7 | | 3 | DISTNAME= pocl-1.7 |
4 | PKGREVISION= 2 | | 4 | PKGREVISION= 2 |
5 | CATEGORIES= parallel | | 5 | CATEGORIES= parallel |
6 | MASTER_SITES= http://portablecl.org/downloads/ | | 6 | MASTER_SITES= http://portablecl.org/downloads/ |
7 | | | 7 | |
8 | MAINTAINER= pkgsrc-users@NetBSD.org | | 8 | MAINTAINER= pkgsrc-users@NetBSD.org |
9 | HOMEPAGE= http://portablecl.org/ | | 9 | HOMEPAGE= http://portablecl.org/ |
10 | COMMENT= Portable implementation of the OpenCL standard | | 10 | COMMENT= Portable implementation of the OpenCL standard |
11 | LICENSE= mit | | 11 | LICENSE= mit |
12 | | | 12 | |
13 | USE_CMAKE= yes | | 13 | USE_CMAKE= yes |
14 | USE_TOOLS+= pkg-config | | 14 | USE_TOOLS+= pkg-config |
| @@ -23,26 +23,31 @@ CMAKE_ARGS+= -DCMAKE_BUILD_TYPE="Release | | | @@ -23,26 +23,31 @@ CMAKE_ARGS+= -DCMAKE_BUILD_TYPE="Release |
23 | CMAKE_ARGS+= -DCMAKE_INSTALL_LIBDIR="lib" | | 23 | CMAKE_ARGS+= -DCMAKE_INSTALL_LIBDIR="lib" |
24 | CMAKE_ARGS+= -DPOCL_INSTALL_ICD_VENDORDIR="${PREFIX}/share/examples/OpenCL/vendors" | | 24 | CMAKE_ARGS+= -DPOCL_INSTALL_ICD_VENDORDIR="${PREFIX}/share/examples/OpenCL/vendors" |
25 | CMAKE_ARGS+= -DKERNELLIB_HOST_CPU_VARIANTS="distro" | | 25 | CMAKE_ARGS+= -DKERNELLIB_HOST_CPU_VARIANTS="distro" |
26 | CMAKE_ARGS+= -DLLVM_CONFIG=${LLVM_CONFIG_PATH:Q} | | 26 | CMAKE_ARGS+= -DLLVM_CONFIG=${LLVM_CONFIG_PATH:Q} |
27 | | | 27 | |
28 | LDFLAGS+= ${COMPILER_RPATH_FLAG}${PREFIX}/lib/pocl | | 28 | LDFLAGS+= ${COMPILER_RPATH_FLAG}${PREFIX}/lib/pocl |
29 | | | 29 | |
30 | # The PLIST includes target-specific files so needs to be generated. | | 30 | # The PLIST includes target-specific files so needs to be generated. |
31 | GENERATE_PLIST+= find ${DESTDIR}${PREFIX} \( -type f -o -type l \) -print | \ | | 31 | GENERATE_PLIST+= find ${DESTDIR}${PREFIX} \( -type f -o -type l \) -print | \ |
32 | sed 's,${DESTDIR}${PREFIX}/,,' | ${SORT} ; | | 32 | sed 's,${DESTDIR}${PREFIX}/,,' | ${SORT} ; |
33 | | | 33 | |
34 | .include "../../mk/bsd.prefs.mk" | | 34 | .include "../../mk/bsd.prefs.mk" |
35 | | | 35 | |
| | | 36 | # "LLVM could not recognize your CPU model automatically..." |
| | | 37 | .if !empty(MACHINE_ARCH:Maarch64*) |
| | | 38 | CMAKE_ARGS+= -DLLC_HOST_CPU="cortex-a53" |
| | | 39 | .endif |
| | | 40 | |
36 | pre-configure: | | 41 | pre-configure: |
37 | .if empty(PKGSRC_COMPILER:M*clang*) | | 42 | .if empty(PKGSRC_COMPILER:M*clang*) |
38 | # XXX: When using GCC, pkgsrc provides 'clang' wrappers that are actually gcc. | | 43 | # XXX: When using GCC, pkgsrc provides 'clang' wrappers that are actually gcc. |
39 | # XXX: This is copied from Firefox, which also needs this hack... | | 44 | # XXX: This is copied from Firefox, which also needs this hack... |
40 | ${LN} -sf ${PREFIX}/bin/clang ${WRKDIR}/.cwrapper/bin/clang | | 45 | ${LN} -sf ${PREFIX}/bin/clang ${WRKDIR}/.cwrapper/bin/clang |
41 | ${LN} -sf ${PREFIX}/bin/clang++ ${WRKDIR}/.cwrapper/bin/clang++ | | 46 | ${LN} -sf ${PREFIX}/bin/clang++ ${WRKDIR}/.cwrapper/bin/clang++ |
42 | ${LN} -sf ${PREFIX}/bin/clang-cpp ${WRKDIR}/.cwrapper/bin/clang-cpp | | 47 | ${LN} -sf ${PREFIX}/bin/clang-cpp ${WRKDIR}/.cwrapper/bin/clang-cpp |
43 | .endif | | 48 | .endif |
44 | | | 49 | |
45 | OWN_DIRS+= ${PKG_SYSCONFDIR}/OpenCL/vendors | | 50 | OWN_DIRS+= ${PKG_SYSCONFDIR}/OpenCL/vendors |
46 | | | 51 | |
47 | CONF_FILES+= ${PREFIX}/share/examples/OpenCL/vendors/pocl.icd \ | | 52 | CONF_FILES+= ${PREFIX}/share/examples/OpenCL/vendors/pocl.icd \ |
48 | ${PKG_SYSCONFDIR}/OpenCL/vendors/pocl.icd | | 53 | ${PKG_SYSCONFDIR}/OpenCL/vendors/pocl.icd |