From b09aa5caae7ff44a4151505b062a5cd0334249af6d6468a288281b0ca49ce493 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Lie?= Date: Mon, 25 Feb 2019 16:39:16 +0000 Subject: [PATCH] Accepting request 677983 from GNOME:Next Add patch and refresh spec OBS-URL: https://build.opensuse.org/request/show/677983 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gsound?expand=0&rev=9 --- gsound-gsound-play-Call-setlocale.patch | 28 ++++++++++++++++++++++ gsound.changes | 8 +++++++ gsound.spec | 32 ++++++++++++------------- 3 files changed, 52 insertions(+), 16 deletions(-) create mode 100644 gsound-gsound-play-Call-setlocale.patch diff --git a/gsound-gsound-play-Call-setlocale.patch b/gsound-gsound-play-Call-setlocale.patch new file mode 100644 index 0000000..2dcfd23 --- /dev/null +++ b/gsound-gsound-play-Call-setlocale.patch @@ -0,0 +1,28 @@ +From ef94719d7ec2adfd72b38418754786d4e3346176 Mon Sep 17 00:00:00 2001 +From: Ting-Wei Lan +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 + diff --git a/gsound.changes b/gsound.changes index 7590dd6..5acec5f 100644 --- a/gsound.changes +++ b/gsound.changes @@ -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 diff --git a/gsound.spec b/gsound.spec index 5aaa6c5..ec8415c 100644 --- a/gsound.spec +++ b/gsound.spec @@ -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