From owner-svn-ports-head@freebsd.org Thu Jan 19 11:37:46 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 86A2CCB8A13; Thu, 19 Jan 2017 11:37:46 +0000 (UTC) (envelope-from danfe@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 614311904; Thu, 19 Jan 2017 11:37:46 +0000 (UTC) (envelope-from danfe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0JBbjWp094904; Thu, 19 Jan 2017 11:37:45 GMT (envelope-from danfe@FreeBSD.org) Received: (from danfe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0JBbi1v094897; Thu, 19 Jan 2017 11:37:44 GMT (envelope-from danfe@FreeBSD.org) Message-Id: <201701191137.v0JBbi1v094897@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: danfe set sender to danfe@FreeBSD.org using -f From: Alexey Dokuchaev Date: Thu, 19 Jan 2017 11:37:44 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r431857 - in head/devel: . ispc ispc/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: Thu, 19 Jan 2017 11:37:46 -0000 Author: danfe Date: Thu Jan 19 11:37:44 2017 New Revision: 431857 URL: https://svnweb.freebsd.org/changeset/ports/431857 Log: Add a port of Intel's compiler for high-performance SIMD programming. Because GitHub releases (tarballs) are not fetched with correct modification time, set TIMESTAMP to 1467976432 which corresponds to commit 87d0c9a tagged as this release. PR: 214543 Submitted by: Yuri Victorovich Added: head/devel/ispc/ head/devel/ispc/Makefile (contents, props changed) head/devel/ispc/distinfo (contents, props changed) head/devel/ispc/files/ head/devel/ispc/files/patch-Makefile (contents, props changed) head/devel/ispc/files/patch-examples_common.mk (contents, props changed) head/devel/ispc/files/patch-examples_tasksys.cpp (contents, props changed) head/devel/ispc/pkg-descr (contents, props changed) Modified: head/devel/Makefile Modified: head/devel/Makefile ============================================================================== --- head/devel/Makefile Thu Jan 19 11:20:21 2017 (r431856) +++ head/devel/Makefile Thu Jan 19 11:37:44 2017 (r431857) @@ -1105,6 +1105,7 @@ SUBDIR += ipython SUBDIR += ireport SUBDIR += isl + SUBDIR += ispc SUBDIR += it-eric6 SUBDIR += itext SUBDIR += ivykis Added: head/devel/ispc/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/ispc/Makefile Thu Jan 19 11:37:44 2017 (r431857) @@ -0,0 +1,50 @@ +# Created by: Yuri Victorovich +# $FreeBSD$ + +PORTNAME= ispc +PORTVERSION= 1.9.1 +DISTVERSIONPREFIX= v +CATEGORIES= devel + +MAINTAINER= yuri@rawbw.com +COMMENT= Intel's compiler for high-performance SIMD programming + +LICENSE= BSD3CLAUSE +LICENSE_FILE= ${WRKSRC}/LICENSE.txt + +BUILD_DEPENDS= clang${CLANG_VERSION}:lang/clang${CLANG_VERSION} + +USE_GITHUB= yes + +USES= bison gmake python:build shebangfix +ALL_TARGET= default +MAKE_ENV= LLVM_HOME="${LOCALBASE}" +CLANG_VERSION= 38 +SHEBANG_FILES= *.py + +MAKE_ARGS= LLVM_CONFIG=${LOCALBASE}/bin/llvm-config${CLANG_VERSION} \ + CLANG=clang${CLANG_VERSION} CXX=clang++${CLANG_VERSION} + +PLIST_FILES= bin/ispc + +post-patch: + @${REINPLACE_CMD} -e 's|python|${PYTHON_CMD}| ; s|@$$(C|$$(C|' \ + ${WRKSRC}/Makefile + @${REINPLACE_CMD} -e '/alloca\.h/d' ${WRKSRC}/util.cpp + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/ispc ${STAGEDIR}${PREFIX}/bin + +do-test: + @cd ${WRKSRC} && ISPC_HOME=${WRKSRC} ./run_tests.py + +run-examples: + @[ -f ${LOCALBASE}/lib/libtbb.so ] || ! echo "ERROR run-examples target requires devel/tbb package installed" +.for e in simple sort mandelbrot stencil + @cd ${WRKSRC}/examples/${e} && \ + ${ECHO} "===> Running example ${e}" && \ + ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} && \ + ./${e} +.endfor + +.include Added: head/devel/ispc/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/ispc/distinfo Thu Jan 19 11:37:44 2017 (r431857) @@ -0,0 +1,3 @@ +TIMESTAMP = 1467976432 +SHA256 (ispc-ispc-v1.9.1_GH0.tar.gz) = c52910a007f1b0c732dd1cb981e7c22f3b9b575f0b097a49f4e43fc7a3e7e976 +SIZE (ispc-ispc-v1.9.1_GH0.tar.gz) = 19276043 Added: head/devel/ispc/files/patch-Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/ispc/files/patch-Makefile Thu Jan 19 11:37:44 2017 (r431857) @@ -0,0 +1,22 @@ +--- Makefile.orig 2016-07-08 11:13:52 UTC ++++ Makefile +@@ -241,16 +241,16 @@ dirs: + @/bin/mkdir -p objs + + llvm_check: +- @llvm-config --version > /dev/null || \ ++ @$(LLVM_CONFIG) --version > /dev/null || \ + (echo; \ + echo "******************************************"; \ +- echo "ERROR: llvm-config not found in your PATH"; \ ++ echo "ERROR: $(LLVM_CONFIG) not found in your PATH"; \ + echo "******************************************"; \ + echo; exit 1) + @echo -e '$(subst $(newline), ,$(RIGHT_LLVM))' + + print_llvm_src: llvm_check +- @echo Using LLVM `llvm-config --version` from `llvm-config --libdir` ++ @echo Using LLVM `$(LLVM_CONFIG) --version` from `$(LLVM_CONFIG) --libdir` + @echo Using compiler to build: `$(CXX) --version | head -1` + + clean: Added: head/devel/ispc/files/patch-examples_common.mk ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/ispc/files/patch-examples_common.mk Thu Jan 19 11:37:44 2017 (r431857) @@ -0,0 +1,39 @@ +--- examples/common.mk.orig 2016-07-08 11:13:52 UTC ++++ examples/common.mk +@@ -4,18 +4,18 @@ TASK_LIB=-lpthread + TASK_OBJ=objs/tasksys.o + + CXX=clang++ +-CXXFLAGS+=-Iobjs/ -O2 ++CXXFLAGS+=-Iobjs/ -O2 -std=c++11 -I$(LOCALBASE)/include + CC=clang + CCFLAGS+=-Iobjs/ -O2 + +-LIBS=-lm $(TASK_LIB) -lstdc++ ++LIBS=-lm $(TASK_LIB) -lstdc++ -L$(LOCALBASE)/lib -ltbb + ISPC=ispc + ISPC_FLAGS+=-O2 + ISPC_HEADER=objs/$(ISPC_SRC:.ispc=_ispc.h) + +-ARCH:=$(shell uname -m | sed -e s/x86_64/x86/ -e s/i686/x86/ -e s/arm.*/arm/ -e s/sa110/arm/) ++_ARCH:=$(shell uname -m | sed -e s/amd64/x86/ -e s/i.86/x86/ -e s/arm.*/arm/ -e s/sa110/arm/) + +-ifeq ($(ARCH),x86) ++ifeq ($(_ARCH),x86) + ISPC_OBJS=$(addprefix objs/, $(ISPC_SRC:.ispc=)_ispc.o) + COMMA=, + ifneq (,$(findstring $(COMMA),$(ISPC_IA_TARGETS))) +@@ -53,11 +53,11 @@ ifeq ($(ARCH),x86) + CXXFLAGS += -m64 + CCFLAGS += -m64 + endif +-else ifeq ($(ARCH),arm) ++else ifeq ($(_ARCH),arm) + ISPC_OBJS=$(addprefix objs/, $(ISPC_SRC:.ispc=_ispc.o)) + ISPC_TARGETS=$(ISPC_ARM_TARGETS) + else +- $(error Unknown architecture $(ARCH) from uname -m) ++ $(error Unknown architecture $(_ARCH) from uname -m) + endif + + CPP_OBJS=$(addprefix objs/, $(CPP_SRC:.cpp=.o)) Added: head/devel/ispc/files/patch-examples_tasksys.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/ispc/files/patch-examples_tasksys.cpp Thu Jan 19 11:37:44 2017 (r431857) @@ -0,0 +1,11 @@ +--- examples/tasksys.cpp.orig 2016-07-08 11:13:52 UTC ++++ examples/tasksys.cpp +@@ -90,6 +90,8 @@ + #define ISPC_USE_CONCRT + #elif defined(__linux__) + #define ISPC_USE_PTHREADS ++ #elif defined(__FreeBSD__) ++ #define ISPC_USE_TBB_TASK_GROUP // ISPC_USE_PTHREADS fails for some reason, need to investigate + #elif defined(__APPLE__) + #define ISPC_USE_GCD + #endif Added: head/devel/ispc/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/ispc/pkg-descr Thu Jan 19 11:37:44 2017 (r431857) @@ -0,0 +1,7 @@ +ispc is a compiler for a variant of the C programming language, with +extensions for single program, multiple data programming. Under the SPMD +model, the programmer writes a program that generally appears to be a +regular serial program, though the execution model is actually that a +number of program instances execute in parallel on the hardware. + +WWW: https://ispc.github.io/