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

Collapse All | Expand All

(-)Makefile (-6 / +11 lines)
Lines 3-29 Link Here
3
3
4
PORTNAME=	freeocl
4
PORTNAME=	freeocl
5
PORTVERSION=	0.3.6
5
PORTVERSION=	0.3.6
6
PORTREVISION=	5
6
PORTREVISION=	6
7
CATEGORIES=	devel
7
CATEGORIES=	devel
8
MASTER_SITES=	${MASTER_SITE_GOOGLE_CODE}
8
MASTER_SITES=	${MASTER_SITE_GOOGLE_CODE}
9
DISTNAME=	FreeOCL-${PORTVERSION}-src
9
DISTNAME=	FreeOCL-${PORTVERSION}-src
10
10
11
MAINTAINER=	ohartman@zedat.fu-berlin.de
11
MAINTAINER=	ohartman@zedat.fu-berlin.de
12
COMMENT=	Free Open Computing Language (OpenCL) implementation for CPU
12
COMMENT=	Free implementation of OpenCL 1.2 for CPUs
13
13
14
LICENSE=	LGPL3
15
16
CONFLICTS=	ocl-icd[0-9]* opencl-icd[0-9]* pocl[0-9]*
17
14
BUILD_DEPENDS=	${LOCALBASE}/lib/libatomic_ops.a:${PORTSDIR}/devel/libatomic_ops \
18
BUILD_DEPENDS=	${LOCALBASE}/lib/libatomic_ops.a:${PORTSDIR}/devel/libatomic_ops \
15
		${LOCALBASE}/include/CL/opencl.h:${PORTSDIR}/devel/opencl
19
		${LOCALBASE}/include/CL/opencl.h:${PORTSDIR}/devel/opencl
16
20
17
LICENSE=	LGPL3
18
19
WRKSRC=		${WRKDIR}/FreeOCL-${PORTVERSION}-Source
21
WRKSRC=		${WRKDIR}/FreeOCL-${PORTVERSION}-Source
20
22
21
USE_GCC=	yes
23
USE_GCC=	any
22
USES=		cmake
24
USES=		cmake
23
USE_LDCONFIG=	yes
25
USE_LDCONFIG=	yes
24
26
27
CXXFLAGS+=	-pthread -std=gnu++0x
28
CMAKE_ENV+=	FREEOCL_CXX_COMPILER="${CXX}"
29
25
post-patch:
30
post-patch:
26
	${REINPLACE_CMD} -e 's:%%PREFIX%%:${PREFIX}:g' ${WRKSRC}/src/icd/icd_loader.cpp \
31
		@${REINPLACE_CMD} -e 's:%%PREFIX%%:${PREFIX}:g' ${WRKSRC}/src/icd/icd_loader.cpp \
27
		${WRKSRC}/CMakeLists.txt
32
		${WRKSRC}/CMakeLists.txt
28
33
29
.include <bsd.port.mk>
34
.include <bsd.port.mk>
(-)files/patch-CMakeLists.txt (-3 / +11 lines)
Lines 1-6 Link Here
1
--- CMakeLists.txt.orig	2012-09-22 12:55:02.000000000 +0400
1
--- CMakeLists.txt.orig	2012-09-02 19:00:41.000000000 +0200
2
+++ CMakeLists.txt	2012-09-22 12:55:27.000000000 +0400
2
+++ CMakeLists.txt	2013-05-18 21:41:36.907149619 +0200
3
@@ -83,7 +83,7 @@ endif(LIBRT)
3
@@ -69,6 +69,7 @@
4
 
5
 include_directories(.)
6
 include_directories(include)
7
+include_directories(/usr/local/include)
8
 include_directories(src)
9
 link_libraries(${CMAKE_THREAD_LIBS_INIT})
10
 find_library(LIBDL dl)
11
@@ -83,7 +84,7 @@
4
 add_subdirectory(samples)
12
 add_subdirectory(samples)
5
 add_subdirectory(src)
13
 add_subdirectory(src)
6
 
14
 
(-)files/patch-src-utils-threadpool.cpp (-10 lines)
Lines 1-10 Link Here
1
--- src/utils/threadpool.cpp.orig	2014-07-04 08:45:34.000000000 +0200
2
+++ src/utils/threadpool.cpp	2014-07-04 08:46:03.000000000 +0200
3
@@ -18,6 +18,7 @@
4
 #include "threadpool.h"
5
 #include <FreeOCL/config.h>
6
 #include <sched.h>
7
+#include <xmmintrin.h>
8
 #include <atomic_ops.h>
9
 #include <utils/time.h>
10
 
(-)files/patch-src__device.cpp (+14 lines)
Line 0 Link Here
1
--- src/device.cpp.orig	2013-05-18 20:12:03.000000000 +0200
2
+++ src/device.cpp	2013-05-18 20:13:30.000000000 +0200
3
@@ -345,7 +345,11 @@
4
 
5
 	pool = new FreeOCL::threadpool();
6
 
7
+#ifdef	__FreeBSD__
8
+	std::string ostype = trim(run_command("/sbin/sysctl -e kern.ostype | awk '{ print $NF }'"));
9
+#else
10
 	std::string ostype = trim(run_command("/sbin/sysctl -e kernel.ostype | awk '{ print $NF }'"));
11
+#endif
12
 	if (ostype.empty())
13
 		ostype = trim(run_command("/sbin/sysctl -e kern.ostype | awk '{ print $NF }'"));
14
 	if (ostype.empty())
(-)files/patch-src__freeocl.h (-10 / +13 lines)
Lines 1-11 Link Here
1
--- src/freeocl.h.orig	2012-09-02 19:00:41.000000000 +0200
1
--- src/freeocl.h.orig	2014-10-04 21:20:27.000000000 +0200
2
+++ src/freeocl.h	2014-07-04 08:42:48.000000000 +0200
2
+++ src/freeocl.h	2014-10-04 21:21:50.000000000 +0200
3
@@ -26,6 +26,8 @@
3
@@ -35,6 +35,11 @@
4
 #include "dispatch.h"
4
 #define CRASH()
5
 #include <iostream>
5
 #endif
6
 #include <deque>
7
+#include <sys/types.h>
8
+#include <xmmintrin.h>
9
 
6
 
10
 #ifdef DEBUG_UTILS
7
+#ifdef __FreeBSD__
11
 #define MSG(X)	std::cout << #X << std::endl
8
+typedef	unsigned int uint;
9
+typedef	uint64_t u_int64_t;
10
+#endif
11
+
12
 namespace FreeOCL
13
 {
14
 	extern cl_platform_id platform;
(-)files/patch-src__utils__threadpool.h (+10 lines)
Line 0 Link Here
1
--- src/utils/threadpool.h.orig	2014-10-04 21:23:27.000000000 +0200
2
+++ src/utils/threadpool.h	2014-10-04 21:23:44.000000000 +0200
3
@@ -22,6 +22,7 @@
4
 #include <deque>
5
 #include <vector>
6
 #include <ucontext.h>
7
+#include <xmmintrin.h>
8
 
9
 namespace FreeOCL
10
 {
(-)files/patch-src_freeocl.h (-11 lines)
Lines 1-11 Link Here
1
--- src/freeocl.h.orig	2012-09-02 19:00:41.000000000 +0200
2
+++ src/freeocl.h	2014-07-04 08:42:48.000000000 +0200
3
@@ -26,6 +26,8 @@
4
 #include "dispatch.h"
5
 #include <iostream>
6
 #include <deque>
7
+#include <sys/types.h>
8
+#include <xmmintrin.h>
9
 
10
 #ifdef DEBUG_UTILS
11
 #define MSG(X)	std::cout << #X << std::endl
(-)files/patch-src_icd_icd_loader.cpp (-13 lines)
Lines 1-13 Link Here
1
--- src/icd/icd_loader.cpp.orig	2012-09-22 13:14:12.000000000 +0400
2
+++ src/icd/icd_loader.cpp	2012-09-22 13:15:03.000000000 +0400
3
@@ -53,8 +53,8 @@ namespace FreeOCL
4
 
5
 	icd_loader::icd_loader()
6
 	{
7
-		// Get the list of all *.icd files in /etc/OpenCL/vendors/
8
-		const std::deque<std::string> &files = list_files("/etc/OpenCL/vendors/", ".icd");
9
+		// Get the list of all *.icd files in %%PREFIX%%/etc/OpenCL/vendors/
10
+		const std::deque<std::string> &files = list_files("%%PREFIX%%/etc/OpenCL/vendors/", ".icd");
11
 		// For each file
12
 		for(std::deque<std::string>::const_iterator i = files.begin() ; i != files.end() ; ++i)
13
 		{
(-)pkg-descr (-1 / +5 lines)
Line 1 Link Here
1
FreeOCL - a free OpenCL implementation for CPU
1
FreeOCL is an implementation of OpenCL 1.2 specifications 
2
targeting CPUs. Instead of using a built-in or dedicated 
3
compiler, it relies on an external C++ compiler. 
4
5
See: https://code.google.com/p/freeocl/

Return to bug 179180