View | Details | Raw Unified | Return to bug 217771 | Differences between
and this patch

Collapse All | Expand All

(-)lang/beignet/Makefile (-10 / +25 lines)
Lines 2-8 Link Here
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	beignet
4
PORTNAME=	beignet
5
PORTVERSION=	1.3.0
5
PORTVERSION=	1.3.1
6
CATEGORIES=	lang
6
CATEGORIES=	lang
7
MASTER_SITES=	https://01.org/sites/default/files/
7
MASTER_SITES=	https://01.org/sites/default/files/
8
DISTVERSIONSUFFIX=	-source
8
DISTVERSIONSUFFIX=	-source
Lines 10-15 Link Here
10
MAINTAINER=	x11@FreeBSD.org
10
MAINTAINER=	x11@FreeBSD.org
11
COMMENT=	OpenCL library for Intel GPUs
11
COMMENT=	OpenCL library for Intel GPUs
12
12
13
LICENSE=	LGPL21+
14
LICENSE_FILE=	${WRKSRC}/COPYING
15
13
BUILD_DEPENDS=	clang${LLVMVER}:devel/llvm${LLVMVER} \
16
BUILD_DEPENDS=	clang${LLVMVER}:devel/llvm${LLVMVER} \
14
		opencl>=0:devel/opencl
17
		opencl>=0:devel/opencl
15
LIB_DEPENDS=	libOpenCL.so:devel/ocl-icd \
18
LIB_DEPENDS=	libOpenCL.so:devel/ocl-icd \
Lines 23-28 Link Here
23
USE_XORG=	sm ice x11 xext xfixes
26
USE_XORG=	sm ice x11 xext xfixes
24
USE_GL=		gl egl
27
USE_GL=		gl egl
25
SHEBANG_FILES=	src/git_sha1.sh backend/kernels/compile.sh
28
SHEBANG_FILES=	src/git_sha1.sh backend/kernels/compile.sh
29
ALL_TARGET=	all
26
LLVMVER=	39
30
LLVMVER=	39
27
31
28
CMAKE_ARGS+=	-DLLVM_CONFIG_EXECUTABLE=${LOCALBASE}/bin/llvm-config${LLVMVER}
32
CMAKE_ARGS+=	-DLLVM_CONFIG_EXECUTABLE=${LOCALBASE}/bin/llvm-config${LLVMVER}
Lines 30-51 Link Here
30
ONLY_FOR_ARCHS=	i386 amd64
34
ONLY_FOR_ARCHS=	i386 amd64
31
ONLY_FOR_ARCHS_REASON= Beignet needs a graphics driver supported by the Intel KMS driver
35
ONLY_FOR_ARCHS_REASON= Beignet needs a graphics driver supported by the Intel KMS driver
32
36
33
# running tests from makefile doesn't work quite yet, so comment them out for now.
37
OPTIONS_DEFINE=	FP64 TEST
34
#OPTIONS_DEFINE=	TESTS
38
FP64_DESC=	Double precision (experimental)
35
#TESTS_DESC=	Build and run the test suite
36
39
40
FP64_CMAKE_BOOL=	EXPERIMENTAL_DOUBLE
41
TEST_ALL_TARGET=	flat_address_space utest_run
42
43
.include <bsd.port.options.mk>
44
45
.if ${ARCH} == amd64
46
PLIST_SUB+=	OCL20=""
47
.else # ${ARCH} == i386
48
PLIST_SUB+=	OCL20="@comment "
49
.endif
50
37
post-patch:
51
post-patch:
38
	@${REINPLACE_CMD} -e 's|llvm-dis|llvm-dis${LLVMVER}|g; \
52
	@${REINPLACE_CMD} -e 's|llvm-dis|llvm-dis${LLVMVER}|g; \
39
		s|clang |clang${LLVMVER} |g' \
53
		s|clang |clang${LLVMVER} |g' \
40
		${WRKSRC}/backend/kernels/compile.sh
54
		${WRKSRC}/backend/kernels/compile.sh
41
#post-patch-TESTS-off:
42
	@${REINPLACE_CMD} -e 's|ADD_SUBDIRECTORY(utests)||g' \
43
		${WRKSRC}/CMakeLists.txt
44
55
56
# XXX bug 213732: compiler_fill_gl_image() [FAILED]
57
do-test-TEST-on:
58
	-@(cd ${TEST_WRKSRC}.utests; . ./setenv.sh; \
59
		./flataddress_space; ./utest_run; )
60
61
pre-install-TEST-on: do-test-TEST-on
62
45
post-install:
63
post-install:
46
	@${RM} -r ${STAGEDIR}${PREFIX}/include/CL
64
	@${RM} -r ${STAGEDIR}${PREFIX}/include/CL
47
65
48
#post-install-TESTS-on:
49
#	@cd ${WRKSRC}/utests && sh ./setenv.sh && ./utest_run
50
51
.include <bsd.port.mk>
66
.include <bsd.port.mk>
(-)lang/beignet/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1488314347
1
TIMESTAMP = 1489436686
2
SHA256 (beignet-1.3.0-source.tar.gz) = 63d98b4fe8fba3dbc0299d29fef84560625e5ac51b16b8fed453021d4afb5cd5
2
SHA256 (beignet-1.3.1-source.tar.gz) = 399b7bc64d674b3092683263f7c085c5592686b9d837817e77857248e5cb561f
3
SIZE (beignet-1.3.0-source.tar.gz) = 1133643
3
SIZE (beignet-1.3.1-source.tar.gz) = 1136608
(-)lang/beignet/files/patch-CMakeLists.txt (-3 / +3 lines)
Lines 1-4 Link Here
1
--- CMakeLists.txt.orig	2017-01-20 10:44:56 UTC
1
--- CMakeLists.txt.orig	2017-03-13 07:23:01 UTC
2
+++ CMakeLists.txt
2
+++ CMakeLists.txt
3
@@ -31,7 +31,6 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINA
3
@@ -31,7 +31,6 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINA
4
 
4
 
Lines 17-23 Link Here
17
 
17
 
18
 # XLib
18
 # XLib
19
 Find_Package(X11)
19
 Find_Package(X11)
20
@@ -219,7 +218,7 @@ IF(OCLIcd_FOUND)
20
@@ -217,7 +216,7 @@ IF(OCLIcd_FOUND)
21
     "intel-beignet.icd.in"
21
     "intel-beignet.icd.in"
22
     "${ICD_FILE_NAME}"
22
     "${ICD_FILE_NAME}"
23
   )
23
   )
Lines 25-28 Link Here
25
+  install (FILES ${CMAKE_CURRENT_BINARY_DIR}/${ICD_FILE_NAME} DESTINATION ${CMAKE_INSTALL_PREFIX}/etc/OpenCL/vendors)
25
+  install (FILES ${CMAKE_CURRENT_BINARY_DIR}/${ICD_FILE_NAME} DESTINATION ${CMAKE_INSTALL_PREFIX}/etc/OpenCL/vendors)
26
 ELSE(OCLIcd_FOUND)
26
 ELSE(OCLIcd_FOUND)
27
   MESSAGE(STATUS "Looking for OCL ICD header file - not found")
27
   MESSAGE(STATUS "Looking for OCL ICD header file - not found")
28
 ENDIF(OCLIcd_FOUND)
28
   MESSAGE(FATAL_ERROR "OCL ICD loader miss. If you really want to disable OCL ICD support, please run cmake with option -DOCLICD_COMPAT=0.")
(-)lang/beignet/files/patch-CMake_FindLLVM.cmake (-1 / +1 lines)
Lines 1-4 Link Here
1
--- CMake/FindLLVM.cmake.orig	2017-01-20 10:40:51 UTC
1
--- CMake/FindLLVM.cmake.orig	2017-02-14 09:37:24 UTC
2
+++ CMake/FindLLVM.cmake
2
+++ CMake/FindLLVM.cmake
3
@@ -46,21 +46,21 @@ endif (LLVM_FIND_VERSION_MAJOR AND LLVM_
3
@@ -46,21 +46,21 @@ endif (LLVM_FIND_VERSION_MAJOR AND LLVM_
4
 
4
 
(-)lang/beignet/files/patch-src_cl__device__id.c (-5 / +5 lines)
Lines 1-4 Link Here
1
--- src/cl_device_id.c.orig	2017-01-20 10:40:51 UTC
1
--- src/cl_device_id.c.orig	2017-02-14 09:40:26 UTC
2
+++ src/cl_device_id.c
2
+++ src/cl_device_id.c
3
@@ -34,7 +34,12 @@
3
@@ -34,7 +34,12 @@
4
 #include <stdio.h>
4
 #include <stdio.h>
Lines 14-20 Link Here
14
 #ifndef CL_VERSION_1_2
14
 #ifndef CL_VERSION_1_2
15
 #define CL_DEVICE_BUILT_IN_KERNELS 0x103F
15
 #define CL_DEVICE_BUILT_IN_KERNELS 0x103F
16
@@ -258,6 +263,7 @@ LOCAL cl_device_id
16
@@ -258,6 +263,7 @@ LOCAL cl_device_id
17
 cl_get_gt_device(void)
17
 cl_get_gt_device(cl_device_type device_type)
18
 {
18
 {
19
   cl_device_id ret = NULL;
19
   cl_device_id ret = NULL;
20
+/* FIXME check cl_driver_get_device_id() */
20
+/* FIXME check cl_driver_get_device_id() */
Lines 21-27 Link Here
21
   const int device_id = cl_driver_get_device_id();
21
   const int device_id = cl_driver_get_device_id();
22
   cl_device_id device = NULL;
22
   cl_device_id device = NULL;
23
 
23
 
24
@@ -743,7 +749,7 @@ kbl_gt4_break:
24
@@ -747,7 +753,7 @@ kbl_gt4_break:
25
     case PCI_CHIP_SANDYBRIDGE_M_GT2_PLUS:
25
     case PCI_CHIP_SANDYBRIDGE_M_GT2_PLUS:
26
     case PCI_CHIP_SANDYBRIDGE_BRIDGE_S:
26
     case PCI_CHIP_SANDYBRIDGE_BRIDGE_S:
27
     case PCI_CHIP_SANDYBRIDGE_S_GT:
27
     case PCI_CHIP_SANDYBRIDGE_S_GT:
Lines 30-36 Link Here
30
       ret = NULL;
30
       ret = NULL;
31
       break;
31
       break;
32
     default:
32
     default:
33
@@ -764,6 +770,7 @@ kbl_gt4_break:
33
@@ -768,6 +774,7 @@ kbl_gt4_break:
34
   /* Apply any driver-dependent updates to the device info */
34
   /* Apply any driver-dependent updates to the device info */
35
   cl_driver_update_device_info(ret);
35
   cl_driver_update_device_info(ret);
36
 
36
 
Lines 38-44 Link Here
38
   #define toMB(size) (size)&(UINT64_MAX<<20)
38
   #define toMB(size) (size)&(UINT64_MAX<<20)
39
   /* Get the global_mem_size and max_mem_alloc size from
39
   /* Get the global_mem_size and max_mem_alloc size from
40
    * driver, system ram and hardware*/
40
    * driver, system ram and hardware*/
41
@@ -783,6 +790,24 @@ kbl_gt4_break:
41
@@ -787,6 +794,24 @@ kbl_gt4_break:
42
     ret->max_mem_alloc_size = toMB((ret->global_mem_size * 3 / 4 > maxallocmem) ?
42
     ret->max_mem_alloc_size = toMB((ret->global_mem_size * 3 / 4 > maxallocmem) ?
43
                               maxallocmem: ret->global_mem_size * 3 / 4);
43
                               maxallocmem: ret->global_mem_size * 3 / 4);
44
   }
44
   }
(-)lang/beignet/files/patch-src_git__sha1.sh (-1 / +1 lines)
Lines 1-4 Link Here
1
--- src/git_sha1.sh.orig	2017-02-28 21:01:04 UTC
1
--- src/git_sha1.sh.orig	2017-03-13 21:02:42 UTC
2
+++ src/git_sha1.sh
2
+++ src/git_sha1.sh
3
@@ -1,4 +1,4 @@
3
@@ -1,4 +1,4 @@
4
-#!/usr/local/bin/bash
4
-#!/usr/local/bin/bash
(-)lang/beignet/files/patch-utests_CMakeLists.txt (-2 / +2 lines)
Lines 1-6 Link Here
1
--- utests/CMakeLists.txt.orig	2017-01-20 10:40:51 UTC
1
--- utests/CMakeLists.txt.orig	2017-02-14 09:37:49 UTC
2
+++ utests/CMakeLists.txt
2
+++ utests/CMakeLists.txt
3
@@ -333,12 +333,12 @@ list (GET GBE_BIN_GENERATER -1 GBE_BIN_F
3
@@ -329,12 +329,12 @@ list (GET GBE_BIN_GENERATER -1 GBE_BIN_F
4
 if(GEN_PCI_ID)
4
 if(GEN_PCI_ID)
5
   ADD_CUSTOM_COMMAND(
5
   ADD_CUSTOM_COMMAND(
6
   OUTPUT ${kernel_bin}.bin
6
   OUTPUT ${kernel_bin}.bin
(-)lang/beignet/files/patch-utests_image__from__buffer.cpp (+20 lines)
Line 0 Link Here
1
--- utests/image_from_buffer.cpp.orig	2017-03-13 21:06:07 UTC
2
+++ utests/image_from_buffer.cpp
3
@@ -1,6 +1,6 @@
4
 #include <string.h>
5
 #include "utest_helper.hpp"
6
-#include <malloc.h>
7
+#include <cstdlib>
8
 #include <cstring>
9
 
10
 static void image_from_buffer(void)
11
@@ -33,8 +33,7 @@ static void image_from_buffer(void)
12
   // Setup kernel and images
13
   size_t buffer_sz = sizeof(uint32_t) * w * h;
14
   uint32_t* src_data;
15
-  src_data = (uint32_t*)memalign(base_address_alignment, buffer_sz);
16
-  if(!src_data) {
17
+  if(posix_memalign((void**)&src_data, base_address_alignment, buffer_sz)) {
18
     fprintf(stderr, "run out of memory\n");
19
     return;
20
   }
(-)lang/beignet/pkg-plist (+2 lines)
Lines 29-34 Link Here
29
lib/beignet/include/ocl_vload_20.h
29
lib/beignet/include/ocl_vload_20.h
30
lib/beignet/include/ocl_work_group.h
30
lib/beignet/include/ocl_work_group.h
31
lib/beignet/include/ocl_workitem.h
31
lib/beignet/include/ocl_workitem.h
32
%%OCL20%%lib/beignet/beignet_20.bc
33
%%OCL20%%lib/beignet/beignet_20.pch
32
lib/beignet/libcl.so
34
lib/beignet/libcl.so
33
lib/beignet/libgbe.so
35
lib/beignet/libgbe.so
34
lib/beignet/libgbeinterp.so
36
lib/beignet/libgbeinterp.so

Return to bug 217771