Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 83811 | Differences between
and this patch

Collapse All | Expand All

(-)/usr/portage/sys-libs/cracklib/cracklib-2.7-r10.ebuild.orig (-5 / +64 lines)
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.7-r10.ebuild,v 1.13 2005/02/22 22:30:12 vapier Exp $
3
# $Header: /var/cvsroot/gentoo-x86/sys-libs/cracklib/cracklib-2.7-r10.ebuild,v 1.13 2005/02/22 22:30:12 vapier Exp $
4
4
5
inherit flag-o-matic eutils toolchain-funcs
5
inherit flag-o-matic eutils toolchain-funcs multilib
6
6
7
MY_P=${P/-/,}
7
MY_P=${P/-/,}
8
DESCRIPTION="Password Checking Library"
8
DESCRIPTION="Password Checking Library"
Lines 17-23 Link Here
17
RDEPEND="sys-apps/miscfiles"
17
RDEPEND="sys-apps/miscfiles"
18
DEPEND="${RDEPEND}
18
DEPEND="${RDEPEND}
19
	uclibc? ( app-arch/gzip )
19
	uclibc? ( app-arch/gzip )
20
	sys-devel/gcc-config"
20
	sys-devel/gcc-config
21
	!app-emulation/emul-linux-x86-baselibs"
21
22
22
S="${WORKDIR}/${MY_P}"
23
S="${WORKDIR}/${MY_P}"
23
24
Lines 46-59 Link Here
46
			${S}/cracklib/Makefile \
47
			${S}/cracklib/Makefile \
47
			|| die "sed ${S}/cracklib/Makefile failed"
48
			|| die "sed ${S}/cracklib/Makefile failed"
48
	fi
49
	fi
50
51
	if use amd64 && has_multilib_profile; then
52
		cp -ar ${S} ${S}-x86
53
		mv ${S} ${S}-amd64
54
	fi
49
}
55
}
50
56
51
src_compile() {
57
src_compile() {
52
	tc-export CC LD AR
58
	if use amd64 && has_multilib_profile; then
59
		local OPWD=$PWD
60
		local OCFLAGS="${CFLAGS}"
61
		local OLD="${LD}"
62
		cd ${S}-x86
63
		CFLAGS="${OCFLAGS} -m32"
64
		export LD="ld -melf_i386"
65
		src_compile-multilib
66
		CFLAGS="${OCFLAGS}"
67
		LD="${OLD}"
68
		cd ${S}-amd64
69
		src_compile-multilib LD
70
		cd ${OPWD}
71
		unset OLD
72
		unset OCFLAGS
73
		unset OPWD
74
	else
75
		src_compile-multilib LD
76
	fi
77
}
78
79
src_compile-multilib() {
80
	tc-export CC ${1} AR
53
	emake all || die "emake failed"
81
	emake all || die "emake failed"
54
}
82
}
55
83
56
src_install() {
84
src_install() {
85
	if use amd64 && has_multilib_profile; then
86
		local OPWD=$PWD
87
		cd ${S}-x86
88
		dodir /usr/{lib32,sbin,include,lib} /lib32
89
		make DESTDIR="${D}" install LIBDIR="/usr/lib32" || die "make install failed"
90
		# correct permissions on static lib
91
		if [ -x "${D}/usr/lib32/libcrack.a" ] ; then
92
			fperms 644 "/usr/lib32/libcrack.a"
93
		fi
94
95
		# put libcrack.so.2.7 in /lib for cases where /usr isn't available yet
96
		mv "${D}/usr/lib32/libcrack.so"* "${D}/lib32" \
97
			|| die "mv failed"
98
99
		# This link is needed and not created. :| bug #9611
100
		dosym libcrack.so.2.7 "/lib32/libcrack.so.2"
101
102
		rm -rf ${D}/usr/lib32/cracklib*
103
		cd ${S}-amd64
104
		src_install-multilib -amd64
105
		for files in ${D}/usr/lib64/cracklib*; do
106
			ln -sf ../lib64/`basename $files` ${D}/usr/lib32/
107
		done
108
		cd ${OPWD}
109
		unset OPWD
110
	else
111
		src_install-multilib
112
	fi
113
}
114
115
src_install-multilib() {
57
	dodir /usr/{$(get_libdir),sbin,include,lib} /$(get_libdir)
116
	dodir /usr/{$(get_libdir),sbin,include,lib} /$(get_libdir)
58
	keepdir /usr/share/cracklib
117
	keepdir /usr/share/cracklib
59
118
Lines 83-93 Link Here
83
	# it's possible that pam is NOT in the USE flag at the time, and will be
142
	# it's possible that pam is NOT in the USE flag at the time, and will be
84
	# later on only.
143
	# later on only.
85
144
86
	cp "${S}/cracklib/packer.h" "${D}/usr/include" || die "cp failed"
145
	cp "${S}${1}/cracklib/packer.h" "${D}/usr/include" || die "cp failed"
87
	#fix the permissions on it as they may be wrong in some cases
146
	#fix the permissions on it as they may be wrong in some cases
88
	fperms 644 /usr/include/packer.h
147
	fperms 644 /usr/include/packer.h
89
148
90
	preplib "/usr/$(get_libdir)" "/$(get_libdir)"
149
	preplib "/usr/$(get_libdir)" "/$(get_libdir)"
91
150
92
	dodoc "${S}/"{HISTORY,MANIFEST,POSTER,README}
151
	dodoc "${S}${1}/"{HISTORY,MANIFEST,POSTER,README}
93
}
152
}

Return to bug 83811