commit:     1f6e782d7a55190109ea0e3829812d668dee07b0
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sun May 16 11:56:49 2021 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sun May 16 14:43:48 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1f6e782d

sys-libs/pwdb: EAPI-7 bump

Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 sys-libs/pwdb/files/pwdb-0.62-build.patch   | 28 ++++++-------
 sys-libs/pwdb/files/pwdb-0.62-selinux.patch | 24 +++++------
 sys-libs/pwdb/pwdb-0.62-r2.ebuild           | 64 +++++++++++++++++++++++++++++
 3 files changed, 90 insertions(+), 26 deletions(-)

diff --git a/sys-libs/pwdb/files/pwdb-0.62-build.patch 
b/sys-libs/pwdb/files/pwdb-0.62-build.patch
index ecef517b1ca..92c77c28d10 100644
--- a/sys-libs/pwdb/files/pwdb-0.62-build.patch
+++ b/sys-libs/pwdb/files/pwdb-0.62-build.patch
@@ -11,8 +11,8 @@ http://bugs.gentoo.org/126695
 http://bugs.gentoo.org/137134
  - don't show traditional warnings
 
---- Makefile
-+++ Makefile
+--- a/Makefile
++++ b/Makefile
 @@ -71,7 +71,7 @@
  
  WARNINGS += -ansi -D_POSIX_SOURCE -Wall -Wwrite-strings \
@@ -22,8 +22,8 @@ http://bugs.gentoo.org/137134
        -Wnested-externs -Winline -Wshadow 
  INCLUDEDIR=-I$(CRTDIR)/include
  
---- libpwdb/Makefile
-+++ libpwdb/Makefile
+--- a/libpwdb/Makefile
++++ b/libpwdb/Makefile
 @@ -50,7 +50,7 @@
  
  
@@ -42,8 +42,8 @@ http://bugs.gentoo.org/137134
        ln -sf $(LIBFILENAME) $(LIBDIR)/$(LIBDYNAME)
        $(INSTALL) -m 644 $(LIBSTATIC) $(LIBDIR)
  
---- libpwdb/posix/pwd.c
-+++ libpwdb/posix/pwd.c
+--- a/libpwdb/posix/pwd.c
++++ b/libpwdb/posix/pwd.c
 @@ -7,6 +7,7 @@
   */
  
@@ -52,8 +52,8 @@ http://bugs.gentoo.org/137134
  
  #define PWDB_HARD_CORE 1
  #include <pwdb/pwdb_public.h>
---- libpwdb/posix/undefined.c
-+++ libpwdb/posix/undefined.c
+--- a/libpwdb/posix/undefined.c
++++ b/libpwdb/posix/undefined.c
 @@ -5,6 +5,7 @@
   */
  
@@ -62,8 +62,8 @@ http://bugs.gentoo.org/137134
  
  #define PWDB_HARD_CORE 1
  #include <pwdb/pwdb_public.h>
---- libpwdb/pwdb/pwdb_helper.c
-+++ libpwdb/pwdb/pwdb_helper.c
+--- a/libpwdb/pwdb/pwdb_helper.c
++++ b/libpwdb/pwdb/pwdb_helper.c
 @@ -18,6 +18,7 @@
   *
   */
@@ -72,8 +72,8 @@ http://bugs.gentoo.org/137134
  #include "pwdb_public.h"
  #include "pwdb_module.h"
  
---- libpwdb/pwdb/interface/shadow/group.c
-+++ libpwdb/pwdb/interface/shadow/group.c
+--- a/libpwdb/pwdb/interface/shadow/group.c
++++ b/libpwdb/pwdb/interface/shadow/group.c
 @@ -533,7 +533,7 @@
  
      static const char *supp_entry[] = {
@@ -83,8 +83,8 @@ http://bugs.gentoo.org/137134
      "groups",               /* these are serviced by requests */
      NULL
      };
---- libpwdb/radius/radius.c
-+++ libpwdb/radius/radius.c
+--- a/libpwdb/radius/radius.c
++++ b/libpwdb/radius/radius.c
 @@ -145,7 +145,7 @@
                      const char* password,
                      RADIUS_RESULT *rad_result)

diff --git a/sys-libs/pwdb/files/pwdb-0.62-selinux.patch 
b/sys-libs/pwdb/files/pwdb-0.62-selinux.patch
index 106be564517..02ba3c50c38 100644
--- a/sys-libs/pwdb/files/pwdb-0.62-selinux.patch
+++ b/sys-libs/pwdb/files/pwdb-0.62-selinux.patch
@@ -1,5 +1,5 @@
---- pwdb-0.62/examples/Makefile.pwdbselinux    1998-10-06 19:57:04.000000000 
-0400
-+++ pwdb-0.62/examples/Makefile        2003-07-09 14:45:54.702663000 -0400
+--- a/examples/Makefile
++++ b/examples/Makefile
 @@ -4,6 +4,8 @@ PROGS  = posix gentest tpwdb radtest grou
  SRCS = $(addsuffix .c,$(PROGS))
  OBJS = $(addsuffix .o,$(PROGS))
@@ -36,8 +36,8 @@
  
  clean:
        rm -f ${PROGS} *.o *~
---- pwdb-0.62/libpwdb/shadow/shadowio.c.pwdbselinux    1998-10-06 
16:58:43.000000000 -0400
-+++ pwdb-0.62/libpwdb/shadow/shadowio.c        2003-07-09 14:45:54.705662544 
-0400
+--- a/libpwdb/shadow/shadowio.c
++++ b/libpwdb/shadow/shadowio.c
 @@ -16,6 +16,12 @@
  
  #include "../_pwdb_internal.h"
@@ -133,8 +133,8 @@
  }
  
  int __pwdb_spw_update (const struct __pwdb_spwd *spwd)
---- pwdb-0.62/libpwdb/shadow/sgroupio.c.pwdbselinux    1998-10-06 
16:58:43.000000000 -0400
-+++ pwdb-0.62/libpwdb/shadow/sgroupio.c        2003-07-09 14:45:54.704662696 
-0400
+--- a/libpwdb/shadow/sgroupio.c
++++ b/libpwdb/shadow/sgroupio.c
 @@ -16,6 +16,12 @@
  
  #include "../_pwdb_internal.h"
@@ -230,8 +230,8 @@
  }
  
  int __pwdb_sgr_update (const struct __pwdb_sgrp *sgrent)
---- pwdb-0.62/libpwdb/unix/pwio.c.pwdbselinux  1998-10-06 16:58:43.000000000 
-0400
-+++ pwdb-0.62/libpwdb/unix/pwio.c      2003-07-09 14:45:54.707662240 -0400
+--- a/libpwdb/unix/pwio.c
++++ b/libpwdb/unix/pwio.c
 @@ -16,6 +16,11 @@
  
  #include "../_pwdb_internal.h"
@@ -326,8 +326,8 @@
  }
  
  /*
---- pwdb-0.62/libpwdb/unix/groupio.c.pwdbselinux       1998-10-06 
16:58:43.000000000 -0400
-+++ pwdb-0.62/libpwdb/unix/groupio.c   2003-07-09 14:45:54.708662088 -0400
+--- a/libpwdb/unix/groupio.c
++++ b/libpwdb/unix/groupio.c
 @@ -11,6 +11,12 @@
  #include "../_pwdb_internal.h"
  
@@ -422,8 +422,8 @@
  }
  
  /* update an entry */
---- pwdb-0.62/libpwdb/Makefile.pwdbselinux     1999-04-10 05:31:20.000000000 
-0400
-+++ pwdb-0.62/libpwdb/Makefile 2003-07-09 14:45:54.709661936 -0400
+--- a/libpwdb/Makefile
++++ b/libpwdb/Makefile
 @@ -22,7 +22,7 @@ HEADERS      = pwdb/pwdb_public.h pwdb/pwdb_c
  
  # needed for generic interface compilation

diff --git a/sys-libs/pwdb/pwdb-0.62-r2.ebuild 
b/sys-libs/pwdb/pwdb-0.62-r2.ebuild
new file mode 100644
index 00000000000..3ef2906710f
--- /dev/null
+++ b/sys-libs/pwdb/pwdb-0.62-r2.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit toolchain-funcs flag-o-matic usr-ldscript
+
+DESCRIPTION="Password database"
+HOMEPAGE="https://packages.gentoo.org/package/sys-libs/pwdb";
+SRC_URI="mirror://gentoo/${P}.tar.gz"
+
+LICENSE="|| ( BSD GPL-2 )"
+SLOT="0"
+KEYWORDS="~alpha amd64 arm ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~s390 sparc x86"
+IUSE="selinux"
+RESTRICT="test" #122603
+
+# Note: NIS could probably be made conditional if anyone cared ...
+RDEPEND="
+       net-libs/libnsl:0=
+       net-libs/libtirpc
+       selinux? ( sys-libs/libselinux )"
+DEPEND="${RDEPEND}"
+BDEPEND="virtual/pkgconfig"
+
+DOCS=( CHANGES CREDITS README doc/pwdb.txt )
+HTML_DOCS=( doc/html/. )
+
+PATCHES=( "${FILESDIR}"/${P}-build.patch )
+
+src_prepare() {
+       default
+
+       use selinux && eapply "${FILESDIR}"/${P}-selinux.patch
+
+       append-cppflags $($(tc-getPKG_CONFIG) --cflags libtirpc)
+       export LDLIBS=$($(tc-getPKG_CONFIG) --libs libtirpc)
+
+       sed -i \
+               -e "s/^DIRS = .*/DIRS = libpwdb/" \
+               -e "s:EXTRAS += :EXTRAS += ${CFLAGS} :" \
+               Makefile || die
+       sed -i \
+               -e "s:=gcc:=$(tc-getCC):g" \
+               -e "s:=ar:=$(tc-getAR):g" \
+               -e "s:=ranlib:=$(tc-getRANLIB):g" \
+               default.defs || die
+}
+
+src_install() {
+       dodir /usr/$(get_libdir) /usr/include/pwdb
+       emake \
+               INCLUDED="${D}"/usr/include/pwdb \
+               LIBDIR="${D}"/usr/$(get_libdir) \
+               LDCONFIG="echo" \
+               install
+
+       gen_usr_ldscript -a pwdb
+
+       insinto /etc
+       doins conf/pwdb.conf
+
+       einstalldocs
+}

Reply via email to