Accepting request 678972 from GNOME:Factory

- Add gsound-gsound-play-Call-setlocale.patch: gsound-play: Call
  setlocale in main function. It is required to correctly show
  translated messages on some locales (bgo#760429).
- Run spec-cleaner, modernize spec.

OBS-URL: https://build.opensuse.org/request/show/678972
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gsound?expand=0&rev=4
This commit is contained in:
Stephan Kulow 2019-03-01 19:28:07 +00:00 committed by Git OBS Bridge
commit cc1639fc97
3 changed files with 52 additions and 16 deletions

View File

@ -0,0 +1,28 @@
From ef94719d7ec2adfd72b38418754786d4e3346176 Mon Sep 17 00:00:00 2001
From: Ting-Wei Lan <lantw@src.gnome.org>
Date: Mon, 11 Jan 2016 14:14:30 +0800
Subject: [PATCH] gsound-play: Call setlocale in main function
It is required to correctly show translated messages on some locales.
https://bugzilla.gnome.org/show_bug.cgi?id=760429
---
tools/gsound-play.vala | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/gsound-play.vala b/tools/gsound-play.vala
index 298ba20..e3a5268 100644
--- a/tools/gsound-play.vala
+++ b/tools/gsound-play.vala
@@ -55,6 +55,8 @@ async void play() throws Error
int main(string[] args)
{
+ Intl.setlocale (LocaleCategory.ALL, "");
+
Environment.set_application_name("gsound-play");
var opt_ctx = new OptionContext();
--
2.18.1

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Thu Feb 21 11:30:48 UTC 2019 - bjorn.lie@gmail.com
- Add gsound-gsound-play-Call-setlocale.patch: gsound-play: Call
setlocale in main function. It is required to correctly show
translated messages on some locales (bgo#760429).
- Run spec-cleaner, modernize spec.
-------------------------------------------------------------------
Mon Mar 5 14:52:47 UTC 2018 - jengelh@inai.de

View File

@ -1,7 +1,7 @@
#
# spec file for package gsound
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2014 Bjørn Lie, Bryne, Norway.
#
# All modifications and additions to the file contributed by third parties
@ -13,19 +13,23 @@
# 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 lib%{name}0
Name: gsound
Version: 1.0.2
Release: 0
Summary: A library for playing system sounds
License: LGPL-2.1-only
Group: Development/Libraries/GNOME
Url: https://wiki.gnome.org/Projects/GSound
Source: http://download.gnome.org/sources/gsound/1.0/gsound-%{version}.tar.xz
URL: https://wiki.gnome.org/Projects/GSound
Source0: https://download.gnome.org/sources/gsound/1.0/gsound-%{version}.tar.xz
# PATCH-FIX-UPSTREAM gsound-gsound-play-Call-setlocale.patch -- gsound-play: Call setlocale in main function
Patch0: gsound-gsound-play-Call-setlocale.patch
BuildRequires: pkgconfig
BuildRequires: pkgconfig(gobject-introspection-1.0)
BuildRequires: pkgconfig(libcanberra)
@ -71,34 +75,31 @@ This package provides files needed for developing
applications with gsound.
%prep
%setup -q
%autosetup -p1
%build
%configure --disable-static --enable-vala
make %{?_smp_mflags}
%configure \
--disable-static \
--enable-vala \
%{nil}
%make_build
%install
make DESTDIR=%{buildroot} install %{?_smp_mflags}
# REMOVE libtool archive
rm %{buildroot}%{_libdir}/libgsound.la
%make_install
find %{buildroot} -type f -name "*.la" -delete -print
%post -n %{soname} -p /sbin/ldconfig
%postun -n %{soname} -p /sbin/ldconfig
%files
%defattr(-,root,root)
%doc ChangeLog README
%{_bindir}/gsound-play
%files -n %{soname}
%defattr(-,root,root)
%license COPYING
%{_libdir}/libgsound.so.*
%files devel
%defattr(-,root,root)
%{_datadir}/gir-1.0/GSound-1.0.gir
%{_datadir}/gtk-doc/html/gsound/
%{_datadir}/vala/vapi/gsound.deps
@ -110,7 +111,6 @@ rm %{buildroot}%{_libdir}/libgsound.la
%{_libdir}/pkgconfig/gsound.pc
%files -n typelib-1_0-GSound-1_0
%defattr(-,root,root)
%{_libdir}/girepository-1.0/GSound-1.0.typelib
%changelog