SHA256
1
0
forked from pool/libcanberra

4 Commits

Author SHA256 Message Date
8ead21ce4e Accepting request 1254325 from GNOME:Factory
OBS-URL: https://build.opensuse.org/request/show/1254325
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libcanberra?expand=0&rev=50
2025-03-20 18:23:40 +00:00
57e9ac68d2 - Change license to LGPL-2.1-or-later, per legal review.
OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/libcanberra?expand=0&rev=81
2025-03-19 08:33:15 +00:00
0b5446a0aa Accepting request 1232785 from GNOME:Factory
OBS-URL: https://build.opensuse.org/request/show/1232785
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libcanberra?expand=0&rev=49
2024-12-20 14:24:38 +00:00
24b4c4a4cf - Update to version v0.30+2:
+ gtk: Don't assume all GdkDisplays are GdkX11Displays.
- Migrate package to obs_scm: we don't expect changes in git to
  happen anymore, but it's the line used across all GNOME packages.
- Call autogen.sh in build section: the git checkout is not
  bootstrapped.
- Drop libcanberra-broadway-fix.patch: part of the upstream git
  tree.
- Pass --with-systemdunitdir=no to configure: dbus-broker newly
  pulls in systemd, but we have been running without those service
  files for like ever. With libcanberra being in maintenance only
  mode, there seems to be no justification to change this now.
- Do not package documentation: building them requires lynx, which
  seems a bit exaggerated.

OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/libcanberra?expand=0&rev=79
2024-12-20 08:07:08 +00:00
7 changed files with 67 additions and 95 deletions

19
_service Normal file
View File

@@ -0,0 +1,19 @@
<?xml version="1.0"?>
<services>
<service name="obs_scm" mode="manual">
<param name="scm">git</param>
<param name="url">http://git.0pointer.net/clone/libcanberra.git</param>
<param name="revision">master</param>
<param name="versionformat">@PARENT_TAG@+@TAG_OFFSET@</param>
<param name="versionrewrite-pattern">v?(.*)(\+0)?</param>
<param name="versionrewrite-replacement">\1</param>
<!-- <param name="changesgenerate">enable</param> -->
</service>
<service name="tar" mode="buildtime"/>
<service name="recompress" mode="buildtime">
<param name="file">*.tar</param>
<param name="compression">zst</param>
</service>
<service name="set_version" mode="manual" />
</services>

BIN
libcanberra-0.30+2.obscpio LFS Normal file

Binary file not shown.

Binary file not shown.

View File

@@ -1,71 +0,0 @@
From c0620e432650e81062c1967cc669829dbd29b310 Mon Sep 17 00:00:00 2001
From: Michael Meeks <michael.meeks@suse.com>
Date: Fri, 9 Nov 2012 16:16:40 +0000
Subject: [PATCH] gtk: Don't assume all GdkDisplays are GdkX11Displays:
broadway/wayland
---
src/canberra-gtk-module.c | 15 +++++++++++++++
src/canberra-gtk.c | 5 +++++
2 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/src/canberra-gtk-module.c b/src/canberra-gtk-module.c
index 67791f0..c1532ab 100644
--- a/src/canberra-gtk-module.c
+++ b/src/canberra-gtk-module.c
@@ -307,6 +307,11 @@ static gint window_get_desktop(GdkDisplay *d, GdkWindow *w) {
guchar *data = NULL;
gint ret = -1;
+#ifdef GDK_IS_X11_DISPLAY
+ if (!GDK_IS_X11_DISPLAY(d))
+ return 0;
+#endif
+
if (XGetWindowProperty(GDK_DISPLAY_XDISPLAY(d), GDK_WINDOW_XID(w),
gdk_x11_get_xatom_by_name_for_display(d, "_NET_WM_DESKTOP"),
0, G_MAXLONG, False, XA_CARDINAL, &type_return,
@@ -335,6 +340,11 @@ static gint display_get_desktop(GdkDisplay *d) {
guchar *data = NULL;
gint ret = -1;
+#ifdef GDK_IS_X11_DISPLAY
+ if (!GDK_IS_X11_DISPLAY(d))
+ return 0;
+#endif
+
if (XGetWindowProperty(GDK_DISPLAY_XDISPLAY(d), DefaultRootWindow(GDK_DISPLAY_XDISPLAY(d)),
gdk_x11_get_xatom_by_name_for_display(d, "_NET_CURRENT_DESKTOP"),
0, G_MAXLONG, False, XA_CARDINAL, &type_return,
@@ -365,6 +375,11 @@ static gboolean window_is_xembed(GdkDisplay *d, GdkWindow *w) {
gboolean ret = FALSE;
Atom xembed;
+#ifdef GDK_IS_X11_DISPLAY
+ if (!GDK_IS_X11_DISPLAY(d))
+ return FALSE;
+#endif
+
/* Gnome Panel applets are XEMBED windows. We need to make sure we
* ignore them */
diff --git a/src/canberra-gtk.c b/src/canberra-gtk.c
index 34446f5..08cb668 100644
--- a/src/canberra-gtk.c
+++ b/src/canberra-gtk.c
@@ -185,6 +185,11 @@ static gint window_get_desktop(GdkDisplay *d, GdkWindow *w) {
guchar *data = NULL;
gint ret = -1;
+#ifdef GDK_IS_X11_DISPLAY
+ if (!GDK_IS_X11_DISPLAY(d))
+ return 0;
+#endif
+
if (XGetWindowProperty(GDK_DISPLAY_XDISPLAY(d), GDK_WINDOW_XID(w),
gdk_x11_get_xatom_by_name_for_display(d, "_NET_WM_DESKTOP"),
0, G_MAXLONG, False, XA_CARDINAL, &type_return,
--
1.7.7

View File

@@ -1,3 +1,26 @@
-------------------------------------------------------------------
Tue Mar 18 21:07:36 UTC 2025 - Michael Gorse <mgorse@suse.com>
- Change license to LGPL-2.1-or-later, per legal review.
-------------------------------------------------------------------
Thu Dec 19 10:17:46 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>
- Update to version v0.30+2:
+ gtk: Don't assume all GdkDisplays are GdkX11Displays.
- Migrate package to obs_scm: we don't expect changes in git to
happen anymore, but it's the line used across all GNOME packages.
- Call autogen.sh in build section: the git checkout is not
bootstrapped.
- Drop libcanberra-broadway-fix.patch: part of the upstream git
tree.
- Pass --with-systemdunitdir=no to configure: dbus-broker newly
pulls in systemd, but we have been running without those service
files for like ever. With libcanberra being in maintenance only
mode, there seems to be no justification to change this now.
- Do not package documentation: building them requires lynx, which
seems a bit exaggerated.
-------------------------------------------------------------------
Thu Apr 4 12:56:22 UTC 2024 - Fabian Vogt <fvogt@suse.com>

4
libcanberra.obsinfo Normal file
View File

@@ -0,0 +1,4 @@
name: libcanberra
version: 0.30+2
mtime: 1352503095
commit: c0620e432650e81062c1967cc669829dbd29b310

View File

@@ -1,7 +1,7 @@
#
# spec file for package libcanberra
#
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -18,19 +18,17 @@
%define debug_package_requires libcanberra0 = %{version}-%{release}
Name: libcanberra
Version: 0.30
Version: 0.30+2
Release: 0
Summary: Portable sound event library
License: LGPL-2.0-or-later
License: LGPL-2.1-or-later
Group: Development/Libraries/GNOME
URL: http://0pointer.de/lennart/projects/libcanberra
Source: http://0pointer.de/lennart/projects/libcanberra/%{name}-%{version}.tar.xz
Source: %{name}-%{version}.tar.zst
Source1: libcanberra-gtk-module.sh
Source99: baselibs.conf
# PATCH-FIX-UPSTREAM libcanberra-multi-backend.patch boo#753243 fdo#51662 dimstar@opensuse.org -- Set the multi backend as default and allow it actually to work.
Patch0: libcanberra-multi-backend.patch
# PATCH-FIX-UPSTREAM libcanberra-broadway-fix.patch boo#789066 michael.meeks@suse.com
Patch1: libcanberra-broadway-fix.patch
BuildRequires: gtk-doc
BuildRequires: libltdl-devel
BuildRequires: pkgconfig
@@ -217,13 +215,15 @@ This package provides the development files for libcanberra-gtk2.
cp %{SOURCE1} libcanberra-gtk-module.sh
%build
%configure \
--disable-static \
--enable-pulse \
--enable-alsa \
--enable-null \
--disable-oss \
--enable-udev \
./autogen.sh
%configure \
--disable-static \
--enable-pulse \
--enable-alsa \
--enable-null \
--disable-oss \
--enable-udev \
--with-systemdsystemunitdir=no \
--with-builtin=dso
make %{?_smp_mflags} V=1
@@ -231,7 +231,6 @@ make %{?_smp_mflags} V=1
%make_install
install -Dpm 0755 libcanberra-gtk-module.sh \
%{buildroot}%{_sysconfdir}/X11/xinit/xinitrc.d/libcanberra-gtk-module.sh
rm %{buildroot}%{_datadir}/doc/libcanberra/README
%suse_update_desktop_file %{buildroot}%{_datadir}/gnome/autostart/libcanberra-login-sound.desktop
%suse_update_desktop_file %{buildroot}%{_datadir}/gdm/autostart/LoginWindow/libcanberra-ready-sound.desktop
@@ -246,14 +245,13 @@ find %{buildroot} -type f -name "*.la" -delete -print
%postun gtk3-0 -p /sbin/ldconfig
%files -n libcanberra0
%doc README
%license LGPL
%{_libdir}/libcanberra.so.*
%dir %{_libdir}/libcanberra-%{version}/
%{_libdir}/libcanberra-%{version}/libcanberra-alsa.so
%{_libdir}/libcanberra-%{version}/libcanberra-multi.so
%{_libdir}/libcanberra-%{version}/libcanberra-null.so
%{_libdir}/libcanberra-%{version}/libcanberra-pulse.so
%dir %{_libdir}/libcanberra-*/
%{_libdir}/libcanberra-*/libcanberra-alsa.so
%{_libdir}/libcanberra-*/libcanberra-multi.so
%{_libdir}/libcanberra-*/libcanberra-null.so
%{_libdir}/libcanberra-*/libcanberra-pulse.so
%files gtk0
%{_libdir}/libcanberra-gtk.so.*
@@ -299,7 +297,6 @@ find %{buildroot} -type f -name "*.la" -delete -print
%{_libdir}/pkgconfig/libcanberra-gtk3.pc
%files devel
%doc %{_datadir}/gtk-doc/html/libcanberra/
%{_includedir}/canberra.h
%{_includedir}/canberra-gtk.h
%{_libdir}/libcanberra.so