Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] supertux2: fix locale on musl, remove -data subpackage.
@ 2020-12-09 19:28 ericonr
  2020-12-09 20:32 ` [PR PATCH] [Updated] " ericonr
  2020-12-11  1:54 ` [PR PATCH] [Merged]: " ericonr
  0 siblings, 2 replies; 3+ messages in thread
From: ericonr @ 2020-12-09 19:28 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 457 bytes --]

There is a new pull request by ericonr against master on the void-packages repository

https://github.com/ericonr/void-packages supertux
https://github.com/void-linux/void-packages/pull/27054

supertux2: fix locale on musl, remove -data subpackage.
Unless LANG was 'C', supertux2 would immediately abort when launched.

The data subpackage is no longer necessary.

A patch file from https://github.com/void-linux/void-packages/pull/27054.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-supertux-27054.patch --]
[-- Type: text/x-diff, Size: 3171 bytes --]

From 4ccfedacd41fd7bc22b5ad181beee9328da6f1e2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Wed, 9 Dec 2020 16:24:11 -0300
Subject: [PATCH] supertux2: fix locale on musl, remove -data subpackage.

Unless LANG was 'C', supertux2 would immediately abort when launched.

The data subpackage is no longer necessary.
---
 srcpkgs/supertux2/patches/locale.patch | 36 ++++++++++++++++++++++++++
 srcpkgs/supertux2/template             | 11 ++------
 2 files changed, 38 insertions(+), 9 deletions(-)
 create mode 100644 srcpkgs/supertux2/patches/locale.patch

diff --git a/srcpkgs/supertux2/patches/locale.patch b/srcpkgs/supertux2/patches/locale.patch
new file mode 100644
index 00000000000..ca3dfb74923
--- /dev/null
+++ b/srcpkgs/supertux2/patches/locale.patch
@@ -0,0 +1,36 @@
+commit 4380f504fbd51aa9ef7eb222b0bced481402fa7d
+Author: Érico Rolim <erico.erc@gmail.com>
+Date:   Wed Dec 9 16:22:22 2020 -0300
+
+    supertux/main: add try-catch for locale initialization.
+    
+    Fixes #1564.
+
+diff --git src/supertux/main.cpp src/supertux/main.cpp
+index ad5e3fde6..c33627e18 100644
+--- src/supertux/main.cpp
++++ src/supertux/main.cpp
+@@ -563,10 +563,19 @@ Main::run(int argc, char** argv)
+ 	_wfreopen(w_errpath.c_str(), L"a", stderr);
+ #endif
+ 
+-  // Create and install global locale
+-  std::locale::global(boost::locale::generator().generate(""));
+-  // Make boost.filesystem use it
+-  boost::filesystem::path::imbue(std::locale());
++  // Create and install global locale - this can fail on some setups:
++  // - with bad LANG values
++  // - targets where libstdc++ uses its generic locales code (https://gcc.gnu.org/legacy-ml/libstdc++/2003-02/msg00345.html)
++  try
++  {
++    std::locale::global(boost::locale::generator().generate(""));
++    // Make boost.filesystem use it
++    boost::filesystem::path::imbue(std::locale());
++  }
++  catch(const std::runtime_error& err)
++  {
++    std::cout << "Warning: " << err.what() << std::endl;
++  }
+ 
+   int result = 0;
+ 
diff --git a/srcpkgs/supertux2/template b/srcpkgs/supertux2/template
index e0637ee9bbc..6546d1b0aa0 100644
--- a/srcpkgs/supertux2/template
+++ b/srcpkgs/supertux2/template
@@ -1,7 +1,7 @@
 # Template file for 'supertux2'
 pkgname=supertux2
 version=0.6.2
-revision=2
+revision=3
 wrksrc="SuperTux-v${version}-Source"
 build_style=cmake
 configure_args="
@@ -12,17 +12,10 @@ configure_args="
 hostmakedepends="pkg-config"
 makedepends="SDL2_image-devel boost-devel glew-devel libcurl-devel
  libopenal-devel libraqm-devel physfs-devel"
-depends="supertux2-data"
 short_desc="Side-scrolling platform game, milestone 2"
 maintainer="beefcurtains <beefcurtains@voidlinux.org>"
 license="GPL-3.0-or-later, GPL-2.0-or-later, CC-BY-SA-3.0, CC-BY-SA-4.0, CC-BY-3.0"
 homepage="https://supertux.github.io/"
 distfiles="https://github.com/SuperTux/supertux/releases/download/v${version}/SuperTux-v${version}-Source.tar.gz"
 checksum=26a9e56ea2d284148849f3239177d777dda5b675a10ab2d76ee65854c91ff598
-
-supertux2-data_package() {
-	short_desc+=" - data files"
-	pkg_install() {
-		vmove usr/share/supertux2
-	}
-}
+replaces="supertux2-data>=0"

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PR PATCH] [Updated] supertux2: fix locale on musl, remove -data subpackage.
  2020-12-09 19:28 [PR PATCH] supertux2: fix locale on musl, remove -data subpackage ericonr
@ 2020-12-09 20:32 ` ericonr
  2020-12-11  1:54 ` [PR PATCH] [Merged]: " ericonr
  1 sibling, 0 replies; 3+ messages in thread
From: ericonr @ 2020-12-09 20:32 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 462 bytes --]

There is an updated pull request by ericonr against master on the void-packages repository

https://github.com/ericonr/void-packages supertux
https://github.com/void-linux/void-packages/pull/27054

supertux2: fix locale on musl, remove -data subpackage.
Unless LANG was 'C', supertux2 would immediately abort when launched.

The data subpackage is no longer necessary.

A patch file from https://github.com/void-linux/void-packages/pull/27054.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-supertux-27054.patch --]
[-- Type: text/x-diff, Size: 3475 bytes --]

From 7b1cc72e3e453ea4606d4b60f1459ce8e16e8a66 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Wed, 9 Dec 2020 16:24:11 -0300
Subject: [PATCH] supertux2: fix locale on musl, remove -data subpackage.

Unless LANG was 'C', supertux2 would immediately abort when launched.

The data subpackage is no longer necessary.
---
 srcpkgs/supertux2-data                 |  1 -
 srcpkgs/supertux2/patches/locale.patch | 36 ++++++++++++++++++++++++++
 srcpkgs/supertux2/template             | 11 ++------
 3 files changed, 38 insertions(+), 10 deletions(-)
 delete mode 120000 srcpkgs/supertux2-data
 create mode 100644 srcpkgs/supertux2/patches/locale.patch

diff --git a/srcpkgs/supertux2-data b/srcpkgs/supertux2-data
deleted file mode 120000
index ea7ce77a976..00000000000
--- a/srcpkgs/supertux2-data
+++ /dev/null
@@ -1 +0,0 @@
-supertux2
\ No newline at end of file
diff --git a/srcpkgs/supertux2/patches/locale.patch b/srcpkgs/supertux2/patches/locale.patch
new file mode 100644
index 00000000000..ca3dfb74923
--- /dev/null
+++ b/srcpkgs/supertux2/patches/locale.patch
@@ -0,0 +1,36 @@
+commit 4380f504fbd51aa9ef7eb222b0bced481402fa7d
+Author: Érico Rolim <erico.erc@gmail.com>
+Date:   Wed Dec 9 16:22:22 2020 -0300
+
+    supertux/main: add try-catch for locale initialization.
+    
+    Fixes #1564.
+
+diff --git src/supertux/main.cpp src/supertux/main.cpp
+index ad5e3fde6..c33627e18 100644
+--- src/supertux/main.cpp
++++ src/supertux/main.cpp
+@@ -563,10 +563,19 @@ Main::run(int argc, char** argv)
+ 	_wfreopen(w_errpath.c_str(), L"a", stderr);
+ #endif
+ 
+-  // Create and install global locale
+-  std::locale::global(boost::locale::generator().generate(""));
+-  // Make boost.filesystem use it
+-  boost::filesystem::path::imbue(std::locale());
++  // Create and install global locale - this can fail on some setups:
++  // - with bad LANG values
++  // - targets where libstdc++ uses its generic locales code (https://gcc.gnu.org/legacy-ml/libstdc++/2003-02/msg00345.html)
++  try
++  {
++    std::locale::global(boost::locale::generator().generate(""));
++    // Make boost.filesystem use it
++    boost::filesystem::path::imbue(std::locale());
++  }
++  catch(const std::runtime_error& err)
++  {
++    std::cout << "Warning: " << err.what() << std::endl;
++  }
+ 
+   int result = 0;
+ 
diff --git a/srcpkgs/supertux2/template b/srcpkgs/supertux2/template
index e0637ee9bbc..6546d1b0aa0 100644
--- a/srcpkgs/supertux2/template
+++ b/srcpkgs/supertux2/template
@@ -1,7 +1,7 @@
 # Template file for 'supertux2'
 pkgname=supertux2
 version=0.6.2
-revision=2
+revision=3
 wrksrc="SuperTux-v${version}-Source"
 build_style=cmake
 configure_args="
@@ -12,17 +12,10 @@ configure_args="
 hostmakedepends="pkg-config"
 makedepends="SDL2_image-devel boost-devel glew-devel libcurl-devel
  libopenal-devel libraqm-devel physfs-devel"
-depends="supertux2-data"
 short_desc="Side-scrolling platform game, milestone 2"
 maintainer="beefcurtains <beefcurtains@voidlinux.org>"
 license="GPL-3.0-or-later, GPL-2.0-or-later, CC-BY-SA-3.0, CC-BY-SA-4.0, CC-BY-3.0"
 homepage="https://supertux.github.io/"
 distfiles="https://github.com/SuperTux/supertux/releases/download/v${version}/SuperTux-v${version}-Source.tar.gz"
 checksum=26a9e56ea2d284148849f3239177d777dda5b675a10ab2d76ee65854c91ff598
-
-supertux2-data_package() {
-	short_desc+=" - data files"
-	pkg_install() {
-		vmove usr/share/supertux2
-	}
-}
+replaces="supertux2-data>=0"

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PR PATCH] [Merged]: supertux2: fix locale on musl, remove -data subpackage.
  2020-12-09 19:28 [PR PATCH] supertux2: fix locale on musl, remove -data subpackage ericonr
  2020-12-09 20:32 ` [PR PATCH] [Updated] " ericonr
@ 2020-12-11  1:54 ` ericonr
  1 sibling, 0 replies; 3+ messages in thread
From: ericonr @ 2020-12-11  1:54 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 321 bytes --]

There's a merged pull request on the void-packages repository

supertux2: fix locale on musl, remove -data subpackage.
https://github.com/void-linux/void-packages/pull/27054

Description:
Unless LANG was 'C', supertux2 would immediately abort when launched.

The data subpackage is no longer necessary.

Fixes #17687

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-12-11  1:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-09 19:28 [PR PATCH] supertux2: fix locale on musl, remove -data subpackage ericonr
2020-12-09 20:32 ` [PR PATCH] [Updated] " ericonr
2020-12-11  1:54 ` [PR PATCH] [Merged]: " ericonr

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).