Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Sep 2012 13:26:51 GMT
From:      Oliver Hartmann <ohartman@zedat.fu-berlin.de>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/171921: New port: devel/ocltools: 
Message-ID:  <201209241326.q8ODQpQB013534@red.freebsd.org>
Resent-Message-ID: <201209241330.q8ODUBMV021047@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         171921
>Category:       ports
>Synopsis:       New port: devel/ocltools:
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Sep 24 13:30:11 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Oliver Hartmann
>Release:        FreeBSD 10.0-CURRENT/amd64 CLANG & FreeBSD 9.1-PRE/amd64 CLANG
>Organization:
FU Berlin
>Environment:
>Description:
The port provides the OpenCL toolset provided by the developer group located at 
http://www.clusterchimps.org.

The port relies on either port ((devel/pocl) || ((devel/freeocl) && (devel/opencl))).

>From the website's URL I took this for further explnanations:

OCLTools is a powerful, yet compact, suite of tools that provides developers with more alternatives to kernel compilation. OCLTools enables you to eliminate costly kernel compilation time from the runtime of your application. With OCLTools developers can embed the source code of their kernels (clear text or encrypted) directly into their program binaries eliminating the need to distribute kernel source code in the open while still maintaining the flexibility of runtime compilation. Not only can you embed source code into your OpenCL binaries but you can embed precompiled kernels as well effectively eliminating the additional kernel compilation overhead from the run time of your application. 

Link:

http://www.clusterchimps.org
>How-To-Repeat:
Attention: The toolset has not been tested properly on OpenCL code due to the lack of suitable testing environments, OpenCL libraries (they has been just committed/suggested to the ports collection as devel/freeocl and devel/pocl respectively).
>Fix:


Patch attached with submission follows:

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	ocltools
#	ocltools/Makefile
#	ocltools/distinfo
#	ocltools/pkg-descr
#	ocltools/files
#	ocltools/files/patch-configure.ac
#	ocltools/files/patch-src-oclcc-oclcc.cpp
#	ocltools/pkg-message
#	ocltools/pkg-plist
#
echo c - ocltools
mkdir -p ocltools > /dev/null 2>&1
echo x - ocltools/Makefile
sed 's/^X//' >ocltools/Makefile << '49f0b906df4994f4bd4b63258986a1e0'
XPORTNAME=		ocltools
XPORTVERSION=		1.0
XCATEGORIES=		devel
X
XMAINTAINER=		ohartman@zedat.fu-berlin.de
XCOMMENT=		OCLTools is a powerful suite of tools that provides alternatives to kernel compilation.
X
XMASTER_SITES=		http://www.clusterchimps.org/download-ocltools.php/
X
X.include<bsd.port.pre.mk>
X
XNOFETCHFILES=		${DISTFILES}
X
X.if !exists(${DISTDIR}/${DISTNAME}${EXTRACT_SUFX})
XIGNORE= Due to download restrictions you need to download the source\
X	tarball ${PORTNAME}-${PORTVERSION}.${SUFFIX} manually\
X	and place it in ${DISTDIR} as ${DISTFILES}
X.endif
X
XLIB_DEPENDS=		boost_program_options.4:$PORTSDIR}/devel/boost-libs
X
XCPPFLAGS+=		-I/usr/local/include
XLDFLAGS+=		-L/usr/local/lib
X
X# Selecting the OpenCL library
XOPTIONS_SINGLE=		OCLLIB
XOPTIONS_SINGLE_OCLLIB=	LIB_POCL LIB_FREEOCL
XOPTIONS_DEFAULT=        LIB_POCL
X
XLIB_FREEOCL_DESC=	Use devel/freeocl as OpenCL
XLIB_POCL_DESC=		Use devel/pocl as OpenCL
X
X.include <bsd.port.options.mk>
X
X.if ${PORT_OPTIONS:MLIB_POCL}
XLIB_DEPENDS=		pocl.0:${PORTSDIR}/devel/pocl
X.endif
X
X.if ${PORT_OPTIONS:MLIB_FREEOCL}
XLIB_DEPENDS=		OpenCL:${PORTSDIR}/devel/freeocl
X.endif
X
XUSE_LDCONFIG=		yes
XUSE_GMAKE=		yes
XGNU_CONFIGURE=		yes
X
X.include <bsd.port.post.mk>
49f0b906df4994f4bd4b63258986a1e0
echo x - ocltools/distinfo
sed 's/^X//' >ocltools/distinfo << 'bc356d45649379a3336532a455926b69'
XSHA256 (ocltools-1.0.tar.gz) = cf2284130497bde9a912eb446de1e782870deb674d2624b393f954e972537983
XSIZE (ocltools-1.0.tar.gz) = 895803
bc356d45649379a3336532a455926b69
echo x - ocltools/pkg-descr
sed 's/^X//' >ocltools/pkg-descr << '98993f2a93f313be2fbcb6967f646f66'
XOCLtools are a powerful toolset mainatining OpenCL kernel.
X
XOCLTools comes with an offline OpenCL compiler (oclcc), 
XELF file generator (oclelf), encryption tool (oclcrypt), 
Xand utility library to help streamline the OpenCL kernel 
Xcompilation process. "The ClusterChimps Guide to Offline 
XOpenCL Compiling and Linking" not only serves as a 
Xreference for the tools but it also walks you step by 
Xstep through each usecase with example code showing you 
Xhow it's done. 
X
Xhttp://www.clusterchimps.org
98993f2a93f313be2fbcb6967f646f66
echo c - ocltools/files
mkdir -p ocltools/files > /dev/null 2>&1
echo x - ocltools/files/patch-configure.ac
sed 's/^X//' >ocltools/files/patch-configure.ac << 'ea2980b17e074e2d9c3c65beb83998ff'
X--- configure.ac.orig	2012-09-22 18:35:54.000000000 +0200
X+++ configure.ac	2012-09-22 18:36:21.000000000 +0200
X@@ -45,11 +45,11 @@
X         [set_debug=gnu-default])
X if test "${set_debug}" = "yes"; then
X         GXX_DEBUG_FLAG="-g2 -O0"
X-        BOOST_LIBS="-lboost_program_options-gcc41-mt-d"
X+        BOOST_LIBS="-lboost_program_options"
X         OPENCL_LIBS="-lOpenCL"
X elif test "${set_debug}" = "gnu-default"; then
X         GXX_DEBUG_FLAG="-g -O2"
X-        BOOST_LIBS="-lboost_program_options-gcc41-mt-d"
X+        BOOST_LIBS="-lboost_program_options"
X         OPENCL_LIBS="-lOpenCL"
X else
X         GXX_DEBUG_FLAG="-g0 -O2"
ea2980b17e074e2d9c3c65beb83998ff
echo x - ocltools/files/patch-src-oclcc-oclcc.cpp
sed 's/^X//' >ocltools/files/patch-src-oclcc-oclcc.cpp << '0cfcebbc9ab62265738738acb99df20a'
X--- ./src/oclcc/oclcc.cpp.orig	2012-09-22 18:14:35.000000000 +0200
X+++ ./src/oclcc/oclcc.cpp	2012-09-22 18:24:01.000000000 +0200
X@@ -24,6 +24,9 @@
X #include <CL/cl.h>
X #include <oclutil.h>
X #include <CL/cl_ext.h>
X+#ifdef	__FreeBSD__
X+typedef	unsigned long ulong;
X+#endif
X 
X #include <boost/program_options/options_description.hpp>
X #include <boost/program_options/variables_map.hpp>
0cfcebbc9ab62265738738acb99df20a
echo x - ocltools/pkg-message
sed 's/^X//' >ocltools/pkg-message << '4cadb3f4edf9b6c3df0e2fa75549198d'
XOCLTools provides developers with more alternatives to kernel compilation. 
XIt enables you to eliminate costly kernel compilation time from the runtime 
Xof your application. 
XDevelopers can embed the source code of their kernels (clear text or encrypted) 
Xdirectly into their program binaries eliminating the need to distribute kernel 
Xsource code in the open while still maintaining the flexibility of runtime 
Xcompilation. Not only can you embed source code into your OpenCL binaries 
Xbut you can embed precompiled kernels as well effectively eliminating the 
Xadditional kernel compilation overhead from the run time of your application. 
X
XOCLTools comes with an offline OpenCL compiler (oclcc), ELF file generator 
X(oclelf), encryption tool (oclcrypt), and utility library to help streamline 
Xthe OpenCL kernel compilation process. "The ClusterChimps Guide to Offline 
XOpenCL Compiling and Linking" not only serves as a reference for the tools 
Xbut it also walks you step by step through each usecase with example code 
Xshowing you how it's done. 
4cadb3f4edf9b6c3df0e2fa75549198d
echo x - ocltools/pkg-plist
sed 's/^X//' >ocltools/pkg-plist << '3a7cf29fc41f1e55d998a058990ae9c9'
Xbin/oclcc
Xbin/oclcrypt
Xbin/oclelf
Xinclude/oclutil.h
Xlib/libocltools.a
Xlib/libocltools.la
Xlib/libocltools.so
Xlib/libocltools.so.0
Xlib/libocltoolscrypt.a
Xlib/libocltoolscrypt.la
Xlib/libocltoolscrypt.so
Xlib/libocltoolscrypt.so.0
Xshare/ocltools/oclelf.ld
X@dirrm share/ocltools
3a7cf29fc41f1e55d998a058990ae9c9
exit



>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201209241326.q8ODQpQB013534>