Gentoo Archives: gentoo-commits

From: Mart Raudsepp <leio@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/libpwquality/
Date: Tue, 17 Sep 2019 17:08:18
Message-Id: 1568739941.afddf6d5f6569f19595c246e1403d93eb61be93e.leio@gentoo
1 commit: afddf6d5f6569f19595c246e1403d93eb61be93e
2 Author: Mart Raudsepp <leio <AT> gentoo <DOT> org>
3 AuthorDate: Tue Sep 17 17:05:41 2019 +0000
4 Commit: Mart Raudsepp <leio <AT> gentoo <DOT> org>
5 CommitDate: Tue Sep 17 17:05:41 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=afddf6d5
7
8 dev-libs/libpwquality: bump to 1.4.1; add py3.7, remove 2.7
9
10 Only app-admin/calamares seems to be depending on libpwquality
11 python flags (but wrongly, without depending on USE=python too
12 at this time), and it is py3-only. Therefore we can drop the
13 py2 support here, in preparation of py2 sunset.
14
15 Package-Manager: Portage-2.3.69, Repoman-2.3.12
16 Signed-off-by: Mart Raudsepp <leio <AT> gentoo.org>
17
18 dev-libs/libpwquality/Manifest | 1 +
19 dev-libs/libpwquality/libpwquality-1.4.1.ebuild | 77 +++++++++++++++++++++++++
20 2 files changed, 78 insertions(+)
21
22 diff --git a/dev-libs/libpwquality/Manifest b/dev-libs/libpwquality/Manifest
23 index 39fa38a421a..2a32842dd51 100644
24 --- a/dev-libs/libpwquality/Manifest
25 +++ b/dev-libs/libpwquality/Manifest
26 @@ -1 +1,2 @@
27 DIST libpwquality-1.4.0.tar.bz2 450384 BLAKE2B 52a6f1c1bf90f6f01fb07667937b9792935729be77042bfc97dee8faa923212fa02410ad4e5c56f778bc9a8d248655f0b738889f5a0e73dc201d62d0c79093d0 SHA512 b8049f8b71bbfd4d345dbd4c4cffd29e9029b0fca4c95527af54d11a3b06e4708236b630df6c66738368298679c96cb3bf26b1b5d95cb3c5f7e1073cab8a98d9
28 +DIST libpwquality-1.4.1.tar.bz2 423053 BLAKE2B 305dbad6bba47d489cc5af7a362564cf9d8800e72d2e77cdbb2ea6fbf4d6888ef07ea93a4af474a60e6c25df417d0222ba54ebfa458894508410cec1ffbae654 SHA512 0bbec7e79a4db56c2cbda65c36003758a1044eee2ac8c678447d96d3cddf034a3196a7d8cd7972e9f50701391b8b81e2c3769fd81c4e4605fed96efd120ff257
29
30 diff --git a/dev-libs/libpwquality/libpwquality-1.4.1.ebuild b/dev-libs/libpwquality/libpwquality-1.4.1.ebuild
31 new file mode 100644
32 index 00000000000..138f711f39e
33 --- /dev/null
34 +++ b/dev-libs/libpwquality/libpwquality-1.4.1.ebuild
35 @@ -0,0 +1,77 @@
36 +# Copyright 1999-2019 Gentoo Authors
37 +# Distributed under the terms of the GNU General Public License v2
38 +
39 +EAPI=6
40 +PYTHON_COMPAT=( python3_{5,6,7} )
41 +
42 +inherit eutils multilib pam python-r1 toolchain-funcs usr-ldscript
43 +
44 +DESCRIPTION="Library for password quality checking and generating random passwords"
45 +HOMEPAGE="https://github.com/libpwquality/libpwquality"
46 +SRC_URI="https://github.com/${PN}/${PN}/releases/download/${P}/${P}.tar.bz2"
47 +
48 +LICENSE="|| ( BSD GPL-2 )"
49 +SLOT="0"
50 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
51 +IUSE="pam python static-libs"
52 +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
53 +
54 +RDEPEND="
55 + >=sys-libs/cracklib-2.8:=[static-libs(+)?]
56 + pam? ( virtual/pam )
57 + python? ( ${PYTHON_DEPS} )
58 +"
59 +DEPEND="${RDEPEND}
60 + >=sys-devel/gettext-0.18.2
61 + virtual/pkgconfig
62 +"
63 +
64 +src_prepare() {
65 + default
66 + # ensure pkgconfig files go in /usr
67 + sed -e 's:\(pkgconfigdir *=\).*:\1 '${EPREFIX}/usr/$(get_libdir)'/pkgconfig:' \
68 + -i src/Makefile.{am,in} || die "sed failed"
69 + use python && python_copy_sources
70 +}
71 +
72 +src_configure() {
73 + # Install library in /lib for pam
74 + configuring() {
75 + local sitedir
76 + econf \
77 + --libdir="${EPREFIX}/$(get_libdir)" \
78 + $(use_enable pam) \
79 + --with-securedir="${EPREFIX}/$(getpam_mod_dir)" \
80 + $(use_enable python python-bindings) \
81 + $(usex python "--with-pythonsitedir=$(use python && python_get_sitedir)" "") \
82 + $(use_enable static-libs static)
83 + }
84 + if_use_python_python_foreach_impl configuring
85 +}
86 +
87 +src_compile() {
88 + if_use_python_python_foreach_impl default
89 +}
90 +
91 +src_test() {
92 + if_use_python_python_foreach_impl default
93 +}
94 +
95 +src_install() {
96 + if_use_python_python_foreach_impl default
97 + if use static-libs; then
98 + # Do not install static libs in /lib
99 + mkdir -p "${ED}usr/$(get_libdir)"
100 + mv "${ED}$(get_libdir)/libpwquality.a" "${ED}/usr/$(get_libdir)/" || die
101 + gen_usr_ldscript libpwquality.so
102 + fi
103 + prune_libtool_files --modules
104 +}
105 +
106 +if_use_python_python_foreach_impl() {
107 + if use python; then
108 + python_foreach_impl run_in_build_dir "$@"
109 + else
110 + "$@"
111 + fi
112 +}