/[gentoo-x86]/eclass/perl-module.eclass
Gentoo

Diff of /eclass/perl-module.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.64 Revision 1.65
1# Copyright 1999-2004 Gentoo Foundation 1# Copyright 1999-2004 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.64 2004/08/02 18:45:37 rac Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/perl-module.eclass,v 1.65 2004/10/01 21:32:07 mcummings Exp $
4# 4#
5# Author: Seemant Kulleen <seemant@gentoo.org> 5# Author: Seemant Kulleen <seemant@gentoo.org>
6# Maintained by the Perl herd <perl@gentoo.org> 6# Maintained by the Perl herd <perl@gentoo.org>
7# 7#
8# The perl-module eclass is designed to allow easier installation of perl 8# The perl-module eclass is designed to allow easier installation of perl
25# 25#
26# 2004.05.25 rac 26# 2004.05.25 rac
27# for the same reasons, make the perl dep >=5.8.2 to get everybody 27# for the same reasons, make the perl dep >=5.8.2 to get everybody
28# with 5.8.0 and its 6.03 makemaker up to a version that can 28# with 5.8.0 and its 6.03 makemaker up to a version that can
29# understand DESTDIR 29# understand DESTDIR
30#
31# 2004.10.01 mcummings
32# noticed a discrepancy in how we were sed fixing references to ${D}
30 33
31DEPEND=">=dev-lang/perl-5.8.2 !<dev-perl/ExtUtils-MakeMaker-6.17" 34DEPEND=">=dev-lang/perl-5.8.2 !<dev-perl/ExtUtils-MakeMaker-6.17"
32SRC_PREP="no" 35SRC_PREP="no"
33SRC_TEST="skip" 36SRC_TEST="skip"
34 37
35PERL_VERSION="" 38PERL_VERSION=""
36SITE_ARCH="" 39SITE_ARCH=""
37SITE_LIB="" 40SITE_LIB=""
41VENDOR_LIB=""
42VENDOR_ARCH=""
38ARCH_LIB="" 43ARCH_LIB=""
39POD_DIR="" 44POD_DIR=""
40 45
41perl-module_src_prep() { 46perl-module_src_prep() {
42 47
105 touch ${D}/${POD_DIR}/${P}.pod.site 110 touch ${D}/${POD_DIR}/${P}.pod.site
106 cat ${D}/${POD_DIR}/${P}.pod >>${D}/${POD_DIR}/${P}.pod.site 111 cat ${D}/${POD_DIR}/${P}.pod >>${D}/${POD_DIR}/${P}.pod.site
107 rm -f ${D}/${SITE_LIB}/perllocal.pod 112 rm -f ${D}/${SITE_LIB}/perllocal.pod
108 fi 113 fi
109 114
110 for FILE in `find ${D} -type f -name "*.html" -o -name ".packlist"`; do 115 if [ -f ${D}${VENDOR_LIB}/perllocal.pod ];
116 then
117 touch ${D}/${POD_DIR}/${P}.pod
118 sed -e "s:${D}::g" \
119 ${D}${VENDOR_LIB}/perllocal.pod >> ${D}/${POD_DIR}/${P}.pod
120 touch ${D}/${POD_DIR}/${P}.pod.vendor
121 cat ${D}/${POD_DIR}/${P}.pod >>${D}/${POD_DIR}/${P}.pod.vendor
122 rm -f ${D}/${VENDOR_LIB}/perllocal.pod
123 fi
124
125
126 for FILE in `find ${D} -type f |grep -v '.so'`; do
127 STAT=`file $FILE| grep -i " text"`
128 if [ "${STAT}x" != "x" ]; then
111 sed -i -e "s:${D}:/:g" ${FILE} 129 sed -i -e "s:${D}:/:g" ${FILE}
130 fi
112 done 131 done
113 132
114 for doc in Change* MANIFEST* README*; do 133 for doc in Change* MANIFEST* README*; do
115 [ -s "$doc" ] && dodoc $doc 134 [ -s "$doc" ] && dodoc $doc
116 done 135 done
144 updatepod 163 updatepod
145} 164}
146 165
147perlinfo() { 166perlinfo() {
148 167
168 eval `perl '-V:version'`
169 PERL_VERSION=${version}
170
171 eval `perl '-V:installsitearch'`
172 SITE_ARCH=${installsitearch}
173
174 eval `perl '-V:installsitearch'`
175 SITE_LIB=${installsitearch}
176
177 eval `perl '-V:installarchlib'`
178 ARCH_LIB=${installarchlib}
179
180 eval `perl '-V:installvendorlib'`
181 VENDOR_LIB=${installvendorlib}
182
183 eval `perl '-V:installvendorarch'`
184 VENDOR_ARCH=${installvendorarch}
185
149 if [ -f /usr/bin/perl ] 186 if [ -f /usr/bin/perl ]
150 then 187 then
151 POD_DIR="/usr/share/perl/gentoo-pods/${version}" 188 POD_DIR="/usr/share/perl/gentoo-pods/${version}"
152 fi 189 fi
153 eval `perl '-V:version'`
154 PERL_VERSION=${version}
155 eval `perl '-V:installsitearch'`
156 SITE_ARCH=${installsitearch}
157 eval `perl '-V:installarchlib'`
158 ARCH_LIB=${installarchlib}
159 eval `perl '-V:installarchlib'`
160 ARCH_LIB=${installarchlib}
161 eval `perl '-V:installsitearch'`
162 SITE_LIB=${installsitearch}
163} 190}
164 191
165updatepod() { 192updatepod() {
166 perlinfo 193 perlinfo
167 194
173 done 200 done
174 for FILE in `find ${POD_DIR} -type f -name "*.pod.site"`; do 201 for FILE in `find ${POD_DIR} -type f -name "*.pod.site"`; do
175 cat ${FILE} >> ${SITE_LIB}/perllocal.pod 202 cat ${FILE} >> ${SITE_LIB}/perllocal.pod
176 rm -f ${FILE} 203 rm -f ${FILE}
177 done 204 done
205 for FILE in `find ${POD_DIR} -type f -name "*.pod.vendor"`; do
206 cat ${FILE} >> ${VENDOR_LIB}/perllocal.pod
207 rm -f ${FILE}
208 done
178 fi 209 fi
179} 210}

Legend:
Removed from v.1.64  
changed lines
  Added in v.1.65

  ViewVC Help
Powered by ViewVC 1.1.20