summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2024-12-27 13:27:50 +0000
committerSam James <sam@gentoo.org>2024-12-27 13:27:50 +0000
commit69dc457a544268864991232be2cf5df20522e793 (patch)
treebbf6ebf825a455d568ca8b779f47834ee4ff6d83 /sys-libs/cracklib
parentdev-libs/botan: refresh no-avx2 patch to upstream variant (diff)
downloadgentoo-69dc457a544268864991232be2cf5df20522e793.tar.gz
gentoo-69dc457a544268864991232be2cf5df20522e793.tar.bz2
gentoo-69dc457a544268864991232be2cf5df20522e793.zip
sys-libs/cracklib: add 2.10.3
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sys-libs/cracklib')
-rw-r--r--sys-libs/cracklib/Manifest1
-rw-r--r--sys-libs/cracklib/cracklib-2.10.3.ebuild130
2 files changed, 131 insertions, 0 deletions
diff --git a/sys-libs/cracklib/Manifest b/sys-libs/cracklib/Manifest
index 662ad6ae1817..98269d8cf8ce 100644
--- a/sys-libs/cracklib/Manifest
+++ b/sys-libs/cracklib/Manifest
@@ -1,2 +1,3 @@
DIST cracklib-2.10.2.tar.xz 465152 BLAKE2B 87ea88085fee30cbd6e59485f157b7c6213e21619ff8af20ed33c118fd4be78cc9fc5b8ac5d583391df7a3bd527671044410d0e5cfe1cf864c0608cd24a8ca0b SHA512 b58f513bb3094821a69e45c092483d7445ecd1ea2d4d70b6cc422c58e478146f4656fc1ddc0b276f1da31a858d2baea4cca233c9232e2acd05085d55873f3273
+DIST cracklib-2.10.3.tar.xz 466704 BLAKE2B 714b904a4f890f399fc2acd3c8ed91173cbce19d04f386cd594388e1d35197b135d760616998979051de9154f9e94c587d21f80979fe4e00ada66010006c7216 SHA512 5a86116b888dd324d17495c3ccefb061bfc6b31a7dcebc394324d87878dec5dec268591f9d7ef30cf60f70df9ff3bbf3d891c60efc198dba80f83cc43a08273c
DIST cracklib-2.9.11.tar.xz 461116 BLAKE2B 46b499e465c1c268b772781a9c8ce573a5167ae2e0ac919b403acdb9a14c35140dfb53909eef6e41600e26c2f87d905b3d6d05380c66f053d091765b58a264f4 SHA512 c32e509f757344a1f0b7032ad3b6dc47a8759852a94e511c92073d85bce55f45d48c389d9eb34c993e1d61ad5c1542150672f3e8bc147148ebbb04d3319a2409
diff --git a/sys-libs/cracklib/cracklib-2.10.3.ebuild b/sys-libs/cracklib/cracklib-2.10.3.ebuild
new file mode 100644
index 000000000000..13f5dab1a076
--- /dev/null
+++ b/sys-libs/cracklib/cracklib-2.10.3.ebuild
@@ -0,0 +1,130 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# Note: ideally bump with sys-apps/cracklib-words
+DISTUTILS_EXT=1
+DISTUTILS_OPTIONAL=1
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{10..13} )
+inherit distutils-r1 libtool multilib-minimal usr-ldscript
+
+MY_P=${P/_}
+DESCRIPTION="Password Checking Library"
+HOMEPAGE="https://github.com/cracklib/cracklib/"
+SRC_URI="https://github.com/${PN}/${PN}/releases/download/v${PV}/${P}.tar.xz"
+S="${WORKDIR}"/${MY_P}
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE="nls python static-libs zlib"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+RDEPEND="
+ python? ( ${PYTHON_DEPS} )
+ zlib? ( >=sys-libs/zlib-1.2.8-r1:=[${MULTILIB_USEDEP}] )
+"
+DEPEND="
+ ${RDEPEND}
+ nls? ( virtual/libintl )
+"
+BDEPEND="
+ nls? ( sys-devel/gettext )
+ python? ( ${DISTUTILS_DEPS} )
+"
+
+distutils_enable_tests unittest
+
+pkg_setup() {
+ # Workaround bug #195017
+ if has unmerge-orphans ${FEATURES} && has_version "<${CATEGORY}/${PN}-2.8.10" ; then
+ eerror "Upgrade path is broken with FEATURES=unmerge-orphans"
+ eerror "Please run: FEATURES=-unmerge-orphans emerge cracklib"
+ die "Please run: FEATURES=-unmerge-orphans emerge cracklib"
+ fi
+}
+
+src_prepare() {
+ default
+
+ # bug #269003
+ elibtoolize
+
+ if use python ; then
+ distutils-r1_src_prepare
+ fi
+}
+
+multilib_src_configure() {
+ local myeconfargs=(
+ # use /usr/lib so that the dictionary is shared between ABIs
+ --with-default-dict="/usr/lib/cracklib_dict"
+ --without-python
+ $(use_enable nls)
+ $(use_enable static-libs static)
+ )
+
+ export ac_cv_header_zlib_h=$(usex zlib)
+ export ac_cv_search_gzopen=$(usex zlib -lz no)
+
+ ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
+}
+
+multilib_src_compile() {
+ default
+
+ if multilib_is_native_abi && use python ; then
+ local -x CFLAGS="${CFLAGS} -DLOCALEDIR='\"${EPREFIX}/usr/share/locale\"' -DDEFAULT_CRACKLIB_DICT=\'${EPREFIX}/usr/lib/cracklib_dict\'"
+ cd python || die
+ distutils-r1_src_compile
+ fi
+}
+
+multilib_src_test() {
+ default
+
+ if multilib_is_native_abi && use python ; then
+ distutils-r1_src_test
+ fi
+}
+
+python_test() {
+ cd "${S}"/python || die
+
+ # Make sure we load the freshly built library
+ local -x LD_LIBRARY_PATH="${BUILD_DIR/-${EPYTHON/./_}}/lib/.libs:${BUILD_DIR}/lib:${LD_LIBRARY_PATH}"
+
+ eunittest
+}
+
+multilib_src_install() {
+ default
+
+ # Move shared libs to /
+ gen_usr_ldscript -a crack
+
+ if multilib_is_native_abi && use python ; then
+ cd python || die
+ distutils-r1_src_install
+ fi
+}
+
+multilib_src_install_all() {
+ einstalldocs
+
+ find "${ED}" -type f -name "*.la" -delete || die
+ rm -r "${ED}"/usr/share/cracklib || die
+
+ insinto /usr/share/dict
+ doins dicts/cracklib-small
+}
+
+pkg_postinst() {
+ if [[ -z ${ROOT} ]] ; then
+ ebegin "Regenerating cracklib dictionary"
+ create-cracklib-dict "${EPREFIX}"/usr/share/dict/* > /dev/null
+ eend $?
+ fi
+}