# Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/portage/eclass/perl-module.eclass,v 1.1 2005/03/13 21:41:34 yaakov Exp $ # # Author: Seemant Kulleen # Maintained by the Perl herd # # The perl-module eclass is designed to allow easier installation of perl # modules, and their incorporation into the Gentoo Linux system. ECLASS=perl-module INHERITED="${INHERITED} ${ECLASS}" EXPORT_FUNCTIONS pkg_setup pkg_preinst pkg_postinst pkg_prerm pkg_postrm \ src_compile src_install src_test \ perlinfo updatepod # 2004.05.10 rac # block on makemaker versions earlier than that in the 5.8.2 core. in # actuality, this should be handled in the perl ebuild, so every perl # ebuild should block versions of MakeMaker older than the one it # carries. in the meantime, since we have dumped support for MakeMaker # <6.11 and the associated broken DESTDIR handling, block here to save # people from sandbox trouble. # # 2004.05.25 rac # for the same reasons, make the perl dep >=5.8.2 to get everybody # with 5.8.0 and its 6.03 makemaker up to a version that can # understand DESTDIR # # 2004.10.01 mcummings # noticed a discrepancy in how we were sed fixing references to ${D} DEPEND=">=dev-lang/perl-5.8.2 !> ${D}/${POD_DIR}/${P}.pod touch ${D}/${POD_DIR}/${P}.pod.arch cat ${D}/${POD_DIR}/${P}.pod >>${D}/${POD_DIR}/${P}.pod.arch rm -f ${D}/${ARCH_LIB}/perllocal.pod fi if [ -f ${D}${SITE_LIB}/perllocal.pod ]; then touch ${D}/${POD_DIR}/${P}.pod sed -e "s:${D}::g" \ ${D}${SITE_LIB}/perllocal.pod >> ${D}/${POD_DIR}/${P}.pod touch ${D}/${POD_DIR}/${P}.pod.site cat ${D}/${POD_DIR}/${P}.pod >>${D}/${POD_DIR}/${P}.pod.site rm -f ${D}/${SITE_LIB}/perllocal.pod fi if [ -f ${D}${VENDOR_LIB}/perllocal.pod ]; then touch ${D}/${POD_DIR}/${P}.pod sed -e "s:${D}::g" \ ${D}${VENDOR_LIB}/perllocal.pod >> ${D}/${POD_DIR}/${P}.pod touch ${D}/${POD_DIR}/${P}.pod.vendor cat ${D}/${POD_DIR}/${P}.pod >>${D}/${POD_DIR}/${P}.pod.vendor rm -f ${D}/${VENDOR_LIB}/perllocal.pod fi } updatepod() { perlinfo if [ -d "${POD_DIR}" ] then for FILE in `find ${POD_DIR} -type f -name "*.pod.arch"`; do cat ${FILE} >> ${ARCH_LIB}/perllocal.pod rm -f ${FILE} done for FILE in `find ${POD_DIR} -type f -name "*.pod.site"`; do cat ${FILE} >> ${SITE_LIB}/perllocal.pod rm -f ${FILE} done for FILE in `find ${POD_DIR} -type f -name "*.pod.vendor"`; do cat ${FILE} >> ${VENDOR_LIB}/perllocal.pod rm -f ${FILE} done fi }