Hello community,

here is the log from the commit of package c++-gtk-utils for openSUSE:Factory 
checked in at 2020-05-02 22:17:14
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/c++-gtk-utils (Old)
 and      /work/SRC/openSUSE:Factory/.c++-gtk-utils.new.2738 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "c++-gtk-utils"

Sat May  2 22:17:14 2020 rev:31 rq:799473 version:2.2.19

Changes:
--------
--- /work/SRC/openSUSE:Factory/c++-gtk-utils/c++-gtk-utils.changes      
2018-02-03 15:42:36.837058957 +0100
+++ /work/SRC/openSUSE:Factory/.c++-gtk-utils.new.2738/c++-gtk-utils.changes    
2020-05-02 22:17:17.280529838 +0200
@@ -1,0 +2,19 @@
+Wed Apr 29 23:57:32 UTC 2020 - Atri Bhattacharya <[email protected]>
+
+- Update to version 2.2.19:
+  + Use autoconf's TAP support for running tests.
+  + Cater for guile-3.0 declarative modules.
+  + Suppress GStaticRecMutex deprecation warnings.
+- Changes from versions 2.2.16 through 2.2.18: See installed
+  ChangeLog file.
+- Convert to multibuild format to build flavours for gtk2, gtk3,
+  and gtk4.
+- Add BuildRequires: autoconf which is needed when building gtk2
+  and gtk4 flavours where the configure script is modified before
+  running %configure.
+- Add c++-gtk-utils-gtk4-3.98-fixes.patch to fix compilation
+  against gtk4 >= 3.98; combined from upstream git master commits
+  3589475, 687abc, 847e9b, and 97eb26 and rebased to apply cleanly
+  using quilt.
+
+-------------------------------------------------------------------

Old:
----
  c++-gtk-utils-2.2.15.tar.gz

New:
----
  _multibuild
  c++-gtk-utils-2.2.19.tar.gz
  c++-gtk-utils-gtk4-3.98-fixes.patch

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

Other differences:
------------------
++++++ c++-gtk-utils.spec ++++++
--- /var/tmp/diff_new_pack.IlEuTu/_old  2020-05-02 22:17:17.992531329 +0200
+++ /var/tmp/diff_new_pack.IlEuTu/_new  2020-05-02 22:17:17.996531338 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package c++-gtk-utils
 #
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
 # Copyright (c) 2012 Malcolm J Lewis <[email protected]>
 #
 # All modifications and additions to the file contributed by third parties
@@ -13,30 +13,63 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
 
-%define         soname 2_2-0
+%global flavor @BUILD_FLAVOR@%{nil}
+%global soname 2_2-0
 
-Name:           c++-gtk-utils
-Version:        2.2.15
+%global srcname c++-gtk-utils
+
+%if "%{flavor}" == ""
+ExclusiveArch:  do_not_build
+%define pkgname %{srcname}
+%endif
+
+%if "%{flavor}" == "gtk2"
+%bcond_without gtk
+%define _gtk 2
+%define config_script configure-gtk2
+%define gtk_dev_pkg pkgconfig(gtk+-2.0)
+%define pkgname %{srcname}-gtk%{_gtk}
+%endif
+
+%if "%{flavor}" == "gtk3"
+%bcond_without gtk
+%define _gtk 3
+%define config_script configure
+%define gtk_dev_pkg pkgconfig(gtk+-3.0)
+%define pkgname %{srcname}-gtk%{_gtk}
+%endif
+
+%if "%{flavor}" == "gtk4"
+%bcond_without gtk
+%define _gtk 4
+%define config_script configure-gtk4
+%define gtk_dev_pkg pkgconfig(gtk4)
+%define pkgname %{srcname}-gtk%{_gtk}
+%endif
+
+%define libname libcxx-gtk-utils-%{_gtk}-%{soname}
+%define devname libcxx-gtk-utils-%{_gtk}-devel
+
+Name:           %{pkgname}
+Version:        2.2.19
 Release:        0
 Summary:        Lightweight library for GTK+ programs using C++
-License:        LGPL-2.1
+License:        LGPL-2.1-only
 Group:          System/Libraries
-Url:            http://cxx-gtk-utils.sourceforge.net/
-Source0:        
http://downloads.sourceforge.net/project/cxx-gtk-utils/cxx-gtk-utils/%{version}/c++-gtk-utils-%{version}.tar.gz
+URL:            http://cxx-gtk-utils.sourceforge.net/
+Source0:        
http://downloads.sourceforge.net/project/cxx-gtk-utils/cxx-gtk-utils/%{version}/%{srcname}-%{version}.tar.gz
+# PATCH-FIX-UPSTREAM c++-gtk-utils-gtk4-3.98-fixes.patch [email protected] 
-- Fix compilation against gtk4 >= 3.98; patch taken from upstream git commits
+Patch0:         c++-gtk-utils-gtk4-3.98-fixes.patch
+BuildRequires:  autoconf
 BuildRequires:  gcc-c++
 BuildRequires:  guile-devel
-%if 0%{?favor_gtk2}
-%define         _gtk 2
-BuildRequires:  gtk2-devel
-%else
-%define         _gtk 3
-BuildRequires:  gtk3-devel
+%if %{with gtk}
+BuildRequires:  %{gtk_dev_pkg}
 %endif
-BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 
 %description
 This is a lightweight library containing a number of classes and
@@ -44,59 +77,63 @@
 environments, where the user does not want to use a full-on wrapper
 such as gtkmm or wxWidgets.
 
-%package -n libcxx-gtk-utils-%{_gtk}-%{soname}
+%package -n %{libname}
 Summary:        Lightweight library for GTK+ programs using C++
 Group:          System/Libraries
 
-%description -n libcxx-gtk-utils-%{_gtk}-%{soname}
+%description -n %{libname}
 This is a lightweight library containing a number of classes and
 functions for programming GTK+ programs using C++ in POSIX (unix-like)
 environments, where the user does not want to use a full-on wrapper
 such as gtkmm or wxWidgets.
 
-%package -n libcxx-gtk-utils-%{_gtk}-devel
+%package -n %{devname}
 Summary:        Lightweight library for GTK+ programs using C++ -- Development 
Files
 Group:          Development/Libraries/C and C++
-Requires:       libcxx-gtk-utils-%{_gtk}-%{soname} = %{version}
+Requires:       %{libname} = %{version}
 
-%description -n libcxx-gtk-utils-%{_gtk}-devel
+%description -n %{devname}
 This is a lightweight library containing a number of classes and
 functions for programming GTK+ programs using C++ in POSIX (unix-like)
 environments, where the user does not want to use a full-on wrapper
 such as gtkmm or wxWidgets.
 
 %prep
-%setup -q
+%autosetup -n %{srcname}-%{version} -p1
 
 %build
-%if 0%{?favor_gtk2}
-cp -a configure-gtk2 configure
-cp -a configure-gtk2.ac configure.ac
-%endif
+if [ "%{config_script}" != "configure" ]
+then
+  cp -a %{config_script} configure
+  cp -a %{config_script}.ac configure.ac
+fi
+
 %configure \
     --disable-static \
-    --docdir=%{_docdir}/%{name}
-make %{?_smp_flags}
+    --docdir=%{_docdir}/%{pkgname} \
+    %{?with_gtk:--with-gtk} \
+    %{!?with_gtk:--without-gtk} \
+    %{nil}
+%make_build
 
 %install
 %make_install
 # Clean up
-find %{buildroot}%{_libdir} -name '*.la' -type f -delete -print
+find %{buildroot} -type f -name "*.la" -delete -print
 
-%post -n libcxx-gtk-utils-%{_gtk}-%{soname} -p /sbin/ldconfig
+%post -n %{libname} -p /sbin/ldconfig
+%postun -n %{libname} -p /sbin/ldconfig
 
-%postun -n libcxx-gtk-utils-%{_gtk}-%{soname} -p /sbin/ldconfig
-
-%files -n libcxx-gtk-utils-%{_gtk}-%{soname}
-%defattr(-,root,root,-)
-%doc COPYING NEWS
+%files -n %{libname}
+%license COPYING
+%doc NEWS
 %{_libdir}/libcxx-gtk-utils-%{_gtk}-2.2.so.*
 
-%files -n libcxx-gtk-utils-%{_gtk}-devel
-%defattr(-,root,root,-)
+%files -n %{devname}
 %doc ChangeLog
-%doc %{_docdir}/%{name}
+%doc %{_docdir}/%{pkgname}
 %{_includedir}/c++-gtk-utils-%{_gtk}-2.2/
 %{_libdir}/libcxx-gtk-utils-%{_gtk}-2.2.so
 %{_libdir}/pkgconfig/c++-gtk-utils-%{_gtk}-2.2.pc
+
 %changelog

++++++ _multibuild ++++++
<multibuild>
  <package>gtk2</package>
  <package>gtk3</package>
  <package>gtk4</package>
</multibuild>

++++++ c++-gtk-utils-2.2.15.tar.gz -> c++-gtk-utils-2.2.19.tar.gz ++++++
++++ 103223 lines of diff (skipped)

++++++ c++-gtk-utils-gtk4-3.98-fixes.patch ++++++
commit 3589475a9da1d2bdd7e450617c5ecb0673ed9e8b
Author: Chris Vine <[email protected]>
Date:   Fri Feb 14 22:59:52 2020 +0000

    Add fixes for gtk-3.98.0

Index: c++-gtk-utils-2.2.19/ChangeLog
===================================================================
--- c++-gtk-utils-2.2.19.orig/ChangeLog
+++ c++-gtk-utils-2.2.19/ChangeLog
@@ -1,3 +1,11 @@
+In sourceforge git
+------------------
+
+       Add fixes for gtk-3.98.0 and gtk-3.98.1 (file_print_manager.cpp,
+       text_print_manager.cpp, window.h, window.cpp;
+       tests/extra/test_file_print_manager.cpp,
+       tests/extra/test_text_print_manager.cpp).
+
 Version 2.2.19 (27 January 2020)
 --------------
 
Index: c++-gtk-utils-2.2.19/c++-gtk-utils/file_print_manager.cpp
===================================================================
--- c++-gtk-utils-2.2.19.orig/c++-gtk-utils/file_print_manager.cpp
+++ c++-gtk-utils-2.2.19/c++-gtk-utils/file_print_manager.cpp
@@ -86,16 +86,14 @@ FilePrintDialog::FilePrintDialog(GtkWind
                                            true, parent_p,
                                            
(GtkWindow*)gtk_print_unix_dialog_new(0, 0)) {
 
-#if GTK_CHECK_VERSION(3,94,0)
-  gtk_window_set_type_hint(get_win(), GDK_SURFACE_TYPE_HINT_DIALOG);
-#else
+#if !(GTK_CHECK_VERSION(3,94,0))
   gtk_window_set_type_hint(get_win(), GDK_WINDOW_TYPE_HINT_DIALOG);
+  gtk_window_set_position(get_win(), GTK_WIN_POS_CENTER_ON_PARENT);
 #endif
 
   g_signal_connect((GObject*)get_win(), "response",
                   G_CALLBACK(cgu_fpd_selected), this);
 
-  gtk_window_set_position(get_win(), GTK_WIN_POS_CENTER_ON_PARENT);
   gtk_window_set_resizable(get_win(), false);
 
   if (print_settings_p) {
Index: c++-gtk-utils-2.2.19/c++-gtk-utils/window.cpp
===================================================================
--- c++-gtk-utils-2.2.19.orig/c++-gtk-utils/window.cpp
+++ c++-gtk-utils-2.2.19/c++-gtk-utils/window.cpp
@@ -24,14 +24,17 @@ License as follows:
 
 #include <c++-gtk-utils/lib_defs.h>
 
-#include <glib.h>
-
 #include <c++-gtk-utils/window.h>
 #include <c++-gtk-utils/application.h>
 #include <c++-gtk-utils/thread.h>
 
 #ifdef CGU_USE_GTK
 
+// with GTK >= 3.98.0 we include glib.h in window.h
+#if !(GTK_CHECK_VERSION(3,98,0))
+#include <glib.h>
+#endif
+
 namespace Cgu {
 class WinBase::CB {
 public:
@@ -101,7 +104,11 @@ WinBase::WinBase(const char* caption, Gd
 #endif
                 GtkWindow* parent_p_, GtkWindow* window_p):
                             in_exec_loop(false), is_modal(modal),
-                            close_guard(false), parent_p(parent_p_) {
+                            close_guard(false), parent_p(parent_p_)
+#if GTK_CHECK_VERSION(3,98,0)
+                            , loop(0)
+#endif
+{
 
 #if GTK_CHECK_VERSION(2,99,0)
   app_p = 0;
@@ -109,7 +116,11 @@ WinBase::WinBase(const char* caption, Gd
 
   if (window_p) g_window_p = window_p;
   else {
+#if GTK_CHECK_VERSION(3,98,1)
+    g_window_p = (GtkWindow*)gtk_window_new();
+#else
     g_window_p = (GtkWindow*)gtk_window_new(GTK_WINDOW_TOPLEVEL);
+#endif
   }
   
   if (caption) gtk_window_set_title(g_window_p, caption);
@@ -151,8 +162,11 @@ WinBase::~WinBase() {
   // one of its callbacks so hoping to destroy itself by going out of scope but
   // has caused this WinBase object to unblock instead - this further call to
   // gtk_main_quit() will balance up the recursive calls to gtk_main() to 
ensure
-  // that both the parent and this object are unblocked and so destroyed)
+  // that both the parent and this object are unblocked and so destroyed).  
This
+  // shouldn't happen with GTK4.
+#if !(GTK_CHECK_VERSION(3,98,0))
   if (in_exec_loop) gtk_main_quit();
+#endif
 }
 
 int WinBase::get_exec_val() const {
@@ -176,7 +190,11 @@ void WinBase::close() {
   gtk_widget_hide(GTK_WIDGET(g_window_p));
   if (in_exec_loop) {
     in_exec_loop = false;
+#if GTK_CHECK_VERSION(3,98,0)
+    g_main_loop_quit(loop);
+#else
     gtk_main_quit();
+#endif
   }
   // if we have not called exec(), then the dialog is self-owning
   // and it is safe and necessary to call 'delete this'
@@ -203,7 +221,14 @@ int WinBase::exec() {
 #endif
 
   in_exec_loop = true;
+#if GTK_CHECK_VERSION(3,98,0)
+  loop = g_main_loop_new(0, false);
+  g_main_loop_run(loop);
+  g_main_loop_unref(loop);
+  loop = 0;
+#else
   gtk_main();
+#endif
   return get_exec_val();
 }
 
Index: c++-gtk-utils-2.2.19/c++-gtk-utils/window.h
===================================================================
--- c++-gtk-utils-2.2.19.orig/c++-gtk-utils/window.h
+++ c++-gtk-utils-2.2.19/c++-gtk-utils/window.h
@@ -29,6 +29,9 @@ License as follows:
 
 #ifdef CGU_USE_GTK
 #include <gtk/gtk.h>
+#if GTK_CHECK_VERSION(3,98,0)
+#include <glib.h> // for GMainLoop
+#endif
 #endif
 
 /** 
@@ -241,6 +244,10 @@ class WinBase {
   void unset_application() {app_p = 0;}
 #endif
 
+#if GTK_CHECK_VERSION(3,98,0)
+  GMainLoop* loop;
+#endif
+
 protected:
   /**
    * A function for the use of derived classes which will cause the
Index: c++-gtk-utils-2.2.19/c++-gtk-utils/text_print_manager.cpp
===================================================================
--- c++-gtk-utils-2.2.19.orig/c++-gtk-utils/text_print_manager.cpp
+++ c++-gtk-utils-2.2.19/c++-gtk-utils/text_print_manager.cpp
@@ -1,4 +1,4 @@
-/* Copyright (C) 2007, 2011, 2013 and 2017 to 2019 Chris Vine
+/* Copyright (C) 2007, 2011, 2013 and 2017 to 2020 Chris Vine
 
 The library comprised in this file or of which this file is part is
 distributed by Chris Vine under the GNU Lesser General Public
@@ -611,7 +611,10 @@ GObject* TextPrintManager::create_custom
   GtkGrid* grid_p = (GtkGrid*)gtk_grid_new();
   g_object_set(grid_p,
               "valign", GTK_ALIGN_CENTER,
-              "margin", 12,
+              "margin-top", 15,
+              "margin-bottom", 15,
+              "margin-start", 15,
+              "margin-end", 15,
               static_cast<void*>(0));
   gtk_grid_attach(grid_p, font_label_p, 0, 0, 1, 1);
   gtk_grid_attach(grid_p, font_entry_h, 1, 0, 1, 1);
Index: c++-gtk-utils-2.2.19/tests/extra/test_file_print_manager.cpp
===================================================================
--- c++-gtk-utils-2.2.19.orig/tests/extra/test_file_print_manager.cpp
+++ c++-gtk-utils-2.2.19/tests/extra/test_file_print_manager.cpp
@@ -1,4 +1,4 @@
-/* Copyright (C) 2012, 2017 and 2018 Chris Vine
+/* Copyright (C) 2012, 2017, 2018 and 2020 Chris Vine
 
 The library comprised in this file or of which this file is part is
 distributed by Chris Vine under the GNU Lesser General Public
@@ -57,7 +57,12 @@ void message_button_clicked(GtkWidget* w
 ProgWin::ProgWin(): WinBase{"Print test", 0, false} {
 #if GTK_CHECK_VERSION(3,96,0)
   GtkWidget* box = gtk_box_new(GTK_ORIENTATION_VERTICAL, 2);
-  g_object_set(box, "margin", 5, static_cast<void*>(0));
+  g_object_set(box,
+              "margin-bottom", 5,
+              "margin-top", 5,
+              "margin-start", 5,
+              "margin-end", 5,
+              static_cast<void*>(0));
   gtk_container_add(GTK_CONTAINER(get_win()), box);
   GtkWidget* label = gtk_label_new("Print test page?");
   gtk_widget_set_vexpand(label, true);
Index: c++-gtk-utils-2.2.19/tests/extra/test_text_print_manager.cpp
===================================================================
--- c++-gtk-utils-2.2.19.orig/tests/extra/test_text_print_manager.cpp
+++ c++-gtk-utils-2.2.19/tests/extra/test_text_print_manager.cpp
@@ -1,4 +1,4 @@
-/* Copyright (C) 2012, 2013, 2017 and 2018 Chris Vine
+/* Copyright (C) 2012, 2013, 2017, 2018 and 2020 Chris Vine
 
 The library comprised in this file or of which this file is part is
 distributed by Chris Vine under the GNU Lesser General Public
@@ -62,7 +62,12 @@ void message_button_clicked(GtkWidget* w
 ProgWin::ProgWin(): WinBase{"Print test", 0, false} {
 #if GTK_CHECK_VERSION(3,96,0)
   GtkWidget* box = gtk_box_new(GTK_ORIENTATION_VERTICAL, 2);
-  g_object_set(box, "margin", 5, static_cast<void*>(0));
+  g_object_set(box,
+              "margin-bottom", 5,
+              "margin-top", 5,
+              "margin-start", 5,
+              "margin-end", 5,
+              static_cast<void*>(0));
   gtk_container_add(GTK_CONTAINER(get_win()), box);
 
   GtkWidget* label = gtk_label_new("Print test page?");

Reply via email to