Bug 278197

Summary: [NEW PORT] devel/cppinsights: C++ Insights - See your source code with the eyes of a compiler.
Product: Ports & Packages Reporter: Martin Filla <freebsd>
Component: Individual Port(s)Assignee: Vladimir Druzenko <vvd>
Status: Closed FIXED    
Severity: Affects Some People CC: vvd
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
URL: https://github.com/andreasfertig/cppinsights/releases/tag/v_17.0
Attachments:
Description Flags
cppinsights.diff
none
0001-cppinsights-new-port.patch
none
0001-cppinsights-new-port.patch
none
0001-cppinsights-new-port.patch freebsd: maintainer-approval+

Description Martin Filla 2024-04-06 13:35:29 UTC
Created attachment 249761 [details]
cppinsights.diff

Hi,
new port C++ Insights - See your source code with the eyes of a compiler.
Comment 1 Martin Filla 2024-04-07 09:29:01 UTC
poudriere is not ok 
cppinsights-v_17.0/DPrint.h:11:10: fatal error: 'source_location' file not found
Comment 2 Martin Filla 2024-10-18 08:55:13 UTC
Created attachment 254325 [details]
0001-cppinsights-new-port.patch

Updating database digests format: .......... done
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 1 packages (of 0 packages in the universe):

Installed packages to be REMOVED:
	cppinsights: 17.0

Number of packages to be removed: 1

The operation will free 29 MiB.
[133amd64-default] [1/1] Deinstalling cppinsights-17.0...
[133amd64-default] [1/1] Deleting files for cppinsights-17.0: .... done
===========================================================================
=>> Checking for extra files and directories
[00:03:59] Installing from package
[133amd64-default] Installing cppinsights-17.0...
[133amd64-default] Extracting cppinsights-17.0: .... done
[00:04:00] Cleaning up
===>  Cleaning for cppinsights-17.0
[00:04:00] Deinstalling package
Updating database digests format: . done
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 1 packages (of 0 packages in the universe):

Installed packages to be REMOVED:
	cppinsights: 17.0

Number of packages to be removed: 1
Comment 3 Vladimir Druzenko freebsd_committer freebsd_triage 2024-10-18 12:36:41 UTC
1. "PORTNAME == GH_PROJECT" - remove GH_PROJECT.

2. Replace:
USES=		cmake llvm:17
LIB_DEPENDS=	libLLVM-17.so:devel/llvm17
with:
USES=		cmake llvm:17,lib
and test.
Check Mk/Uses/llvm.mk for more information.

3. WWW=		https://cppinsights.io/
Doesn't look like the official site.
Maybe https://github.com/andreasfertig/cppinsights is better.
Comment 4 Vladimir Druzenko freebsd_committer freebsd_triage 2024-10-18 12:39:08 UTC
4. pkg-descr:
C++ Insights is a Clang-based tool that does a source-to-source transformation. The goal of C++ Insights is to make things visible that normally and intentionally happen behind the scenes. It's about the magic the compiler does for us to make things work.
Comment 5 Vladimir Druzenko freebsd_committer freebsd_triage 2024-10-18 12:40:19 UTC
Or:
C++ Insights is a Clang-based tool that does a source-to-source transformation. The goal of C++ Insights is to make things visible that normally and intentionally happen behind the scenes. It's about the magic the compiler does for us to make things work. Or looking through the classes of a compiler.
Comment 6 Martin Filla 2024-10-18 16:47:01 UTC
Created attachment 254339 [details]
0001-cppinsights-new-port.patch

it is fixed.
Comment 7 Vladimir Druzenko freebsd_committer freebsd_triage 2024-10-18 22:56:07 UTC
Can it work with other LLVM versions? Or it support 17 only?
Comment 8 Vladimir Druzenko freebsd_committer freebsd_triage 2024-10-18 23:52:03 UTC
set(INSIGHTS_MIN_LLVM_MAJOR_VERSION 17)
Build fine with LLVM18.

USES=		cmake llvm:min=17,lib
CMAKE_ARGS=    -DLLVM_CONFIG_PATH="${LOCALBASE}/llvm${LLVM_VERSION}/bin/llvm-config"
Comment 9 Martin Filla 2024-10-19 07:09:09 UTC
Created attachment 254349 [details]
0001-cppinsights-new-port.patch
Comment 10 commit-hook freebsd_committer freebsd_triage 2024-10-19 11:10:46 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=b147b55eb79e58ef0b0a36a590be74110f4658c6

commit b147b55eb79e58ef0b0a36a590be74110f4658c6
Author:     Martin Filla <freebsd@sysctl.cz>
AuthorDate: 2024-10-19 11:07:34 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2024-10-19 11:10:15 +0000

    sysutils/cppinsights: New port: C++ Insights - See your source code with the eyes of a compiler

    C++ Insights is a Clang-based tool that does a source-to-source
    transformation. The goal of C++ Insights is to make things visible that
    normally and intentionally happen behind the scenes.It's about the magic
    the compiler does for us to make things work.

    https://github.com/andreasfertig/cppinsights
    https://cppinsights.io

    PR:     278197

 sysutils/cppinsights/Makefile (new)  | 21 +++++++++++++++++++++
 sysutils/cppinsights/distinfo (new)  |  3 +++
 sysutils/cppinsights/pkg-descr (new) |  4 ++++
 3 files changed, 28 insertions(+)
Comment 11 commit-hook freebsd_committer freebsd_triage 2024-10-19 11:23:48 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=57537ad6cea08e3d16cd67b1280b5723be42d08a

commit 57537ad6cea08e3d16cd67b1280b5723be42d08a
Author:     Martin Filla <freebsd@sysctl.cz>
AuthorDate: 2024-10-19 11:17:00 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2024-10-19 11:23:14 +0000

    devel/cppinsights: New port: C++ Insights - See your source code with the eyes of a compiler

    C++ Insights is a Clang-based tool that does a source-to-source
    transformation. The goal of C++ Insights is to make things visible that
    normally and intentionally happen behind the scenes.It's about the magic
    the compiler does for us to make things work.

    https://github.com/andreasfertig/cppinsights
    https://cppinsights.io

    PR:     278197

 devel/Makefile                    |  1 +
 devel/cppinsights/Makefile (new)  | 21 +++++++++++++++++++++
 devel/cppinsights/distinfo (new)  |  3 +++
 devel/cppinsights/pkg-descr (new) |  4 ++++
 4 files changed, 29 insertions(+)
Comment 12 commit-hook freebsd_committer freebsd_triage 2024-10-19 11:23:49 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=283f04fa6013b4f18cabab8fc1fa5647651a3b4d

commit 283f04fa6013b4f18cabab8fc1fa5647651a3b4d
Author:     Vladimir Druzenko <vvd@FreeBSD.org>
AuthorDate: 2024-10-19 11:14:02 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2024-10-19 11:22:29 +0000

    sysutils/cppinsights: Revert "New port"

    This reverts commit b147b55eb79e58ef0b0a36a590be74110f4658c6.

    sysutils/cppinsights: incorrect category

    PR:     278197
    Fixes:  b147b55eb79e (New port: C++ Insights - See your source code with the eyes of a compiler)

 sysutils/cppinsights/Makefile (gone)  | 21 ---------------------
 sysutils/cppinsights/distinfo (gone)  |  3 ---
 sysutils/cppinsights/pkg-descr (gone) |  4 ----
 3 files changed, 28 deletions(-)
Comment 13 Vladimir Druzenko freebsd_committer freebsd_triage 2024-10-19 11:25:41 UTC
Change category to devel.