summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick McLean <patrick.mclean@sony.com>2019-07-26 10:26:43 -0700
committerPatrick McLean <chutzpah@gentoo.org>2019-07-26 10:26:43 -0700
commit87f4a1b2fba5868ef23640c36b01fc3762d0dcb2 (patch)
treee2c6e95ff9b0c9d17f962ee181494d6e0a443a20 /dev-util/kernelshark
parentkde-apps/kjots: pkgmove to app-text/kjots (diff)
downloadgentoo-87f4a1b2fba5868ef23640c36b01fc3762d0dcb2.tar.gz
gentoo-87f4a1b2fba5868ef23640c36b01fc3762d0dcb2.tar.bz2
gentoo-87f4a1b2fba5868ef23640c36b01fc3762d0dcb2.zip
dev-util/kernelshark: New package
Copyright: Sony Interactive Entertainment Inc. Package-Manager: Portage-2.3.69, Repoman-2.3.16 Signed-off-by: Patrick McLean <chutzpah@gentoo.org>
Diffstat (limited to 'dev-util/kernelshark')
-rw-r--r--dev-util/kernelshark/Manifest1
-rw-r--r--dev-util/kernelshark/files/kernelshark-1.0-build.patch33
-rw-r--r--dev-util/kernelshark/files/kernelshark-1.0-desktop-version.patch11
-rw-r--r--dev-util/kernelshark/kernelshark-1.0.ebuild58
-rw-r--r--dev-util/kernelshark/kernelshark-9999.ebuild58
-rw-r--r--dev-util/kernelshark/metadata.xml12
6 files changed, 173 insertions, 0 deletions
diff --git a/dev-util/kernelshark/Manifest b/dev-util/kernelshark/Manifest
new file mode 100644
index 000000000000..dcdebcda1201
--- /dev/null
+++ b/dev-util/kernelshark/Manifest
@@ -0,0 +1 @@
+DIST kernelshark-1.0.tar.gz 4238163 BLAKE2B edae4bcaf646a8c430e64205cd5d137d8df7eb839075b4bb5da459852e1bb887eaa98de51afd1884cfd27833d3513fc26995fba6964220eb8b95a317d3e4e057 SHA512 ff9f0846ba7105813742bb56887870eff8af4f525864ab75d37dcb2dd6c2222fbd500fd08140d605c3f0021d88991c114e0ffeb7da9ada979bdd78defaa1c266
diff --git a/dev-util/kernelshark/files/kernelshark-1.0-build.patch b/dev-util/kernelshark/files/kernelshark-1.0-build.patch
new file mode 100644
index 000000000000..411d4235a215
--- /dev/null
+++ b/dev-util/kernelshark/files/kernelshark-1.0-build.patch
@@ -0,0 +1,33 @@
+diff --git a/CMakeLists.txt b/kernel-shark/CMakeLists.txt
+index 45c6f23..e2394d9 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -63,11 +63,11 @@ set(KS_LOGO_LABEL KS_logo_horizontal.svg)
+
+ set(CMAKE_INSTALL_RPATH "${_INSTALL_PREFIX}/lib/${KS_APP_NAME}/")
+
+-if (CMAKE_BUILD_TYPE MATCHES Package)
++if (NOT CMAKE_BUILD_TYPE MATCHES Package)
+
+ set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
+
+-else (CMAKE_BUILD_TYPE MATCHES Package)
++else (CMAKE_BUILD_TYPE MATCHES Gentoo)
+
+ set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
+
+diff --git a/build/FindTraceCmd.cmake b/kernel-shark/build/FindTraceCmd.cmake
+index 2da4eee..c454ce6 100644
+--- a/build/FindTraceCmd.cmake
++++ b/build/FindTraceCmd.cmake
+@@ -40,8 +40,8 @@ find_library(TRACEEVENT_LIBRARY NAMES traceevent/libtraceevent.a
+ # search was successful "find_path" will do nothing this time.
+ find_program(TRACECMD_EXECUTABLE NAMES trace-cmd)
+ find_path(TRACECMD_INCLUDE_DIR NAMES trace-cmd/trace-cmd.h)
+-find_library(TRACECMD_LIBRARY NAMES trace-cmd/libtracecmd.so)
+-find_library(TRACEEVENT_LIBRARY NAMES traceevent/libtraceevent.so)
++find_library(TRACECMD_LIBRARY NAMES libtracecmd.so)
++find_library(TRACEEVENT_LIBRARY NAMES libtraceevent.so)
+
+ IF (TRACECMD_INCLUDE_DIR AND TRACECMD_LIBRARY AND TRACECMD_EXECUTABLE)
+
diff --git a/dev-util/kernelshark/files/kernelshark-1.0-desktop-version.patch b/dev-util/kernelshark/files/kernelshark-1.0-desktop-version.patch
new file mode 100644
index 000000000000..2b9b444958dc
--- /dev/null
+++ b/dev-util/kernelshark/files/kernelshark-1.0-desktop-version.patch
@@ -0,0 +1,11 @@
+diff --git a/kernel-shark/build/ks.desktop.cmake b/kernel-shark/build/ks.desktop.cmake
+index 2b02c0d..34c02ea 100644
+--- a/build/ks.desktop.cmake
++++ b/build/ks.desktop.cmake
+@@ -1,5 +1,5 @@
+ [Desktop Entry]
+-Version=@KS_VERSION_STRING@
++Version=1.1
+ Type=Application
+ Name=Kernel Shark
+ GenericName=Kernel Shark
diff --git a/dev-util/kernelshark/kernelshark-1.0.ebuild b/dev-util/kernelshark/kernelshark-1.0.ebuild
new file mode 100644
index 000000000000..44d6447fb0ee
--- /dev/null
+++ b/dev-util/kernelshark/kernelshark-1.0.ebuild
@@ -0,0 +1,58 @@
+# Copyright 2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit flag-o-matic cmake-utils
+
+DESCRIPTION="Graphical reader for trace-cmd output"
+HOMEPAGE="http://kernelshark.org/"
+
+if [[ ${PV} =~ [9]{4,} ]]; then
+ EGIT_REPO_URI="https://github.com/rostedt/trace-cmd.git"
+ inherit git-r3
+ S="${WORKDIR}/${P}/kernel-shark"
+
+else
+ MY_P="${PN}-v${PV}"
+ SRC_URI="https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/snapshot/trace-cmd-${MY_P}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+ S="${WORKDIR}/trace-cmd-${MY_P}/kernel-shark"
+
+fi
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0"
+IUSE="custom-optimization doc"
+
+DEPEND=">=dev-util/trace-cmd-2.8.3:=
+ dev-libs/json-c:=
+ >=media-libs/freeglut-3.0.0:=
+ x11-libs/libXmu:=
+ x11-libs/libXi:=
+ dev-qt/qtcore:5=
+ dev-qt/qtwidgets:5=
+ dev-qt/qtnetwork:5=
+"
+RDEPEND="${DEPEND}"
+BDEPEND=">=dev-util/cmake-2.8.11
+ doc? (
+ media-gfx/graphviz
+ app-doc/doxygen
+ )
+"
+
+PATCHES=(
+ "${FILESDIR}/kernelshark-1.0-build.patch"
+ "${FILESDIR}/kernelshark-1.0-desktop-version.patch"
+)
+
+src_configure() {
+ local mycmakeargs=(
+ -D_INSTALL_PREFIX="${EPREFIX}/usr"
+ -DTRACECMD_INCLUDE_DIR="${EPREFIX}/usr/include/trace-cmd"
+ -D_DOXYGEN_DOC="$(usex doc)"
+ )
+ use custom-optimization || replace-flags -O? -O3
+ cmake-utils_src_configure
+}
diff --git a/dev-util/kernelshark/kernelshark-9999.ebuild b/dev-util/kernelshark/kernelshark-9999.ebuild
new file mode 100644
index 000000000000..44d6447fb0ee
--- /dev/null
+++ b/dev-util/kernelshark/kernelshark-9999.ebuild
@@ -0,0 +1,58 @@
+# Copyright 2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit flag-o-matic cmake-utils
+
+DESCRIPTION="Graphical reader for trace-cmd output"
+HOMEPAGE="http://kernelshark.org/"
+
+if [[ ${PV} =~ [9]{4,} ]]; then
+ EGIT_REPO_URI="https://github.com/rostedt/trace-cmd.git"
+ inherit git-r3
+ S="${WORKDIR}/${P}/kernel-shark"
+
+else
+ MY_P="${PN}-v${PV}"
+ SRC_URI="https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/snapshot/trace-cmd-${MY_P}.tar.gz -> ${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+ S="${WORKDIR}/trace-cmd-${MY_P}/kernel-shark"
+
+fi
+
+LICENSE="GPL-2 LGPL-2.1"
+SLOT="0"
+IUSE="custom-optimization doc"
+
+DEPEND=">=dev-util/trace-cmd-2.8.3:=
+ dev-libs/json-c:=
+ >=media-libs/freeglut-3.0.0:=
+ x11-libs/libXmu:=
+ x11-libs/libXi:=
+ dev-qt/qtcore:5=
+ dev-qt/qtwidgets:5=
+ dev-qt/qtnetwork:5=
+"
+RDEPEND="${DEPEND}"
+BDEPEND=">=dev-util/cmake-2.8.11
+ doc? (
+ media-gfx/graphviz
+ app-doc/doxygen
+ )
+"
+
+PATCHES=(
+ "${FILESDIR}/kernelshark-1.0-build.patch"
+ "${FILESDIR}/kernelshark-1.0-desktop-version.patch"
+)
+
+src_configure() {
+ local mycmakeargs=(
+ -D_INSTALL_PREFIX="${EPREFIX}/usr"
+ -DTRACECMD_INCLUDE_DIR="${EPREFIX}/usr/include/trace-cmd"
+ -D_DOXYGEN_DOC="$(usex doc)"
+ )
+ use custom-optimization || replace-flags -O? -O3
+ cmake-utils_src_configure
+}
diff --git a/dev-util/kernelshark/metadata.xml b/dev-util/kernelshark/metadata.xml
new file mode 100644
index 000000000000..8de31ac92c9a
--- /dev/null
+++ b/dev-util/kernelshark/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>chutzpah@gentoo.org</email>
+ <name>Patrick McLean</name>
+ </maintainer>
+ <use>
+ <flag name="custom-optimization">Build with user-specified compiler optimizations
+ (-Os, -O0, -O1, -O2, -O3) from CFLAGS</flag>
+ </use>
+</pkgmetadata>