Index: lang/beignet/Makefile =================================================================== --- lang/beignet/Makefile +++ lang/beignet/Makefile @@ -2,11 +2,10 @@ # $FreeBSD$ PORTNAME= beignet -PORTVERSION= 1.3.1 -PORTREVISION= 1 -DISTVERSIONSUFFIX= -source +DISTVERSIONPREFIX= Release_v +DISTVERSION= 1.3.1-227 +DISTVERSIONSUFFIX= -g757ccf02 CATEGORIES= lang -MASTER_SITES= https://01.org/sites/default/files/ MAINTAINER= x11@FreeBSD.org COMMENT= OpenCL library for Intel GPUs @@ -21,7 +20,8 @@ RUN_DEPENDS= opencl>=0:devel/opencl \ clang${LLVMVER}:devel/llvm${LLVMVER} -WRKSRC= ${WRKDIR}/Beignet-${PORTVERSION}-Source +USE_GITHUB= yes +GH_ACCOUNT= intel USES= cmake ncurses pkgconfig shebangfix USE_XORG= sm ice x11 xext xfixes @@ -29,27 +29,35 @@ USE_LDCONFIG= ${LOCALBASE}/lib/${PORTNAME} SHEBANG_FILES= src/git_sha1.sh backend/kernels/compile.sh ALL_TARGET= all -LLVMVER= ${MESA_LLVM_VER:U39} +LLVMVER= ${MESA_LLVM_VER:U40} CMAKE_ARGS+= -DLLVM_CONFIG_EXECUTABLE=${LOCALBASE}/bin/llvm-config${LLVMVER} -PLIST_SUB= OCL20=${"${ARCH:Mamd64}" != "":?"":"@comment "} - ONLY_FOR_ARCHS= i386 amd64 ONLY_FOR_ARCHS_REASON= Beignet needs a graphics driver supported by the Intel KMS driver -OPTIONS_DEFINE= FP64 TEST -FP64_DESC= Double precision (experimental) +OPTIONS_DEFINE= FP64 OCL20 TEST +OPTIONS_DEFAULT= OCL20 +OPTIONS_EXCLUDE_i386= OCL20 +OPTIONS_SUB= yes +FP64_DESC= Double precision (experimental) FP64_CMAKE_BOOL= EXPERIMENTAL_DOUBLE + +OCL20_DESC= OpenCL 2.0 support +OCL20_CMAKE_BOOL= ENABLE_OPENCL_20 + TEST_ALL_TARGET= flat_address_space utest_run post-patch: @${REINPLACE_CMD} -e 's|llvm-dis|llvm-dis${LLVMVER}|g; \ s|clang |clang${LLVMVER} |g' \ ${WRKSRC}/backend/kernels/compile.sh +# BSD mkdir(1) doesn't support -p flag after arguments + @${REINPLACE_CMD} -e 's/\(mkdir\)\(.*\)\( -p\)/\1\3\2/' \ + ${WRKSRC}/utests/CMakeLists.txt -# XXX bug 213732: compiler_fill_gl_image() [FAILED] +# XXX bug 213732: compiler_device_enqueue() Interrupt signal (SIGSEGV) received. do-test-TEST-on: -@(cd ${TEST_WRKSRC}/utests; . ./setenv.sh; \ ./flat_address_space; ./utest_run; ) Index: lang/beignet/distinfo =================================================================== --- lang/beignet/distinfo +++ lang/beignet/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1489436686 -SHA256 (beignet-1.3.1-source.tar.gz) = 399b7bc64d674b3092683263f7c085c5592686b9d837817e77857248e5cb561f -SIZE (beignet-1.3.1-source.tar.gz) = 1136608 +TIMESTAMP = 1501477522 +SHA256 (intel-beignet-Release_v1.3.1-227-g757ccf02_GH0.tar.gz) = 7cec10015696ace9a150c3fa12dc63abb55cf66719cfeeef4325e5e6643c5738 +SIZE (intel-beignet-Release_v1.3.1-227-g757ccf02_GH0.tar.gz) = 1156701 Index: lang/beignet/files/patch-CMakeLists.txt =================================================================== --- lang/beignet/files/patch-CMakeLists.txt +++ lang/beignet/files/patch-CMakeLists.txt @@ -1,4 +1,4 @@ ---- CMakeLists.txt.orig 2017-01-20 10:44:56 UTC +--- CMakeLists.txt.orig 2017-07-31 05:05:22 UTC +++ CMakeLists.txt @@ -31,7 +31,6 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINA @@ -17,12 +17,12 @@ # XLib Find_Package(X11) -@@ -219,7 +218,7 @@ IF(OCLIcd_FOUND) - "intel-beignet.icd.in" - "${ICD_FILE_NAME}" - ) -- install (FILES ${CMAKE_CURRENT_BINARY_DIR}/${ICD_FILE_NAME} DESTINATION /etc/OpenCL/vendors) -+ install (FILES ${CMAKE_CURRENT_BINARY_DIR}/${ICD_FILE_NAME} DESTINATION ${CMAKE_INSTALL_PREFIX}/etc/OpenCL/vendors) - ELSE(OCLIcd_FOUND) - MESSAGE(STATUS "Looking for OCL ICD header file - not found") - ENDIF(OCLIcd_FOUND) +@@ -219,7 +218,7 @@ IF(OCLICD_COMPAT) + "${ICD_FILE_NAME}" + ) + IF(NOT OCL_ICD_INSTALL_PREFIX) +- set(OCL_ICD_INSTALL_PREFIX "/etc/OpenCL/vendors") ++ set(OCL_ICD_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/etc/OpenCL/vendors") + ENDIF(NOT OCL_ICD_INSTALL_PREFIX) + install (FILES ${CMAKE_CURRENT_BINARY_DIR}/${ICD_FILE_NAME} DESTINATION ${OCL_ICD_INSTALL_PREFIX}) + ELSE(OCLIcd_FOUND) Index: lang/beignet/files/patch-utests_image__planar__yuv.cpp =================================================================== --- /dev/null +++ lang/beignet/files/patch-utests_image__planar__yuv.cpp @@ -0,0 +1,24 @@ +--- utests/image_planar_yuv.cpp.orig 2017-06-23 08:05:54 UTC ++++ utests/image_planar_yuv.cpp +@@ -1,6 +1,6 @@ + #include + #include "utest_helper.hpp" +-#include ++#include + #include + + static void image_planar_yuv(void) +@@ -28,10 +28,9 @@ static void image_planar_yuv(void) + uint8_t* src_data; + uint8_t* yplane_data; + uint8_t* uvplane_data; +- src_data = (uint8_t*)memalign(base_address_alignment, buffer_sz); +- yplane_data = (uint8_t*)memalign(base_address_alignment, yplane_sz); +- uvplane_data = (uint8_t*)memalign(base_address_alignment, uvplane_sz); +- if (!src_data || !yplane_data || !uvplane_data) { ++ if (posix_memalign((void **)&src_data, base_address_alignment, buffer_sz) || ++ posix_memalign((void **)&yplane_data, base_address_alignment, yplane_sz) || ++ posix_memalign((void **)&uvplane_data, base_address_alignment, uvplane_sz)) { + fprintf(stderr, "run out of memory\n"); + return; + } Index: lang/beignet/pkg-plist =================================================================== --- lang/beignet/pkg-plist +++ lang/beignet/pkg-plist @@ -18,6 +18,7 @@ lib/beignet/include/ocl_integer.h lib/beignet/include/ocl_math.h lib/beignet/include/ocl_math_20.h +lib/beignet/include/ocl_math_common.h lib/beignet/include/ocl_memcpy.h lib/beignet/include/ocl_memset.h lib/beignet/include/ocl_misc.h @@ -34,3 +35,4 @@ lib/beignet/libcl.so lib/beignet/libgbe.so lib/beignet/libgbeinterp.so +share/metainfo/com.intel.beignet.metainfo.xml