git: d8b7018aa8d2 - main - devel/fccf: exorcise -march=native and fix LLVM use
Date: Thu, 06 Apr 2023 21:44:00 UTC
The branch main has been updated by fuz: URL: https://cgit.FreeBSD.org/ports/commit/?id=d8b7018aa8d21de29c5e83913397618d4217b2e6 commit d8b7018aa8d21de29c5e83913397618d4217b2e6 Author: Robert Clausecker <fuz@FreeBSD.org> AuthorDate: 2023-02-27 23:40:28 +0000 Commit: Robert Clausecker <fuz@FreeBSD.org> CommitDate: 2023-04-06 20:33:19 +0000 devel/fccf: exorcise -march=native and fix LLVM use - remove -march=native as per policy. - convert PORTVERSION to DISTVERSION - depend on LLVM using USES=llvm - ensure that the correct LLVM is linked against --- devel/fccf/Makefile | 13 ++++++------- devel/fccf/files/patch-CMakeLists.txt | 15 +++++++++++++-- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/devel/fccf/Makefile b/devel/fccf/Makefile index 224b3b6f2e64..6d391124306d 100644 --- a/devel/fccf/Makefile +++ b/devel/fccf/Makefile @@ -1,7 +1,7 @@ PORTNAME= fccf -PORTVERSION= 0.6.0 -PORTREVISION= 1 DISTVERSIONPREFIX= v +DISTVERSION= 0.6.0 +PORTREVISION= 2 CATEGORIES= devel MAINTAINER= ports@FreeBSD.org @@ -10,19 +10,18 @@ WWW= https://github.com/p-ranav/fccf LICENSE= MIT -BUILD_DEPENDS= argparse>0:devel/argparse \ - llvm${LLVM_DEFAULT}>0:devel/llvm${LLVM_DEFAULT} +BUILD_DEPENDS= argparse>0:devel/argparse LIB_DEPENDS= libfmt.so:devel/libfmt -RUN_DEPENDS= llvm${LLVM_DEFAULT}>0:devel/llvm${LLVM_DEFAULT} -USES= cmake +USES= cmake llvm:build,lib,run USE_GITHUB= yes GH_ACCOUNT= p-ranav +CMAKE_ARGS= -DLLVM_DIR:STRING=${PREFIX}/llvm${LLVM_VERSION}/lib/cmake/llvm CXXFLAGS+= -I${LOCALBASE}/include/argparse post-patch: - ${REINPLACE_CMD} "s/llvm-config/llvm-config${LLVM_DEFAULT}/g" ${WRKSRC}/CMakeLists.txt + ${REINPLACE_CMD} "s/llvm-config/${LLVM_CONFIG}/g" ${WRKSRC}/CMakeLists.txt .include <bsd.port.mk> diff --git a/devel/fccf/files/patch-CMakeLists.txt b/devel/fccf/files/patch-CMakeLists.txt index 60a94ebfdcbe..dc107e0cff99 100644 --- a/devel/fccf/files/patch-CMakeLists.txt +++ b/devel/fccf/files/patch-CMakeLists.txt @@ -1,8 +1,10 @@ --- CMakeLists.txt.orig 2022-05-02 12:24:57 UTC +++ CMakeLists.txt -@@ -22,29 +22,32 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native" +@@ -20,31 +20,33 @@ endif() + + set(CMAKE_CXX_FLAGS_DEBUG "-g") set(CMAKE_CXX_FLAGS_RELEASE "-O3") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native") +-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native") -# ---- Argparse ------------- @@ -52,3 +54,12 @@ # ---- LLVM --------------- find_package(LLVM REQUIRED CONFIG) +@@ -90,7 +92,7 @@ find_package(Threads REQUIRED) + ## Append flags to enable exceptions and optimization + set(CMAKE_CXX_FLAGS_DEBUG "-g") + set(CMAKE_CXX_FLAGS_RELEASE "-O3") +-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native -std=c++17 -fexceptions") ++set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -fexceptions") + + # ---- Declare library ---- +