From nobody Fri Apr 29 07:16:33 2022 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 1B2981AB2D53; Fri, 29 Apr 2022 07:16:34 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KqP1G06hTz4Vv0; Fri, 29 Apr 2022 07:16:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651216594; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vt3dtFB9Q7t1lR0Nrt3AoOmzvRHQcV3RZdIBR7Y3aXA=; b=HQkcsSEt4TZd0n5IKAiNqIemcTIaVlQEsWmdNFluWAQkJVXLfwCWy3k6DloeV9bLrDYvnx kOADVIxbfNjHl1+shvcKQyueXhcVo51RdVxMlnW562qCOS2eZA70cnEkAMiJ50G0PV5WV1 7U9YNSkvZ/2sZhbz55kPEhH/I8H6tooJQnBIgHMpU5Vj9ZKLJHUj/G5KxRVN0Q387jd7so 5qWmcikvq1ATSHqlgt+Yd3+ulEtTLng7XNDfMKdajxreRPTkfGd+QXFqKlo8WIHO2cq+oE tlB8e3qNNSCYfWAh6+7DftuFaOatuwgu+SYEMJiLfDOoQdtrHlHuLCMeOlUeow== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D7E0645E; Fri, 29 Apr 2022 07:16:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 23T7GXqs049656; Fri, 29 Apr 2022 07:16:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 23T7GXe7049655; Fri, 29 Apr 2022 07:16:33 GMT (envelope-from git) Date: Fri, 29 Apr 2022 07:16:33 GMT Message-Id: <202204290716.23T7GXe7049655@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Baptiste Daroussin Subject: git: 76b39d470f39 - main - devel/fccf: new port List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 76b39d470f398e6a4ff7be7b41be289546c31470 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651216594; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vt3dtFB9Q7t1lR0Nrt3AoOmzvRHQcV3RZdIBR7Y3aXA=; b=UevbX1bXspdAHfhro9XA78BK4esZstGPJUYxp5xj3ONIIw0fjhwWrqoMyE9cj1Qcuy/3VL /hFiWbtO/66MY8z/tCVeIisazkyc2HRSrl6DMImUR30heSFlMF9uDua7MnXX6vQEPuCoQd FaxEEdHeBQuhNv5cnQEuNHAY+fiuzuyOea6R9dhXxljwu9Jece1Hl4BoAx7HSbsMPjOoax iqwt3U8U3FpjMhv77juD26QqXx33EQCPfgLpgUIkJt1v4yt6F5j28GbJJf6/UMBrztzhzl I+oZSec0z2fmTArNqJwWiqL5VrXzVNpKTsHL53Wn3cZcitB7QqmrRNJss8K2TA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1651216594; a=rsa-sha256; cv=none; b=LnZ0VxO3c+vhWT6X5HuWX0Th4UL15Np+lBjVuxw53cQuh3PcHQLbBYcfIMn7LYTvgpBXHH GxcVLA4y9xSmtd4xYJpj8LObKqllN5Cr5yRF8c+WfBZXi8+XyEWFaoXrMQkKMDpaH1mrOu yRd5J58i+exDJBjsyw/EuZzMsXGtWvl5MzCh9DL+Y62W++7Xb9YyGBgYtN0HcsUMOR0YEg nX/Fjnn/rvZesCJu5T7j+NmF3efbnsOq+GjW01oxZpGOaJI5G7zB3Uf1KokaL2VJy74pZk Jgjcmom/ak/9biS3+qzJdBmXjuJR5UfWm+M/naC7QyReKvVGKoLceR0Bx7rgdA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/ports/commit/?id=76b39d470f398e6a4ff7be7b41be289546c31470 commit 76b39d470f398e6a4ff7be7b41be289546c31470 Author: Baptiste Daroussin AuthorDate: 2022-04-29 07:15:26 +0000 Commit: Baptiste Daroussin 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 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 + #else ++#ifndef __FreeBSD__ + # include ++#endif + #endif + + #include 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