Bug 171376 - New port: devel/freeocl: Providing a CPU-based OpenCL library libOpenCL.so to FreeBSD
Summary: New port: devel/freeocl: Providing a CPU-based OpenCL library libOpenCL.so to...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Boris Samorodov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-06 13:20 UTC by O. Hartmann
Modified: 2012-09-22 15:33 UTC (History)
0 users

See Also:


Attachments
file.shar (2.54 KB, text/plain)
2012-09-06 13:20 UTC, O. Hartmann
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description O. Hartmann 2012-09-06 13:20:01 UTC
FreeBSD lacks for crucial GPGPU/CPU support when it comes to CUDA (nVidai) or OpenCL (open standard). Since nor Intel, nor nVidia and nor AMD support FreeBSD as a development platform using the rapidly spreading OpenCL standard, FreeBSD is useless as a development platform for OpenCL-based software.

It seems that there are efforts making OpenCL for CPU available on a opensource basis and one of those promising efforts can be found at 

http://code.google.com/p/freeocl/

The port provides a OpenCL library that can be compiled against.

The port suggestion made hereby requires another port I suggested providing the Khronos OpenCL 1.2 header files, see also my New Port request for

devel/opencl (http://www.freebsd.org/cgi/query-pr.cgi?pr=171375)

[ports/171375]

Fix: Patch attached with submission follows:
Comment 1 Boris Samorodov freebsd_committer freebsd_triage 2012-09-21 12:02:36 UTC
Responsible Changed
From-To: freebsd-ports-bugs->bsam

take.
Comment 2 Boris Samorodov 2012-09-21 12:54:58 UTC
Hi Oliver,

thanks for the port submission.

The MAINTAINER at ports/171375 and ports/171376 is set to
ports@FreeBSD.org. It's an alias for nobody. We do not
commit new ports with a MAINTAINER set to ports@. Are
you doing to become the first maintainer?
Comment 3 dfilter service freebsd_committer freebsd_triage 2012-09-22 15:29:55 UTC
Author: bsam
Date: Sat Sep 22 14:29:45 2012
New Revision: 304678
URL: http://svn.freebsd.org/changeset/ports/304678

Log:
  Add freeocl 0.3.6, free Open Computing Language (OpenCL) implementation
  for CPU.
  
  PR:		ports/171376
  Submitted by:	Oliver Hartmann <ohartman@zedat.fu-berlin.de>

Added:
  head/devel/freeocl/
  head/devel/freeocl/Makefile   (contents, props changed)
  head/devel/freeocl/distinfo   (contents, props changed)
  head/devel/freeocl/files/
  head/devel/freeocl/files/patch-CMakeLists.txt   (contents, props changed)
  head/devel/freeocl/files/patch-src_icd_icd_loader.cpp   (contents, props changed)
  head/devel/freeocl/pkg-descr   (contents, props changed)
  head/devel/freeocl/pkg-plist   (contents, props changed)
Modified:
  head/devel/Makefile

Modified: head/devel/Makefile
==============================================================================
--- head/devel/Makefile	Sat Sep 22 14:27:51 2012	(r304677)
+++ head/devel/Makefile	Sat Sep 22 14:29:45 2012	(r304678)
@@ -447,6 +447,7 @@
     SUBDIR += fpc-zlib
     SUBDIR += fpp
     SUBDIR += frama-c
+    SUBDIR += freeocl
     SUBDIR += frink
     SUBDIR += fsmgenerator
     SUBDIR += ftjam

Added: head/devel/freeocl/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/freeocl/Makefile	Sat Sep 22 14:29:45 2012	(r304678)
@@ -0,0 +1,33 @@
+# Created by: Oliver Hartmann <ohartman@zedat.fu-berlin.de>
+# $FreeBSD$
+
+PORTNAME=	freeocl
+PORTVERSION=	0.3.6
+CATEGORIES=	devel
+MASTER_SITES=	${MASTER_SITE_GOOGLE_CODE}
+DISTNAME=	FreeOCL-${PORTVERSION}-src
+
+MAINTAINER=	ohartman@zedat.fu-berlin.de
+COMMENT=	Free Open Computing Language (OpenCL) implementation for CPU
+
+BUILD_DEPENDS=	${LOCALBASE}/lib/libatomic_ops.a:${PORTSDIR}/devel/libatomic_ops \
+		${LOCALBASE}/include/CL/opencl.h:${PORTSDIR}/devel/opencl
+
+LICENCE=	LGPL3
+
+WRKSRC=		${WRKDIR}/FreeOCL-${PORTVERSION}-Source
+
+USE_GCC=	4.6+
+USE_CMAKE=	yes
+USE_LDCONFIG=	yes
+CMAKE_BUILD_TYPE=Release
+
+post-patch:
+	${REINPLACE_CMD} -e 's:%%PREFIX%%:${PREFIX}:g' ${WRKSRC}/src/icd/icd_loader.cpp \
+		${WRKSRC}/CMakeLists.txt
+
+.include <bsd.port.pre.mk>
+.if ${OSVERSION} < 800000
+BROKEN=		this port does not compile at 7.x: "src/program.cpp:531:37: error: 'RTLD_NOLOAD' was not declared in this scope"
+.endif
+.include <bsd.port.post.mk>

Added: head/devel/freeocl/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/freeocl/distinfo	Sat Sep 22 14:29:45 2012	(r304678)
@@ -0,0 +1,2 @@
+SHA256 (FreeOCL-0.3.6-src.tar.gz) = d1eea6d6214781a67efee6b691f06407780fb51f8dd742a83324478a6cfb8f1a
+SIZE (FreeOCL-0.3.6-src.tar.gz) = 216517

Added: head/devel/freeocl/files/patch-CMakeLists.txt
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/freeocl/files/patch-CMakeLists.txt	Sat Sep 22 14:29:45 2012	(r304678)
@@ -0,0 +1,11 @@
+--- CMakeLists.txt.orig	2012-09-22 12:55:02.000000000 +0400
++++ CMakeLists.txt	2012-09-22 12:55:27.000000000 +0400
+@@ -83,7 +83,7 @@ endif(LIBRT)
+ add_subdirectory(samples)
+ add_subdirectory(src)
+ 
+-install(FILES icd/freeocl.icd DESTINATION /etc/OpenCL/vendors/)
++install(FILES icd/freeocl.icd DESTINATION %%PREFIX%%/etc/OpenCL/vendors/)
+ # OpenCL headers shouldn't be needed in the runtime package
+ # install(DIRECTORY include/CL/ DESTINATION include/CL/ FILES_MATCHING PATTERN "*.h")
+ install(DIRECTORY include/FreeOCL/ DESTINATION include/FreeOCL/ FILES_MATCHING PATTERN "*.h")

Added: head/devel/freeocl/files/patch-src_icd_icd_loader.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/freeocl/files/patch-src_icd_icd_loader.cpp	Sat Sep 22 14:29:45 2012	(r304678)
@@ -0,0 +1,13 @@
+--- src/icd/icd_loader.cpp.orig	2012-09-22 13:14:12.000000000 +0400
++++ src/icd/icd_loader.cpp	2012-09-22 13:15:03.000000000 +0400
+@@ -53,8 +53,8 @@ namespace FreeOCL
+ 
+ 	icd_loader::icd_loader()
+ 	{
+-		// Get the list of all *.icd files in /etc/OpenCL/vendors/
+-		const std::deque<std::string> &files = list_files("/etc/OpenCL/vendors/", ".icd");
++		// Get the list of all *.icd files in %%PREFIX%%/etc/OpenCL/vendors/
++		const std::deque<std::string> &files = list_files("%%PREFIX%%/etc/OpenCL/vendors/", ".icd");
+ 		// For each file
+ 		for(std::deque<std::string>::const_iterator i = files.begin() ; i != files.end() ; ++i)
+ 		{

Added: head/devel/freeocl/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/freeocl/pkg-descr	Sat Sep 22 14:29:45 2012	(r304678)
@@ -0,0 +1 @@
+FreeOCL - a free OpenCL implementation for CPU

Added: head/devel/freeocl/pkg-plist
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/freeocl/pkg-plist	Sat Sep 22 14:29:45 2012	(r304678)
@@ -0,0 +1,33 @@
+etc/OpenCL/vendors/freeocl.icd
+include/FreeOCL/asyncmemop.h
+include/FreeOCL/atomic.h
+include/FreeOCL/common.h
+include/FreeOCL/config.h
+include/FreeOCL/converters.h
+include/FreeOCL/geometric.h
+include/FreeOCL/image1d_array_t.h
+include/FreeOCL/image1d_buffer_t.h
+include/FreeOCL/image1d_t.h
+include/FreeOCL/image2d_array_t.h
+include/FreeOCL/image2d_t.h
+include/FreeOCL/image3d_t.h
+include/FreeOCL/imgreadwrite.h
+include/FreeOCL/integer.h
+include/FreeOCL/math.h
+include/FreeOCL/memfence.h
+include/FreeOCL/opencl_c.h
+include/FreeOCL/printf.h
+include/FreeOCL/relational.h
+include/FreeOCL/simdopts.h
+include/FreeOCL/sync.h
+include/FreeOCL/vectors.h
+include/FreeOCL/vloadstore.h
+include/FreeOCL/vmisc.h
+include/FreeOCL/workitem.h
+lib/libFreeOCL.so
+lib/libOpenCL.so
+lib/libOpenCL.so.1
+lib/libOpenCL.so.1.2
+@dirrm include/FreeOCL
+@dirrm etc/OpenCL/vendors
+@dirrm etc/OpenCL
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 4 Boris Samorodov freebsd_committer freebsd_triage 2012-09-22 15:33:16 UTC
State Changed
From-To: open->closed

Committed in an acceptable state, thanks for the port!