aboutsummaryrefslogtreecommitdiffstats
path: root/devel
diff options
context:
space:
mode:
authorbsam <bsam@FreeBSD.org>2012-09-22 22:29:45 +0800
committerbsam <bsam@FreeBSD.org>2012-09-22 22:29:45 +0800
commitc4b86a2b0cd7908dab69643810e5c31e6058e8c7 (patch)
tree2a9f1cfe07fa1d13f13463baea34da6d811e7533 /devel
parent7319ad3518612e93ce41c4bcc9ab8d35aa5e1209 (diff)
downloadfreebsd-ports-gnome-c4b86a2b0cd7908dab69643810e5c31e6058e8c7.tar.gz
freebsd-ports-gnome-c4b86a2b0cd7908dab69643810e5c31e6058e8c7.tar.zst
freebsd-ports-gnome-c4b86a2b0cd7908dab69643810e5c31e6058e8c7.zip
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>
Diffstat (limited to 'devel')
-rw-r--r--devel/Makefile1
-rw-r--r--devel/freeocl/Makefile33
-rw-r--r--devel/freeocl/distinfo2
-rw-r--r--devel/freeocl/files/patch-CMakeLists.txt11
-rw-r--r--devel/freeocl/files/patch-src_icd_icd_loader.cpp13
-rw-r--r--devel/freeocl/pkg-descr1
-rw-r--r--devel/freeocl/pkg-plist33
7 files changed, 94 insertions, 0 deletions
diff --git a/devel/Makefile b/devel/Makefile
index 20f29af41ad0..aac47baa8389 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -447,6 +447,7 @@
SUBDIR += fpc-zlib
SUBDIR += fpp
SUBDIR += frama-c
+ SUBDIR += freeocl
SUBDIR += frink
SUBDIR += fsmgenerator
SUBDIR += ftjam
diff --git a/devel/freeocl/Makefile b/devel/freeocl/Makefile
new file mode 100644
index 000000000000..1d67127be504
--- /dev/null
+++ b/devel/freeocl/Makefile
@@ -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>
diff --git a/devel/freeocl/distinfo b/devel/freeocl/distinfo
new file mode 100644
index 000000000000..bb4794022fd8
--- /dev/null
+++ b/devel/freeocl/distinfo
@@ -0,0 +1,2 @@
+SHA256 (FreeOCL-0.3.6-src.tar.gz) = d1eea6d6214781a67efee6b691f06407780fb51f8dd742a83324478a6cfb8f1a
+SIZE (FreeOCL-0.3.6-src.tar.gz) = 216517
diff --git a/devel/freeocl/files/patch-CMakeLists.txt b/devel/freeocl/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..25e5a4c65237
--- /dev/null
+++ b/devel/freeocl/files/patch-CMakeLists.txt
@@ -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")
diff --git a/devel/freeocl/files/patch-src_icd_icd_loader.cpp b/devel/freeocl/files/patch-src_icd_icd_loader.cpp
new file mode 100644
index 000000000000..095c08d4fbfd
--- /dev/null
+++ b/devel/freeocl/files/patch-src_icd_icd_loader.cpp
@@ -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)
+ {
diff --git a/devel/freeocl/pkg-descr b/devel/freeocl/pkg-descr
new file mode 100644
index 000000000000..d5d8b41cbcd2
--- /dev/null
+++ b/devel/freeocl/pkg-descr
@@ -0,0 +1 @@
+FreeOCL - a free OpenCL implementation for CPU
diff --git a/devel/freeocl/pkg-plist b/devel/freeocl/pkg-plist
new file mode 100644
index 000000000000..9faffc562667
--- /dev/null
+++ b/devel/freeocl/pkg-plist
@@ -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