Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 310513
Collapse All | Expand All

(-)perl-module.eclass (-11 / +20 lines)
Lines 1-4 Link Here
1
# Copyright 1999-2009 Gentoo Foundation
1
# Copyright 1999-2010 Gentoo Foundation
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/eclass/perl-module.eclass,v 1.122 2010/02/03 00:20:07 hanno Exp $
3
# $Header: /var/cvsroot/gentoo-x86/eclass/perl-module.eclass,v 1.122 2010/02/03 00:20:07 hanno Exp $
4
#
4
#
Lines 21-27 Link Here
21
	0|1)
21
	0|1)
22
		PERL_EXPF="${PERL_EXPF} pkg_setup pkg_preinst pkg_postinst pkg_prerm pkg_postrm"
22
		PERL_EXPF="${PERL_EXPF} pkg_setup pkg_preinst pkg_postinst pkg_prerm pkg_postrm"
23
		;;
23
		;;
24
	2)
24
	2|3)
25
		PERL_EXPF="${PERL_EXPF} src_prepare src_configure"
25
		PERL_EXPF="${PERL_EXPF} src_prepare src_configure"
26
		[[ ${CATEGORY} == "perl-core" ]] && \
26
		[[ ${CATEGORY} == "perl-core" ]] && \
27
			PERL_EXPF="${PERL_EXPF} pkg_postinst pkg_postrm"
27
			PERL_EXPF="${PERL_EXPF} pkg_postinst pkg_postrm"
Lines 100-108 Link Here
100
			<<< "${pm_echovar}" \
100
			<<< "${pm_echovar}" \
101
				|| die "Unable to build! (are you using USE=\"build\"?)"
101
				|| die "Unable to build! (are you using USE=\"build\"?)"
102
	elif [[ -f Makefile.PL ]] ; then
102
	elif [[ -f Makefile.PL ]] ; then
103
		has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX=
103
		einfo "Using ExtUtils::MakeMaker"
104
		einfo "Using ExtUtils::MakeMaker"
104
		perl Makefile.PL \
105
		perl Makefile.PL \
105
			PREFIX=/usr \
106
			PREFIX="${EPREFIX}"/usr \
106
			INSTALLDIRS=vendor \
107
			INSTALLDIRS=vendor \
107
			INSTALLMAN3DIR='none' \
108
			INSTALLMAN3DIR='none' \
108
			DESTDIR="${D}" \
109
			DESTDIR="${D}" \
Lines 188-197 Link Here
188
			|| die "emake ${myinst} ${mytargets} failed"
189
			|| die "emake ${myinst} ${mytargets} failed"
189
	fi
190
	fi
190
191
191
	if [[ -d "${D}"/usr/share/man ]] ; then
192
	has "${EAPI:-0}" 0 1 2 && ! use prefix && ED=${D}
193
194
	if [[ -d "${ED}"/usr/share/man ]] ; then
192
#		einfo "Cleaning out stray man files"
195
#		einfo "Cleaning out stray man files"
193
		find "${D}"/usr/share/man -type f -name "*.3pm" -delete
196
		find "${ED}"/usr/share/man -type f -name "*.3pm" -delete
194
		find "${D}"/usr/share/man -depth -type d -empty -delete
197
		find "${ED}"/usr/share/man -depth -type d -empty -delete
195
	fi
198
	fi
196
199
197
	fixlocalpod
200
	fixlocalpod
Lines 206-212 Link Here
206
		find "${D}/${VENDOR_LIB}" -depth -mindepth 1 -type d -empty -delete
209
		find "${D}/${VENDOR_LIB}" -depth -mindepth 1 -type d -empty -delete
207
	fi
210
	fi
208
211
209
	find "${D}" -type f -not -name '*.so' -print0 | while read -rd '' f ; do
212
	find "${ED}" -type f -not -name '*.so' -print0 | while read -rd '' f ; do
210
		if file "${f}" | grep -q -i " text" ; then
213
		if file "${f}" | grep -q -i " text" ; then
211
			grep -q "${D}" "${f}" && ewarn "QA: File contains a temporary path ${f}"
214
			grep -q "${D}" "${f}" && ewarn "QA: File contains a temporary path ${f}"
212
			sed -i -e "s:${D}:/:g" "${f}"
215
			sed -i -e "s:${D}:/:g" "${f}"
Lines 250-257 Link Here
250
}
253
}
251
254
252
fixlocalpod() {
255
fixlocalpod() {
253
	find "${D}" -type f -name perllocal.pod -delete
256
	has "${EAPI:-0}" 0 1 2 && ! use prefix && ED=${D}
254
	find "${D}" -depth -mindepth 1 -type d -empty -delete
257
	find "${ED}" -type f -name perllocal.pod -delete
258
	find "${ED}" -depth -mindepth 1 -type d -empty -delete
255
}
259
}
256
260
257
linkduallifescripts() {
261
linkduallifescripts() {
Lines 259-274 Link Here
259
		return 0
263
		return 0
260
	fi
264
	fi
261
265
266
	if has "${EAPI:-0}" 0 1 2 && ! use prefix ; then
267
		ED=${D}
268
		EROOT=${ROOT}
269
	fi
270
262
	local i ff
271
	local i ff
263
	if has "${EBUILD_PHASE:-none}" "postinst" "postrm" ; then
272
	if has "${EBUILD_PHASE:-none}" "postinst" "postrm" ; then
264
		for i in "${DUALLIFESCRIPTS[@]}" ; do
273
		for i in "${DUALLIFESCRIPTS[@]}" ; do
265
			alternatives_auto_makesym "/usr/bin/${i}" "/usr/bin/${i}-[0-9]*"
274
			alternatives_auto_makesym "/usr/bin/${i}" "/usr/bin/${i}-[0-9]*"
266
			ff=`echo "${ROOT}"/usr/share/man/man1/${i}-${PV}-${P}.1*`
275
			ff=`echo "${EROOT}"/usr/share/man/man1/${i}-${PV}-${P}.1*`
267
			ff=${ff##*.1}
276
			ff=${ff##*.1}
268
			alternatives_auto_makesym "/usr/share/man/man1/${i}.1${ff}" "/usr/share/man/man1/${i}-[0-9]*"
277
			alternatives_auto_makesym "/usr/share/man/man1/${i}.1${ff}" "/usr/share/man/man1/${i}-[0-9]*"
269
		done
278
		done
270
	else
279
	else
271
		pushd "${D}" > /dev/null
280
		pushd "${ED}" > /dev/null
272
		for i in $(find usr/bin -maxdepth 1 -type f 2>/dev/null) ; do
281
		for i in $(find usr/bin -maxdepth 1 -type f 2>/dev/null) ; do
273
			mv ${i}{,-${PV}-${P}} || die
282
			mv ${i}{,-${PV}-${P}} || die
274
			DUALLIFESCRIPTS[${#DUALLIFESCRIPTS[*]}]=${i##*/}
283
			DUALLIFESCRIPTS[${#DUALLIFESCRIPTS[*]}]=${i##*/}

Return to bug 310513