summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukáš Jirkovský2015-06-26 23:50:34 +0200
committerLukáš Jirkovský2015-06-26 23:50:34 +0200
commitabcba91912511f927bedb2418bd9f38cc118ae74 (patch)
treef6af50c73b6d345e6ef2069cff1f7b95dcc58cc7
downloadaur-abcba91912511f927bedb2418bd9f38cc118ae74.tar.gz
initial import
-rw-r--r--.SRCINFO20
-rw-r--r--PKGBUILD49
-rw-r--r--codeviz.install18
3 files changed, 87 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..c1bd54af479e
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,20 @@
+pkgbase = codeviz
+ pkgdesc = A call graph generation utility for C/C++
+ pkgver = 1.0.12
+ pkgrel = 1
+ url = http://www.csn.ul.ie/~mel/projects/codeviz/
+ install = codeviz.install
+ arch = i686
+ arch = x86_64
+ license = GPL2
+ depends = perl
+ depends = graphviz
+ noextract = gcc-4.6.4.tar.gz
+ options = !buildflags
+ source = http://www.csn.ul.ie/~mel/projects/codeviz/codeviz-1.0.12.tar.gz
+ source = ftp://ftp.gnu.org/pub/gnu/gcc/gcc-4.6.4/gcc-4.6.4.tar.gz
+ md5sums = 31bb56aeccc8eefb24f23073bf523c48
+ md5sums = a8f15fc233589924ccd8cc8140b0ca3c
+
+pkgname = codeviz
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..4c8c82952c58
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,49 @@
+# Maintainer: Lukas Jirkovsky <l.jirkovsky@gmail.com>
+pkgname=codeviz
+pkgver=1.0.12
+_gccver=4.6.4
+pkgrel=1
+pkgdesc="A call graph generation utility for C/C++"
+arch=('i686' 'x86_64')
+url="http://www.csn.ul.ie/~mel/projects/codeviz/"
+license=('GPL2')
+depends=('perl' 'graphviz')
+# unset the C(XX)FLAGS because they would break the compilation if they contained
+# options not supported in $_gccver
+options=('!buildflags')
+source=(http://www.csn.ul.ie/~mel/projects/codeviz/codeviz-$pkgver.tar.gz \
+ ftp://ftp.gnu.org/pub/gnu/gcc/gcc-$_gccver/gcc-${_gccver}.tar.gz)
+noextract=(gcc-${_gccver}.tar.gz)
+install=codeviz.install
+md5sums=('31bb56aeccc8eefb24f23073bf523c48'
+ 'a8f15fc233589924ccd8cc8140b0ca3c')
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ # disable problematic flags, solution by ftschindler from gcc46
+ CPPFLAGS=${CPPFLAGS//-D_FORTIFY_SOURCE=?/}
+ export CPPFLAGS
+ CFLAGS=${CFLAGS//-fstack-protector-strong/-fstack-protector}
+ export CFLAGS
+ CXXFLAGS=${CXXFLAGS//-fstack-protector-strong/-fstack-protector}
+ export CXXFLAGS
+
+ # update for gcc 4.6.4 instead of 4.6.2
+ find . -type f -exec sed -i 's|4\.6\.2|4\.6\.4|g' '{}' ';'
+ mv compilers/install_gcc-4.6.2.sh compilers/install_gcc-${_gccver}.sh
+ mv compilers/gcc-patches/gcc-4.6.2-cdepn.diff compilers/gcc-patches/gcc-${_gccver}-cdepn.diff
+
+ # link the downloaded sources so the configure script doesn't download them again
+ ln -sf "$SRCDEST/gcc-${_gccver}.tar.gz" compilers/gcc-${_gccver}.tar.gz
+
+ ./configure --gcc=4.6.4 --prefix=/usr --gccgraph=/opt/gccgraph
+ make
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+ make DESTDIR="$pkgdir" install
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/codeviz.install b/codeviz.install
new file mode 100644
index 000000000000..e701d1e4b800
--- /dev/null
+++ b/codeviz.install
@@ -0,0 +1,18 @@
+post_install() {
+cat << EOT
+ Patched gcc is installed to /opt/gccgraph. To compile a project
+ for use with CodeViz, genearlly the following will work
+
+ make CC=/opt/gccgraph/bin/gcc or g++
+
+ To generate a full.graph file for C, use
+
+ genfull
+
+ For C++, make sure you use the cppdepn method with
+
+ genfull -g cppdepn
+
+ or the results will not be what you expect.
+EOT
+}