aboutsummaryrefslogtreecommitdiffstats
path: root/devel/bear
diff options
context:
space:
mode:
authorpi <pi@FreeBSD.org>2017-07-23 16:05:00 +0800
committerpi <pi@FreeBSD.org>2017-07-23 16:05:00 +0800
commit4c7cea8a61ea8592e76322939dc9d3f3afd556a6 (patch)
tree833cdd4d81143104f08727cb722301ebada9ae1f /devel/bear
parentb4dd6905d314ba698fb85f6d7bbcacd985561828 (diff)
downloadfreebsd-ports-gnome-4c7cea8a61ea8592e76322939dc9d3f3afd556a6.tar.gz
freebsd-ports-gnome-4c7cea8a61ea8592e76322939dc9d3f3afd556a6.tar.zst
freebsd-ports-gnome-4c7cea8a61ea8592e76322939dc9d3f3afd556a6.zip
New port: devel/bear
Bear is a tool that generates a compilation database for clang tooling. The JSON compilation database is used in the clang project to provide information on how a single compilation unit is processed. With this, it is easy to re-run the compilation with alternate programs. One way to get a compilation database is to use cmake as the build tool. Passing -DCMAKE_EXPORT_COMPILE_COMMANDS=ON to cmake generates the compile_commands.json file into the current directory. For non-cmake projects, Bear generates the JSON file during the build process. The concept behind Bear is: to execute the original build command and intercept the exec calls issued by the build tool. To achieve that, Bear uses the LD_PRELOAD or DYLD_INSERT_LIBRARIES mechanisms provided by the dynamic linker. WWW: https://github.com/rizsotto/Bear PR: 220475 Submitted by: Jov <amutu@amutu.com>
Diffstat (limited to 'devel/bear')
-rw-r--r--devel/bear/Makefile34
-rw-r--r--devel/bear/distinfo3
-rw-r--r--devel/bear/pkg-descr16
-rw-r--r--devel/bear/pkg-plist4
4 files changed, 57 insertions, 0 deletions
diff --git a/devel/bear/Makefile b/devel/bear/Makefile
new file mode 100644
index 000000000000..499ac9084711
--- /dev/null
+++ b/devel/bear/Makefile
@@ -0,0 +1,34 @@
+# Created by: Jov <amutu@amutu.com>
+# $FreeBSD$
+
+PORTNAME= bear
+PORTVERSION= 2.3.6
+CATEGORIES= devel
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER= amutu@amutu.com
+COMMENT= Tool that generates a compilation database for clang tooling
+
+LICENSE= GPLv3
+
+USE_GITHUB= yes
+GH_ACCOUNT= rizsotto
+GH_PROJECT= Bear
+
+USES= cmake shebangfix python:2.7+
+USE_LDCONFIG= yes
+
+SHEBANG_FILES= bear/main.py.in
+
+OPTIONS_DEFINE= DOCS
+
+post-patch:
+ ${REINPLACE_CMD} -e '/install(FILES COPYING/d' \
+ -e '/{CMAKE_INSTALL_DOCDIR}/d' \
+ ${WRKSRC}/CMakeLists.txt
+
+post-install-DOCS-on:
+ ${MKDIR} ${STAGEDIR}${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/README.md ${STAGEDIR}${DOCSDIR}
+
+.include <bsd.port.mk>
diff --git a/devel/bear/distinfo b/devel/bear/distinfo
new file mode 100644
index 000000000000..a8d56525f1f6
--- /dev/null
+++ b/devel/bear/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1499241718
+SHA256 (rizsotto-Bear-2.3.6_GH0.tar.gz) = 94ceb407d4058b22563bc26b5a4d0d1d10df83987320e60e455e8a6a5616a75d
+SIZE (rizsotto-Bear-2.3.6_GH0.tar.gz) = 41275
diff --git a/devel/bear/pkg-descr b/devel/bear/pkg-descr
new file mode 100644
index 000000000000..c3f787d58e85
--- /dev/null
+++ b/devel/bear/pkg-descr
@@ -0,0 +1,16 @@
+Bear is a tool that generates a compilation database for clang
+tooling. The JSON compilation database is used in the clang project
+to provide information on how a single compilation unit is processed.
+With this, it is easy to re-run the compilation with alternate
+programs. One way to get a compilation database is to use cmake as
+the build tool. Passing -DCMAKE_EXPORT_COMPILE_COMMANDS=ON to cmake
+generates the compile_commands.json file into the current directory.
+For non-cmake projects, Bear generates the JSON file during the
+build process.
+
+The concept behind Bear is: to execute the original build command
+and intercept the exec calls issued by the build tool. To achieve
+that, Bear uses the LD_PRELOAD or DYLD_INSERT_LIBRARIES mechanisms
+provided by the dynamic linker.
+
+WWW: https://github.com/rizsotto/Bear
diff --git a/devel/bear/pkg-plist b/devel/bear/pkg-plist
new file mode 100644
index 000000000000..9f744253883f
--- /dev/null
+++ b/devel/bear/pkg-plist
@@ -0,0 +1,4 @@
+bin/bear
+lib/libear.so
+man/man1/bear.1.gz
+%%PORTDOCS%%%%DOCSDIR%%/README.md