From 7c28c8fbd9a56f4c43480440190766b718a243e5 Mon Sep 17 00:00:00 2001 From: Steve Prybylski Date: Tue, 8 Sep 2015 13:35:18 -0400 Subject: [PATCH] lightdm: fix musl --- .../lightdm/files/musl/musl-language.patch | 34 +++++++++++++++++++ .../lightdm/files/musl/musl-updwtmpx.patch | 13 +++++++ srcpkgs/lightdm/template | 10 ++++++ 3 files changed, 57 insertions(+) create mode 100644 srcpkgs/lightdm/files/musl/musl-language.patch create mode 100644 srcpkgs/lightdm/files/musl/musl-updwtmpx.patch diff --git a/srcpkgs/lightdm/files/musl/musl-language.patch b/srcpkgs/lightdm/files/musl/musl-language.patch new file mode 100644 index 00000000000..890965c195c --- /dev/null +++ b/srcpkgs/lightdm/files/musl/musl-language.patch @@ -0,0 +1,34 @@ +--- ./liblightdm-gobject/language.c.orig 2015-09-08 14:44:54.377669101 -0400 ++++ ./liblightdm-gobject/language.c 2015-09-08 14:45:12.453668549 -0400 +@@ -224,6 +224,7 @@ + + if (!priv->name) + { ++#if HAVE_LC_IDENTIFICATION + gchar *locale = get_locale_name (priv->code); + if (locale) + { +@@ -238,6 +239,7 @@ + setlocale (LC_ALL, current); + } + if (!priv->name) ++#endif + { + gchar **tokens = g_strsplit_set (priv->code, "_.@", 2); + priv->name = g_strdup (tokens[0]); +@@ -267,6 +269,7 @@ + + if (!priv->territory && strchr (priv->code, '_')) + { ++#if HAVE_LC_IDENTIFICATION + gchar *locale = get_locale_name (priv->code); + if (locale) + { +@@ -281,6 +284,7 @@ + setlocale (LC_ALL, current); + } + if (!priv->territory) ++#endif + { + gchar **tokens = g_strsplit_set (priv->code, "_.@", 3); + priv->territory = g_strdup (tokens[1]); diff --git a/srcpkgs/lightdm/files/musl/musl-updwtmpx.patch b/srcpkgs/lightdm/files/musl/musl-updwtmpx.patch new file mode 100644 index 00000000000..afdbf943c42 --- /dev/null +++ b/srcpkgs/lightdm/files/musl/musl-updwtmpx.patch @@ -0,0 +1,13 @@ +--- ./src/session-child.c.orig 2015-09-08 14:47:47.260663825 -0400 ++++ ./src/session-child.c 2015-09-08 14:48:01.578663388 -0400 +@@ -198,8 +198,8 @@ + } + + /* GNU provides this but we can't rely on that so let's make our own version */ +-static void +-updwtmpx (const gchar *wtmp_file, struct utmpx *ut) ++void ++updwtmpx (const char *wtmp_file, const struct utmpx *ut) + { + struct utmp u; + diff --git a/srcpkgs/lightdm/template b/srcpkgs/lightdm/template index 66cf7ad933b..e5a1bd1097a 100644 --- a/srcpkgs/lightdm/template +++ b/srcpkgs/lightdm/template @@ -42,6 +42,16 @@ if [ -z "$CROSS_BUILD" ]; then subpackages+=" liblightdm-qt liblightdm-qt5" fi +post_extract() { + case "$XBPS_TARGET_MACHINE" in + *-musl) + for f in ${FILESDIR}/musl/*.patch; do + patch -Np1 -i $f + done + ;; + esac +} + post_install() { # Remove provided init file and use our own. rm -rf ${DESTDIR}/etc/init