Hello community,

here is the log from the commit of package oprofile for openSUSE:Factory
checked in at Wed May 4 14:37:22 CEST 2011.



--------
--- oprofile/oprofile.changes   2010-06-29 17:10:30.000000000 +0200
+++ /mounts/work_src_done/STABLE/oprofile/oprofile.changes      2011-05-03 
05:08:13.000000000 +0200
@@ -1,0 +2,16 @@
+Tue May  3 03:02:55 UTC 2011 - idoen...@novell.com
+
+- Add oprofile-0.9.6-gcc46.patch to fix compilation with gcc 4.6
+
+-------------------------------------------------------------------
+Thu Apr 28 18:33:19 UTC 2011 - to...@novell.com
+
+- Add support for building using qt4 (no bnc)
+
+-------------------------------------------------------------------
+Thu Apr 28 18:14:54 UTC 2011 - to...@novell.com
+
+- Add README-BEFORE-ADDING-PATCHES local file documenting required patch 
+  header
+
+-------------------------------------------------------------------

calling whatdependson for head-i586


New:
----
  README-BEFORE-ADDING-PATCHES
  oprofile-0.9.6-gcc46.patch
  oprofile-qt4.diff

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ oprofile.spec ++++++
--- /var/tmp/diff_new_pack.6FAYMN/_old  2011-05-04 14:31:18.000000000 +0200
+++ /var/tmp/diff_new_pack.6FAYMN/_new  2011-05-04 14:31:18.000000000 +0200
@@ -1,7 +1,7 @@
 #
-# spec file for package oprofile (Version 0.9.6)
+# spec file for package oprofile
 #
-# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,14 +18,14 @@
 
 
 Name:           oprofile
-BuildRequires:  binutils-devel fdupes java2-devel-packages libxslt popt-devel 
qt3-devel update-desktop-files
+BuildRequires:  binutils-devel fdupes java2-devel-packages libxslt popt-devel 
qt-devel update-desktop-files
 Url:            http://oprofile.sourceforge.net/
 License:        GPLv2+ ; LGPLv2.1+
 Group:          Development/Tools/Other
 AutoReqProv:    on
 PreReq:         /usr/sbin/groupadd /usr/sbin/useradd
 Version:        0.9.6
-Release:        3
+Release:        11
 Summary:        System-Wide Profiler for Linux Systems
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 Source:         %{name}-%{version}.tar.bz2
@@ -33,8 +33,11 @@
 Source2:        %{name}.rpmlintrc
 Source3:        baselibs.conf
 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
@@ -90,6 +93,8 @@
 %setup -q
 %patch1
 %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
@@ -102,7 +107,7 @@
 ./configure CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" \
   --prefix=/usr --mandir=%{_mandir} --libdir=%{_libdir} \
   --with-kernel-support --with-java=$PWD/java \
-  --with-qt-libraries=%_libdir/qt3/%_lib
+  --enable-gui=qt4 
 make %{?jobs:-j%jobs}
 
 %install

++++++ README-BEFORE-ADDING-PATCHES ++++++
All patches need to have a patch description header similar to what is used in 
SuSE kernel git tree. Patches added without this will be reverted.  Thanks.

From: Name <email>
Subject: Summary of fix
Date: date
References: bnc#xxxxxx (bugzilla reference if applicable)
Upstream: yes (provide repo/commit-id in description) or no (provide reason)
Signed-Off-by: Name <email> (same as From: if committer is patch author)

Short paragraph describing problem/fix.

References to upstream repo-path/commit-id if applicable.
++++++ oprofile-0.9.6-gcc46.patch ++++++
From: Ismail Doenmez <idoen...@suse.de>
Subject: Fix compilation with gcc 4.6
Date: 09.03.2011
References: N/A
Upstream: yes
Signed-Off-by: William Cohen <wco...@redhat.com>
 
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;
        };
++++++ oprofile-qt4.diff ++++++
From: maynardj <mayna...@us.ibm.com>
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 <to...@suse.de>


    Signed-off-by: Gert Wollny <gw.foss...@gmail.com>
    Acked-by:      Maynard Johnson <mayna...@us.ibm.com>
    
    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 <libgen.h>]])
 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
        <varlistentry>
                <term>OProfile GUI</term>
                <listitem><para>
-                       The use of the GUI to start the profiler requires the 
<filename>Qt 2</filename> library. <filename>Qt 3</filename> should
-                       also work.
+                       The use of the GUI to start the profiler requires the 
<filename>Qt</filename> library.
+                       Either <filename>Qt 3</filename> or <filename>Qt 
4</filename> should work.
                </para></listitem>
        </varlistentry>
        <varlistentry>
--- 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 <fstream>
 #include <algorithm>
 
+#if QT3_SUPPORT
+#include <Qt/qlineedit.h>
+#include <Qt/qcheckbox.h>
+#include <Qt/qtabwidget.h>
+#include <Qt/qmessagebox.h>
+#include <Qt/qvalidator.h>
+#include <Qt/qlabel.h>
+#include <Qt/qpushbutton.h>
+#include <Qt/q3listview.h>
+#include <Qt/q3combobox.h>
+#include <Qt/q3listbox.h>
+#include <Qt/q3filedialog.h>
+#include <Qt/q3buttongroup.h>
+#include <Qt/q3header.h>
+#else
 #include <qlineedit.h>
-#include <qlistview.h>
-#include <qcombobox.h>
-#include <qlistbox.h>
-#include <qfiledialog.h>
-#include <qbuttongroup.h>
 #include <qcheckbox.h>
 #include <qtabwidget.h>
 #include <qmessagebox.h>
 #include <qvalidator.h>
 #include <qlabel.h>
 #include <qpushbutton.h>
+#include <qlistview.h>
+#include <qcombobox.h>
+#include <qlistbox.h>
+#include <qfiledialog.h>
+#include <qbuttongroup.h>
 #include <qheader.h>
+#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<op_event_descr>::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<op_event const *> events;
 
-       set<QListViewItem *>::const_iterator it;
+       set<Q3ListViewItem *>::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<QListViewItem *> current_selection;
-       QListViewItem * cur;
+       set<Q3ListViewItem *> 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<QListViewItem *> new_deselected;
+       vector<Q3ListViewItem *> new_deselected;
        set_difference(selected_events.begin(), selected_events.end(),
                       current_selection.begin(), current_selection.end(),
                       back_inserter(new_deselected));
-       vector<QListViewItem *>::const_iterator it;
+       vector<Q3ListViewItem *>::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<QListViewItem *> new_selected;
+       vector<Q3ListViewItem *> 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<QListViewItem *>::const_iterator it;
+               set<Q3ListViewItem *>::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<string> 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 <map>
 #include <set>
 
+#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<QListViewItem *> selected_events;
-       QListViewItem * current_event;
+       std::set<Q3ListViewItem *> 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@
 

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



Remember to have fun...

-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to