Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 532428 - dev-util/bear-1.4.3 - tool to generate llvm compilation databases from compile commands
Summary: dev-util/bear-1.4.3 - tool to generate llvm compilation databases from compil...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: AMD64 Linux
: Normal enhancement (vote)
Assignee: Default Assignee for New Packages
URL:
Whiteboard:
Keywords: EBUILD
Depends on:
Blocks:
 
Reported: 2014-12-13 10:47 UTC by Dmitry Petrov
Modified: 2020-07-01 21:25 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
bear-1.4.3.ebuild (bear-1.4.3.ebuild,678 bytes, text/plain)
2014-12-13 10:47 UTC, Dmitry Petrov
Details
Fixed error in bear-1.4.3 ebuild (bear-1.4.3-r1.ebuild,728 bytes, text/plain)
2015-02-07 22:06 UTC, Dmitry Petrov
Details
bear-2.0.1.ebuild (bear-2.0.1.ebuild,728 bytes, text/plain)
2015-02-07 22:08 UTC, Dmitry Petrov
Details
bear-2.0.2.ebuild (bear-2.0.2.ebuild,682 bytes, text/plain)
2015-03-01 11:04 UTC, Franz Trischberger
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry Petrov 2014-12-13 10:47:47 UTC
Created attachment 391546 [details]
bear-1.4.3.ebuild

There're packages in portage (mainly vim/emacs plugins) that makes C/C++ development easier by using libclang for autocompletion/code navigation etc. All this plugins require correct compilation flags for sources.

One of widely accepted formats for mapping source files to compilation flags is llvm compile database. Some build tools (like cmake) can generate llvm compilation database by themselves, but autotools/handwritten makefiles cannot.

dev-util/bear can ease life of developer by intercepting compiler commands (via LD_PRELOAD) and store them in compilation database.

Attached ebuild can also be used to compile from github repository (simply change name to bear-9999.ebuild).
Comment 1 Franz Trischberger 2014-12-21 11:05:50 UTC
Thx, I just wanted to open a request, too.
Though there is an issue with you ebuild:
It does not build for non-live version, because it extracts to ${WORKDIR}/Bear-${PV}, but portage expects it to be "bear-${PV}".

MY_PN="${PN/b/B}"
S="${WORKDIR}/${MY_PN}-${PV}"

solves the issue.

Two small nags:
cmake-utils already handles the cmake-dep.
And you inherit from multilib but don't use it.

It would be really great to get bear into portage. I already used it for many projects to quickly get to hack on them (vim+youcompleteme).
Comment 2 David Holm 2015-02-07 11:38:58 UTC
Version 2.0.1 is available now.  Please add this ebuild soon.
Comment 3 Dmitry Petrov 2015-02-07 22:06:59 UTC
Created attachment 395848 [details]
Fixed error in bear-1.4.3 ebuild

Fixed error in ebuild as  Franz Fellner suggested
Comment 4 Dmitry Petrov 2015-02-07 22:08:12 UTC
Created attachment 395850 [details]
bear-2.0.1.ebuild
Comment 5 Franz Trischberger 2015-02-09 09:27:52 UTC
The 2.0.1-ebuild is not complete yet. The bear-executable was rewritten in python, so we need at least a python-DEP. Looking at the description of the different python eclasses [1] I think we should use python-single-r1 [2]:
"If your package installs Python scripts or modules, [...] use python-single-r1."

I can do the changes, probably this evening.

[1] http://wiki.gentoo.org/wiki/Project:Python/Eclasses
[2] http://wiki.gentoo.org/wiki/Project:Python/python-single-r1
Comment 6 Franz Trischberger 2015-03-01 11:04:37 UTC
Created attachment 397770 [details]
bear-2.0.2.ebuild

Sry, was a long evening...
* Update to bear-2.0.2
* make use of python-single-r1.eclass
* cleaned up deps
* minor general polishing

Also made sure it works as live ebuild.
Comment 7 Franz Trischberger 2015-04-06 09:33:24 UTC
bear-2.0.3 was released april 4.
There were only bugfixes, bear-2.0.2.ebuild can simply be copied over to bear-2.0.3.ebuild.
Comment 8 simonfxr 2019-08-10 11:17:30 UTC
Is there any progress? I would find it very useful!