diff --git a/oprofile-0.9.4-fixes.diff b/oprofile-0.9.4-fixes.diff index 42c5a59..54fcf14 100644 --- a/oprofile-0.9.4-fixes.diff +++ b/oprofile-0.9.4-fixes.diff @@ -3,10 +3,25 @@ libutil++/bfd_support.cpp | 3 +++ 2 files changed, 5 insertions(+) -Index: oprofile-0.9.6/libutil++/bfd_support.cpp -=================================================================== ---- oprofile-0.9.6.orig/libutil++/bfd_support.cpp 2009-11-24 16:25:17.000000000 +0100 -+++ oprofile-0.9.6/libutil++/bfd_support.cpp 2010-02-03 16:59:58.000000000 +0100 +--- a/agents/jvmpi/jvmpi_oprofile.cpp ++++ b/agents/jvmpi/jvmpi_oprofile.cpp +@@ -24,12 +24,14 @@ + * + */ + ++#include + #include + #include + #include + #include + #include + #include ++#include + + extern "C" { + #include +--- a/libutil++/bfd_support.cpp ++++ b/libutil++/bfd_support.cpp @@ -370,6 +370,9 @@ bool interesting_symbol(asymbol * sym) if (!(sym->section->flags & SEC_LOAD)) return false; diff --git a/oprofile-0.9.5-buildfixes.diff b/oprofile-0.9.5-buildfixes.diff index ddeee1a..4ab086a 100644 --- a/oprofile-0.9.5-buildfixes.diff +++ b/oprofile-0.9.5-buildfixes.diff @@ -8,10 +8,8 @@ utils/opcontrol | 13 +++++++++++-- 7 files changed, 21 insertions(+), 11 deletions(-) -Index: Makefile.am -=================================================================== ---- Makefile.am.orig -+++ Makefile.am +--- a/Makefile.am ++++ b/Makefile.am @@ -25,6 +25,7 @@ SUBDIRS = \ @@ -20,10 +18,8 @@ Index: Makefile.am ACLOCAL_AMFLAGS = -I m4 # The module will not build under distcheck -Index: agents/jvmpi/Makefile.am -=================================================================== ---- agents/jvmpi/Makefile.am.orig -+++ agents/jvmpi/Makefile.am +--- a/agents/jvmpi/Makefile.am ++++ b/agents/jvmpi/Makefile.am @@ -1,6 +1,6 @@ -pkglib_LTLIBRARIES = libjvmpi_oprofile.la +lib_LTLIBRARIES = libjvmpi_oprofile.la @@ -33,10 +29,8 @@ Index: agents/jvmpi/Makefile.am libjvmpi_oprofile_la_SOURCES = jvmpi_oprofile.cpp -Index: agents/jvmti/Makefile.am -=================================================================== ---- agents/jvmti/Makefile.am.orig -+++ agents/jvmti/Makefile.am +--- a/agents/jvmti/Makefile.am ++++ b/agents/jvmti/Makefile.am @@ -1,8 +1,8 @@ AM_CFLAGS = @OP_CFLAGS@ @@ -48,10 +42,8 @@ Index: agents/jvmti/Makefile.am libjvmti_oprofile_la_LIBADD = ../../libopagent/libopagent.la -Index: libopagent/Makefile.am -=================================================================== ---- libopagent/Makefile.am.orig -+++ libopagent/Makefile.am +--- a/libopagent/Makefile.am ++++ b/libopagent/Makefile.am @@ -1,4 +1,4 @@ -pkglib_LTLIBRARIES = libopagent.la +lib_LTLIBRARIES = libopagent.la @@ -67,10 +59,8 @@ Index: libopagent/Makefile.am libopagent_la_LIBADD = $(BFD_LIBS) # Do not increment the major version for this library except to -Index: m4/builtinexpect.m4 -=================================================================== ---- m4/builtinexpect.m4.orig -+++ m4/builtinexpect.m4 +--- a/m4/builtinexpect.m4 ++++ b/m4/builtinexpect.m4 @@ -5,7 +5,7 @@ AC_MSG_CHECKING([whether __builtin_expec SAVE_CFLAGS=$CFLAGS CFLAGS="-Werror $CFLAGS" @@ -80,10 +70,8 @@ Index: m4/builtinexpect.m4 if (__builtin_expect(i, 0)) { } ], AC_MSG_RESULT([yes]); EXTRA_CFLAGS_MODULE="$EXTRA_CFLAGS_MODULE -DEXPECT_OK", -Index: m4/mallocattribute.m4 -=================================================================== ---- m4/mallocattribute.m4.orig -+++ m4/mallocattribute.m4 +--- a/m4/mallocattribute.m4 ++++ b/m4/mallocattribute.m4 @@ -4,9 +4,9 @@ AC_DEFUN([AX_MALLOC_ATTRIBUTE], AC_MSG_CHECKING([whether malloc attribute is understood]) SAVE_CFLAGS=$CFLAGS @@ -96,11 +84,9 @@ Index: m4/mallocattribute.m4 CFLAGS=$SAVE_CFLAGS ] ) -Index: utils/opcontrol -=================================================================== ---- utils/opcontrol.orig -+++ utils/opcontrol -@@ -481,10 +481,19 @@ get_image_range() +--- a/utils/opcontrol ++++ b/utils/opcontrol +@@ -482,10 +482,19 @@ get_image_range() exit 1 fi diff --git a/oprofile-0.9.6-gcc46.patch b/oprofile-0.9.6-gcc46.patch deleted file mode 100644 index 78670a0..0000000 --- a/oprofile-0.9.6-gcc46.patch +++ /dev/null @@ -1,22 +0,0 @@ -From: Ismail Doenmez -Subject: Fix compilation with gcc 4.6 -Date: 09.03.2011 -References: N/A -Upstream: yes -Signed-Off-by: William Cohen - -Do not use mutable for reference variable. -Upstream commit id: b18f60db60487ada38d5f04f52981628b28c6835 - -diff -up oprofile-0.9.6/libpp/format_output.h.mutable oprofile-0.9.6/libpp/format_output.h ---- oprofile-0.9.6/libpp/format_output.h.mutable 2011-02-09 10:20:29.598713997 -0500 -+++ oprofile-0.9.6/libpp/format_output.h 2011-02-09 11:39:48.504714000 -0500 -@@ -91,7 +91,7 @@ protected: - symbol_entry const & symbol; - sample_entry const & sample; - size_t pclass; -- mutable counts_t & counts; -+ counts_t & counts; - extra_images const & extra; - double diff; - }; diff --git a/oprofile-0.9.6.tar.bz2 b/oprofile-0.9.6.tar.bz2 deleted file mode 100644 index 5b9c9b2..0000000 --- a/oprofile-0.9.6.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4ad252ccd06442e35a336b49984b183867ee621f6ea3fbd4f9d96e4f94fff9bc -size 959835 diff --git a/oprofile-0.9.7.tar.bz2 b/oprofile-0.9.7.tar.bz2 new file mode 100644 index 0000000..a042abf --- /dev/null +++ b/oprofile-0.9.7.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:34ae290c9be9675f925721561f569abc8d7e960d5a0f4a70adf224b16cca6d43 +size 1047960 diff --git a/oprofile-qt4.diff b/oprofile-qt4.diff deleted file mode 100644 index e2786c6..0000000 --- a/oprofile-qt4.diff +++ /dev/null @@ -1,402 +0,0 @@ -From: maynardj -Date: Fri Feb 25 11:50:18 2011 -0600 -Subject: Use qt3Support to allow building with either qt3 or qt4 -Git-Repo: git://oprofile.git.sourceforge.net/gitroot/oprofile/oprofile -Git-Commit: 7e4a107edca55f01dc62d2351c85264a3bc97fd3 -References: request by Ismail Dönme, rferencing redhat BZ#683923 -Signed-Off-by: Tony Jones - - - Signed-off-by: Gert Wollny - Acked-by: Maynard Johnson - - Description: - This patch makes changes to oprofile gui files to use qt3Support to facilitate - building with either qt3 or qt4. The configure script now has a new option: - --enable-gui=[qt3|qt4|yes|no]. If not given or set to yes, the gui build - defaults to qt3, which is the same as what it has done in the past. - ---- - configure.in | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++-- - doc/oprofile.xml | 4 +-- - gui/Makefile.am | 5 +-- - gui/oprof_start.cpp | 64 ++++++++++++++++++++++++++++++------------------ - gui/oprof_start.h | 14 +++++++--- - gui/ui/Makefile.am | 2 - - 6 files changed, 121 insertions(+), 36 deletions(-) - ---- a/configure.in -+++ b/configure.in -@@ -18,6 +18,7 @@ AM_CONFIG_HEADER(config.h) - AC_CHECK_DECLS([basename], [], [], [[#include ]]) - AC_PROG_RANLIB - AC_PROG_LIBTOOL -+PKG_PROG_PKG_CONFIG - - dnl for the man page - DATE="`date '+%a %d %B %Y'`" -@@ -131,7 +132,61 @@ ORIG_X_SAVE_LIBS="$LIBS" - LIBS="$X_PRE_LIBS $LIBS $X_LIBS -lX11 $X_EXTRA_LIBS" - X_LIBS="$LIBS" - AC_SUBST(X_LIBS) --QT_DO_IT_ALL -+ -+AC_ARG_ENABLE(gui,[ --enable-gui compile with gui component (qt3|qt4|yes|no), -+ if not given or set to yes, gui defaults to qt3],, enable_gui=qt3) -+ -+if test "x$enable_gui" = "xqt3" || test "x$enable_gui" = "xyes"; then -+ QT_VERSION=3 -+ QT_DO_IT_ALL -+ QT_LIBS="$QT_LIB $QT_LDFLAGS" -+ QT_CFLAGS="$QT_INCLUDES" -+fi -+ -+if test "x$enable_gui" = "xqt4"; then -+ QT_VERSION=4 -+ PKG_CHECK_MODULES(QT, Qt3Support QtGui QtCore ,,[ -+ echo "You requested QT4 but its build files are not available. Exiting now." -+ exit -+ ]) -+ MOC=$(pkg-config --variable=moc_location QtCore) -+ UIC=$(pkg-config --variable=uic_location QtCore)3 -+ QT_VERSION=$(pkg-config --modversion QtCore) -+ -+dnl following are some sanity tests and workarounds for buggy QtCore.pc files -+ if test "x$MOC" = "x"; then -+ echo "WARNING: Your QtCore.pc file is buggy, it doesn't provide the variable 'moc_location'" -+ echo "WARNING: I will try to find it in your PATH ..." -+ AC_CHECK_PROG(MOC, moc, moc) -+ if test "x$MOC" = "x"; then -+ echo "WARNING: You can fix this by adding the location of moc to your path." -+ echo "WARNING: Exiting now." -+ exit -+ fi -+ fi -+ -+ if test "x$UIC" = "x3"; then -+ echo "WARNING: Your QtCore.pc file is buggy, it doesn't provide the variable 'uic_location'" -+ echo "WARNING: I will try to find it in your PATH ..." -+ AC_CHECK_PROG(UIChelp, uic3, uic3) -+ if test "x$UIChelp" = "x"; then -+ echo "WARNING: You can fix this by adding the location of uic3 to your path." -+ echo "WARNING: Exiting now." -+ exit -+ else -+ UIC="$UIChelp" -+ fi -+ fi -+ -+ flags_has_qt3support=$(echo $QT_CFLAGS | grep QT3_SUPPORT) -+ if test "x$flags_has_qt3support" = "x" ; then -+ echo "WARNING: Your Qt3Support package is buggy; it dosn't include the 'QT3_SUPPORT' flag" -+ echo "WARNING: adding it manually" -+ QT_CFLAGS="$QT_CFLAGS -DQT3_SUPPORT" -+ fi -+fi -+AM_CONDITIONAL(have_qt, test -n "$QT_LIBS") -+ - LIBS="$ORIG_X_SAVE_LIBS" - - dnl enable pch for c++ -@@ -155,7 +210,6 @@ AC_SUBST(POPT_LIBS) - - # do NOT put tests here, they will fail in the case X is not installed ! - --AM_CONDITIONAL(have_qt, test -n "$QT_LIB") - - AX_CFLAGS_OPTION(OP_CFLAGS,[-W]) - AX_CXXFLAGS_OPTION(OP_CXXFLAGS,[-W]) -@@ -268,6 +322,16 @@ AC_OUTPUT(Makefile \ - - AX_COPY_IF_CHANGE(doc/xsl/catalog-1.xml, doc/xsl/catalog.xml) - -+if test "x$enable_gui" = "xno" ; then -+ echo "No GUI will be built as it was explicitly disabled." -+else -+ if test -z "$QT_LIBS"; then -+ echo "Warning: QT version $QT_VERSION was requested but not found. No GUI will be built." -+ else -+ echo "Building GUI with QT $QT_VERSION" -+ fi -+fi -+ - if test -z "$QT_LIB"; then - echo "Warning: a working Qt not found; no GUI will be built" - fi ---- a/doc/oprofile.xml -+++ b/doc/oprofile.xml -@@ -190,8 +190,8 @@ For information on how to use OProfile's - - OProfile GUI - -- The use of the GUI to start the profiler requires the Qt 2 library. Qt 3 should -- also work. -+ The use of the GUI to start the profiler requires the Qt library. -+ Either Qt 3 or Qt 4 should work. - - - ---- a/gui/Makefile.am -+++ b/gui/Makefile.am -@@ -14,7 +14,7 @@ EXTRA_DIST = $(dist_sources) - if have_qt - - AM_CPPFLAGS = \ -- @QT_INCLUDES@ \ -+ @QT_CFLAGS@ \ - -I ${top_srcdir}/libop \ - -I ${top_srcdir}/libutil++ \ - -I ${top_srcdir}/libutil -@@ -30,8 +30,7 @@ oprof_start_LDADD = \ - ../libop/libop.a \ - ../libutil/libutil.a \ - ui/liboprof_start.a \ -- @QT_LDFLAGS@ \ -- @QT_LIB@ \ -+ @QT_LIBS@ \ - @X_LIBS@ - - oprof_start.moc.cpp: ${top_srcdir}/gui/oprof_start.h ---- a/gui/oprof_start.cpp -+++ b/gui/oprof_start.cpp -@@ -20,21 +20,37 @@ - #include - #include - -+#if QT3_SUPPORT -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#else - #include --#include --#include --#include --#include --#include - #include - #include - #include - #include - #include - #include -+#include -+#include -+#include -+#include -+#include - #include -+#define Q3ListView QListView -+#endif - --#include "config.h" - #include "oprof_start.h" - #include "op_config.h" - #include "op_config_24.h" -@@ -268,10 +284,10 @@ void oprof_start::fill_events() - namespace { - - /// find the first item with the given text in column 0 or return NULL --QListViewItem * findItem(QListView * view, char const * name) -+Q3ListViewItem * findItem(Q3ListView * view, char const * name) - { - // Qt 2.3.1 does not have QListView::findItem() -- QListViewItem * item = view->firstChild(); -+ Q3ListViewItem * item = view->firstChild(); - - while (item && strcmp(item->text(0).latin1(), name)) - item = item->nextSibling(); -@@ -292,7 +308,7 @@ void oprof_start::setup_default_event() - event_cfgs[descr.name].user_ring_count = 1; - event_cfgs[descr.name].os_ring_count = 1; - -- QListViewItem * item = findItem(events_list, descr.name); -+ Q3ListViewItem * item = findItem(events_list, descr.name); - if (item) - item->setSelected(true); - } -@@ -349,7 +365,7 @@ void oprof_start::read_set_events() - event_cfgs[ev_name].os_ring_count = 1; - } - -- QListViewItem * item = findItem(events_list, ev_name.c_str()); -+ Q3ListViewItem * item = findItem(events_list, ev_name.c_str()); - if (item) - item->setSelected(true); - } -@@ -436,7 +452,7 @@ void oprof_start::fill_events_listbox() - - for (vector::reverse_iterator cit = v_events.rbegin(); - cit != v_events.rend(); ++cit) { -- new QListViewItem(events_list, cit->name.c_str()); -+ new Q3ListViewItem(events_list, cit->name.c_str()); - } - - setUpdatesEnabled(true); -@@ -467,7 +483,7 @@ void oprof_start::display_event(op_event - } - - --bool oprof_start::is_selectable_event(QListViewItem * item) -+bool oprof_start::is_selectable_event(Q3ListViewItem * item) - { - if (item->isSelected()) - return true; -@@ -486,7 +502,7 @@ bool oprof_start::is_selectable_event(QL - - void oprof_start::draw_event_list() - { -- QListViewItem * cur; -+ Q3ListViewItem * cur; - for (cur = events_list->firstChild(); cur; cur = cur->nextSibling()) { - if (is_selectable_event(cur)) - cur->setPixmap(0, *green_pixmap); -@@ -500,7 +516,7 @@ bool oprof_start::alloc_selected_events( - { - vector events; - -- set::const_iterator it; -+ set::const_iterator it; - for (it = selected_events.begin(); it != selected_events.end(); ++it) - events.push_back(find_event_by_name((*it)->text(0).latin1(),0,0)); - -@@ -520,24 +536,24 @@ void oprof_start::event_selected() - // (de)selected item so we record a set of selected items and diff - // it in the appropriate way with the previous list of selected items. - -- set current_selection; -- QListViewItem * cur; -+ set current_selection; -+ Q3ListViewItem * cur; - for (cur = events_list->firstChild(); cur; cur = cur->nextSibling()) { - if (cur->isSelected()) - current_selection.insert(cur); - } - - // First remove the deselected item. -- vector new_deselected; -+ vector new_deselected; - set_difference(selected_events.begin(), selected_events.end(), - current_selection.begin(), current_selection.end(), - back_inserter(new_deselected)); -- vector::const_iterator it; -+ vector::const_iterator it; - for (it = new_deselected.begin(); it != new_deselected.end(); ++it) - selected_events.erase(*it); - - // Now try to add the newly selected item if enough HW resource exists -- vector new_selected; -+ vector new_selected; - set_difference(current_selection.begin(), current_selection.end(), - selected_events.begin(), selected_events.end(), - back_inserter(new_selected)); -@@ -558,7 +574,7 @@ void oprof_start::event_selected() - } - - --void oprof_start::event_over(QListViewItem * item) -+void oprof_start::event_over(Q3ListViewItem * item) - { - op_event_descr const & descr = locate_event(item->text(0).latin1()); - -@@ -566,10 +582,10 @@ void oprof_start::event_over(QListViewIt - if (!is_selectable_event(item)) { - help_str += " conflicts with:"; - -- set::const_iterator it; -+ set::const_iterator it; - for (it = selected_events.begin(); - it != selected_events.end(); ) { -- QListViewItem * temp = *it; -+ Q3ListViewItem * temp = *it; - selected_events.erase(it++); - if (is_selectable_event(item)) { - help_str += " "; -@@ -844,7 +860,7 @@ void oprof_start::on_start_profiler() - - bool one_enable = false; - -- QListViewItem * cur; -+ Q3ListViewItem * cur; - for (cur = events_list->firstChild(); cur; cur = cur->nextSibling()) { - if (!cur->isSelected()) - continue; -@@ -946,7 +962,7 @@ bool oprof_start::save_config() - vector tmpargs; - tmpargs.push_back("--setup"); - -- QListViewItem * cur; -+ Q3ListViewItem * cur; - for (cur = events_list->firstChild(); cur; cur = cur->nextSibling()) { - if (!cur->isSelected()) - continue; ---- a/gui/oprof_start.h -+++ b/gui/oprof_start.h -@@ -16,11 +16,17 @@ - #include - #include - -+#include "config.h" -+ - #include "ui/oprof_start.base.h" - #include "oprof_start_config.h" - - #include "op_events.h" - -+#ifndef QT3_SUPPORT -+#define Q3ListViewItem QListViewItem -+#endif -+ - class QIntValidator; - class QListViewItem; - class QTimerEvent; -@@ -62,7 +68,7 @@ protected slots: - /// events selection change - void event_selected(); - /// the mouse is over an event -- void event_over(QListViewItem *); -+ void event_over(Q3ListViewItem *); - /// state of separate_kernel_cb changed - void on_separate_kernel_cb_changed(int); - /// reset sample files -@@ -121,7 +127,7 @@ private: - void draw_event_list(); - - /// return true if item is selectable or already selected -- bool is_selectable_event(QListViewItem * item); -+ bool is_selectable_event(Q3ListViewItem * item); - - /// try to alloc counters for the selected_events - bool alloc_selected_events() const; -@@ -139,8 +145,8 @@ private: - /// The currently selected events. We must track this because - /// with multiple selection listbox QT doesn't allow to know - /// what is the last selected item. events_selected() update it -- std::set selected_events; -- QListViewItem * current_event; -+ std::set selected_events; -+ Q3ListViewItem * current_event; - - /// current config - config_setting config; ---- a/gui/ui/Makefile.am -+++ b/gui/ui/Makefile.am -@@ -2,7 +2,7 @@ EXTRA_DIST = oprof_start.base.ui - - if have_qt - --AM_CPPFLAGS = @QT_INCLUDES@ -+AM_CPPFLAGS = @QT_CFLAGS@ - - AM_CXXFLAGS = @OP_CXXFLAGS@ - diff --git a/oprofile.changes b/oprofile.changes index 6d15b6b..c2835e3 100644 --- a/oprofile.changes +++ b/oprofile.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Sat Sep 24 16:34:13 UTC 2011 - tonyj@suse.com + +- Upgrade to version 0.9.7. +- Drop unneeded patches. +- Remove non-utf8 characters from changelog + ------------------------------------------------------------------- Tue May 3 03:02:55 UTC 2011 - idoenmez@novell.com @@ -310,8 +317,8 @@ Tue May 13 14:06:49 CEST 2003 - mmj@suse.de Mon Mar 31 13:18:26 CEST 2003 - mmj@suse.de - Update to 0.5.2 including: - · Docu overhaul - · Feature additions + · Docu overhaul + · Feature additions - Bzip2'ed sources - Folded both automake patches into one patch @@ -365,20 +372,20 @@ Tue Feb 4 21:29:58 CET 2003 - mmj@suse.de Tue Feb 4 04:19:45 CET 2003 - mmj@suse.de - Update to oprofile 0.5: - · Pentium IV support, including support for HyperThreading, is + · Pentium IV support, including support for HyperThreading, is supported for 2.5 kernels (currently only in the -mm patchset). - · Timer interrupt support for PA-RISC, ppc64, and sparc64 in 2.5 + · Timer interrupt support for PA-RISC, ppc64, and sparc64 in 2.5 kernels is available. Userspace Alpha support has been added. - · HyperThreading support for Pentium IV on 2.4 kernels is not yet + · HyperThreading support for Pentium IV on 2.4 kernels is not yet available. Note that PA-RISC and Alpha require kernel patches not yet available in a released kernel tree. - · Support for the IA-64 architecture has been added for 2.4 kernels. - · OProfile's userspace now works correctly on all 64-bit platforms. - · A new script, opcontrol, has been added to unify control of the + · Support for the IA-64 architecture has been added for 2.4 kernels. + · OProfile's userspace now works correctly on all 64-bit platforms. + · A new script, opcontrol, has been added to unify control of the OProfile daemon and sample files. On 2.5, this allows separate daemon startup and starting/stopping profiling. - · Fixed upstream to compile with gcc 3.3 - · Several bugfixes + · Fixed upstream to compile with gcc 3.3 + · Several bugfixes ------------------------------------------------------------------- Wed Jan 29 02:13:55 CET 2003 - ro@suse.de diff --git a/oprofile.spec b/oprofile.spec index 36eb872..d0adb8e 100644 --- a/oprofile.spec +++ b/oprofile.spec @@ -24,8 +24,8 @@ License: GPLv2+ ; LGPLv2.1+ Group: Development/Tools/Other AutoReqProv: on PreReq: /usr/sbin/groupadd /usr/sbin/useradd -Version: 0.9.6 -Release: 11 +Version: 0.9.7 +Release: 1 Summary: System-Wide Profiler for Linux Systems BuildRoot: %{_tmppath}/%{name}-%{version}-build Source: %{name}-%{version}.tar.bz2 @@ -36,8 +36,6 @@ Source4: jvmpi.h Source5: README-BEFORE-ADDING-PATCHES Patch1: oprofile-0.9.5-buildfixes.diff Patch2: oprofile-0.9.4-fixes.diff -Patch3: oprofile-qt4.diff -Patch4: oprofile-0.9.6-gcc46.patch %description OProfile is a system-wide profiler for Linux systems, capable of @@ -91,10 +89,8 @@ from supported virtual machines. %prep %setup -q -%patch1 +%patch1 -p1 %patch2 -p1 -%patch3 -p1 -%patch4 -p1 mkdir -p java/include # copy files necessary to build Java agent libraries # libjvmpi_oprofile.so and libjvmti_oprofile.so @@ -108,6 +104,13 @@ autoreconf -fi --prefix=/usr --mandir=%{_mandir} --libdir=%{_libdir} \ --with-kernel-support --with-java=$PWD/java \ --enable-gui=qt4 +# Change DATE/TIME macros to use last change time of oprofile.changes +# See http://lists.opensuse.org/opensuse-factory/2011-05/msg00304.html +modified="$(sed -n '/^----/n;s/ - .*$//;p;q' "%{_sourcedir}/%{name}.changes")" +DATE="\"$(date -d "${modified}" "+%%b %%e %%Y")\"" +TIME="\"$(date -d "${modified}" "+%%R")\"" +find . -type f -regex ".*\.c\|.*\.cpp\|.*\.h" -exec grep -E -e __DATE__ -e __TIME__ {} + +find . -type f -regex ".*\.c\|.*\.cpp\|.*\.h" -exec sed -i "s/__DATE__/${DATE}/g;s/__TIME__/${TIME}/g" {} + make %{?jobs:-j%jobs} %install @@ -138,7 +141,7 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/libjvm[tp]i_oprofile.so %exclude %{_libdir}/libjvm[tp]i_oprofile.*a %doc doc/oprofile.html doc/internals.html doc/opreport.xsd -%doc COPYING README TODO ChangeLog +%doc COPYING README TODO ChangeLog-* %files devel %defattr(-,root,root)