From 9d3eff474774c2cd2f904e8c15ec71f3643fb03d Mon Sep 17 00:00:00 2001 From: Juan RP Date: Fri, 8 May 2015 10:24:24 +0200 Subject: [PATCH] polkit: try to unbreak musl build: patch based on the Alpine one. --- srcpkgs/polkit/patches/getnetgrent.patch | 42 ++++++++++++++++++++++++ srcpkgs/polkit/template | 14 +++----- 2 files changed, 47 insertions(+), 9 deletions(-) create mode 100644 srcpkgs/polkit/patches/getnetgrent.patch diff --git a/srcpkgs/polkit/patches/getnetgrent.patch b/srcpkgs/polkit/patches/getnetgrent.patch new file mode 100644 index 00000000000..95792f2714d --- /dev/null +++ b/srcpkgs/polkit/patches/getnetgrent.patch @@ -0,0 +1,42 @@ +--- configure.ac.orig 2015-05-08 10:21:01.500335031 +0200 ++++ configure.ac 2015-05-08 10:21:19.483327115 +0200 +@@ -158,7 +158,7 @@ AC_CHECK_LIB(expat,XML_ParserCreate,[EXP + [AC_MSG_ERROR([Can't find expat library. Please install expat.])]) + AC_SUBST(EXPAT_LIBS) + +-AC_CHECK_FUNCS(clearenv) ++AC_CHECK_FUNCS(clearenv getnetgrent) + + if test "x$GCC" = "xyes"; then + LDFLAGS="-Wl,--as-needed $LDFLAGS" +--- src/polkitbackend/polkitbackendinteractiveauthority.c.orig 2015-05-08 10:22:03.093307918 +0200 ++++ src/polkitbackend/polkitbackendinteractiveauthority.c 2015-05-08 10:23:44.516263273 +0200 +@@ -2103,6 +2103,7 @@ get_users_in_group (PolkitIdentity + return ret; + } + ++#if defined HAVE_GETNETGRENT + static GList * + get_users_in_net_group (PolkitIdentity *group, + gboolean include_root) +@@ -2154,6 +2155,7 @@ get_users_in_net_group (PolkitIdentity + endnetgrent (); + return ret; + } ++#endif + + /* ---------------------------------------------------------------------------------------------------- */ + +@@ -2243,10 +2245,12 @@ authentication_agent_initiate_challenge + { + user_identities = g_list_concat (user_identities, get_users_in_group (identity, FALSE)); + } ++#if defined HAVE_GETNETGRENT + else if (POLKIT_IS_UNIX_NETGROUP (identity)) + { + user_identities = g_list_concat (user_identities, get_users_in_net_group (identity, FALSE)); + } ++#endif + else + { + g_warning ("Unsupported identity"); diff --git a/srcpkgs/polkit/template b/srcpkgs/polkit/template index 3d2da32e44e..a83dcdb9323 100644 --- a/srcpkgs/polkit/template +++ b/srcpkgs/polkit/template @@ -1,7 +1,7 @@ # Template file for 'polkit' pkgname=polkit version=0.112 -revision=9 +revision=10 build_pie=yes build_style=gnu-configure configure_args="$(vopt_enable gir introspection) @@ -14,8 +14,8 @@ license="GPL-2" distfiles="${FREEDESKTOP_SITE}/${pkgname}/releases/${pkgname}-${version}.tar.gz" checksum=d695f43cba4748a822fbe864dd32c4887c5da1c71694a47693ace5e88fcf6af6 -hostmakedepends="pkg-config intltool libxslt docbook-xsl glib-devel - $(vopt_if gir gobject-introspection)" +hostmakedepends="automake libtool gettext-devel pkg-config intltool libxslt + docbook-xsl glib-devel gtk-doc gobject-introspection" makedepends="libglib-devel expat-devel pam-devel mozjs17-devel $(vopt_if systemd systemd-devel)" system_accounts="polkitd" @@ -26,16 +26,12 @@ make_dirs=" # Package build options build_options="gir systemd" # Disable gir for cross builds. -if [ "$CROSS_BUILD" ]; then - hostmakedepends+=" automake libtool gettext-devel gtk-doc gobject-introspection" -else +if [ -z "$CROSS_BUILD" ]; then build_options_default+=" gir" fi pre_configure() { - if [ "$CROSS_BUILD" ]; then - autoreconf -fi - fi + autoreconf -fi # Drop requirement of /sys/fs/cgroup/systemd test in configure... WTF. sed -e 's,/sys/fs/cgroup/systemd/,/sys/fs/cgroup,g' -i configure }