1 |
commit: b7562888f8a22755fa367afe52a7edd9ac14e32a |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Mar 16 21:59:01 2023 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Mar 16 22:01:02 2023 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b7562888 |
7 |
|
8 |
sys-libs/cracklib: add 2.9.10 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/897312 |
11 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
12 |
|
13 |
sys-libs/cracklib/Manifest | 1 + |
14 |
sys-libs/cracklib/cracklib-2.9.10.ebuild | 123 +++++++++++++++++++++++++++++++ |
15 |
2 files changed, 124 insertions(+) |
16 |
|
17 |
diff --git a/sys-libs/cracklib/Manifest b/sys-libs/cracklib/Manifest |
18 |
index 1e2de84b4772..1d66101e9c18 100644 |
19 |
--- a/sys-libs/cracklib/Manifest |
20 |
+++ b/sys-libs/cracklib/Manifest |
21 |
@@ -1 +1,2 @@ |
22 |
+DIST cracklib-2.9.10.tar.bz2 620648 BLAKE2B f4ebf4aea6da81424a8b9fae9c204260f6020937b6b2b02cec13527f812e1751522a47a4432ff0a2a233eeb88fe0c8b7e7fd371f611a40bf2d34a10ddfd4fe83 SHA512 0c3856833f4c58fc1ebc63cc08b189c55e8d5722ef8cdc1cad5f717cef137a83648657e005e2d0367006b27aafa1bb63e36e7998918937733816635880c85f74 |
23 |
DIST cracklib-2.9.8.tar.bz2 613017 BLAKE2B d9a5d922d6ac777b08cec9c427c0cde48666cdf67bf4136eb5866a0111b101c795dceb8e206e90bff31d1c8d26505bc1a950e8ea079562d8afd601641a7caf0c SHA512 bba1b82067156f44095b282c70c06a05e58572cde7ad2430dd24c4b42ae98be86708ea86ba8b7104aa5887e16ac90d7cf3ae613b84ab9c0f7602307d78b75371 |
24 |
|
25 |
diff --git a/sys-libs/cracklib/cracklib-2.9.10.ebuild b/sys-libs/cracklib/cracklib-2.9.10.ebuild |
26 |
new file mode 100644 |
27 |
index 000000000000..71fddeb64779 |
28 |
--- /dev/null |
29 |
+++ b/sys-libs/cracklib/cracklib-2.9.10.ebuild |
30 |
@@ -0,0 +1,123 @@ |
31 |
+# Copyright 1999-2023 Gentoo Authors |
32 |
+# Distributed under the terms of the GNU General Public License v2 |
33 |
+ |
34 |
+EAPI=8 |
35 |
+ |
36 |
+# Note: ideally bump with sys-apps/cracklib-words |
37 |
+ |
38 |
+DISTUTILS_OPTIONAL=1 |
39 |
+PYTHON_COMPAT=( python3_{9..11} ) |
40 |
+inherit distutils-r1 libtool multilib-minimal usr-ldscript |
41 |
+ |
42 |
+MY_P=${P/_} |
43 |
+DESCRIPTION="Password Checking Library" |
44 |
+HOMEPAGE="https://github.com/cracklib/cracklib/" |
45 |
+SRC_URI="https://github.com/${PN}/${PN}/releases/download/v${PV}/${P}.tar.bz2" |
46 |
+S="${WORKDIR}"/${MY_P} |
47 |
+ |
48 |
+LICENSE="LGPL-2.1" |
49 |
+SLOT="0" |
50 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos" |
51 |
+IUSE="nls python static-libs zlib" |
52 |
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" |
53 |
+ |
54 |
+RDEPEND=" |
55 |
+ python? ( ${PYTHON_DEPS} ) |
56 |
+ zlib? ( >=sys-libs/zlib-1.2.8-r1:=[${MULTILIB_USEDEP}] ) |
57 |
+" |
58 |
+DEPEND=" |
59 |
+ ${RDEPEND} |
60 |
+ nls? ( virtual/libintl ) |
61 |
+" |
62 |
+BDEPEND=" |
63 |
+ nls? ( sys-devel/gettext ) |
64 |
+ python? ( |
65 |
+ dev-python/setuptools[${PYTHON_USEDEP}] |
66 |
+ ) |
67 |
+" |
68 |
+ |
69 |
+do_python() { |
70 |
+ multilib_is_native_abi || return 0 |
71 |
+ use python || return 0 |
72 |
+ |
73 |
+ pushd python > /dev/null || die |
74 |
+ distutils-r1_src_${EBUILD_PHASE} |
75 |
+ popd > /dev/null || die |
76 |
+} |
77 |
+ |
78 |
+pkg_setup() { |
79 |
+ # Workaround bug #195017 |
80 |
+ if has unmerge-orphans ${FEATURES} && has_version "<${CATEGORY}/${PN}-2.8.10" ; then |
81 |
+ eerror "Upgrade path is broken with FEATURES=unmerge-orphans" |
82 |
+ eerror "Please run: FEATURES=-unmerge-orphans emerge cracklib" |
83 |
+ die "Please run: FEATURES=-unmerge-orphans emerge cracklib" |
84 |
+ fi |
85 |
+} |
86 |
+ |
87 |
+src_prepare() { |
88 |
+ default |
89 |
+ |
90 |
+ # bug ##269003 |
91 |
+ elibtoolize |
92 |
+ |
93 |
+ do_python |
94 |
+} |
95 |
+ |
96 |
+multilib_src_configure() { |
97 |
+ local myeconfargs=( |
98 |
+ # use /usr/lib so that the dictionary is shared between ABIs |
99 |
+ --with-default-dict="/usr/lib/cracklib_dict" |
100 |
+ --without-python |
101 |
+ $(use_enable nls) |
102 |
+ $(use_enable static-libs static) |
103 |
+ ) |
104 |
+ |
105 |
+ export ac_cv_header_zlib_h=$(usex zlib) |
106 |
+ export ac_cv_search_gzopen=$(usex zlib -lz no) |
107 |
+ |
108 |
+ ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" |
109 |
+} |
110 |
+ |
111 |
+multilib_src_compile() { |
112 |
+ default |
113 |
+ |
114 |
+ do_python |
115 |
+} |
116 |
+ |
117 |
+multilib_src_test() { |
118 |
+ default |
119 |
+ |
120 |
+ # Make sure we load the freshly built library |
121 |
+ LD_LIBRARY_PATH="${BUILD_DIR}/lib/.libs:${LD_LIBRARY_PATH}" do_python |
122 |
+} |
123 |
+ |
124 |
+python_test() { |
125 |
+ ${EPYTHON} -m unittest test_cracklib || die "Tests fail with ${EPYTHON}" |
126 |
+} |
127 |
+ |
128 |
+multilib_src_install() { |
129 |
+ default |
130 |
+ |
131 |
+ # Move shared libs to / |
132 |
+ gen_usr_ldscript -a crack |
133 |
+ |
134 |
+ do_python |
135 |
+} |
136 |
+ |
137 |
+multilib_src_install_all() { |
138 |
+ einstalldocs |
139 |
+ |
140 |
+ find "${ED}" -type f -name "*.la" -delete || die |
141 |
+ rm -r "${ED}"/usr/share/cracklib || die |
142 |
+ |
143 |
+ insinto /usr/share/dict |
144 |
+ doins dicts/cracklib-small |
145 |
+} |
146 |
+ |
147 |
+pkg_postinst() { |
148 |
+ if [[ -z ${ROOT} ]] ; then |
149 |
+ ebegin "Regenerating cracklib dictionary" |
150 |
+ create-cracklib-dict "${EPREFIX}"/usr/share/dict/* > /dev/null |
151 |
+ eend $? |
152 |
+ fi |
153 |
+} |