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

Collapse All | Expand All

(-)lang/pocl/Makefile (-23 / +34 lines)
Lines 1-46 Link Here
1
# $FreeBSD$
1
# $FreeBSD$
2
2
3
PORTNAME=	pocl
3
PORTNAME=						pocl
4
PORTVERSION=	0.14
4
PORTVERSION=				1.2
5
CATEGORIES=	lang
5
DISTVERSIONPREFIX=	v
6
MASTER_SITES=	SF/pocl \
6
DISTVERSIONSUFFIX=	-RC2
7
		http://portablecl.org/downloads/
7
CATEGORIES=					lang
8
8
9
MAINTAINER=	ohartman@zedat.fu-berlin.de
9
MAINTAINER=					ohartmann@walstatt.org
10
COMMENT=	POrtable Computing Language (POCL)
10
COMMENT=						POrtable Computing Language (POCL)
11
11
12
LICENSE=	MIT
12
LICENSE=						MIT
13
LICENSE_FILE=	${WRKSRC}/LICENSE
13
LICENSE_FILE=				${WRKSRC}/LICENSE
14
14
15
BROKEN_FreeBSD_10=	pocl is not supported on 10.x
15
BROKEN_FreeBSD_10=	pocl is not supported on 10.x
16
ONLY_FOR_ARCHS=		amd64 i386
16
17
ONLY_FOR_ARCHS=			i386 amd64 arm64
17
ONLY_FOR_ARCHS_REASON=	only tested on x86
18
ONLY_FOR_ARCHS_REASON=	only tested on x86
18
19
19
BUILD_DEPENDS=	llvm${LLVM_VERSION}>=0:devel/llvm${LLVM_VERSION} \
20
BUILD_DEPENDS=	llvm${LLVM_VERSION}>=0:devel/llvm${LLVM_VERSION} \
20
		opencl>=2.1:devel/opencl
21
				opencl>=2.1:devel/opencl
21
LIB_DEPENDS=	libhwloc.so:devel/hwloc \
22
LIB_DEPENDS=	libhwloc.so:devel/hwloc \
22
		libOpenCL.so:devel/ocl-icd \
23
				libOpenCL.so:devel/ocl-icd \
23
		libltdl.so:devel/libltdl
24
				libltdl.so:devel/libltdl
24
RUN_DEPENDS=	llvm${LLVM_VERSION}>=0:devel/llvm${LLVM_VERSION}
25
RUN_DEPENDS=	llvm${LLVM_VERSION}>=0:devel/llvm${LLVM_VERSION}
25
26
26
LLVM_VERSION=	${MESA_LLVM_VER:U40}
27
LLVM_VERSION=	${MESA_LLVM_VER:U60}
27
28
28
USES=		cmake:outsource localbase:ldflags ncurses pkgconfig
29
USES=			cmake localbase:ldflags ncurses pkgconfig
29
USE_CXXSTD=	gnu++11
30
31
USE_GITHUB=		yes
30
USE_LDCONFIG=	yes
32
USE_LDCONFIG=	yes
33
USE_CXXSTD=		gnu++11
31
34
32
CMAKE_ARGS=	-DWITH_LLVM_CONFIG="${LOCALBASE}/llvm${LLVM_VERSION}/bin/llvm-config" \
35
CMAKE_ARGS=		-DWITH_LLVM_CONFIG="${LOCALBASE}/llvm${LLVM_VERSION}/bin/llvm-config" \
33
		-DPOCL_INSTALL_PKGCONFIG_DIR="${PREFIX}/libdata/pkgconfig" \
36
				-DPOCL_INSTALL_PKGCONFIG_DIR="${PREFIX}/libdata/pkgconfig" \
34
		-DKERNELLIB_HOST_CPU_VARIANTS="distro"
37
				-DKERNELLIB_HOST_CPU_VARIANTS="distro"
35
PLIST_SUB=	OPSYS=${OPSYS:tl} ARCH=${ARCH:S/amd64/x86_64/}
38
PLIST_SUB=		OPSYS=${OPSYS:tl} ARCH=${ARCH:S/amd64/x86_64/}
36
39
37
OPTIONS_DEFINE=	TEST
40
OPTIONS_DEFINE=	TEST CUDA VECMATH
38
41
39
TEST_DESC=	Tests from the OpenCL book
42
TEST_DESC=			Tests from the OpenCL book
40
TEST_CMAKE_OFF=	-DENABLE_TESTSUITES=""
43
TEST_CMAKE_OFF=	-DENABLE_TESTSUITES=""
41
TEST_CMAKE_ON=	-DENABLE_TESTSUITES="all"
44
TEST_CMAKE_ON=	-DENABLE_TESTSUITES="all"
42
TEST_TARGET=	test
45
TEST_TARGET=		test
43
46
47
CUDA_DESC=			Enable CUDA backend (requires LLVM NVPTX supp.)
48
CUDA_CMAKE_OFF=	-DENABLE_CUDA=OFF 
49
CUDA_CMAKE_ON=	-DENABLE_CUDA=ON 
50
51
VECMATH_DESC=	Vectormath Lib
52
VECMATH_CMAKE_OFF=	-DENABLE_VECMATHLIB=OFF
53
VECMATH_CMAKE_ON=	-DENABLE_VECMATHLIB=ON
54
44
pre-install-TEST-on: do-test
55
pre-install-TEST-on: do-test
45
56
46
.include <bsd.port.mk>
57
.include <bsd.port.mk>
(-)lang/pocl/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1491868935
1
TIMESTAMP = 1536062239
2
SHA256 (pocl-0.14.tar.gz) = 2127bf925a91fbbe3daf2f1bac0da5c8aceb16e2a9434977a3057eade974106a
2
SHA256 (pocl-pocl-v1.2-RC2_GH0.tar.gz) = 63fd241189d6d8d4985fcb910a75309b820520d5fbc422422edabc2e4fcc97c1
3
SIZE (pocl-0.14.tar.gz) = 1231630
3
SIZE (pocl-pocl-v1.2-RC2_GH0.tar.gz) = 1603439
(-)lang/pocl/files/patch-CMakeLists.txt (-15 / +6 lines)
Lines 1-21 Link Here
1
--- CMakeLists.txt.orig	2017-04-05 14:15:40 UTC
1
--- CMakeLists.txt.orig	2018-09-04 14:56:24.344580000 +0200
2
+++ CMakeLists.txt
2
+++ CMakeLists.txt	2018-09-04 14:57:13.570910000 +0200
3
@@ -70,7 +70,7 @@ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "a
3
@@ -546,6 +546,9 @@
4
   set(ARMV6 1)
4
   set(HAVE_UTIME 0)
5
 elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64")
5
 endif()
6
   set(ARM64 1)
7
-elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "(i.86|AMD64|x86_64)")
8
+elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "(i.86|amd64|AMD64|x86_64)")
9
   if(POCL_DEVICE_ADDRESS_BITS MATCHES "32")
10
     set(I386 1)
11
   else()
12
@@ -318,6 +318,9 @@ include(CheckFunctionExists)
13
 check_function_exists(fork HAVE_FORK)
14
 check_function_exists(vfork HAVE_VFORK)
15
 
6
 
16
+include(CheckIncludeFiles)
7
+include(CheckIncludeFiles)
17
+check_include_files("sys/types.h;sys/sysctl.h" HAVE_SYSCTL_H)
8
+check_include_files("sys/types.h;sys/sysctl.h" HAVE_SYSCTL_H)
18
+
9
+
10
 
19
 ######################################################################################
11
 ######################################################################################
20
 
12
 
21
 if(NOT DEFINED DEFAULT_USE_VECMATHLIB)
(-)lang/pocl/files/patch-lib_CL_devices_cpuinfo.c (-7 / +7 lines)
Lines 1-5 Link Here
1
--- lib/CL/devices/cpuinfo.c.orig	2017-04-05 14:15:40 UTC
1
--- lib/CL/devices/cpuinfo.c.orig	2017-12-18 19:45:26.000000000 +0100
2
+++ lib/CL/devices/cpuinfo.c
2
+++ lib/CL/devices/cpuinfo.c	2017-12-23 03:18:38.821984000 +0100
3
@@ -34,6 +34,12 @@
3
@@ -34,6 +34,12 @@
4
 #include "config.h"
4
 #include "config.h"
5
 #include "cpuinfo.h"
5
 #include "cpuinfo.h"
Lines 13-19 Link Here
13
 static const char* cpuinfo = "/proc/cpuinfo";
13
 static const char* cpuinfo = "/proc/cpuinfo";
14
 #define MAX_CPUINFO_SIZE 64*1024
14
 #define MAX_CPUINFO_SIZE 64*1024
15
 //#define DEBUG_POCL_CPUINFO
15
 //#define DEBUG_POCL_CPUINFO
16
@@ -153,8 +159,51 @@ pocl_cpuinfo_detect_max_clock_frequency(
16
@@ -153,8 +159,51 @@
17
     } 
17
     } 
18
   return -1;  
18
   return -1;  
19
 }
19
 }
Lines 65-71 Link Here
65
 /**
65
 /**
66
  * Detects the number of parallel hardware threads supported by
66
  * Detects the number of parallel hardware threads supported by
67
  * the CPU by parsing the cpuinfo.
67
  * the CPU by parsing the cpuinfo.
68
@@ -232,6 +281,19 @@ pocl_cpuinfo_detect_compute_unit_count()
68
@@ -232,6 +281,19 @@
69
     } 
69
     } 
70
   return -1;  
70
   return -1;  
71
 }
71
 }
Lines 85-91 Link Here
85
 
85
 
86
 #ifdef POCL_ANDROID
86
 #ifdef POCL_ANDROID
87
 
87
 
88
@@ -270,6 +332,7 @@ pocl_cpuinfo_get_cpu_name_and_vendor(cl_
88
@@ -326,6 +388,7 @@
89
    * short_name is in the .data anyways.*/
89
    * short_name is in the .data anyways.*/
90
   device->long_name = device->short_name;
90
   device->long_name = device->short_name;
91
 
91
 
Lines 93-99 Link Here
93
   /* default vendor and vendor_id, in case it cannot be found by other means */
93
   /* default vendor and vendor_id, in case it cannot be found by other means */
94
   device->vendor = cpuvendor_default;
94
   device->vendor = cpuvendor_default;
95
   if (device->vendor_id == 0)
95
   if (device->vendor_id == 0)
96
@@ -318,7 +381,25 @@ pocl_cpuinfo_get_cpu_name_and_vendor(cl_
96
@@ -425,6 +488,25 @@
97
   char *new_name = (char*)malloc (len);
97
   char *new_name = (char*)malloc (len);
98
   snprintf (new_name, len, "%s-%s", device->short_name, start);
98
   snprintf (new_name, len, "%s-%s", device->short_name, start);
99
   device->long_name = new_name;
99
   device->long_name = new_name;
Lines 101-107 Link Here
101
+  int mib[2];
101
+  int mib[2];
102
+  size_t len = 0;
102
+  size_t len = 0;
103
+  char *model;
103
+  char *model;
104
 
104
+
105
+  mib[0] = CTL_HW;
105
+  mib[0] = CTL_HW;
106
+  mib[1] = HW_MODEL;
106
+  mib[1] = HW_MODEL;
107
+  if (sysctl(mib, 2, NULL, &len, NULL, 0))
107
+  if (sysctl(mib, 2, NULL, &len, NULL, 0))
(-)lang/pocl/pkg-plist (-6 / +4 lines)
Lines 1-14 Link Here
1
bin/poclcc
1
bin/poclcc
2
etc/OpenCL/vendors/pocl.icd
2
etc/OpenCL/vendors/pocl.icd
3
include/poclu.h
4
lib/libpocl.so
3
lib/libpocl.so
5
lib/libpocl.so.1
4
lib/libpocl.so.2
6
lib/libpocl.so.1.7.0
5
lib/libpocl.so.2.2.0
7
lib/libpoclu.so
8
lib/libpoclu.so.1
9
lib/libpoclu.so.1.7.0
10
lib/pocl/libllvmopencl.so
6
lib/pocl/libllvmopencl.so
11
libdata/pkgconfig/pocl.pc
7
libdata/pkgconfig/pocl.pc
8
%%DATADIR%%/include/_builtin_renames.h
12
%%DATADIR%%/include/_enable_all_exts.h
9
%%DATADIR%%/include/_enable_all_exts.h
13
%%DATADIR%%/include/_kernel.h
10
%%DATADIR%%/include/_kernel.h
14
%%DATADIR%%/include/_kernel_c.h
11
%%DATADIR%%/include/_kernel_c.h
Lines 19-24 Link Here
19
%%DATADIR%%/kernel-%%ARCH%%-portbld-%%OPSYS%%%%OSREL%%-avx.bc
16
%%DATADIR%%/kernel-%%ARCH%%-portbld-%%OPSYS%%%%OSREL%%-avx.bc
20
%%DATADIR%%/kernel-%%ARCH%%-portbld-%%OPSYS%%%%OSREL%%-avx2.bc
17
%%DATADIR%%/kernel-%%ARCH%%-portbld-%%OPSYS%%%%OSREL%%-avx2.bc
21
%%DATADIR%%/kernel-%%ARCH%%-portbld-%%OPSYS%%%%OSREL%%-avx512.bc
18
%%DATADIR%%/kernel-%%ARCH%%-portbld-%%OPSYS%%%%OSREL%%-avx512.bc
19
%%DATADIR%%/kernel-%%ARCH%%-portbld-%%OPSYS%%%%OSREL%%-avx_f16c.bc
22
%%DATADIR%%/kernel-%%ARCH%%-portbld-%%OPSYS%%%%OSREL%%-avx_fma4.bc
20
%%DATADIR%%/kernel-%%ARCH%%-portbld-%%OPSYS%%%%OSREL%%-avx_fma4.bc
23
%%DATADIR%%/kernel-%%ARCH%%-portbld-%%OPSYS%%%%OSREL%%-sse2.bc
21
%%DATADIR%%/kernel-%%ARCH%%-portbld-%%OPSYS%%%%OSREL%%-sse2.bc
24
%%DATADIR%%/kernel-%%ARCH%%-portbld-%%OPSYS%%%%OSREL%%-sse41.bc
22
%%DATADIR%%/kernel-%%ARCH%%-portbld-%%OPSYS%%%%OSREL%%-sse41.bc

Return to bug 224584