summaryrefslogtreecommitdiff
path: root/~lukeshu
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2012-07-08 12:29:21 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2012-07-08 12:29:21 -0400
commit91aa54e1f064792c3754d78d483a2785cc716fa6 (patch)
treefb5e725cfbd886e35892726414acb132c3a89bff /~lukeshu
parentf221752c71764a68e3d5d2525ee067c7536d3705 (diff)
downloadabslibre-91aa54e1f064792c3754d78d483a2785cc716fa6.tar.gz
abslibre-91aa54e1f064792c3754d78d483a2785cc716fa6.tar.bz2
abslibre-91aa54e1f064792c3754d78d483a2785cc716fa6.zip
add ~lukeshu/codeanalyst, modified from AUR
Diffstat (limited to '~lukeshu')
-rw-r--r--~lukeshu/codeanalyst/PKGBUILD67
-rw-r--r--~lukeshu/codeanalyst/codeanalyst.desktop9
-rwxr-xr-x~lukeshu/codeanalyst/codeanalyst.install32
-rw-r--r--~lukeshu/codeanalyst/codeanalyst.sudo1
-rw-r--r--~lukeshu/codeanalyst/codeanalyst.svg59
-rw-r--r--~lukeshu/codeanalyst/gcc47.patch72
-rw-r--r--~lukeshu/codeanalyst/skipSetup.patch68
7 files changed, 308 insertions, 0 deletions
diff --git a/~lukeshu/codeanalyst/PKGBUILD b/~lukeshu/codeanalyst/PKGBUILD
new file mode 100644
index 000000000..5cbab45dc
--- /dev/null
+++ b/~lukeshu/codeanalyst/PKGBUILD
@@ -0,0 +1,67 @@
+# Maintainer (Parabola): Luke Shumaker <lukeshu@sbcglobal.net>
+# Maintainer (AUR): Felipe Bugno <capent@yahoo.com>
+
+# A note about the oprofile fork:
+# The docs claim that the fork is just for adding support for
+# processors that aren't upstream yet (at the time, they are now that
+# 0.9.7 is out). So, shouldn't we just link against 0.9.7? Well:
+# * AMD also added a bunch of CodeAnalyst-specific code. Also some of
+# the external.
+# * Several external variables/types have different names; the API is
+# incompatible.
+# * [extra]/oprofile-0.9.7-3 only includes about half of the headers.
+
+pkgbase=CodeAnalyst
+pkgname=codeanalyst
+pkgver=3.3.18.0361
+_pkgver="${pkgver//./_}"
+pkgrel=4.1
+pkgdesc="AMD performance profiler. Includes a fork of oprofile."
+url="http://developer.amd.com/tools/${pkgbase}/"
+arch=('i686' 'x86_64')
+license=('GPL')
+depends=('gcc' 'sudo' 'qt>=4.1' 'oprofile' 'libdwarf')
+makedepends=('linux-headers' 'elfutils' 'findutils' 'file')
+provides=('oprofile=0.9.6cvs')
+conflicts=('oprofile')
+options=('!strip')
+install=codeanalyst.install
+source=("http://download2-developer.amd.com/amd/${pkgbase}/${pkgbase}${_pkgver}Public.tar.gz"
+ 'gcc47.patch'
+ 'skipSetup.patch'
+ 'codeanalyst.sudo'
+ 'codeanalyst.desktop'
+ 'codeanalyst.svg')
+
+build() {
+ cd "${srcdir}/${pkgbase}-${_pkgver}-Public"
+ patch -Np1 -i "${srcdir}/gcc47.patch"
+ patch -Np1 -i "${srcdir}/skipSetup.patch"
+ rm -rf src/dwarf-* # easiest way to ensure using the system install
+
+ ./autogen.sh
+ ./configure --prefix=/usr \
+ --with-libdwarf-includes=/usr/include/libdwarf \
+ --with-libdwarf-libraries=/usr/lib
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgbase}-${_pkgver}-Public"
+ make DESTDIR="${pkgdir}" install
+ rm -f "${pkgdir}/usr/sbin/ca_user_manager" # either codeanalyst.install does this, or it is trivial
+
+ find "${pkgdir}"/usr/{bin,sbin} -type f -exec file '{}' +|sed -n 's/:\s*ELF .*//p'|xargs strip
+
+ cd "${srcdir}"
+ install -D -m644 codeanalyst.sudo "${pkgdir}/etc/sudoers.d/codeanalyst"
+ install -D -m644 codeanalyst.svg "${pkgdir}/usr/share/icons/hicolor/scalable/apps/codeanalyst.svg"
+ install -D -m644 codeanalyst.desktop "${pkgdir}/usr/share/applications/codeanalyst.desktop"
+}
+
+md5sums=('f1e29bc7c7da259df228ce59281ee1d7'
+ '063d0fc9680641a92ce5e310ffe1c9c0'
+ 'ce549e59c4a5916fd19e8d085e863627'
+ '3cc8f64fe84c5a886d0172ee8d99f690'
+ '3a18d3f7fb01f199a8ed5ae2908c18e4'
+ '1822a4157b82904b82e72fc1e9bcbd42')
diff --git a/~lukeshu/codeanalyst/codeanalyst.desktop b/~lukeshu/codeanalyst/codeanalyst.desktop
new file mode 100644
index 000000000..56d54f884
--- /dev/null
+++ b/~lukeshu/codeanalyst/codeanalyst.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Name=AMD CodeAnalyst
+Comment=AMD profiler and performance analyzer
+Exec=/usr/bin/CodeAnalyst
+Icon=codeanalyst
+Terminal=false
+Encoding=UTF-8
+Type=Application
+Categories=Development;
diff --git a/~lukeshu/codeanalyst/codeanalyst.install b/~lukeshu/codeanalyst/codeanalyst.install
new file mode 100755
index 000000000..8edb4adc2
--- /dev/null
+++ b/~lukeshu/codeanalyst/codeanalyst.install
@@ -0,0 +1,32 @@
+post_install() {
+ getent group amdca &>/dev/null || /usr/bin/groupadd amdca &>/dev/null
+ echo " ==> To use CodeAnalyst as non-root, you must be in the 'amdca' group"
+ echo " ie: gpasswd -a USERNAME amdca"
+
+ chown root:amdca /usr/bin/calog_report
+ chown root:amdca /usr/bin/capackage.sh
+ chown root:amdca /usr/bin/careport.sh
+ chown root:amdca /usr/bin/cgreport
+ chown root:amdca /usr/bin/CodeAnalyst
+ chown root:amdca /usr/bin/opannotate
+ chown root:amdca /usr/bin/oparchive
+ chown root:amdca /usr/bin/opcontrol
+ chown root:amdca /usr/bin/opgprof
+ chown root:amdca /usr/bin/ophelp
+ chown root:amdca /usr/bin/opimport
+ chown root:amdca /usr/bin/opjitconv
+ chown root:amdca /usr/bin/opreport
+ chown root:amdca /usr/bin/oprofiled
+ chown root:amdca /usr/sbin/ca_oprofile_controller
+ #chown root:amdca /usr/sbin/ca_user_manager
+
+ update-desktop-database -q
+}
+
+post_remove() {
+ if getent group amdca &>/dev/null; then
+ groupdel amdca
+ fi
+
+ update-desktop-database -q
+}
diff --git a/~lukeshu/codeanalyst/codeanalyst.sudo b/~lukeshu/codeanalyst/codeanalyst.sudo
new file mode 100644
index 000000000..1c3173bdb
--- /dev/null
+++ b/~lukeshu/codeanalyst/codeanalyst.sudo
@@ -0,0 +1 @@
+%amdca ALL= NOPASSWD: /usr/sbin/ca_oprofile_controller
diff --git a/~lukeshu/codeanalyst/codeanalyst.svg b/~lukeshu/codeanalyst/codeanalyst.svg
new file mode 100644
index 000000000..8febf725b
--- /dev/null
+++ b/~lukeshu/codeanalyst/codeanalyst.svg
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Generator: Adobe Illustrator 12.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ version="1.1"
+ id="Layer_1"
+ width="286.95001"
+ height="286.95001"
+ viewBox="0 0 286.95063 286.95"
+ overflow="visible"
+ enable-background="new 0 0 1368.987 286.954"
+ xml:space="preserve"
+ inkscape:version="0.48.3.1 r9886"
+ sodipodi:docname="AMD_Logo.svg"
+ style="overflow:visible"><metadata
+ id="metadata17"><rdf:RDF><cc:Work
+ rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
+ id="defs15" /><sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="1920"
+ inkscape:window-height="1028"
+ id="namedview13"
+ showgrid="false"
+ inkscape:zoom="2.11"
+ inkscape:cx="163.32315"
+ inkscape:cy="145.21584"
+ inkscape:window-x="-4"
+ inkscape:window-y="-3"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="Layer_1" />
+<polyline
+ points="1165.47,92.779 1165.39,203.495 1281.63,203.513 1198.44,286.826 1081.79,286.954 1080.38,176.065 1165.47,92.779"
+ id="polyline3"
+ style="fill:#009a66"
+ transform="translate(-1082.0371,1.8496035e-4)" />
+<polyline
+ points="1165.39,84.082 1285.07,83.854 1284.83,202.972 1368.99,286.954 1368.75,0.12 1081.79,0 1165.39,84.082"
+ id="polyline5"
+ style="fill:#009a66"
+ transform="translate(-1082.0371,1.8496035e-4)" />
+
+
+
+</svg> \ No newline at end of file
diff --git a/~lukeshu/codeanalyst/gcc47.patch b/~lukeshu/codeanalyst/gcc47.patch
new file mode 100644
index 000000000..dfec4a0c4
--- /dev/null
+++ b/~lukeshu/codeanalyst/gcc47.patch
@@ -0,0 +1,72 @@
+diff -crB CodeAnalyst-3_3_18_0361-Public.orig/src/ca/cg/Makefile.am CodeAnalyst-3_3_18_0361-Public/src/ca/cg/Makefile.am
+*** CodeAnalyst-3_3_18_0361-Public.orig/src/ca/cg/Makefile.am 2012-04-13 02:41:43.000000000 -0300
+--- CodeAnalyst-3_3_18_0361-Public/src/ca/cg/Makefile.am 2012-04-22 17:55:01.227439003 -0300
+***************
+*** 25,31 ****
+ cgcvt.cpp
+
+
+! cgreport_LDFLAGS = -Wl -fPIC @QT_LDFLAGS@
+
+ AM_CPPFLAGS= $(INCLUDES) $(more_flags) \
+ $(FLAG64) -Wno-unused -Wno-parentheses \
+--- 25,31 ----
+ cgcvt.cpp
+
+
+! cgreport_LDFLAGS = -fPIC @QT_LDFLAGS@
+
+ AM_CPPFLAGS= $(INCLUDES) $(more_flags) \
+ $(FLAG64) -Wno-unused -Wno-parentheses \
+diff -crB CodeAnalyst-3_3_18_0361-Public.orig/src/ca/gui/MonitorDockView.cpp CodeAnalyst-3_3_18_0361-Public/src/ca/gui/MonitorDockView.cpp
+*** CodeAnalyst-3_3_18_0361-Public.orig/src/ca/gui/MonitorDockView.cpp 2012-04-13 02:41:43.000000000 -0300
+--- CodeAnalyst-3_3_18_0361-Public/src/ca/gui/MonitorDockView.cpp 2012-04-22 17:38:14.884058192 -0300
+***************
+*** 17,22 ****
+--- 17,23 ----
+ */
+
+ #include <qtooltip.h>
++ #include <unistd.h>
+
+ #include "MonitorDockView.h"
+
+diff -crB CodeAnalyst-3_3_18_0361-Public.orig/src/ca/libs/libca/dwarfengine.cpp CodeAnalyst-3_3_18_0361-Public/src/ca/libs/libca/dwarfengine.cpp
+*** CodeAnalyst-3_3_18_0361-Public.orig/src/ca/libs/libca/dwarfengine.cpp 2012-04-13 02:41:43.000000000 -0300
+--- CodeAnalyst-3_3_18_0361-Public/src/ca/libs/libca/dwarfengine.cpp 2012-04-22 17:34:45.670714989 -0300
+***************
+*** 21,26 ****
+--- 21,27 ----
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <fcntl.h>
++ #include <unistd.h>
+
+ #include "dwarfengine.h"
+ #define DWARF_DEBUG 0
+diff -crB CodeAnalyst-3_3_18_0361-Public.orig/src/ca/libs/libopdata/opdata_handler.cpp CodeAnalyst-3_3_18_0361-Public/src/ca/libs/libopdata/opdata_handler.cpp
+*** CodeAnalyst-3_3_18_0361-Public.orig/src/ca/libs/libopdata/opdata_handler.cpp 2012-04-13 02:41:43.000000000 -0300
+--- CodeAnalyst-3_3_18_0361-Public/src/ca/libs/libopdata/opdata_handler.cpp 2012-04-22 17:32:30.780708624 -0300
+***************
+*** 29,34 ****
+--- 29,35 ----
+ #include <sys/stat.h>
+ #include <fcntl.h>
+ #include <time.h>
++ #include <unistd.h>
+
+ // CodeAnalyst headers
+ #include "CaProfileWriter.h"
+diff -crB CodeAnalyst-3_3_18_0361-Public.orig/src/ca_agent/libCAagent/slock.cpp CodeAnalyst-3_3_18_0361-Public/src/ca_agent/libCAagent/slock.cpp
+*** CodeAnalyst-3_3_18_0361-Public.orig/src/ca_agent/libCAagent/slock.cpp 2012-04-13 02:41:43.000000000 -0300
+--- CodeAnalyst-3_3_18_0361-Public/src/ca_agent/libCAagent/slock.cpp 2012-04-22 17:26:58.424026278 -0300
+***************
+*** 13,18 ****
+--- 13,19 ----
+ #include <sys/ipc.h>
+ #include <sys/sem.h>
+ #include <sys/stat.h>
++ #include <unistd.h>
+
+ #include "slock.h"
+ #include "smm.h"
diff --git a/~lukeshu/codeanalyst/skipSetup.patch b/~lukeshu/codeanalyst/skipSetup.patch
new file mode 100644
index 000000000..fdc9bf42f
--- /dev/null
+++ b/~lukeshu/codeanalyst/skipSetup.patch
@@ -0,0 +1,68 @@
+diff -crB CodeAnalyst-3_3_18_0361-Public.orig/src/ca/Makefile.am CodeAnalyst-3_3_18_0361-Public/src/ca/Makefile.am
+*** CodeAnalyst-3_3_18_0361-Public.orig/src/ca/Makefile.am 2012-04-13 02:41:43.000000000 -0300
+--- CodeAnalyst-3_3_18_0361-Public/src/ca/Makefile.am 2012-04-22 20:44:07.437917684 -0300
+***************
+*** 8,19 ****
+ # FIXME [3.0] diffgui \
+ # $(CA_RELEASE_TYPE)
+
+! install-exec-hook:
+! @if test -e "scripts/Setup.sh"; then \
+! scripts/Setup.sh $(DESTDIR)$(prefix); \
+! fi
+
+! uninstall-hook:
+! @if test -e "scripts/Uninstall.sh"; then \
+! scripts/Uninstall.sh $(DESTDIR)$(prefix);\
+! fi
+--- 8,19 ----
+ # FIXME [3.0] diffgui \
+ # $(CA_RELEASE_TYPE)
+
+! #install-exec-hook:
+! # @if test -e "scripts/Setup.sh"; then \
+! # scripts/Setup.sh $(DESTDIR)$(prefix); \
+! # fi
+
+! #uninstall-hook:
+! # @if test -e "scripts/Uninstall.sh"; then \
+! # scripts/Uninstall.sh $(DESTDIR)$(prefix);\
+! # fi
+diff -crB CodeAnalyst-3_3_18_0361-Public.orig/src/ca_agent/jvmpi/Makefile.am CodeAnalyst-3_3_18_0361-Public/src/ca_agent/jvmpi/Makefile.am
+*** CodeAnalyst-3_3_18_0361-Public.orig/src/ca_agent/jvmpi/Makefile.am 2012-04-13 02:41:43.000000000 -0300
+--- CodeAnalyst-3_3_18_0361-Public/src/ca_agent/jvmpi/Makefile.am 2012-04-22 20:47:21.604593511 -0300
+***************
+*** 15,20 ****
+ libCAJVMPIA_so_SOURCES = \
+ jpa.cpp
+
+! install-exec-hook:
+! @/sbin/ldconfig
+
+--- 15,20 ----
+ libCAJVMPIA_so_SOURCES = \
+ jpa.cpp
+
+! #install-exec-hook:
+! # @/sbin/ldconfig
+
+diff -crB CodeAnalyst-3_3_18_0361-Public.orig/src/Makefile.am CodeAnalyst-3_3_18_0361-Public/src/Makefile.am
+*** CodeAnalyst-3_3_18_0361-Public.orig/src/Makefile.am 2012-04-13 02:41:43.000000000 -0300
+--- CodeAnalyst-3_3_18_0361-Public/src/Makefile.am 2012-04-22 20:44:57.674586720 -0300
+***************
+*** 8,21 ****
+ install-exec-hook:
+ @if test -e "${LIBDWARF_DIR}libdwarf.so"; then \
+ install -pD -m 755 ${LIBDWARF_DIR}libdwarf.so $(DESTDIR)$(prefix)/lib/libdwarf.so ; \
+- /sbin/ldconfig ;\
+ fi
+
+ uninstall-hook:
+ @if test -e "${LIBDWARF_DIR}libdwarf.so"; then \
+ if test -e "$(DESTDIR)$(prefix)/lib/libdwarf.so"; then \
+ rm -f $(DESTDIR)$(prefix)/lib/libdwarf.so ; \
+- /sbin/ldconfig ; \
+ fi ; \
+ fi
+
+--- 8,19 ----