Line
Link Here
|
0 |
-- cracklib-2.8.16.ebuild |
0 |
++ cracklib-2.8.16.ebuild |
Lines 2-8
Link Here
|
2 |
# Distributed under the terms of the GNU General Public License v2 |
2 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
# $Header: /var/cvsroot/gentoo-x86/sys-libs/cracklib/cracklib-2.8.16.ebuild,v 1.1 2010/04/30 13:02:14 vapier Exp $ |
3 |
# $Header: /var/cvsroot/gentoo-x86/sys-libs/cracklib/cracklib-2.8.16.ebuild,v 1.1 2010/04/30 13:02:14 vapier Exp $ |
4 |
|
4 |
|
5 |
inherit eutils toolchain-funcs multilib libtool |
5 |
EAPI="3" |
|
|
6 |
PYTHON_DEPEND="python? 2" |
7 |
SUPPORT_PYTHON_ABIS="1" |
8 |
RESTRICT_PYTHON_ABIS="3.*" |
9 |
|
10 |
inherit distutils toolchain-funcs |
6 |
|
11 |
|
7 |
MY_P=${P/_} |
12 |
MY_P=${P/_} |
8 |
DESCRIPTION="Password Checking Library" |
13 |
DESCRIPTION="Password Checking Library" |
Lines 14-23
Link Here
|
14 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd" |
19 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd" |
15 |
IUSE="nls python" |
20 |
IUSE="nls python" |
16 |
|
21 |
|
17 |
DEPEND="python? ( <dev-lang/python-3 )" |
22 |
DEPEND="sys-libs/zlib |
|
|
23 |
python? ( dev-python/setuptools )" |
24 |
RDEPEND="${DEPEND}" |
18 |
|
25 |
|
19 |
S=${WORKDIR}/${MY_P} |
26 |
S=${WORKDIR}/${MY_P} |
20 |
|
27 |
|
|
|
28 |
PYTHON_MODNAME="cracklib.py" |
29 |
|
21 |
pkg_setup() { |
30 |
pkg_setup() { |
22 |
# workaround #195017 |
31 |
# workaround #195017 |
23 |
if has unmerge-orphans ${FEATURES} && has_version "<${CATEGORY}/${PN}-2.8.10" ; then |
32 |
if has unmerge-orphans ${FEATURES} && has_version "<${CATEGORY}/${PN}-2.8.10" ; then |
Lines 25-54
Link Here
|
25 |
eerror "Please run: FEATURES=-unmerge-orphans emerge cracklib" |
34 |
eerror "Please run: FEATURES=-unmerge-orphans emerge cracklib" |
26 |
die "Please run: FEATURES=-unmerge-orphans emerge cracklib" |
35 |
die "Please run: FEATURES=-unmerge-orphans emerge cracklib" |
27 |
fi |
36 |
fi |
|
|
37 |
|
38 |
use python && python_pkg_setup |
28 |
} |
39 |
} |
29 |
|
40 |
|
30 |
src_unpack() { |
41 |
src_prepare() { |
31 |
unpack ${A} |
42 |
if use python; then |
32 |
cd "${S}" |
43 |
pushd python > /dev/null |
33 |
epatch "${FILESDIR}"/${PN}-2.8.13-python-linkage.patch #246747 |
44 |
distutils_src_prepare |
34 |
sed -i '/PYTHON/s:\(print\) \([^"]*\):\1(\2):' configure #302908 |
45 |
popd > /dev/null |
35 |
elibtoolize #269003 |
46 |
fi |
36 |
} |
47 |
} |
37 |
|
48 |
|
38 |
src_compile() { |
49 |
src_configure() { |
39 |
econf \ |
50 |
econf \ |
40 |
--with-default-dict='$(libdir)/cracklib_dict' \ |
51 |
--with-default-dict='$(libdir)/cracklib_dict' \ |
41 |
$(use_enable nls) \ |
52 |
--without-python \ |
42 |
$(use_with python) \ |
53 |
$(use_enable nls) |
43 |
|| die |
54 |
} |
44 |
emake || die |
55 |
|
|
|
56 |
src_compile() { |
57 |
default |
58 |
|
59 |
if use python; then |
60 |
pushd python > /dev/null |
61 |
distutils_src_compile |
62 |
popd > /dev/null |
63 |
fi |
45 |
} |
64 |
} |
46 |
|
65 |
|
47 |
src_install() { |
66 |
src_install() { |
48 |
emake DESTDIR="${D}" install || die "make install failed" |
67 |
emake DESTDIR="${D}" install || die "emake install failed" |
49 |
rm -r "${D}"/usr/share/cracklib |
68 |
rm -r "${ED}usr/share/cracklib" |
50 |
|
69 |
|
51 |
find "${D}" -name '_cracklibmodule.*a' -exec rm {} + #316495 |
70 |
if use python; then |
|
|
71 |
pushd python > /dev/null |
72 |
distutils_src_install |
73 |
popd > /dev/null |
74 |
fi |
52 |
|
75 |
|
53 |
# move shared libs to / |
76 |
# move shared libs to / |
54 |
gen_usr_ldscript -a crack |
77 |
gen_usr_ldscript -a crack |
Lines 65-68
Link Here
|
65 |
create-cracklib-dict /usr/share/dict/* > /dev/null |
88 |
create-cracklib-dict /usr/share/dict/* > /dev/null |
66 |
eend $? |
89 |
eend $? |
67 |
fi |
90 |
fi |
|
|
91 |
|
92 |
use python && distutils_pkg_postinst |
93 |
} |
94 |
|
95 |
pkg_postrm() { |
96 |
use python && distutils_pkg_postrm |
68 |
} |
97 |
} |