[SM-Commit] GIT changes to master grimoire by Justin Boffemmyer (c7aea7d6a69ea0df7bf94bd4b5c31ce0f6057dc7)

Justin Boffemmyer scm at sourcemage.org
Sun Nov 13 11:08:41 EST 2011


GIT changes to master grimoire by Justin Boffemmyer <flux at sourcemage.org>:

 devel/llvm/CONFIGURE |    7 +++++++
 devel/llvm/DEPENDS   |   10 ++++++++++
 devel/llvm/DETAILS   |    9 ++++++---
 devel/llvm/HISTORY   |   12 ++++++++++++
 devel/llvm/INSTALL   |   21 +++++++++++++++++++++
 devel/llvm/PRE_BUILD |    2 +-
 6 files changed, 57 insertions(+), 4 deletions(-)

New commits:
commit c7aea7d6a69ea0df7bf94bd4b5c31ce0f6057dc7
Author: Justin Boffemmyer <flux at sourcemage.org>
Commit: Justin Boffemmyer <flux at sourcemage.org>

    devel/llvm: add support for clang static analyzer
    
    Added the option to install the clang static analyzer scripts. The
    scripts are functional and helpful for bug-testing code, but are
    currently in a beta stage and do not have an official upstream install.
    As a result, there is nothing in the makefiles to install the scripts,
    nor is there even a recommended/default install location. I have chosed
    $INSTALL_ROOT/usr/share/llvm/ as the base directory for where to install
    the extra material. This can be changed as necessary, or when there is
    an official upstream install location.
    
    The main script(s) (scan-build et. al.) for performing the static
    analysis are written in perl, and thus perl is a hard runtime dependency
    if the user wishes to install this component. The reports generated by
    scan-build (and friends) are indexed html files, and are therefore
    viewable using any standard web browser. There is, however, and
    additional set of scripts for viewing the reports in scan-view, which
    are written in python. As the reports can still be viewed without
    running scan-view, python is an optional runtime dependency.

commit 6f9aa04bedeb26ce3e8ac02ef7b4008e14278625
Author: Justin Boffemmyer <flux at sourcemage.org>
Commit: Justin Boffemmyer <flux at sourcemage.org>

    devel/llvm: fix source numbering and gpg for clang
    
    Corrected the source numbering for the clang sources from 2 to 3. When
    the gpg source checking was added for the llvm sources, the sigs were
    added as SOURCE2, and the clang sources remained as SOURCE2, causing a
    conflict if clang was enabled during CONFIGURE, and consequently there
    would be a failed download.
    
    Also added upstream gpg checking for the clang sources, akin to the llvm
    sources.

diff --git a/devel/llvm/CONFIGURE b/devel/llvm/CONFIGURE
index 3e483c6..20e8043 100755
--- a/devel/llvm/CONFIGURE
+++ b/devel/llvm/CONFIGURE
@@ -1,3 +1,10 @@
+if [[ "$LLVM_WITH_CLANG" == "y" ]]
+then
+  config_query LLVM_WITH_ANALYZER \
+    "Install clang static analyzer (scan-build and scan-view)?" \
+    n
+fi &&
+
 config_query_option LLVMJIT "Enable Just In Time compiling?" y \
 	"--enable-jit" \
 	"--disable-jit"
diff --git a/devel/llvm/DEPENDS b/devel/llvm/DEPENDS
index ac91425..a740784 100755
--- a/devel/llvm/DEPENDS
+++ b/devel/llvm/DEPENDS
@@ -1,6 +1,16 @@
 depends libtool &&
 depends -sub CXX gcc &&
 
+if [[ "$LLVM_WITH_ANALYZER" == "y" ]]
+then
+  # perl is required for scan-build, which is the analyzer itself
+  runtime_depends perl &&
+
+  # python is needed for scan-review, the results viewer, but the results can
+  # also be viewed via any web browser so it isn't strictly necessary
+  suggest_depends python
+fi &&
+
 optional_depends doxygen \
 		"--enable-doxygen" \
 		"--disable-doxygen" \
diff --git a/devel/llvm/DETAILS b/devel/llvm/DETAILS
index 9896122..5d78f17 100755
--- a/devel/llvm/DETAILS
+++ b/devel/llvm/DETAILS
@@ -7,9 +7,12 @@
       SOURCE_GPG=0DD88BA2.gpg:$SOURCE2:UPSTREAM_KEY
   SOURCE2_IGNORE=signature
 if [[ "$LLVM_WITH_CLANG" == y ]]; then
-         SOURCE2="clang-${VERSION}.tgz"
-  SOURCE2_URL[0]=http://${SPELL}.org/releases/${VERSION}/${SOURCE2}
-    SOURCE2_HASH=sha512:0046b716eae7c398a61fb733239f209b60bdd1817e6724730b9515e7ae765565a1e42a805cc06e6f1393d8254ebc845335b244aff825f3fcce551b958683d8f5
+         SOURCE3="clang-${VERSION}.tgz"
+  SOURCE3_URL[0]="http://${SPELL}.org/releases/${VERSION}/${SOURCE3}"
+         SOURCE4="$SOURCE3.sig"
+  SOURCE4_URL[0]="${SOURCE3_URL[0]}.sig"
+     SOURCE3_GPG="0DD88BA2.gpg:$SOURCE4:UPSTREAM_KEY"
+  SOURCE4_IGNORE="signature"
 fi
 SOURCE_DIRECTORY="${BUILD_DIRECTORY}/${SPELL}-${VERSION}"
         WEB_SITE="http://llvm.org "
diff --git a/devel/llvm/HISTORY b/devel/llvm/HISTORY
index cd0ae8e..25a7a93 100644
--- a/devel/llvm/HISTORY
+++ b/devel/llvm/HISTORY
@@ -1,3 +1,15 @@
+2011-09-26 Justin Boffemmyer <flux at sourcemage.org>
+	* DETAILS, PRE_BUILD: converted clang sources to also use upstream
+	  signature checking, and corrected source numbering (clang source
+	  conflicted with llvm sig source)
+	* CONFIGURE: add option for installing the clang static analyzer
+	  scripts
+	* DEPENDS: if the clang static analyzer is enabled, then the runtime
+	  environment will minimally need perl, and python is optional
+	* INSTALL: new file, added to handle installing the clang static
+	  analyzer scripts if enabled in CONFIGURE, as there is currently no
+	  upstream install for the files
+
 2011-09-26 Bor Kraljič <pyrobor at ver.si>
 	* DETAILS: converted to upstream signature checking
 	* 0DD88BA2.gpg: added gpg keyring
diff --git a/devel/llvm/INSTALL b/devel/llvm/INSTALL
new file mode 100755
index 0000000..b361736
--- /dev/null
+++ b/devel/llvm/INSTALL
@@ -0,0 +1,21 @@
+default_install &&
+
+if [[ "$LLVM_WITH_ANALYZER" == "y" ]]
+then
+  target="$INSTALL_ROOT/usr/share/llvm" &&
+
+  cd tools/clang/tools &&
+
+  install -v -m 0755 -o root -g root -d "$target/scan-build" &&
+  install -v -m 0755 -o root -g root -t "$target/scan-build" scan-build/ccc-analyzer &&
+  install -v -m 0755 -o root -g root -t "$target/scan-build" scan-build/scan-build &&
+  install -v -m 0755 -o root -g root -t "$target/scan-build" scan-build/ccc-analyzer &&
+  ln -sf "ccc-analyzer" "$target/scan-build/c++-analyzer" &&
+  install -v -m 0644 -o root -g root -t "$target/scan-build" scan-build/scanview.css &&
+  install -v -m 0644 -o root -g root -t "$target/scan-build" scan-build/sorttable.js &&
+  install -v -m 0755 -o root -g root -d "$target/scan-view" &&
+  install -v -m 0755 -o root -g root -t "$target/scan-view" scan-view/scan-view &&
+  install -v -m 0644 -o root -g root -t "$target/scan-view" scan-view/Reporter.py &&
+  install -v -m 0644 -o root -g root -t "$target/scan-view" scan-view/ScanView.py &&
+  install -v -m 0644 -o root -g root -t "$target/scan-view" scan-view/startfile.py
+fi
diff --git a/devel/llvm/PRE_BUILD b/devel/llvm/PRE_BUILD
index 580ce11..f4248b8 100755
--- a/devel/llvm/PRE_BUILD
+++ b/devel/llvm/PRE_BUILD
@@ -1,6 +1,6 @@
 default_pre_build &&
 if [[ "$LLVM_WITH_CLANG" == y ]]; then
   cd ${SOURCE_DIRECTORY}/tools &&
-  unpack_file 2 &&
+  unpack_file 3 &&
   mv clang-${VERSION} clang
 fi


More information about the SM-Commit mailing list