From owner-svn-ports-all@freebsd.org Thu Nov 28 14:20:18 2019 Return-Path: Delivered-To: svn-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E32C01AAF66; Thu, 28 Nov 2019 14:20:18 +0000 (UTC) (envelope-from pkubaj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47P0Ck5pC9z4clY; Thu, 28 Nov 2019 14:20:18 +0000 (UTC) (envelope-from pkubaj@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A5BEA26EBC; Thu, 28 Nov 2019 14:20:18 +0000 (UTC) (envelope-from pkubaj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xASEKIdt044037; Thu, 28 Nov 2019 14:20:18 GMT (envelope-from pkubaj@FreeBSD.org) Received: (from pkubaj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xASEKIuJ044036; Thu, 28 Nov 2019 14:20:18 GMT (envelope-from pkubaj@FreeBSD.org) Message-Id: <201911281420.xASEKIuJ044036@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pkubaj set sender to pkubaj@FreeBSD.org using -f From: Piotr Kubaj Date: Thu, 28 Nov 2019 14:20:18 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r518579 - head/science/lammps X-SVN-Group: ports-head X-SVN-Commit-Author: pkubaj X-SVN-Commit-Paths: head/science/lammps X-SVN-Commit-Revision: 518579 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Nov 2019 14:20:19 -0000 Author: pkubaj Date: Thu Nov 28 14:20:18 2019 New Revision: 518579 URL: https://svnweb.freebsd.org/changeset/ports/518579 Log: science/lammps: fix build on GCC architectures Don't enable OpenMP everywhere, it causes an error with GCC, reported on https://github.com/lammps/lammps/pull/1483 This requires some hackery with ports not supporting options for specific compilers. OPENMP flag has removed option helpers due to them not being respected otherwise. PR: 241156 Approved by: yuri (maintainer, earlier versior), tcberner (mentor, earlier version) Differential Revision: https://reviews.freebsd.org/D21994 Modified: head/science/lammps/Makefile Modified: head/science/lammps/Makefile ============================================================================== --- head/science/lammps/Makefile Thu Nov 28 13:07:06 2019 (r518578) +++ head/science/lammps/Makefile Thu Nov 28 14:20:18 2019 (r518579) @@ -2,6 +2,7 @@ PORTNAME= lammps PORTVERSION= ${GH_TAGNAME:C/(stable|patch)_([0-9]{1,2})([A-Z][a-z][a-z])([0-9]{4})/\4.\3.\2/S/Jan/01/S/Feb/02/S/Mar/03/S/Apr/04/S/May/05/S/Jun/06/S/Jul/07/S/Aug/08/S/Sep/09/S/Oct/10/S/Nov/11/S/Dec/12/} +PORTREVISION= 1 CATEGORIES= science MAINTAINER= yuri@FreeBSD.org @@ -20,21 +21,21 @@ SHEBANG_GLOB= *.sh *.bash SHEBANG_FILES= lib/kokkos/bin/nvcc_wrapper CMAKE_SOURCE_PATH= ${WRKSRC}/cmake -CMAKE_ARGS= -DBLA_VENDOR:STRING="OpenBLAS" +CMAKE_ARGS= -DBLA_VENDOR:STRING="OpenBLAS" ${CMAKE_ARGS_${CHOSEN_COMPILER_TYPE}} +CMAKE_ARGS_gcc= -DBUILD_OMP:BOOL=false OPTIONS_DEFINE= JPEG PNG GZIP FFMPEG VORONOI LATTE +OPTIONS_DEFINE_clang= OPENMP OPTIONS_GROUP= PARALLEL -OPTIONS_GROUP_PARALLEL= MPI OPENMP -OPTIONS_DEFAULT= MPI OPENMP JPEG PNG GZIP FFMPEG VORONOI LATTE +OPTIONS_GROUP_PARALLEL= MPI ${OPTIONS_DEFINE_${CHOSEN_COMPILER_TYPE}} +OPTIONS_DEFAULT= MPI JPEG PNG GZIP FFMPEG VORONOI LATTE ${OPTIONS_DEFAULT_${CHOSEN_COMPILER_TYPE}} +OPTIONS_DEFAULT_clang= OPENMP PARALLEL_DESC= Enable parallelizations: MPI_CMAKE_BOOL= BUILD_MPI MPI_LIB_DEPENDS= libmpi.so:net/openmpi +MPI_USES= compiler:c11 -OPENMP_USES= localbase -OPENMP_CMAKE_BOOL= BUILD_OMP -OPENMP_LIB_DEPENDS= libomp.so:devel/openmp - FFMPEG_BUILD_DEPENDS= ffmpeg:multimedia/ffmpeg FFMPEG_RUN_DEPENDS= ffmpeg:multimedia/ffmpeg @@ -57,6 +58,14 @@ LATTE_CMAKE_BOOL= PKG_LATTE LATTE_LIB_DEPENDS= liblatte.so:science/latte PORTSCOUT= ignore # due to a special version tagging scheme that this project uses portscout fails to find new versions, watching their GitHub release page instead + +.include + +.if ${PORT_OPTIONS:MOPENMP} +USES+= localbase +CMAKE_ARGS+= -DBUILD_OMP:BOOL=true +LIB_DEPENDS+= libomp.so:devel/openmp +.endif post-patch: @${REINPLACE_CMD} 's|SHELL = /bin/bash|SHELL = ${LOCALBASE}/bin/bash|' ${WRKSRC}/src/Makefile