b7f05445c0
It has been common practice to have one or more URLs at the end of the ports' pkg-descr files, one per line and prefixed with "WWW:". These URLs should point at a project website or other relevant resources. Access to these URLs required processing of the pkg-descr files, and they have often become stale over time. If more than one such URL was present in a pkg-descr file, only the first one was tarnsfered into the port INDEX, but for many ports only the last line did contain the port specific URL to further information. There have been several proposals to make a project URL available as a macro in the ports' Makefiles, over time. This commit implements such a proposal and moves one of the WWW: entries of each pkg-descr file into the respective port's Makefile. A heuristic attempts to identify the most relevant URL in case there is more than one WWW: entry in some pkg-descr file. URLs that are not moved into the Makefile are prefixed with "See also:" instead of "WWW:" in the pkg-descr files in order to preserve them. There are 1256 ports that had no WWW: entries in pkg-descr files. These ports will not be touched in this commit. The portlint port has been adjusted to expect a WWW entry in each port Makefile, and to flag any remaining "WWW:" lines in pkg-descr files as deprecated. Approved by: portmgr (tcberner)
87 lines
3.1 KiB
Makefile
87 lines
3.1 KiB
Makefile
PORTNAME= ispc
|
|
DISTVERSIONPREFIX= v
|
|
DISTVERSION= 1.18.0
|
|
CATEGORIES= devel
|
|
|
|
MAINTAINER= yuri@FreeBSD.org
|
|
COMMENT= Intel's compiler for high-performance SIMD programming
|
|
WWW= https://ispc.github.io/
|
|
|
|
LICENSE= BSD3CLAUSE
|
|
LICENSE_FILE= ${WRKSRC}/LICENSE.txt
|
|
|
|
ONLY_FOR_ARCHS= aarch64 amd64 i386
|
|
ONLY_FOR_ARCHS_REASON= only available for these architectures
|
|
|
|
BUILD_DEPENDS= ${LOCALBASE}/bin/flex:textproc/flex \
|
|
m4:devel/m4
|
|
LIB_DEPENDS= libLLVM.so:devel/llvm${LLVM_VERSION}
|
|
|
|
USES= bison cmake compiler:c++14-lang python:build,test shebangfix
|
|
USE_LDCONFIG= yes
|
|
|
|
USE_GITHUB= yes
|
|
GH_TUPLE= google:googletest:6a7ed31:googletest/ispcrt/tests/vendor/google/googletest
|
|
|
|
SHEBANG_FILES= *.py
|
|
|
|
CONFIGURE_ENV= PATH=${LOCALBASE}/llvm${LLVM_VERSION}/bin:${PATH} # see https://github.com/ispc/ispc/issues/2318
|
|
CMAKE_OFF= ISPC_NO_DUMPS DISPCRT_BUILD_GPU ISPC_INCLUDE_TESTS ISPCRT_BUILD_TESTS ISPC_INCLUDE_EXAMPLES
|
|
CMAKE_ARGS= -DFREEBSD_LLVM_VERSION=${LLVM_VERSION} # see https://github.com/ispc/ispc/issues/2318
|
|
|
|
BINARY_ALIAS= flex=${LOCALBASE}/bin/flex python=${PYTHON_CMD} m4=${LOCALBASE}/bin/gm4
|
|
|
|
OPTIONS_DEFINE_amd64= ARM XE
|
|
OPTIONS_DEFINE_i386= ARM
|
|
|
|
ARM_DESC= Enable ARM support - requires ARM backend in LLVM
|
|
ARM_CMAKE_BOOL= ARM_ENABLED
|
|
|
|
XE_DESC= Enable Intel Xe support
|
|
XE_BUILD_DEPENDS= ${LOCALBASE}/llvm${LLVM_VERSION}/lib/libLLVMGenXIntrinsics.a:devel/vc-intrinsics@llvm${LLVM_VERSION}
|
|
XE_LIB_DEPENDS= libze_loader.so:devel/level-zero \
|
|
libLLVMSPIRVLib.so.${LLVM_VERSION}:devel/spirv-llvm-translator@llvm${LLVM_VERSION}
|
|
XE_CMAKE_BOOL= XE_ENABLED
|
|
XE_CMAKE_BOOL_OFF= ISPCRT_BUILD_TESTS
|
|
XE_CMAKE_ON= -DXE_DEPS_DIR:PATH="${LOCALBASE}/llvm${LLVM_VERSION}" -DISPC_INCLUDE_XE_EXAMPLES=OFF
|
|
XE_PLIST_FILES= include/ispcrt/ispcrt.h \
|
|
include/ispcrt/ispcrt.hpp \
|
|
include/ispcrt/ispcrt.isph \
|
|
lib/cmake/ispcrt-${PORTVERSION}/Finddpcpp_compiler.cmake \
|
|
lib/cmake/ispcrt-${PORTVERSION}/Findlevel_zero.cmake \
|
|
lib/cmake/ispcrt-${PORTVERSION}/interop.cmake \
|
|
lib/cmake/ispcrt-${PORTVERSION}/ispc.cmake \
|
|
lib/cmake/ispcrt-${PORTVERSION}/ispcrtConfig.cmake \
|
|
lib/cmake/ispcrt-${PORTVERSION}/ispcrt_Exports-%%CMAKE_BUILD_TYPE%%.cmake \
|
|
lib/cmake/ispcrt-${PORTVERSION}/ispcrt_Exports.cmake \
|
|
lib/libispcrt.so \
|
|
lib/libispcrt.so.1 \
|
|
lib/libispcrt.so.${PORTVERSION} \
|
|
lib/libispcrt_static.a
|
|
XE_BROKEN= Unknown architecture
|
|
|
|
#.include <bsd.port.options.mk>
|
|
#.if ${LLVM_DEFAULT:M[7891]0} || ${LLVM_DEFAULT:M1[12]} # max(LLVM_DEFAULT,13)
|
|
#LLVM_VERSION= 13
|
|
#.else
|
|
#LLVM_VERSION= ${LLVM_DEFAULT}
|
|
#.endif
|
|
|
|
LLVM_VERSION?= 13
|
|
|
|
do-test: # all tests pass
|
|
@cd ${WRKSRC} && ISPC_HOME=${BUILD_WRKSRC}/bin ./run_tests.py
|
|
|
|
test-check-all: # the upstream claims that some of these checks are broken without using their patched llvm version, hence using llvm-devel
|
|
@cd ${BUILD_WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} check-all
|
|
|
|
run-examples: build
|
|
@[ -f ${LOCALBASE}/lib/libtbb.so ] || ! echo "ERROR run-examples target requires devel/tbb package installed"
|
|
.for e in simple sort mandelbrot stencil
|
|
@cd ${WRKSRC}/examples/${e} && \
|
|
${ECHO} "===> Running example ${e}" && \
|
|
${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} && \
|
|
./${e}
|
|
.endfor
|
|
|
|
.include <bsd.port.mk>
|