git: 76b39d470f39 - main - devel/fccf: new port
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 29 Apr 2022 07:16:33 UTC
The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/ports/commit/?id=76b39d470f398e6a4ff7be7b41be289546c31470 commit 76b39d470f398e6a4ff7be7b41be289546c31470 Author: Baptiste Daroussin <bapt@FreeBSD.org> AuthorDate: 2022-04-29 07:15:26 +0000 Commit: Baptiste Daroussin <bapt@FreeBSD.org> CommitDate: 2022-04-29 07:15:26 +0000 devel/fccf: new port fccf is a command-line tool that quickly searches through C/C++ source code in a directory based on a search string and prints relevant code snippets that match the query. Highlights: * Quickly identifies source files that contain a search string. * For each candidate source file, builds an abstract syntax tree (AST). * Visits the nodes in the AST, looking for function declarations, classes, enums, variables etc., that match the user's request. * Pretty-prints the identified snippet of source code to the terminal. * MIT License WWW: https://github.com/p-ranav/fccf --- devel/Makefile | 1 + devel/fccf/Makefile | 21 +++++++++++++++++++++ devel/fccf/distinfo | 3 +++ devel/fccf/files/patch-cmake_install-script.cmake | 11 +++++++++++ devel/fccf/files/patch-source_utf8.cpp | 12 ++++++++++++ devel/fccf/pkg-descr | 13 +++++++++++++ devel/fccf/pkg-plist | 6 ++++++ 7 files changed, 67 insertions(+) diff --git a/devel/Makefile b/devel/Makefile index f586933c5a6e..690d6bbbed59 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -675,6 +675,7 @@ SUBDIR += fatal SUBDIR += fbthrift SUBDIR += fc++ + SUBDIR += fccf SUBDIR += fhist SUBDIR += fifechan SUBDIR += fire-hpp diff --git a/devel/fccf/Makefile b/devel/fccf/Makefile new file mode 100644 index 000000000000..2df369481794 --- /dev/null +++ b/devel/fccf/Makefile @@ -0,0 +1,21 @@ +PORTNAME= fccf +PORTVERSION= 0.5.0 +DISTVERSIONPREFIX= v +CATEGORIES= devel + +MAINTAINER= bapt@FreeBSD.org +COMMENT= Command-line tool that quickly searches through C/C++ + +LICENSE= MIT + +BUILD_DEPENDS+= llvm${LLVM_DEFAULT}>0:devel/llvm${LLVM_DEFAULT} + +USES= cmake + +USE_GITHUB= yes +GH_ACCOUNT= p-ranav + +post-patch: + ${REINPLACE_CMD} "s/llvm-config/llvm-config${LLVM_DEFAULT}/g" ${WRKSRC}/CMakeLists.txt + +.include <bsd.port.mk> diff --git a/devel/fccf/distinfo b/devel/fccf/distinfo new file mode 100644 index 000000000000..6500fe78bdc4 --- /dev/null +++ b/devel/fccf/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1651214882 +SHA256 (p-ranav-fccf-v0.5.0_GH0.tar.gz) = 8c4949f5cd8fc4be9858aa680c8304ceeac6dc4740fdf82e776ff66b05434bf9 +SIZE (p-ranav-fccf-v0.5.0_GH0.tar.gz) = 38074 diff --git a/devel/fccf/files/patch-cmake_install-script.cmake b/devel/fccf/files/patch-cmake_install-script.cmake new file mode 100644 index 000000000000..320cd3d96984 --- /dev/null +++ b/devel/fccf/files/patch-cmake_install-script.cmake @@ -0,0 +1,11 @@ +--- cmake/install-script.cmake.orig 2022-04-29 07:09:29 UTC ++++ cmake/install-script.cmake +@@ -5,7 +5,7 @@ get_filename_component(prefix "${CMAKE_INSTALL_PREFIX} + ) + + get_filename_component(prefix "${CMAKE_INSTALL_PREFIX}" ABSOLUTE) +-set(config_dir "${prefix}/${fccf_INSTALL_CMAKEDIR}") ++set(config_dir "\$ENV{DESTDIR}${prefix}/${fccf_INSTALL_CMAKEDIR}") + set(config_file "${config_dir}/fccfConfig.cmake") + + message(STATUS "Installing: ${config_file}") diff --git a/devel/fccf/files/patch-source_utf8.cpp b/devel/fccf/files/patch-source_utf8.cpp new file mode 100644 index 000000000000..a2b7d024314c --- /dev/null +++ b/devel/fccf/files/patch-source_utf8.cpp @@ -0,0 +1,12 @@ +--- source/utf8.cpp.orig 2022-04-29 07:01:48 UTC ++++ source/utf8.cpp +@@ -19,7 +19,9 @@ + #if _WIN32 + # include <malloc.h> + #else ++#ifndef __FreeBSD__ + # include <alloca.h> ++#endif + #endif + + #include <utf8.h> diff --git a/devel/fccf/pkg-descr b/devel/fccf/pkg-descr new file mode 100644 index 000000000000..c803cd28b2a7 --- /dev/null +++ b/devel/fccf/pkg-descr @@ -0,0 +1,13 @@ +fccf is a command-line tool that quickly searches through C/C++ source code in +a directory based on a search string and prints relevant code snippets that +match the query. + +Highlights: + * Quickly identifies source files that contain a search string. + * For each candidate source file, builds an abstract syntax tree (AST). + * Visits the nodes in the AST, looking for function declarations, classes, + enums, variables etc., that match the user's request. + * Pretty-prints the identified snippet of source code to the terminal. + * MIT License + +WWW: https://github.com/p-ranav/fccf diff --git a/devel/fccf/pkg-plist b/devel/fccf/pkg-plist new file mode 100644 index 000000000000..213689a6e94e --- /dev/null +++ b/devel/fccf/pkg-plist @@ -0,0 +1,6 @@ +bin/fccf +include/argparse/argparse.hpp +lib/cmake/argparse/argparseConfig-version.cmake +lib/cmake/argparse/argparseConfig.cmake +libdata/pkgconfig/argparse.pc +%%DATADIR%%/fccfConfigVersion.cmake