From f5e01e6cd9519fd637e19d4ab6e97f34c4b92591 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Cerqueira?= Date: Sun, 9 Oct 2022 14:29:04 +0100 Subject: [PATCH] xmoto: fix musl build --- .../patches/fix_gettext_GNU-isms_musl.patch | 27 +++++++++++++++++++ srcpkgs/xmoto/template | 4 +-- 2 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 srcpkgs/xmoto/patches/fix_gettext_GNU-isms_musl.patch diff --git a/srcpkgs/xmoto/patches/fix_gettext_GNU-isms_musl.patch b/srcpkgs/xmoto/patches/fix_gettext_GNU-isms_musl.patch new file mode 100644 index 000000000000..f714af9e6fd7 --- /dev/null +++ b/srcpkgs/xmoto/patches/fix_gettext_GNU-isms_musl.patch @@ -0,0 +1,27 @@ +From 7ce512bf0242182306ceb75d7dbe2370aab838f8 Mon Sep 17 00:00:00 2001 +From: _yui +Date: Sun, 9 Oct 2022 14:48:05 +0300 +Subject: [PATCH] i18n: Don't use gettext GNU-isms with musl + +--- + src/common/Locales.cpp | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/common/Locales.cpp b/src/common/Locales.cpp +index 5ee395bd..680da00c 100644 +--- a/src/common/Locales.cpp ++++ b/src/common/Locales.cpp +@@ -66,11 +66,13 @@ std::pair Locales::changeLocale( + setlocale(LC_MESSAGES, NULL)); + #endif + ++#ifdef __GLIBC__ + /* Make change known. */ + { + extern int _nl_msg_cat_cntr; + ++_nl_msg_cat_cntr; + } ++#endif + + std::pair locale_str( + locale.first == NULL ? std::string("") : std::string(locale.first), diff --git a/srcpkgs/xmoto/template b/srcpkgs/xmoto/template index f54fadf9b72c..876d8307c3e9 100644 --- a/srcpkgs/xmoto/template +++ b/srcpkgs/xmoto/template @@ -1,10 +1,10 @@ # Template file for 'xmoto' pkgname=xmoto version=0.6.1 -revision=2 +revision=3 build_style=cmake build_helper="qemu" -configure_args="-DOpenGL_GL_PREFERENCE=GLVND -DXMOTO_PACK=manual" +configure_args="-DCMAKE_BUILD_TYPE=Release -DOpenGL_GL_PREFERENCE=GLVND -DXMOTO_PACK=manual" hostmakedepends="automake libtool gettext-devel-tools intltool desktop-file-utils" makedepends="sqlite-devel zlib-devel libjpeg-turbo-devel libpng-devel libxml2-devel libxdg-basedir-devel glu-devel SDL-devel SDL_mixer-devel