From owner-svn-ports-head@freebsd.org Fri Feb 10 00:23:07 2017 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A5607CD7654; Fri, 10 Feb 2017 00:23:07 +0000 (UTC) (envelope-from jmd@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 660E9128F; Fri, 10 Feb 2017 00:23:07 +0000 (UTC) (envelope-from jmd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1A0N6iX047586; Fri, 10 Feb 2017 00:23:06 GMT (envelope-from jmd@FreeBSD.org) Received: (from jmd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1A0N5Sj047579; Fri, 10 Feb 2017 00:23:05 GMT (envelope-from jmd@FreeBSD.org) Message-Id: <201702100023.v1A0N5Sj047579@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jmd set sender to jmd@FreeBSD.org using -f From: Johannes M Dieterich Date: Fri, 10 Feb 2017 00:23:05 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r433780 - in head/devel: . oclgrind oclgrind/files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Feb 2017 00:23:07 -0000 Author: jmd Date: Fri Feb 10 00:23:05 2017 New Revision: 433780 URL: https://svnweb.freebsd.org/changeset/ports/433780 Log: Add oclgrind port. Oclgrind is the OpenCL equivalent of valgrind and useful to debug OpenCL kernels and OpenCL enabled codes. Reviewed by: swills (mentor) Approved by: swills (mentor) Differential Revision: https://reviews.freebsd.org/D9467 Added: head/devel/oclgrind/ head/devel/oclgrind/Makefile (contents, props changed) head/devel/oclgrind/distinfo (contents, props changed) head/devel/oclgrind/files/ head/devel/oclgrind/files/patch-CMakeLists.txt (contents, props changed) head/devel/oclgrind/files/patch-src_runtime_oclgrind.cpp (contents, props changed) head/devel/oclgrind/pkg-descr (contents, props changed) head/devel/oclgrind/pkg-plist (contents, props changed) Modified: head/devel/Makefile Modified: head/devel/Makefile ============================================================================== --- head/devel/Makefile Fri Feb 10 00:13:51 2017 (r433779) +++ head/devel/Makefile Fri Feb 10 00:23:05 2017 (r433780) @@ -1702,6 +1702,7 @@ SUBDIR += ocaml-xstr SUBDIR += ocaml-xstrp4 SUBDIR += ocl-icd + SUBDIR += oclgrind SUBDIR += ode SUBDIR += ois SUBDIR += okteta Added: head/devel/oclgrind/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/oclgrind/Makefile Fri Feb 10 00:23:05 2017 (r433780) @@ -0,0 +1,32 @@ +# Created by: Johannes Dieterich +# $FreeBSD$ + +PORTNAME= oclgrind +PORTVERSION= 20170122 +DISTVERSIONPREFIX= v +CATEGORIES= devel + +MAINTAINER= jmd@freebsd.org +COMMENT= SPIR interpreter and virtual OpenCL device simulator + +LICENSE= BSD3CLAUSE +LICENSE_FILE= ${WRKSRC}/LICENSE + +BUILD_DEPENDS= opencl>=0:devel/opencl \ + llvm-config40:devel/llvm40 +LIB_DEPENDS= libOpenCL.so:devel/ocl-icd +RUN_DEPENDS= opencl>=0:devel/opencl + +BROKEN_FreeBSD_10= oclgrind is only supported on FreeBSD 11.0 and newer, crashes LLVM 3.4 + +USE_GITHUB= yes +GH_ACCOUNT= jrprice +GH_PROJECT= Oclgrind +GH_TAGNAME= b777367 + +USE_LDCONFIG= yes +USES= cmake + +CMAKE_ARGS+= -DLLVM_DIR=${LOCALBASE}/llvm40/share/llvm/cmake + +.include Added: head/devel/oclgrind/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/oclgrind/distinfo Fri Feb 10 00:23:05 2017 (r433780) @@ -0,0 +1,3 @@ +TIMESTAMP = 1486354287 +SHA256 (jrprice-Oclgrind-v20170122-b777367_GH0.tar.gz) = 0c72e1d82498bc3659990c8c3b5cd43fdf8a00f812c5a7dc8aa735f86c31a320 +SIZE (jrprice-Oclgrind-v20170122-b777367_GH0.tar.gz) = 192908 Added: head/devel/oclgrind/files/patch-CMakeLists.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/oclgrind/files/patch-CMakeLists.txt Fri Feb 10 00:23:05 2017 (r433780) @@ -0,0 +1,11 @@ +--- CMakeLists.txt.orig 2017-01-22 12:14:21 UTC ++++ CMakeLists.txt +@@ -151,7 +151,7 @@ endif() + # Check for library directory suffixes + set(_LIBDIR_SUFFIX "") + get_property(USING_LIB64 GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS) +-if (USING_LIB64 AND NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin") ++if (USING_LIB64 AND NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin" AND NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "FreeBSD") + set(_LIBDIR_SUFFIX "64") + endif() + set(LIBDIR_SUFFIX "${_LIBDIR_SUFFIX}" Added: head/devel/oclgrind/files/patch-src_runtime_oclgrind.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/oclgrind/files/patch-src_runtime_oclgrind.cpp Fri Feb 10 00:23:05 2017 (r433780) @@ -0,0 +1,13 @@ +--- src/runtime/oclgrind.cpp.orig 2017-01-22 12:14:21 UTC ++++ src/runtime/oclgrind.cpp +@@ -364,6 +364,10 @@ static string getLibDirPath() + #if defined(__APPLE__) + uint32_t sz = PATH_MAX; + if (_NSGetExecutablePath(exepath, &sz)) ++#elif defined(__FreeBSD__) ++ char temp[PATH_MAX]; ++ snprintf(temp, sizeof(temp), "/proc/%d/file", getpid()); ++ if (readlink(temp, exepath, PATH_MAX) == -1) + #else // not apple + if (readlink("/proc/self/exe", exepath, PATH_MAX) == -1) + #endif Added: head/devel/oclgrind/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/oclgrind/pkg-descr Fri Feb 10 00:23:05 2017 (r433780) @@ -0,0 +1,12 @@ +Oclgrind + +SPIR interpreter and virtual OpenCL device simulator + +Oclgrind implements a virtual OpenCL device simulator, including an OpenCL +runtime with ICD support. The goal is to provide a platform for creating tools +to aid OpenCL development. In particular, this project currently implements +utilities for debugging memory access errors, detecting data-races and barrier +divergence, collecting instruction histograms, and for interactive OpenCL +kernel debugging. The simulator is built on an interpreter for LLVM IR. + +WWW: https://github.com/jrprice/Oclgrind Added: head/devel/oclgrind/pkg-plist ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/oclgrind/pkg-plist Fri Feb 10 00:23:05 2017 (r433780) @@ -0,0 +1,19 @@ +bin/oclgrind +bin/oclgrind-kernel +include/oclgrind/Context.h +include/oclgrind/Kernel.h +include/oclgrind/KernelInvocation.h +include/oclgrind/Memory.h +include/oclgrind/Plugin.h +include/oclgrind/Program.h +include/oclgrind/Queue.h +include/oclgrind/WorkGroup.h +include/oclgrind/WorkItem.h +include/oclgrind/clc.h +include/oclgrind/clc32.pch +include/oclgrind/clc64.pch +include/oclgrind/common.h +include/oclgrind/half.h +lib/liboclgrind-rt-icd.so +lib/liboclgrind-rt.so +lib/liboclgrind.so