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

Collapse All | Expand All

(-)b/lang/pocl/Makefile (-22 / +24 lines)
Lines 1-41 Link Here
1
PORTNAME=		pocl
1
PORTNAME=			pocl
2
PORTVERSION=		1.6
2
PORTVERSION=		1.7
3
PORTREVISION=		1
4
DISTVERSIONPREFIX=	v
3
DISTVERSIONPREFIX=	v
5
CATEGORIES=		lang
4
CATEGORIES=			lang
6
5
7
MAINTAINER=		ohartmann@walstatt.org
6
MAINTAINER=			ohartmann@walstatt.org
8
COMMENT=		POrtable Computing Language (POCL)
7
COMMENT=			POrtable Computing Language (POCL)
9
8
10
LICENSE=		MIT
9
LICENSE=			MIT
11
LICENSE_FILE=		${WRKSRC}/LICENSE
10
LICENSE_FILE=		${WRKSRC}/LICENSE
12
11
13
ONLY_FOR_ARCHS=		amd64 i386
12
ONLY_FOR_ARCHS=		amd64 i386
14
ONLY_FOR_ARCHS_REASON=	only tested on x86
13
ONLY_FOR_ARCHS_REASON=	only tested on x86 architectures
15
14
16
BUILD_DEPENDS=	llvm${LLVM_VERSION}>=0:devel/llvm${LLVM_VERSION} \
15
RUN_DEPENDS=	llvm${LLVM_VERSION}>=0:devel/llvm${LLVM_VERSION} \
17
			opencl>=2.2:devel/opencl
16
				opencl>=2.2:devel/opencl
18
LIB_DEPENDS=	libhwloc.so.15:devel/hwloc2 libOpenCL.so:devel/ocl-icd
17
LIB_DEPENDS=	libhwloc.so:devel/hwloc2 \
19
RUN_DEPENDS=	${BUILD_DEPENDS}
18
				libOpenCL.so:devel/ocl-icd
20
19
21
USES=		cmake localbase:ldflags ncurses pkgconfig
20
LLVM_VERSION=	${MESA_LLVM_VER:U12}
22
USE_GITHUB=	yes
21
22
USES=			cmake localbase:ldflags ncurses pkgconfig
23
24
USE_GITHUB=		yes
23
USE_LDCONFIG=	yes
25
USE_LDCONFIG=	yes
24
26
25
LLVM_VERSION=	${MESA_LLVM_VER:U11}
26
CMAKE_ARGS=	-DWITH_LLVM_CONFIG="${LOCALBASE}/llvm${LLVM_VERSION}/bin/llvm-config" \
27
CMAKE_ARGS=	-DWITH_LLVM_CONFIG="${LOCALBASE}/llvm${LLVM_VERSION}/bin/llvm-config" \
27
		-DPOCL_INSTALL_PKGCONFIG_DIR="${PREFIX}/libdata/pkgconfig" \
28
			-DPOCL_INSTALL_PKGCONFIG_DIR="${PREFIX}/libdata/pkgconfig" \
28
		-DKERNELLIB_HOST_CPU_VARIANTS="distro" \
29
			-DKERNELLIB_HOST_CPU_VARIANTS="distro" \
29
		-DSINGLE_LLVM_LIB=ON
30
			-DSINGLE_LLVM_LIB=ON
30
31
31
PLIST_SUB=	CONFIGURE_TARGET=${CONFIGURE_TARGET:S/amd64/x86_64/}
32
PLIST_SUB=	CONFIGURE_TARGET=${CONFIGURE_TARGET:S/amd64/x86_64/}
32
33
33
OPTIONS_DEFINE=	DOCS
34
OPTIONS_DEFINE=	DOCS
35
OPTIONS_SUB=	YES
34
36
35
DOCS_DESC=		Build documentation (needs sphinx)
37
DOCS_DESC=		Build documentation (needs textproc/sphinx)
36
DOCS_CMAKE_OFF=		-DENABLE_DOCS=OFF
38
DOCS_CMAKE_OFF=	-DENABLE_DOCS=OFF
37
DOCS_CMAKE_ON=		-DENABLE_DOCS=ON
39
DOCS_CMAKE_ON=	-DENABLE_DOCS=ON
38
DOCS_USES=		python:3.6+
40
DOCS_USES=		python:3.6+
39
DOCS_BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}sphinx>=0,1:textproc/py-sphinx@${PY_FLAVOR}
41
DOCS_BUILD_DEPENDS=	${PY_FLAVOR}-sphinx>0:textproc/py-sphinx@${PY_FLAVOR}
40
42
41
.include <bsd.port.mk>
43
.include <bsd.port.mk>
(-)b/lang/pocl/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1608358712
1
TIMESTAMP = 1627275626
2
SHA256 (pocl-pocl-v1.6_GH0.tar.gz) = b0a4c0c056371b6f0db726b88fbb76bbee94948fb2abd4dbc8d958f7c42f766c
2
SHA256 (pocl-pocl-v1.7_GH0.tar.gz) = 5f6bbc391ba144bc7becc3b90888b25468460d5aa6830f63a3b066137e7bfac3
3
SIZE (pocl-pocl-v1.6_GH0.tar.gz) = 1595212
3
SIZE (pocl-pocl-v1.7_GH0.tar.gz) = 1577676
(-)b/lang/pocl/files/patch-CMakeLists.txt (-4 / +4 lines)
Lines 1-8 Link Here
1
--- CMakeLists.txt.orig	2020-12-16 13:02:13 UTC
1
--- CMakeLists.txt.orig	2019-04-04 12:06:59 UTC
2
+++ CMakeLists.txt
2
+++ CMakeLists.txt
3
@@ -398,6 +398,9 @@ endif()
3
@@ -546,6 +546,9 @@ else()
4
 
4
   set(HAVE_UTIME 0)
5
 
5
 endif()
6
 
6
 
7
+include(CheckIncludeFiles)
7
+include(CheckIncludeFiles)
8
+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)
(-)b/lang/pocl/files/patch-config.h.in.cmake (-2 / +2 lines)
Lines 1-6 Link Here
1
--- config.h.in.cmake.orig	2020-12-16 13:02:13 UTC
1
--- config.h.in.cmake.orig	2019-04-04 12:06:59 UTC
2
+++ config.h.in.cmake
2
+++ config.h.in.cmake
3
@@ -39,6 +39,8 @@
3
@@ -41,6 +41,8 @@
4
 
4
 
5
 #cmakedefine HAVE_VFORK
5
 #cmakedefine HAVE_VFORK
6
 
6
 
(-)b/lang/pocl/files/patch-lib_CL_devices_cpuinfo.c (-8 / +8 lines)
Lines 1-5 Link Here
1
--- lib/CL/devices/cpuinfo.c.orig	2020-12-16 13:02:13 UTC
1
--- lib/CL/devices/cpuinfo.c.orig	2020-12-16 14:02:13.000000000 +0100
2
+++ lib/CL/devices/cpuinfo.c
2
+++ lib/CL/devices/cpuinfo.c	2020-12-19 10:46:13.846666000 +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
@@ -41,9 +47,6 @@ static const char* cpuinfo = "/proc/cpuinfo";
16
@@ -41,9 +47,6 @@
17
 //Linux' cpufrec interface
17
 //Linux' cpufrec interface
18
 static const char* cpufreq_file="/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq";
18
 static const char* cpufreq_file="/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq";
19
 
19
 
Lines 23-29 Link Here
23
 /* Strings to parse in /proc/cpuinfo. Else branch is for x86, x86_64 */
23
 /* Strings to parse in /proc/cpuinfo. Else branch is for x86, x86_64 */
24
 #if   defined  __powerpc__
24
 #if   defined  __powerpc__
25
  #define FREQSTRING "clock"
25
  #define FREQSTRING "clock"
26
@@ -156,8 +159,51 @@ pocl_cpuinfo_detect_max_clock_frequency()
26
@@ -156,8 +159,51 @@
27
     } 
27
     } 
28
   return -1;  
28
   return -1;  
29
 }
29
 }
Lines 75-81 Link Here
75
 /**
75
 /**
76
  * Detects the number of parallel hardware threads supported by
76
  * Detects the number of parallel hardware threads supported by
77
  * the CPU by parsing the cpuinfo.
77
  * the CPU by parsing the cpuinfo.
78
@@ -235,6 +281,19 @@ pocl_cpuinfo_detect_compute_unit_count()
78
@@ -235,6 +281,19 @@
79
     } 
79
     } 
80
   return -1;  
80
   return -1;  
81
 }
81
 }
Lines 95-101 Link Here
95
 
95
 
96
 #if __arm__ || __aarch64__
96
 #if __arm__ || __aarch64__
97
 enum
97
 enum
98
@@ -302,6 +361,7 @@ pocl_cpuinfo_get_cpu_name_and_vendor(cl_device_id devi
98
@@ -302,6 +361,7 @@
99
    * short_name is in the .data anyways.*/
99
    * short_name is in the .data anyways.*/
100
   device->long_name = device->short_name;
100
   device->long_name = device->short_name;
101
 
101
 
Lines 103-109 Link Here
103
   /* default vendor and vendor_id, in case it cannot be found by other means */
103
   /* default vendor and vendor_id, in case it cannot be found by other means */
104
   device->vendor = cpuvendor_default;
104
   device->vendor = cpuvendor_default;
105
   if (device->vendor_id == 0)
105
   if (device->vendor_id == 0)
106
@@ -404,7 +464,26 @@ pocl_cpuinfo_get_cpu_name_and_vendor(cl_device_id devi
106
@@ -404,7 +464,26 @@
107
   char *new_name = (char*)malloc (len);
107
   char *new_name = (char*)malloc (len);
108
   snprintf (new_name, len, "%s-%s", device->short_name, start);
108
   snprintf (new_name, len, "%s-%s", device->short_name, start);
109
   device->long_name = new_name;
109
   device->long_name = new_name;
Lines 130-136 Link Here
130
   /* If the vendor_id field is still empty, we should get the PCI ID associated
130
   /* If the vendor_id field is still empty, we should get the PCI ID associated
131
    * with the CPU vendor (if there is one), to be ready for the (currently
131
    * with the CPU vendor (if there is one), to be ready for the (currently
132
    * provisional) OpenCL 3.0 specification that has finally clarified the
132
    * provisional) OpenCL 3.0 specification that has finally clarified the
133
@@ -415,10 +494,20 @@ pocl_cpuinfo_get_cpu_name_and_vendor(cl_device_id devi
133
@@ -415,10 +494,20 @@
134
    */
134
    */
135
   if (!device->vendor_id)
135
   if (!device->vendor_id)
136
     {
136
     {
(-)b/lang/pocl/files/patch-lib_CL_pocl_timing.c (+11 lines)
Added Link Here
1
--- lib/CL/pocl_timing.c.orig	2021-07-26 09:46:46.292427000 +0200
2
+++ lib/CL/pocl_timing.c	2021-07-26 09:49:46.393248000 +0200
3
@@ -75,7 +75,7 @@
4
   clock_gettime(CLOCK_MONOTONIC, &timespec);
5
 #  endif
6
 # elif defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD_kernel__)
7
-  clock_gettime(CLOCK_UPTIME_FAST, &timespec);
8
+  clock_gettime(CLOCK_MONOTONIC_FAST, &timespec);
9
 # else
10
 # warning Using clock_gettime with CLOCK_REALTIME for monotonic clocks
11
   clock_gettime(CLOCK_REALTIME, &timespec);
(-)b/lang/pocl/pkg-plist (-1 / +1 lines)
Lines 2-8 bin/poclcc Link Here
2
etc/OpenCL/vendors/pocl.icd
2
etc/OpenCL/vendors/pocl.icd
3
lib/libpocl.so
3
lib/libpocl.so
4
lib/libpocl.so.2
4
lib/libpocl.so.2
5
lib/libpocl.so.2.6.0
5
lib/libpocl.so.2.7.0
6
lib/pocl/libllvmopencl.so
6
lib/pocl/libllvmopencl.so
7
lib/pocl/libpocl-devices-basic.so
7
lib/pocl/libpocl-devices-basic.so
8
lib/pocl/libpocl-devices-pthread.so
8
lib/pocl/libpocl-devices-pthread.so

Return to bug 257449