aboutsummaryrefslogtreecommitdiffstats
path: root/devel
diff options
context:
space:
mode:
authormarino <marino@FreeBSD.org>2013-09-01 22:25:11 +0800
committermarino <marino@FreeBSD.org>2013-09-01 22:25:11 +0800
commit0f954343eb68c6a5b160bb639ceff6ad742aa996 (patch)
tree478d03c9a199fbd001e4be02548880aba3fd0b1e /devel
parent9ad78071344c6b3ff02c70e5e026a1dacb787f16 (diff)
downloadfreebsd-ports-gnome-0f954343eb68c6a5b160bb639ceff6ad742aa996.tar.gz
freebsd-ports-gnome-0f954343eb68c6a5b160bb639ceff6ad742aa996.tar.zst
freebsd-ports-gnome-0f954343eb68c6a5b160bb639ceff6ad742aa996.zip
devel/opencl: Unbreak fetch
This port has been unfetchable for some time due to a checksum mismatch. PR: ports/180338 Submitted by: Oliver Hartmann (maintainer)
Diffstat (limited to 'devel')
-rw-r--r--devel/opencl/Makefile20
-rw-r--r--devel/opencl/distinfo8
-rw-r--r--devel/opencl/files/patch-cl.hpp52
-rw-r--r--devel/opencl/pkg-message4
4 files changed, 73 insertions, 11 deletions
diff --git a/devel/opencl/Makefile b/devel/opencl/Makefile
index 46ce036c833b..9c3493fa1f2b 100644
--- a/devel/opencl/Makefile
+++ b/devel/opencl/Makefile
@@ -3,7 +3,7 @@
PORTNAME= opencl
PORTVERSION= 1.2
-PORTREVISION= 2
+PORTREVISION= 5
CATEGORIES= devel
MASTER_SITES= http://www.khronos.org/registry/cl/api/${PORTVERSION}/
DISTFILES= opencl.h cl_platform.h cl.h cl_ext.h cl_dx9_media_sharing.h \
@@ -12,21 +12,27 @@ DIST_SUBDIR= ${PORTNAME}
EXTRACT_ONLY=
MAINTAINER= ohartman@zedat.fu-berlin.de
-COMMENT= Open Computing Language (OpenCL) specifications V1.2
+COMMENT= Open Computing Language (OpenCL) specifications V1.2 (header files)
CONFLICTS= opencl-1.[0-1]
NO_BUILD= yes
-NO_WRKSUBDIR= yes
-PLIST_DIRS= include/CL
+PLIST_DIRS+= include/CL
.for f in ${DISTFILES}
PLIST_FILES+=include/CL/$f
.endfor
+pre-patch:
+ @${MKDIR} ${WRKSRC}
+.for f in ${DISTFILES}
+ @${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/$f ${WRKSRC}/
+.endfor
+
do-install:
- ${MKDIR} ${PREFIX}/include/CL
- ${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/*.h ${PREFIX}/include/CL
- ${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/*.hpp ${PREFIX}/include/CL
+ @${MKDIR} ${PREFIX}/include/CL
+.for f in ${DISTFILES}
+ @${INSTALL_DATA} ${WRKSRC}/$f ${PREFIX}/include/CL
+.endfor
.include <bsd.port.mk>
diff --git a/devel/opencl/distinfo b/devel/opencl/distinfo
index 40c6461025e1..8b692321cd49 100644
--- a/devel/opencl/distinfo
+++ b/devel/opencl/distinfo
@@ -4,8 +4,8 @@ SHA256 (opencl/cl_platform.h) = e212b89bba54f7a4e090a2b2f58f779241ffb3b45b870eee
SIZE (opencl/cl_platform.h) = 41127
SHA256 (opencl/cl.h) = a5465c2ed1a0687878c8f7aa25f94626d7cd3a3868163ecaa6e8b36d6ed52368
SIZE (opencl/cl.h) = 61545
-SHA256 (opencl/cl_ext.h) = 3eafb74bc1b9456fd0e12393bfe65e48c9b3246d3c36b9f69ac253f73e0b50c7
-SIZE (opencl/cl_ext.h) = 11540
+SHA256 (opencl/cl_ext.h) = d23a11d1daebe39c6f5a9743f356bb58cdf0bf5a2019c723a6e2dc1e7dcb0360
+SIZE (opencl/cl_ext.h) = 13646
SHA256 (opencl/cl_dx9_media_sharing.h) = 26fb40bac8e229747bdc27b350b836e3703c1e946cb40893f4c8ab2289203920
SIZE (opencl/cl_dx9_media_sharing.h) = 5157
SHA256 (opencl/cl_d3d10.h) = c7adb38a19663ee240977afc64903f4638d9c5c03ca478793c9f7a15c1c6ac2b
@@ -16,5 +16,5 @@ SHA256 (opencl/cl_gl.h) = aa49d380177ac538b8ab00196381301fac6178e5b931398e3da430
SIZE (opencl/cl_gl.h) = 7343
SHA256 (opencl/cl_gl_ext.h) = 4d663bbfc932ab405623e5f5d1bba3f438351d0ead65e1ccdd9bb769caf7a7d0
SIZE (opencl/cl_gl_ext.h) = 2630
-SHA256 (opencl/cl.hpp) = 006671ee638a29a95c19bf37fbbf71ec8df445d2ea46df81f65faaff2d8a5133
-SIZE (opencl/cl.hpp) = 272297
+SHA256 (opencl/cl.hpp) = d7c8f5c17f88e098dc9f71d80e4b7408fab353e2828b0ba4d4bb55adaa427e83
+SIZE (opencl/cl.hpp) = 277155
diff --git a/devel/opencl/files/patch-cl.hpp b/devel/opencl/files/patch-cl.hpp
new file mode 100644
index 000000000000..d59d24491425
--- /dev/null
+++ b/devel/opencl/files/patch-cl.hpp
@@ -0,0 +1,52 @@
+--- cl.hpp.orig 2013-09-01 13:35:56.642641000 +0000
++++ cl.hpp
+@@ -210,11 +210,10 @@
+ #include <string>
+ #endif
+
+-#if defined(linux) || defined(__APPLE__) || defined(__MACOSX)
++#if defined(linux) || defined(__APPLE__) || defined(__MACOSX) \
++ || defined(__FreeBSD__) || defined(__DragonFly__)
+ #include <alloca.h>
+
+-#include <emmintrin.h>
+-#include <xmmintrin.h>
+ #endif // linux
+
+ #include <cstring>
+@@ -1037,7 +1036,7 @@ namespace detail {
+ #endif // !_WIN32
+ }
+
+- inline void fence() { _mm_mfence(); }
++ inline void fence() { __sync_synchronize(); }
+ }; // namespace detail
+
+
+@@ -2037,6 +2036,26 @@ public:
+ #endif // #if defined(CL_VERSION_1_1)
+ };
+
++template <typename Func>
++cl_int detail::GetInfoHelper<Func, VECTOR_CLASS<cl::Device> >::
++ get(Func f, cl_uint name, VECTOR_CLASS<cl::Device>* param)
++ {
++ ::size_t required;
++ cl_int err = f(name, 0, NULL, &required);
++ if (err != CL_SUCCESS) {
++ return err;
++ }
++
++ cl_device_id* value = (cl_device_id*) alloca(required);
++ err = f(name, required, value, NULL);
++ if (err != CL_SUCCESS) {
++ return err;
++ }
++
++ param->assign(&value[0], &value[required/sizeof(cl_device_id)]);
++ return CL_SUCCESS;
++ }
++
+ /*! \brief Class interface for cl_platform_id.
+ *
+ * \note Copies of these objects are inexpensive, since they don't 'own'
diff --git a/devel/opencl/pkg-message b/devel/opencl/pkg-message
new file mode 100644
index 000000000000..1261005300a2
--- /dev/null
+++ b/devel/opencl/pkg-message
@@ -0,0 +1,4 @@
+OpenCL is the first open, royalty-free standard for cross-platform,
+parallel programming of modern processors.
+
+Patchset provided by POCL developers for cl.hpp applied.