svn commit: r513787 - in head/devel: flang flang-clang

Mark Linimon linimon at FreeBSD.org
Fri Oct 4 22:13:05 UTC 2019


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
 


More information about the svn-ports-all mailing list