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

Collapse All | Expand All

(-)perl-5.8.8-r8.ebuild (-26 / +111 lines)
Lines 41-46 Link Here
41
41
42
PDEPEND=">=app-admin/perl-cleaner-1.03"
42
PDEPEND=">=app-admin/perl-cleaner-1.03"
43
43
44
# Cross-compiled build can't use a bootstrapped miniperl so
45
# it uses native perl.
46
if tc-is-cross-compiler; then
47
	export HOSTPERL="/usr/bin/perl${PV}"
48
else
49
	export HOSTPERL='./perl'
50
fi
51
44
dual_scripts() {
52
dual_scripts() {
45
	src_remove_dual_scripts perl-core/Encode             2.12    enc2xs piconv
53
	src_remove_dual_scripts perl-core/Encode             2.12    enc2xs piconv
46
	src_remove_dual_scripts perl-core/PodParser          1.32    pod2usage podchecker podselect
54
	src_remove_dual_scripts perl-core/PodParser          1.32    pod2usage podchecker podselect
Lines 63-68 Link Here
63
		epause 5
71
		epause 5
64
	fi
72
	fi
65
73
74
	if tc-is-cross-compiler ; then
75
		ewarn "It appears you are cross-compiling ${PN}."
76
		ewarn "You must have libperl-${PV} (>=libperl-5.8.8-r3) and"
77
		ewarn "perl-${PV} (>=perl-5.8.8-r9) installed on your"
78
		ewarn "native build system or this build might fail."
79
		epause 5
80
	fi
81
66
	if [[ ! -f "${ROOT}/usr/$(get_libdir)/${LIBPERL}" ]]
82
	if [[ ! -f "${ROOT}/usr/$(get_libdir)/${LIBPERL}" ]]
67
	then
83
	then
68
		# Make sure we have libperl installed ...
84
		# Make sure we have libperl installed ...
Lines 172-177 Link Here
172
188
173
	# Respect CFLAGS even for linking when done with compiler
189
	# Respect CFLAGS even for linking when done with compiler
174
	epatch "${FILESDIR}"/${P}-ccld-cflags.patch
190
	epatch "${FILESDIR}"/${P}-ccld-cflags.patch
191
192
	# Check the environment for {PERL_LIB}, {PERL_ARCHLIB}
193
	# and {PERL_INC} and use relative headers
194
	epatch "${FILESDIR}"/native-perlinc.patch
195
196
	# Dynamically load modules from ${PERLHOSTLIB} to
197
	# use while compiling
198
	epatch "${FILESDIR}"/perl-dynloader.patch
199
	
200
	# Use Config_heavy.pl from ${PERL_ARCHLIB}
201
	epatch "${FILESDIR}"/perl-configpm-switch.patch
202
203
	if tc-is-cross-compiler; then
204
		# Use ${HOSTPERL}, not miniperl, for cross-compiling
205
		epatch "${FILESDIR}"/Makefile.SH.patch
206
207
		epatch "${FILESDIR}"/perl-moreconfig.patch
208
		epatch "${FILESDIR}"/letgcc-find-errno.patch
209
	fi
175
}
210
}
176
211
177
myconf() {
212
myconf() {
Lines 283-312 Link Here
283
		myconf "-Dlibpth=/usr/local/$(get_libdir) /$(get_libdir) /usr/$(get_libdir)"
318
		myconf "-Dlibpth=/usr/local/$(get_libdir) /$(get_libdir) /usr/$(get_libdir)"
284
	fi
319
	fi
285
320
286
	sh Configure -des \
321
	if tc-is-cross-compiler; then
287
		-Darchname="${myarch}" \
322
		# ${S}/config.sh is generated from config-bits.
288
		-Dcccdlflags='-fPIC' \
323
		# Bash substitution is used to alter options for each build
289
		-Dccdlflags='-rdynamic' \
324
290
		-Dcc="$(tc-getCC)" \
325
		source "${FILESDIR}"/config-bits || die "sourcing of config-bits failed"
291
		-Dprefix='/usr' \
326
		make_configsh || die "make_configsh failed"
292
		-Dvendorprefix='/usr' \
327
293
		-Dsiteprefix='/usr' \
328
		sed -i -e "s|/usr/include|${ROOT}usr/include|g" \
294
		-Dlocincpth=' ' \
329
			"${S}"/ext/Errno/Errno_pm.PL || die "sed of ${S}/ext/Errno/Errno_pm.PL failed"
295
		-Doptimize="${CFLAGS}" \
330
		
296
		-Duselargefiles \
331
		sh Configure -S $(use debug && echo '-DDEBUGGING') || die "Unable to configure"
297
		-Dd_semctl_semun \
332
	else
298
		-Dscriptdir=/usr/bin \
333
		sh Configure -des \
299
		-Dman1dir=/usr/share/man/man1 \
334
			-Darchname="${myarch}" \
300
		-Dman3dir=/usr/share/man/man3 \
335
			-Dcccdlflags='-fPIC' \
301
		-Dinstallman1dir=/usr/share/man/man1 \
336
			-Dccdlflags='-rdynamic' \
302
		-Dinstallman3dir=/usr/share/man/man3 \
337
			-Dcc="$(tc-getCC)" \
303
		-Dman1ext='1' \
338
			-Dprefix='/usr' \
304
		-Dman3ext='3pm' \
339
			-Dvendorprefix='/usr' \
305
		-Dinc_version_list="$inclist" \
340
			-Dsiteprefix='/usr' \
306
		-Dcf_by='Gentoo' \
341
			-Dlocincpth=' ' \
307
		-Ud_csh \
342
			-Doptimize="${CFLAGS}" \
308
		-Dusenm \
343
			-Duselargefiles \
309
		"${myconf[@]}" || die "Unable to configure"
344
			-Dd_semctl_semun \
345
			-Dscriptdir=/usr/bin \
346
			-Dman1dir=/usr/share/man/man1 \
347
			-Dman3dir=/usr/share/man/man3 \
348
			-Dinstallman1dir=/usr/share/man/man1 \
349
			-Dinstallman3dir=/usr/share/man/man3 \
350
			-Dman1ext='1' \
351
			-Dman3ext='3pm' \
352
			-Dinc_version_list="$inclist" \
353
			-Dcf_by='Gentoo' \
354
			-Ud_csh \
355
			-Dusenm \
356
			"${myconf[@]}" || die "Unable to configure"
357
	fi
310
}
358
}
311
359
312
src_compile() {
360
src_compile() {
Lines 317-322 Link Here
317
	src_configure
365
	src_configure
318
366
319
	emake -j1 || die "Unable to make"
367
	emake -j1 || die "Unable to make"
368
	
369
	if tc-is-cross-compiler; then
370
		# Cross-compile build uses host library
371
		export PERLHOSTLIB="$(${HOSTPERL} -V:archlib | cut -d \' -f 2)"
372
		
373
		emake -j1 more || die "Unable to make more"
374
375
		mkdir -p "${S}"/fake_config_library || die "Unable to mkdir ${S}/fake_config_library"
376
		cp -f "${S}"/lib/Config.pm "${S}"/fake_config_library \
377
			|| die "Unable to copy ${S}/lib/Config.pm"
378
379
		emake -j1 more2 "PERLRUN=${HOSTPERL} \
380
			-I${S}/fake_config_library -MConfig" || die "Unable to make more2"
381
		emake -j1 more3 "PERLRUN=${HOSTPERL} \
382
			-I${S}/fake_config_library -MConfig" || die "Unable to make more3"
383
		emake -j1 more4 "PERLRUN=${HOSTPERL} \
384
			-I${S}/fake_config_library -MConfig" || die "Unable to make more4"
385
386
		rm -rf "${S}"/install_me_here || die "Unable to remove ${S}/install_me_here"
387
388
		for f in `find "${S}"/lib -name install_me_here` ; do
389
			cp -r "${f}"/* "${S}"/install_me_here/ || die "Unable to copy ${f}/*" 
390
		done
391
392
		for f in `find "${S}"/lib -name install_me_here` ; do
393
			rm -rf "${f}" || die "Unable to remove ${f}" 
394
		done
395
	fi
320
}
396
}
321
397
322
src_test() {
398
src_test() {
Lines 328-333 Link Here
328
404
329
	export LC_ALL="C"
405
	export LC_ALL="C"
330
406
407
	# Cross-compile build uses host library
408
	tc-is-cross-compiler && \
409
		export PERLHOSTLIB="$(${HOSTPERL} -V:archlib | cut -d \' -f 2)"
410
331
	# Need to do this, else apps do not link to dynamic version of
411
	# Need to do this, else apps do not link to dynamic version of
332
	# the library ...
412
	# the library ...
333
	local coredir="/usr/$(get_libdir)/perl5/${MY_PV}/${myarch}${mythreading}/CORE"
413
	local coredir="/usr/$(get_libdir)/perl5/${MY_PV}/${myarch}${mythreading}/CORE"
Lines 351-357 Link Here
351
	cp -f utils/h2ph utils/h2ph_patched
431
	cp -f utils/h2ph utils/h2ph_patched
352
	epatch "${FILESDIR}"/${PN}-h2ph-ansi-header.patch
432
	epatch "${FILESDIR}"/${PN}-h2ph-ansi-header.patch
353
433
354
	LD_LIBRARY_PATH=. ./perl -Ilib utils/h2ph_patched \
434
	LD_LIBRARY_PATH=. ${HOSTPERL} -Ilib utils/h2ph_patched \
355
		-a -d "${D}"/usr/$(get_libdir)/perl5/${MY_PV}/${myarch}${mythreading} <<EOF
435
		-a -d "${D}"/usr/$(get_libdir)/perl5/${MY_PV}/${myarch}${mythreading} <<EOF
356
asm/termios.h
436
asm/termios.h
357
syscall.h
437
syscall.h
Lines 384-389 Link Here
384
			mv ${i}.new ${i} || die "Sed failed"
464
			mv ${i}.new ${i} || die "Sed failed"
385
	done
465
	done
386
466
467
	# Don't let the cross-compiled build try to
468
	# Install another libperl
469
	tc-is-cross-compiler && \
470
		rm -f "${D}"/usr/$(get_libdir)/${LIBPERL}
471
387
	# Note: find out from psm why we would need/want this.
472
	# Note: find out from psm why we would need/want this.
388
	# ( use berkdb && has_version '=sys-libs/db-1*' ) ||
473
	# ( use berkdb && has_version '=sys-libs/db-1*' ) ||
389
	#	find ${D} -name "*NDBM*" | xargs rm -f
474
	#	find ${D} -name "*NDBM*" | xargs rm -f
Lines 396-402 Link Here
396
		# We expect errors, warnings, and such with the following.
481
		# We expect errors, warnings, and such with the following.
397
482
398
		dodir /usr/share/doc/${PF}/html
483
		dodir /usr/share/doc/${PF}/html
399
		./perl installhtml \
484
		${HOSTPERL} installhtml \
400
			--podroot='.' \
485
			--podroot='.' \
401
			--podpath='lib:ext:pod:vms' \
486
			--podpath='lib:ext:pod:vms' \
402
			--recurse \
487
			--recurse \

Return to bug 134650