Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 4 Oct 2019 22:13:05 +0000 (UTC)
From:      Mark Linimon <linimon@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r513787 - in head/devel: flang flang-clang
Message-ID:  <201910042213.x94MD5qH081612@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: linimon
Date: Fri Oct  4 22:13:04 2019
New Revision: 513787
URL: https://svnweb.freebsd.org/changeset/ports/513787

Log:
  Factor out hardcoding of the string "clang<version".  When doing the
  work to identify stale versions of clang tree-wide, these instances
  cause extra work.
  
  Refactor this usage into LLVM_VER.
  
  Note: this refactoring causes portlint to complain but IMHO this
  annoyance is worth tolerating to help ease maintainability.
  
  PR:		239737, 239738
  Approved by:	maintainer

Modified:
  head/devel/flang-clang/Makefile
  head/devel/flang/Makefile

Modified: head/devel/flang-clang/Makefile
==============================================================================
--- head/devel/flang-clang/Makefile	Fri Oct  4 22:12:43 2019	(r513786)
+++ head/devel/flang-clang/Makefile	Fri Oct  4 22:13:04 2019	(r513787)
@@ -16,8 +16,9 @@ LICENSE_PERMS=	dist-mirror dist-sell pkg-mirror pkg-se
 
 ONLY_FOR_ARCHS=	amd64
 
-BUILD_DEPENDS=	llvm60>=0:devel/llvm60
-RUN_DEPENDS=	llvm60>=0:devel/llvm60
+LLVM_VER=	60
+BUILD_DEPENDS=	llvm${LLVM_VER}>=0:devel/llvm${LLVM_VER}
+RUN_DEPENDS=	llvm${LLVM_VER}>=0:devel/llvm${LLVM_VER}
 
 USES=		cmake compiler:c++11-lib libedit tar:xz perl5 \
 		python shebangfix
@@ -33,7 +34,7 @@ GH_ACCOUNT=	flang-compiler
 GH_PROJECT=	flang-driver
 GH_TAGNAME=	742de5f
 
-CMAKE_ARGS+=	-DLLVM_CONFIG=${LOCALBASE}/bin/llvm-config60
+CMAKE_ARGS+=	-DLLVM_CONFIG=${LOCALBASE}/bin/llvm-config${LLVM_VER}
 
 CMAKE_INSTALL_PREFIX=	${PREFIX}/flang
 

Modified: head/devel/flang/Makefile
==============================================================================
--- head/devel/flang/Makefile	Fri Oct  4 22:12:43 2019	(r513786)
+++ head/devel/flang/Makefile	Fri Oct  4 22:13:04 2019	(r513787)
@@ -14,9 +14,10 @@ LICENSE_FILE=	${WRKSRC}/LICENSE.txt
 
 ONLY_FOR_ARCHS=	amd64
 
-BUILD_DEPENDS=	llvm60>=0:devel/llvm60 \
+LLVM_VER=	60
+BUILD_DEPENDS=	llvm${LLVM_VER}>=0:devel/llvm${LLVM_VER} \
 		flang-clang>=0:devel/flang-clang
-RUN_DEPENDS=	llvm60>=0:devel/llvm60 \
+RUN_DEPENDS=	llvm${LLVM_VER}>=0:devel/llvm${LLVM_VER} \
 		flang-clang>=0:devel/flang-clang
 LIB_DEPENDS=	libpgmath.so:math/libpgmath
 
@@ -30,11 +31,11 @@ USE_GITHUB=	yes
 GH_ACCOUNT=	flang-compiler
 GH_TAGNAME=	53e368b
 
-CMAKE_ARGS+=	-DLLVM_CONFIG=${LOCALBASE}/bin/llvm-config60 \
+CMAKE_ARGS+=	-DLLVM_CONFIG=${LOCALBASE}/bin/llvm-config${LLVM_VER} \
 		-DCMAKE_CXX_COMPILER=${LOCALBASE}flang/bin/clang++ \
 		-DCMAKE_C_COMPILER=${LOCALBASE}/flang/bin/clang \
 		-DCMAKE_Fortran_COMPILER=${LOCALBASE}/flang/bin/flang \
-		-DFLANG_LIBOMP=${LOCALBASE}/llvm60/lib/libomp.so \
+		-DFLANG_LIBOMP=${LOCALBASE}/llvm${LLVM_VER}/lib/libomp.so \
 		-DLIBPGMATH="${LOCALBASE}/lib/libpgmath.a" \
 		-WWITH_ERROR=OFF
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201910042213.x94MD5qH081612>