pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/sysutils/accountsservice accountsservice: Requires msg...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/f43abcc48c3c
branches:  trunk
changeset: 382298:f43abcc48c3c
user:      jperkin <jperkin%pkgsrc.org@localhost>
date:      Tue Jun 26 09:54:30 2018 +0000

description:
accountsservice: Requires msgfmt.  Fix build on SunOS.

diffstat:

 sysutils/accountsservice/Makefile                 |   7 ++-
 sysutils/accountsservice/distinfo                 |   3 +-
 sysutils/accountsservice/patches/patch-src_util.c |  54 +++++++++++++++++++++++
 3 files changed, 61 insertions(+), 3 deletions(-)

diffs (100 lines):

diff -r d2aa1f26db20 -r f43abcc48c3c sysutils/accountsservice/Makefile
--- a/sysutils/accountsservice/Makefile Tue Jun 26 09:37:09 2018 +0000
+++ b/sysutils/accountsservice/Makefile Tue Jun 26 09:54:30 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1 2018/06/11 23:55:50 youri Exp $
+# $NetBSD: Makefile,v 1.2 2018/06/26 09:54:30 jperkin Exp $
 
 DISTNAME=      accountsservice-0.6.42
 CATEGORIES=    sysutils
@@ -12,13 +12,16 @@
 
 GNU_CONFIGURE= yes
 USE_LIBTOOL=   yes
-USE_TOOLS+=    pkg-config intltool gmake autoconf autoreconf automake
+USE_TOOLS+=    pkg-config intltool gmake autoconf autoreconf automake msgfmt
 
 EGDIR=         ${PREFIX}/share/examples/accountsservice
 
 CONFIGURE_ARGS+=       --disable-systemd \
                        --sysconfdir=${EGDIR}
 
+CONFIGURE_ENV.SunOS+=  ac_cv_have_decl_WTMPX_FILENAME=yes
+CPPFLAGS.SunOS+=       -DWTMPX_FILENAME=WTMPX_FILE
+
 LDFLAGS.NetBSD+=       -lutil # pw_getpwconf
 
 ALL_ENV+=      EGDIR=${EGDIR}
diff -r d2aa1f26db20 -r f43abcc48c3c sysutils/accountsservice/distinfo
--- a/sysutils/accountsservice/distinfo Tue Jun 26 09:37:09 2018 +0000
+++ b/sysutils/accountsservice/distinfo Tue Jun 26 09:54:30 2018 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.1 2018/06/11 23:55:50 youri Exp $
+$NetBSD: distinfo,v 1.2 2018/06/26 09:54:30 jperkin Exp $
 
 SHA1 (accountsservice-0.6.42.tar.xz) = 4461347acf3878e100afcc2e3f960fb2c9fd87f4
 RMD160 (accountsservice-0.6.42.tar.xz) = 72b3025468b855d50517729530a92e5cb31ca82e
@@ -8,4 +8,5 @@
 SHA1 (patch-src_daemon.c) = b39c9e4fe82b086002d760eb191de55ac791dc91
 SHA1 (patch-src_libaccountsservice_act-user.c) = 50015cd0d4c32d1b97efa3620697790cca1db541
 SHA1 (patch-src_user.c) = a55c2daf41a8c833de4af0517d353d3fcb73beff
+SHA1 (patch-src_util.c) = 1acd3a534e4c6c3892078f1e89456f732bbee813
 SHA1 (patch-src_wtmp-helper.c) = eb32d598784f31e9baac44bd63ab248f5873c9c3
diff -r d2aa1f26db20 -r f43abcc48c3c sysutils/accountsservice/patches/patch-src_util.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/accountsservice/patches/patch-src_util.c Tue Jun 26 09:54:30 2018 +0000
@@ -0,0 +1,54 @@
+$NetBSD: patch-src_util.c,v 1.1 2018/06/26 09:54:30 jperkin Exp $
+
+Provide getgrouplist for SunOS.  This is available in newer releases,
+so if that becomes a problem we'll need to add a configure test.
+
+--- src/util.c.orig    2013-10-15 20:25:19.000000000 +0000
++++ src/util.c
+@@ -259,6 +259,46 @@ spawn_with_login_uid (GDBusMethodInvocat
+         return ret;
+ }
+ 
++#ifdef __sun
++int
++getgrouplist(const char *uname, gid_t agroup, gid_t *groups, int *grpcnt)
++{
++      const struct group *grp;
++      int i, maxgroups, ngroups, ret;
++
++      ret = 0;
++      ngroups = 0;
++      maxgroups = *grpcnt;
++      groups ? groups[ngroups++] = agroup : ngroups++;
++      if (maxgroups > 1)
++              groups ? groups[ngroups++] = agroup : ngroups++;
++      setgrent();
++      while ((grp = getgrent()) != NULL) {
++              if (groups) {
++                      for (i = 0; i < ngroups; i++) {
++                              if (grp->gr_gid == groups[i])
++                                      goto skip;
++                      }
++              }
++              for (i = 0; grp->gr_mem[i]; i++) {
++                      if (!strcmp(grp->gr_mem[i], uname)) {
++                              if (ngroups >= maxgroups) {
++                                      ret = -1;
++                                      break;
++                              }
++                              groups ? groups[ngroups++] = grp->gr_gid : ngroups++;
++                              break;
++                      }
++              }
++skip:
++              ;
++      }
++      endgrent();
++      *grpcnt = ngroups;
++      return (ret);
++}
++#endif
++
+ gint
+ get_user_groups (const gchar  *user,
+                  gid_t         group,



Home | Main Index | Thread Index | Old Index