Index: head/lang/beignet/Makefile
===================================================================
--- head/lang/beignet/Makefile	(revision 435143)
+++ head/lang/beignet/Makefile	(revision 435144)
@@ -1,51 +1,51 @@
 # Created by: Koop Mast <kwm@FreeBSD.org>
 # $FreeBSD$
 
 PORTNAME=	beignet
-PORTVERSION=	1.2.0
+PORTVERSION=	1.3.0
 CATEGORIES=	lang
 MASTER_SITES=	https://01.org/sites/default/files/
 DISTVERSIONSUFFIX=	-source
 
 MAINTAINER=	x11@FreeBSD.org
 COMMENT=	OpenCL library for Intel GPUs
 
 BUILD_DEPENDS=	clang${LLVMVER}:devel/llvm${LLVMVER} \
 		opencl>=0:devel/opencl
 LIB_DEPENDS=	libOpenCL.so:devel/ocl-icd \
 		libdrm.so:graphics/libdrm
 RUN_DEPENDS=	opencl>=0:devel/opencl \
 		clang${LLVMVER}:devel/llvm${LLVMVER}
 
 WRKSRC=		${WRKDIR}/Beignet-${PORTVERSION}-Source
 
 USES=		cmake gmake ncurses pkgconfig shebangfix
 USE_XORG=	sm ice x11 xext xfixes
 USE_GL=		gl egl
 SHEBANG_FILES=	src/git_sha1.sh backend/kernels/compile.sh
-LLVMVER=	37
+LLVMVER=	39
 
 CMAKE_ARGS+=	-DLLVM_CONFIG_EXECUTABLE=${LOCALBASE}/bin/llvm-config${LLVMVER}
 
 ONLY_FOR_ARCHS=	i386 amd64
 ONLY_FOR_ARCHS_REASON= Beignet needs a graphics driver supported by the Intel KMS driver
 
 # running tests from makefile doesn't work quite yet, so comment them out for now.
 #OPTIONS_DEFINE=	TESTS
 #TESTS_DESC=	Build and run the test suite
 
 post-patch:
 	@${REINPLACE_CMD} -e 's|llvm-dis|llvm-dis${LLVMVER}|g; \
 		s|clang |clang${LLVMVER} |g' \
 		${WRKSRC}/backend/kernels/compile.sh
 #post-patch-TESTS-off:
 	@${REINPLACE_CMD} -e 's|ADD_SUBDIRECTORY(utests)||g' \
 		${WRKSRC}/CMakeLists.txt
 
 post-install:
 	@${RM} -r ${STAGEDIR}${PREFIX}/include/CL
 
 #post-install-TESTS-on:
 #	@cd ${WRKSRC}/utests && sh ./setenv.sh && ./utest_run
 
 .include <bsd.port.mk>
Index: head/lang/beignet/distinfo
===================================================================
--- head/lang/beignet/distinfo	(revision 435143)
+++ head/lang/beignet/distinfo	(revision 435144)
@@ -1,3 +1,3 @@
-TIMESTAMP = 1472595672
-SHA256 (beignet-1.2.0-source.tar.gz) = fc7af19efb7596b04510d26c558a576eba3e95e1ef86fd6951213c6a4bf58bff
-SIZE (beignet-1.2.0-source.tar.gz) = 1076674
+TIMESTAMP = 1488314347
+SHA256 (beignet-1.3.0-source.tar.gz) = 63d98b4fe8fba3dbc0299d29fef84560625e5ac51b16b8fed453021d4afb5cd5
+SIZE (beignet-1.3.0-source.tar.gz) = 1133643
Index: head/lang/beignet/files/patch-src_cl__event.c
===================================================================
--- head/lang/beignet/files/patch-src_cl__event.c	(revision 435143)
+++ head/lang/beignet/files/patch-src_cl__event.c	(nonexistent)
@@ -1,19 +0,0 @@
---- src/cl_event.c.orig	2016-08-23 12:16:02.000000000 +0200
-+++ src/cl_event.c	2016-08-31 17:43:49.430217000 +0200
-@@ -27,6 +27,7 @@
- 
- #include <assert.h>
- #include <stdio.h>
-+#include <time.h>
- 
- void cl_event_update_last_events(cl_command_queue queue, int wait)
- {
-@@ -657,7 +658,7 @@ cl_ulong cl_event_get_cpu_timestamp(cl_u
- {
-   struct timespec ts;
- 
-- if(clock_gettime(CLOCK_MONOTONIC_RAW,&ts) != 0){
-+ if(clock_gettime(CLOCK_MONOTONIC,&ts) != 0){
-   printf("CPU Timmer error\n");
-   return CL_FALSE;
-   }

Property changes on: head/lang/beignet/files/patch-src_cl__event.c
___________________________________________________________________
Deleted: fbsd:nokeywords
## -1 +0,0 ##
-1
\ No newline at end of property
Index: head/lang/beignet/files/patch-backend_src_backend_gen-insn-selection.cpp
===================================================================
--- head/lang/beignet/files/patch-backend_src_backend_gen-insn-selection.cpp	(revision 435143)
+++ head/lang/beignet/files/patch-backend_src_backend_gen-insn-selection.cpp	(nonexistent)
@@ -1,16 +0,0 @@
-Error: No word lists can be found for the language "en_US".
---- backend/src/backend/gen_insn_selection.cpp.orig	2015-12-18 07:34:19.000000000 +0000
-+++ backend/src/backend/gen_insn_selection.cpp	2016-06-13 17:37:52.540024000 +0000
-@@ -1752,11 +1752,11 @@
- 
-   // Boiler plate to initialize the selection library at c++ pre-main
-   static SelectionLibrary *selLib = NULL;
-+  __attribute__((destructor))
-   static void destroySelectionLibrary(void) { GBE_DELETE(selLib); }
-   static struct SelectionLibraryInitializer {
-     SelectionLibraryInitializer(void) {
-       selLib = GBE_NEW_NO_ARG(SelectionLibrary);
--      atexit(destroySelectionLibrary);
-     }
-   } selectionLibraryInitializer;
- 

Property changes on: head/lang/beignet/files/patch-backend_src_backend_gen-insn-selection.cpp
___________________________________________________________________
Deleted: fbsd:nokeywords
## -1 +0,0 ##
-1
\ No newline at end of property
Index: head/lang/beignet/files/patch-CMakeLists.txt
===================================================================
--- head/lang/beignet/files/patch-CMakeLists.txt	(revision 435143)
+++ head/lang/beignet/files/patch-CMakeLists.txt	(revision 435144)
@@ -1,28 +1,28 @@
---- CMakeLists.txt.orig	2016-08-30 10:06:31 UTC
+--- CMakeLists.txt.orig	2017-01-20 10:44:56 UTC
 +++ CMakeLists.txt
-@@ -41,7 +41,6 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINA
+@@ -31,7 +31,6 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINA
  
  INCLUDE (FindPkgConfig)
  
 -SET(CMAKE_VERBOSE_MAKEFILE "false")
  set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/CMake/")
  INCLUDE (GNUInstallDirs OPTIONAL)
  # support old CMake without GNUInstallDirs
-@@ -111,7 +110,7 @@ ELSE (USE_STANDALONE_GBE_COMPILER STREQU
+@@ -101,7 +100,7 @@ ELSE (USE_STANDALONE_GBE_COMPILER STREQU
  ENDIF (USE_STANDALONE_GBE_COMPILER STREQUAL "true")
  
  
 -set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-Bsymbolic -Wl,--no-undefined ${LLVM_LDFLAGS}")
 +set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-Bsymbolic ${LLVM_LDFLAGS}")
  
  # XLib
  Find_Package(X11)
-@@ -230,7 +229,7 @@ IF(OCLIcd_FOUND)
+@@ -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)
Index: head/lang/beignet/files/patch-CMake_FindLLVM.cmake
===================================================================
--- head/lang/beignet/files/patch-CMake_FindLLVM.cmake	(revision 435143)
+++ head/lang/beignet/files/patch-CMake_FindLLVM.cmake	(revision 435144)
@@ -1,30 +1,30 @@
---- CMake/FindLLVM.cmake.orig	2015-04-17 03:59:38.000000000 +0200
-+++ CMake/FindLLVM.cmake	2015-05-09 00:27:01.012701000 +0200
-@@ -52,21 +52,21 @@
+--- CMake/FindLLVM.cmake.orig	2017-01-20 10:40:51 UTC
++++ CMake/FindLLVM.cmake
+@@ -46,21 +46,21 @@ endif (LLVM_FIND_VERSION_MAJOR AND LLVM_
  
  if (LLVM_INSTALL_DIR)
    find_program(CLANG_EXECUTABLE
 -               NAMES clang-${LLVM_VERSION_NODOT} clang-${LLVM_VERSION_NOPATCH} clang
 +               NAMES clang${LLVM_VERSION_NODOT} clang-${LLVM_VERSION_NODOT} clang-${LLVM_VERSION_NOPATCH} clang
                 PATHS ${LLVM_INSTALL_DIR} NO_DEFAULT_PATH)
    find_program(LLVM_AS_EXECUTABLE
 -               NAMES llvm-as-${LLVM_VERSION_NODOT} llvm-as-${LLVM_VERSION_NOPATCH} llvm-as
 +               NAMES llvm-as${LLVM_VERSION_NODOT} llvm-as-${LLVM_VERSION_NODOT} llvm-as-${LLVM_VERSION_NOPATCH} llvm-as
                 PATHS ${LLVM_INSTALL_DIR} NO_DEFAULT_PATH)
    find_program(LLVM_LINK_EXECUTABLE
 -               NAMES llvm-link-${LLVM_VERSION_NODOT} llvm-link-${LLVM_VERSION_NOPATCH} llvm-link
 +               NAMES llvm-link${LLVM_VERSION_NODOT} llvm-link-${LLVM_VERSION_NODOT} llvm-link-${LLVM_VERSION_NOPATCH} llvm-link
                 PATHS ${LLVM_INSTALL_DIR} NO_DEFAULT_PATH)
  else (LLVM_INSTALL_DIR)
    find_program(CLANG_EXECUTABLE
 -               NAMES clang-${LLVM_VERSION_NODOT} clang-${LLVM_VERSION_NOPATCH} clang)
 +               NAMES clang${LLVM_VERSION_NODOT} clang-${LLVM_VERSION_NODOT} clang-${LLVM_VERSION_NOPATCH} clang)
    find_program(LLVM_AS_EXECUTABLE
 -               NAMES llvm-as-${LLVM_VERSION_NODOT} llvm-as-${LLVM_VERSION_NOPATCH} llvm-as)
 +               NAMES llvm-as${LLVM_VERSION_NODOT} llvm-as-${LLVM_VERSION_NODOT} llvm-as-${LLVM_VERSION_NOPATCH} llvm-as)
    find_program(LLVM_LINK_EXECUTABLE
 -               NAMES llvm-link-${LLVM_VERSION_NODOT} llvm-link-${LLVM_VERSION_NOPATCH} llvm-link)
 +               NAMES llvm-link${LLVM_VERSION_NODOT} llvm-link-${LLVM_VERSION_NODOT} llvm-link-${LLVM_VERSION_NOPATCH} llvm-link)
  endif (LLVM_INSTALL_DIR)
  
  execute_process(
Index: head/lang/beignet/files/patch-backend_src_backend_gen__insn__selection.cpp
===================================================================
--- head/lang/beignet/files/patch-backend_src_backend_gen__insn__selection.cpp	(nonexistent)
+++ head/lang/beignet/files/patch-backend_src_backend_gen__insn__selection.cpp	(revision 435144)
@@ -0,0 +1,16 @@
+Error: No word lists can be found for the language "en_US".
+--- backend/src/backend/gen_insn_selection.cpp.orig	2017-01-20 10:40:51 UTC
++++ backend/src/backend/gen_insn_selection.cpp
+@@ -2456,11 +2456,11 @@ namespace gbe
+ 
+   // Boiler plate to initialize the selection library at c++ pre-main
+   static SelectionLibrary *selLib = NULL;
++  __attribute__((destructor))
+   static void destroySelectionLibrary(void) { GBE_DELETE(selLib); }
+   static struct SelectionLibraryInitializer {
+     SelectionLibraryInitializer(void) {
+       selLib = GBE_NEW_NO_ARG(SelectionLibrary);
+-      atexit(destroySelectionLibrary);
+     }
+   } selectionLibraryInitializer;
+ 

Property changes on: head/lang/beignet/files/patch-backend_src_backend_gen__insn__selection.cpp
___________________________________________________________________
Added: fbsd:nokeywords
## -0,0 +1 ##
+1
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Index: head/lang/beignet/files/patch-backend_src_backend_gen__reg__allocation.cpp
===================================================================
--- head/lang/beignet/files/patch-backend_src_backend_gen__reg__allocation.cpp	(revision 435143)
+++ head/lang/beignet/files/patch-backend_src_backend_gen__reg__allocation.cpp	(revision 435144)
@@ -1,10 +1,10 @@
---- backend/src/backend/gen_reg_allocation.cpp.orig	2015-01-30 00:57:16.930955286 +0100
-+++ backend/src/backend/gen_reg_allocation.cpp	2015-01-30 00:57:53.886912927 +0100
+--- backend/src/backend/gen_reg_allocation.cpp.orig	2017-01-20 10:40:51 UTC
++++ backend/src/backend/gen_reg_allocation.cpp
 @@ -33,6 +33,7 @@
  #include <climits>
  #include <iostream>
  #include <iomanip>
 +#include <sys/types.h>
  
  
- namespace gbe
+ #define HALF_REGISTER_FILE_OFFSET (32*64)

Property changes on: head/lang/beignet/files/patch-backend_src_backend_gen__reg__allocation.cpp
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Index: head/lang/beignet/files/patch-backend_src_ir_immediate.hpp
===================================================================
--- head/lang/beignet/files/patch-backend_src_ir_immediate.hpp	(revision 435143)
+++ head/lang/beignet/files/patch-backend_src_ir_immediate.hpp	(revision 435144)
@@ -1,10 +1,10 @@
---- backend/src/ir/immediate.hpp.orig	2015-01-30 01:06:19.873878476 +0100
-+++ backend/src/ir/immediate.hpp	2015-01-30 01:06:29.286877660 +0100
+--- backend/src/ir/immediate.hpp.orig	2017-01-20 10:40:51 UTC
++++ backend/src/ir/immediate.hpp
 @@ -25,6 +25,7 @@
  #ifndef __GBE_IR_IMMEDIATE_HPP__
  #define __GBE_IR_IMMEDIATE_HPP__
  
 +#include <cmath>
  #include <string.h>
  #include "ir/type.hpp"
- #include "sys/platform.hpp"
+ #include "ir/half.hpp"
Index: head/lang/beignet/files/patch-backend_src_sys_alloc.cpp
===================================================================
--- head/lang/beignet/files/patch-backend_src_sys_alloc.cpp	(revision 435143)
+++ head/lang/beignet/files/patch-backend_src_sys_alloc.cpp	(revision 435144)
@@ -1,68 +1,68 @@
---- backend/src/sys/alloc.cpp.orig	2015-07-02 09:39:05.000000000 +0200
-+++ backend/src/sys/alloc.cpp	2015-08-26 11:57:00.901815000 +0200
+--- backend/src/sys/alloc.cpp.orig	2017-01-20 10:40:51 UTC
++++ backend/src/sys/alloc.cpp
 @@ -69,7 +69,7 @@ namespace gbe
      /*! Total number of allocations done */
      volatile intptr_t allocNum;
      /*! Sorts the file name and function name strings */
 -    std::tr1::unordered_map<const char*, int> staticStringMap;
 +    std::unordered_map<const char*, int> staticStringMap;
      /*! Each element contains the actual string */
      std::vector<const char*> staticStringVector;
      std::map<uintptr_t, AllocData> allocMap;
 @@ -140,16 +140,17 @@ namespace gbe
    static bool isMutexInitializing = true;
    static size_t memDebuggerCurrSize(0u);
    static size_t memDebuggerMaxSize(0u);
 +  __attribute__((destructor))
    static void SizeMutexDeallocate(void) { if (sizeMutex) delete sizeMutex; }
    static void SizeMutexAllocate(void) {
      if (sizeMutex == NULL && isMutexInitializing == false) {
        isMutexInitializing = true;
        sizeMutex = new MutexSys;
 -      atexit(SizeMutexDeallocate);
      }
    }
  
    /*! Stop the memory debugger */
 +  __attribute__((destructor))
    static void MemDebuggerEnd(void) {
      MemDebugger *_debug = memDebugger;
      memDebugger = NULL;
 @@ -172,7 +173,6 @@ namespace gbe
    /*! Start the memory debugger */
    static void MemDebuggerStart(void) {
      if (memDebugger == NULL) {
 -      atexit(MemDebuggerEnd);
        memDebugger = new MemDebugger;
      }
    }
 @@ -291,6 +291,29 @@ namespace gbe
    void alignedFree(void *ptr) { if (ptr) std::free(ptr); }
  } /* namespace gbe */
  
 +#elif defined(__FreeBSD__)
 +
 +#include <unistd.h>
 +#include <sys/mman.h>
 +#include <fcntl.h>
 +#include <stdlib.h>
 +#include <malloc_np.h>
 +#include <iostream>
 +
 +namespace gbe
 +{
 +  void* alignedMalloc(size_t size, size_t align) {
 +    void* ptr;
 +    const int err = posix_memalign(&ptr,align,size);
 +    FATAL_IF ((err != 0), "memory allocation failed");
 +    MemDebuggerInitializeMem(ptr, size);
 +    return ptr;
 +  }
 +
 +  void alignedFree(void *ptr) { if (ptr) std::free(ptr); }
 +} /* namespace gbe */
 +
 +
  #else
  #error "Unsupported platform"
  #endif /* __LINUX__ */
Index: head/lang/beignet/files/patch-src_cl__alloc.c
===================================================================
--- head/lang/beignet/files/patch-src_cl__alloc.c	(revision 435143)
+++ head/lang/beignet/files/patch-src_cl__alloc.c	(revision 435144)
@@ -1,25 +1,25 @@
---- src/cl_alloc.c.orig	2015-01-16 11:24:13.000000000 +0100
-+++ src/cl_alloc.c	2015-02-03 15:31:13.983452000 +0100
+--- src/cl_alloc.c.orig	2017-01-20 10:40:51 UTC
++++ src/cl_alloc.c
 @@ -22,7 +22,7 @@
  
  #include <stdlib.h>
  #include <assert.h>
 -#include <malloc.h>
 +#include <sys/types.h>
  
  static volatile int32_t cl_alloc_n = 0;
  
-@@ -41,8 +41,13 @@
+@@ -41,8 +41,13 @@ cl_aligned_malloc(size_t sz, size_t alig
  {
    void * p = NULL;
    atomic_inc(&cl_alloc_n);
 +#ifndef __FreeBSD__
    p = memalign(align, sz);
    assert(p);
 +#else
 +  const int err = posix_memalign(&p,align,sz);
 +  assert(err==0); 
 +#endif
    return p;
  }
  
Index: head/lang/beignet/files/patch-src_cl__api__kernel.c
===================================================================
--- head/lang/beignet/files/patch-src_cl__api__kernel.c	(nonexistent)
+++ head/lang/beignet/files/patch-src_cl__api__kernel.c	(revision 435144)
@@ -0,0 +1,10 @@
+--- src/cl_api_kernel.c.orig	2017-01-20 10:40:51 UTC
++++ src/cl_api_kernel.c
+@@ -26,6 +26,7 @@
+ #include "CL/cl.h"
+ #include <stdio.h>
+ #include <string.h>
++#include <sys/types.h>
+ 
+ cl_int
+ clGetKernelInfo(cl_kernel kernel,

Property changes on: head/lang/beignet/files/patch-src_cl__api__kernel.c
___________________________________________________________________
Added: fbsd:nokeywords
## -0,0 +1 ##
+yes
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Index: head/lang/beignet/files/patch-src_cl__device__id.c
===================================================================
--- head/lang/beignet/files/patch-src_cl__device__id.c	(revision 435143)
+++ head/lang/beignet/files/patch-src_cl__device__id.c	(revision 435144)
@@ -1,65 +1,65 @@
---- src/cl_device_id.c.orig	2016-08-23 12:16:02.000000000 +0200
-+++ src/cl_device_id.c	2016-08-31 17:50:49.806646000 +0200
-@@ -35,7 +35,12 @@
+--- src/cl_device_id.c.orig	2017-01-20 10:40:51 UTC
++++ src/cl_device_id.c
+@@ -34,7 +34,12 @@
  #include <stdio.h>
  #include <string.h>
  #include <stdlib.h>
 +#if defined(__linux__)
  #include <sys/sysinfo.h>
 +#elif defined(__FreeBSD__)
 +#include <sys/types.h>
 +#include <sys/sysctl.h>
 +#endif
  
  #ifndef CL_VERSION_1_2
  #define CL_DEVICE_BUILT_IN_KERNELS 0x103F
-@@ -269,6 +274,7 @@ LOCAL cl_device_id
+@@ -258,6 +263,7 @@ LOCAL cl_device_id
  cl_get_gt_device(void)
  {
    cl_device_id ret = NULL;
 +/* FIXME check cl_driver_get_device_id() */
    const int device_id = cl_driver_get_device_id();
    cl_device_id device = NULL;
  
-@@ -737,7 +743,7 @@ kbl_gt4_break:
+@@ -743,7 +749,7 @@ kbl_gt4_break:
      case PCI_CHIP_SANDYBRIDGE_M_GT2_PLUS:
      case PCI_CHIP_SANDYBRIDGE_BRIDGE_S:
      case PCI_CHIP_SANDYBRIDGE_S_GT:
 -      // Intel(R) HD Graphics SandyBridge not supported yet
 +      printf("Intel(R) HD Graphics SandyBridge not supported yet\n");
        ret = NULL;
        break;
      default:
-@@ -757,6 +763,7 @@ kbl_gt4_break:
+@@ -764,6 +770,7 @@ kbl_gt4_break:
    /* Apply any driver-dependent updates to the device info */
    cl_driver_update_device_info(ret);
  
 +#if defined(__linux__)
-   #define toMB(size) (size)&(0xfffffffffffffff<<20)
+   #define toMB(size) (size)&(UINT64_MAX<<20)
    /* Get the global_mem_size and max_mem_alloc size from
     * driver, system ram and hardware*/
-@@ -776,6 +783,24 @@ kbl_gt4_break:
+@@ -783,6 +790,24 @@ kbl_gt4_break:
      ret->max_mem_alloc_size = toMB((ret->global_mem_size * 3 / 4 > maxallocmem) ?
                                maxallocmem: ret->global_mem_size * 3 / 4);
    }
 +#elif defined(__FreeBSD__) || defined(__DragonFly__)
 +  int mib[2];
 +
 +  mib[0] = CTL_HW;
 +  mib[1] = HW_USERMEM;
 +
 +  uint64_t totalram;
 +  size_t len;
 +  len = sizeof(totalram);
 +  sysctl(mib, 2, &totalram, &len, NULL, 0);
 +
 +  uint64_t two_gb = 2 * 1024 * 1024 * 1024ul;
 +  ret->global_mem_size = (totalram > two_gb) ?
 +                          two_gb : totalram;
 +  ret->max_mem_alloc_size = ret->global_mem_size / 2;
 +#else
 +#error "not implimentend on this OS"
 +#endif
  
    return ret;
  }
Index: head/lang/beignet/files/patch-src_cl__enqueue.c
===================================================================
--- head/lang/beignet/files/patch-src_cl__enqueue.c	(nonexistent)
+++ head/lang/beignet/files/patch-src_cl__enqueue.c	(revision 435144)
@@ -0,0 +1,10 @@
+--- src/cl_enqueue.c.orig	2017-01-20 10:40:51 UTC
++++ src/cl_enqueue.c
+@@ -29,6 +29,7 @@
+ #include <string.h>
+ #include <assert.h>
+ #include <pthread.h>
++#include <sys/types.h>
+ 
+ static cl_int
+ cl_enqueue_read_buffer(enqueue_data *data, cl_int status)

Property changes on: head/lang/beignet/files/patch-src_cl__enqueue.c
___________________________________________________________________
Added: fbsd:nokeywords
## -0,0 +1 ##
+yes
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Index: head/lang/beignet/files/patch-src_git__sha1.sh
===================================================================
--- head/lang/beignet/files/patch-src_git__sha1.sh	(revision 435143)
+++ head/lang/beignet/files/patch-src_git__sha1.sh	(revision 435144)
@@ -1,8 +1,8 @@
---- src/git_sha1.sh.orig	2015-01-16 10:24:13 UTC
+--- src/git_sha1.sh.orig	2017-02-28 21:01:04 UTC
 +++ src/git_sha1.sh
 @@ -1,4 +1,4 @@
--#!/bin/bash
+-#!/usr/local/bin/bash
 +#!/bin/sh
  
  SOURCE_DIR=$1
  FILE=$2
Index: head/lang/beignet/files/patch-src_performance.c
===================================================================
--- head/lang/beignet/files/patch-src_performance.c	(revision 435143)
+++ head/lang/beignet/files/patch-src_performance.c	(revision 435144)
@@ -1,30 +1,30 @@
---- src/performance.c.orig	2015-08-26 11:58:45.989699000 +0200
-+++ src/performance.c	2015-08-26 11:59:40.117247000 +0200
+--- src/performance.c.orig	2017-01-20 10:40:51 UTC
++++ src/performance.c
 @@ -37,7 +37,6 @@ typedef struct storage
  
  
  static storage record;
 -static int atexit_registered = 0;
  
  
  static context_storage_node * prev_context_pointer = NULL;
-@@ -170,6 +169,7 @@ static int cmp(const void *a, const void
+@@ -174,6 +173,7 @@ static int cmp(const void *a, const void
      return 0;
  }
  
 +__attribute__((destructor))
  static void print_time_info()
  {
    context_storage_node *p_context = record.context_storage;
-@@ -273,11 +273,6 @@ static void print_time_info()
+@@ -279,11 +279,6 @@ static void print_time_info()
  
  static void insert(cl_context context, const char *kernel_name, const char *build_opt, float time)
  {
 -  if(!atexit_registered)
 -  {
 -    atexit_registered = 1;
 -    atexit(print_time_info);
 -  }
    context_storage_node *p_context = find_context(context);
    kernel_storage_node *p_kernel = find_kernel(p_context, kernel_name, build_opt);
-   prev_context_pointer = p_context;
+   if(!p_kernel)
Index: head/lang/beignet/files/patch-utests_CMakeLists.txt
===================================================================
--- head/lang/beignet/files/patch-utests_CMakeLists.txt	(revision 435143)
+++ head/lang/beignet/files/patch-utests_CMakeLists.txt	(revision 435144)
@@ -1,17 +1,17 @@
---- utests/CMakeLists.txt.orig	2015-02-02 21:01:26.000000000 +0100
-+++ utests/CMakeLists.txt	2015-02-02 22:19:04.185677000 +0100
-@@ -230,12 +230,12 @@
+--- utests/CMakeLists.txt.orig	2017-01-20 10:40:51 UTC
++++ utests/CMakeLists.txt
+@@ -333,12 +333,12 @@ list (GET GBE_BIN_GENERATER -1 GBE_BIN_F
  if(GEN_PCI_ID)
    ADD_CUSTOM_COMMAND(
    OUTPUT ${kernel_bin}.bin
 -  COMMAND ${GBE_BIN_GENERATER} ${kernel_bin}.cl -o${kernel_bin}.bin -t${GEN_PCI_ID}
 +  COMMAND ${GBE_BIN_GENERATER} -o${kernel_bin}.bin -t${GEN_PCI_ID} ${kernel_bin}.cl
    DEPENDS ${GBE_BIN_FILE} ${kernel_bin}.cl)
  else(GEN_PCI_ID)
    ADD_CUSTOM_COMMAND(
    OUTPUT ${kernel_bin}.bin
 -  COMMAND ${GBE_BIN_GENERATER} ${kernel_bin}.cl -o${kernel_bin}.bin
 +  COMMAND ${GBE_BIN_GENERATER} -o${kernel_bin}.bin ${kernel_bin}.cl
    DEPENDS ${GBE_BIN_FILE} ${kernel_bin}.cl)
  endif(GEN_PCI_ID)
  
Index: head/lang/beignet/files/patch-utests_builtin__exp.cpp
===================================================================
--- head/lang/beignet/files/patch-utests_builtin__exp.cpp	(revision 435143)
+++ head/lang/beignet/files/patch-utests_builtin__exp.cpp	(revision 435144)
@@ -1,14 +1,14 @@
---- utests/builtin_exp.cpp.orig	2015-01-16 10:24:13 UTC
+--- utests/builtin_exp.cpp.orig	2017-01-20 10:40:51 UTC
 +++ utests/builtin_exp.cpp
-@@ -25,7 +25,11 @@ static void cpu_compiler_math(float *dst
+@@ -27,7 +27,11 @@ static void cpu_compiler_math(float *dst
  
    dst[0] = exp(x);
    dst[1] = exp2(x);
 +#ifndef __FreeBSD__
    dst[2] = exp10(x);
 +#else
 +  dst[2] = powf(10,x);
 +#endif
    dst[3] = expm1(x);
    dst[4] = x;
  }
Index: head/lang/beignet/files/patch-utests_utest.cpp
===================================================================
--- head/lang/beignet/files/patch-utests_utest.cpp	(revision 435143)
+++ head/lang/beignet/files/patch-utests_utest.cpp	(revision 435144)
@@ -1,18 +1,18 @@
---- utests/utest.cpp.orig	2015-08-26 12:00:07.664830000 +0200
-+++ utests/utest.cpp	2015-08-26 12:00:37.039946000 +0200
-@@ -44,6 +44,7 @@
+--- utests/utest.cpp.orig	2017-01-20 10:40:51 UTC
++++ utests/utest.cpp
+@@ -52,6 +52,7 @@ vector<int> v;
  RStatistics UTest::retStatistics;
  
  void releaseUTestList(void) { delete UTest::utestList; }
 +__attribute__((destructor))
  void runSummaryAtExit(void) {
    // If case crashes, count it as fail, and accumulate finishrun
    if(UTest::retStatistics.finishrun != UTest::utestList->size()) {
-@@ -113,7 +114,6 @@
+@@ -146,7 +147,6 @@ UTest::UTest(Function fn, const char *na
      utestList = new vector<UTest>;
  
      catch_signal();
 -    atexit(runSummaryAtExit);
    }
    utestList->push_back(*this);
  }
Index: head/lang/beignet/files/patch-utests_utest__math__gen.py
===================================================================
--- head/lang/beignet/files/patch-utests_utest__math__gen.py	(revision 435143)
+++ head/lang/beignet/files/patch-utests_utest__math__gen.py	(revision 435144)
@@ -1,18 +1,18 @@
---- utests/utest_math_gen.py.orig	2015-02-02 20:01:26 UTC
+--- utests/utest_math_gen.py.orig	2017-01-20 10:40:51 UTC
 +++ utests/utest_math_gen.py
 @@ -241,10 +241,11 @@ static float atan2pi(float y, float x){
    exp2Utests = func('exp2','exp2',[exp2_input_type],exp2_output_type,[exp2_input_values],'4 * FLT_ULP')
    
    ##### gentype exp10(gentype)
 -  exp10_input_values = base_input_values
 -  exp10_input_type = ['float','float2','float4','float8','float16']
 -  exp10_output_type = ['float','float2','float4','float8','float16']
 -  exp10Utests = func('exp10','exp10',[exp10_input_type],exp10_output_type,[exp10_input_values],'4 * FLT_ULP')
 +#  exp10_input_values = base_input_values
 +#  exp10_input_type = ['float','float2','float4','float8','float16']
 +#  exp10_output_type = ['float','float2','float4','float8','float16']
 +#  exp10Utests = func('exp10','exp10',[exp10_input_type],exp10_output_type,[exp10_input_values],'4 * FLT_ULP')
 +# FreeBSD does not have a exp10() function
    
    ##### gentype expm1(gentype x)
    expm1_input_values = base_input_values
Index: head/lang/beignet/pkg-plist
===================================================================
--- head/lang/beignet/pkg-plist	(revision 435143)
+++ head/lang/beignet/pkg-plist	(revision 435144)
@@ -1,29 +1,34 @@
 etc/OpenCL/vendors/intel-beignet.icd
 lib/beignet/beignet.bc
 lib/beignet/beignet.pch
 lib/beignet/include/ocl.h
 lib/beignet/include/ocl_as.h
 lib/beignet/include/ocl_async.h
 lib/beignet/include/ocl_atom.h
+lib/beignet/include/ocl_atom_20.h
 lib/beignet/include/ocl_common.h
 lib/beignet/include/ocl_convert.h
 lib/beignet/include/ocl_defines.h
+lib/beignet/include/ocl_enqueue.h
 lib/beignet/include/ocl_float.h
 lib/beignet/include/ocl_geometric.h
 lib/beignet/include/ocl_image.h
 lib/beignet/include/ocl_integer.h
 lib/beignet/include/ocl_math.h
+lib/beignet/include/ocl_math_20.h
 lib/beignet/include/ocl_memcpy.h
 lib/beignet/include/ocl_memset.h
 lib/beignet/include/ocl_misc.h
+lib/beignet/include/ocl_pipe.h
 lib/beignet/include/ocl_printf.h
 lib/beignet/include/ocl_relational.h
 lib/beignet/include/ocl_simd.h
 lib/beignet/include/ocl_sync.h
 lib/beignet/include/ocl_types.h
 lib/beignet/include/ocl_vload.h
+lib/beignet/include/ocl_vload_20.h
 lib/beignet/include/ocl_work_group.h
 lib/beignet/include/ocl_workitem.h
 lib/beignet/libcl.so
 lib/beignet/libgbe.so
 lib/beignet/libgbeinterp.so