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

Collapse All | Expand All

(-)perl-5.14.2.ebuild (-47 / +96 lines)
Lines 38-44 Link Here
38
	sys-libs/zlib
38
	sys-libs/zlib
39
"
39
"
40
DEPEND="${COMMON_DEPEND}
40
DEPEND="${COMMON_DEPEND}
41
	elibc_FreeBSD? ( sys-freebsd/freebsd-mk-defs )
41
	!prefix? ( elibc_FreeBSD? ( sys-freebsd/freebsd-mk-defs ) )
42
"
42
"
43
RDEPEND="${COMMON_DEPEND}
43
RDEPEND="${COMMON_DEPEND}
44
"
44
"
Lines 75-80 Link Here
75
		*-netbsd*)    osname="netbsd" ;;
75
		*-netbsd*)    osname="netbsd" ;;
76
		*-openbsd*)   osname="openbsd" ;;
76
		*-openbsd*)   osname="openbsd" ;;
77
		*-darwin*)    osname="darwin" ;;
77
		*-darwin*)    osname="darwin" ;;
78
		*-interix*)   osname="interix" ;;
78
		*)            osname="linux" ;;
79
		*)            osname="linux" ;;
79
	esac
80
	esac
80
81
Lines 152-159 Link Here
152
153
153
	# pod/perltoc.pod fails
154
	# pod/perltoc.pod fails
154
	# lib/ExtUtils/t/Embed.t fails
155
	# lib/ExtUtils/t/Embed.t fails
155
	ln -s ${LIBPERL} libperl$(get_libname ${SHORT_PV}) || die
156
	if ! tc-is-static-only ; then
156
	ln -s ${LIBPERL} libperl$(get_libname ) || die
157
		ln -s ${LIBPERL} libperl$(get_libname ${SHORT_PV}) || die
158
		ln -s ${LIBPERL} libperl$(get_libname ) || die
159
	fi
160
161
	epatch "${FILESDIR}"/${PN}-5.12.3-aix-soname.patch
162
	epatch "${FILESDIR}"/${PN}-5.8.8-solaris-relocation.patch
163
	epatch "${FILESDIR}"/${PN}-5.8.8-solaris11.patch
164
	epatch "${FILESDIR}"/${PN}-5.14.1-cleanup-paths.patch
165
	epatch "${FILESDIR}"/${PN}-5.8.8-usr-local.patch
166
	epatch "${FILESDIR}"/${PN}-5.10.1-hpux.patch
167
	epatch "${FILESDIR}"/${PN}-5.8.8-darwin-cc-ld.patch
168
	epatch "${FILESDIR}"/${PN}-5.12.3-mint.patch
169
	epatch "${FILESDIR}"/${PN}-5.12.3-interix.patch
170
171
	# Fix build on OSX Lion (10.7)
172
#	sed -i -e '/^usenm=/s/true/false/' hints/darwin.sh
173
174
	# rest of usr-local patch
175
	sed -i \
176
		-e '/^locincpth=/c\locincpth=""' \
177
		-e '/^loclibpth=/c\loclibpth=""' \
178
		-e '/^glibpth=.*\/local\//s: /usr/local/lib.*":":' \
179
		Configure || die
157
}
180
}
158
181
159
myconf() {
182
myconf() {
Lines 181-192 Link Here
181
204
182
	# 266337
205
	# 266337
183
	export BUILD_BZIP2=0
206
	export BUILD_BZIP2=0
184
	export BZIP2_INCLUDE=/usr/include
207
	export BZIP2_INCLUDE=${EPREFIX}/usr/include
185
	export BZIP2_LIB=/usr/$(get_libdir)
208
	export BZIP2_LIB=${EPREFIX}/usr/$(get_libdir)
186
	cat <<-EOF > "${S}/cpan/Compress-Raw-Zlib/config.in"
209
	cat <<-EOF > "${S}/cpan/Compress-Raw-Zlib/config.in"
187
		BUILD_ZLIB = False
210
		BUILD_ZLIB = False
188
		INCLUDE = /usr/include
211
		INCLUDE = ${EPREFIX}/usr/include
189
		LIB = /usr/$(get_libdir)
212
		LIB = ${EPREFIX}/usr/$(get_libdir)
190
213
191
		OLD_ZLIB = False
214
		OLD_ZLIB = False
192
		GZIP_OS_CODE = AUTO_DETECT
215
		GZIP_OS_CODE = AUTO_DETECT
Lines 232-242 Link Here
232
255
233
	[[ ${ELIBC} == "FreeBSD" ]] && myconf "-Dlibc=/usr/$(get_libdir)/libc.a"
256
	[[ ${ELIBC} == "FreeBSD" ]] && myconf "-Dlibc=/usr/$(get_libdir)/libc.a"
234
257
235
	if [[ $(get_libdir) != "lib" ]] ; then
258
	# Prefix: the host system needs not to follow Gentoo multilib stuff, and in
259
	# Prefix itself we don't do multilib either, so make sure perl can find
260
	# something compatible.
261
	if use prefix ; then
262
		local ldir
263
		local llib
264
		local paths=""
265
		echo "int main() {}" > "${T}"/t.c
266
		# need to ensure dirs contain compatible libs, bug #358875
267
		for ldir in /lib /usr/lib /lib64 /lib/64 /usr/lib64 /usr/lib/64 /lib32 /usr/lib32 ; do
268
			[[ -d ${ldir} ]] || continue
269
			# find a random lib from here
270
			llib=( ${ldir}/*$(get_libname) )
271
			[[ -e ${llib[0]} ]] || continue
272
			$(tc-getCC) -o "${T}"/t "${T}"/t.c ${llib[0]} >& /dev/null \
273
				&& paths="${paths} ${ldir}"
274
		done
275
		myconf "-Dlibpth=${EPREFIX}/$(get_libdir) ${EPREFIX}/usr/$(get_libdir) ${paths}"
276
	elif [[ $(get_libdir) != "lib" ]] ; then
236
		# We need to use " and not ', as the written config.sh use ' ...
277
		# We need to use " and not ', as the written config.sh use ' ...
237
		myconf "-Dlibpth=/usr/local/$(get_libdir) /$(get_libdir) /usr/$(get_libdir)"
278
		myconf "-Dlibpth=/usr/local/$(get_libdir) /$(get_libdir) /usr/$(get_libdir)"
238
	fi
279
	fi
239
280
281
	# don't try building ODBM, bug #354453
282
	myconf -Dnoextensions=ODBM_File
283
240
	sh Configure \
284
	sh Configure \
241
		-des \
285
		-des \
242
		-Duseshrplib \
286
		-Duseshrplib \
Lines 244-274 Link Here
244
		-Dcc="$(tc-getCC)" \
288
		-Dcc="$(tc-getCC)" \
245
		-Doptimize="${CFLAGS}" \
289
		-Doptimize="${CFLAGS}" \
246
		-Dldflags="${LDFLAGS}" \
290
		-Dldflags="${LDFLAGS}" \
247
		-Dprefix='/usr' \
291
		-Dprefix="${EPREFIX}"'/usr' \
248
		-Dsiteprefix='/usr' \
292
		-Dinstallprefix="${EPREFIX}"'/usr' \
249
		-Dvendorprefix='/usr' \
293
		-Dsiteprefix="${EPREFIX}"'/usr' \
250
		-Dscriptdir='/usr/bin' \
294
		-Dvendorprefix="${EPREFIX}"'/usr' \
251
		-Dprivlib="${PRIV_LIB}" \
295
		-Dscriptdir="${EPREFIX}"'/usr/bin' \
252
		-Darchlib="${ARCH_LIB}" \
296
		-Dprivlib="${EPREFIX}/usr/$(get_libdir)/perl5/${MY_PV}" \
253
		-Dsitelib="${SITE_LIB}" \
297
		-Darchlib="${EPREFIX}/usr/$(get_libdir)/perl5/${MY_PV}/${myarch}${mythreading}" \
254
		-Dsitearch="${SITE_ARCH}" \
298
		-Dsitelib="${EPREFIX}/usr/$(get_libdir)/perl5/site_perl/${MY_PV}" \
255
		-Dvendorlib="${VENDOR_LIB}" \
299
		-Dsitearch="${EPREFIX}/usr/$(get_libdir)/perl5/site_perl/${MY_PV}/${myarch}${mythreading}" \
256
		-Dvendorarch="${VENDOR_ARCH}" \
300
		-Dvendorlib="${EPREFIX}/usr/$(get_libdir)/perl5/vendor_perl/${MY_PV}" \
257
		-Dman1dir=/usr/share/man/man1 \
301
		-Dvendorarch="${EPREFIX}/usr/$(get_libdir)/perl5/vendor_perl/${MY_PV}/${myarch}${mythreading}" \
258
		-Dman3dir=/usr/share/man/man3 \
302
		-Dman1dir="${EPREFIX}"/usr/share/man/man1 \
259
		-Dsiteman1dir=/usr/share/man/man1 \
303
		-Dman3dir="${EPREFIX}"/usr/share/man/man3 \
260
		-Dsiteman3dir=/usr/share/man/man3 \
304
		-Dsiteman1dir="${EPREFIX}"/usr/share/man/man1 \
261
		-Dvendorman1dir=/usr/share/man/man1 \
305
		-Dsiteman3dir="${EPREFIX}"/usr/share/man/man3 \
262
		-Dvendorman3dir=/usr/share/man/man3 \
306
		-Dvendorman1dir="${EPREFIX}"/usr/share/man/man1 \
307
		-Dvendorman3dir="${EPREFIX}"/usr/share/man/man3 \
263
		-Dman1ext='1' \
308
		-Dman1ext='1' \
264
		-Dman3ext='3pm' \
309
		-Dman3ext='3pm' \
265
		-Dlibperl="${LIBPERL}" \
310
		-Dlibperl="${LIBPERL}" \
266
		-Dlocincpth=' ' \
311
		-Dlocincpth="${EPREFIX}"'/usr/include ' \
312
		-Dglibpth="${EPREFIX}/$(get_libdir) ${EPREFIX}/usr/$(get_libdir)"' ' \
267
		-Duselargefiles \
313
		-Duselargefiles \
268
		-Dd_semctl_semun \
314
		-Dd_semctl_semun \
269
		-Dcf_by='Gentoo' \
315
		-Dcf_by='Gentoo' \
270
		-Dmyhostname='localhost' \
316
		-Dmyhostname='localhost' \
271
		-Dperladmin='root@localhost' \
317
		-Dperladmin="${PORTAGE_ROOT_USER:-root}@localhost" \
272
		-Dinstallusrbinperl='n' \
318
		-Dinstallusrbinperl='n' \
273
		-Ud_csh \
319
		-Ud_csh \
274
		-Uusenm \
320
		-Uusenm \
Lines 295-312 Link Here
295
	fi
341
	fi
296
	emake DESTDIR="${D}" ${installtarget}
342
	emake DESTDIR="${D}" ${installtarget}
297
343
298
	rm -f "${D}"/usr/bin/perl
344
	rm -f "${ED}"/usr/bin/perl
299
	ln -s perl${MY_PV} "${D}"/usr/bin/perl || die
345
	ln -s perl${MY_PV} "${ED}"/usr/bin/perl || die
300
346
301
	dolib.so "${D}"${coredir}/${LIBPERL}
347
	if ! tc-is-static-only ; then
302
	rm -f "${D}"${coredir}/${LIBPERL}
348
		dolib.so "${ED}"${coredir}/${LIBPERL}
303
	ln -sf ${LIBPERL} "${D}"/usr/$(get_libdir)/libperl$(get_libname ${SHORT_PV}) || die
349
		rm -f "${ED}"${coredir}/${LIBPERL}
304
	ln -sf ${LIBPERL} "${D}"/usr/$(get_libdir)/libperl$(get_libname) || die
350
		ln -sf ${LIBPERL} "${ED}"/usr/$(get_libdir)/libperl$(get_libname ${SHORT_PV}) || die
305
	ln -sf ../../../../../$(get_libdir)/${LIBPERL} "${D}"${coredir}/${LIBPERL} || die
351
		ln -sf ${LIBPERL} "${ED}"/usr/$(get_libdir)/libperl$(get_libname) || die
306
	ln -sf ../../../../../$(get_libdir)/${LIBPERL} "${D}"${coredir}/libperl$(get_libname ${SHORT_PV}) || die
352
		ln -sf ../../../../../$(get_libdir)/${LIBPERL} "${ED}"${coredir}/${LIBPERL} || die
307
	ln -sf ../../../../../$(get_libdir)/${LIBPERL} "${D}"${coredir}/libperl$(get_libname) || die
353
		ln -sf ../../../../../$(get_libdir)/${LIBPERL} "${ED}"${coredir}/libperl$(get_libname ${SHORT_PV}) || die
354
		ln -sf ../../../../../$(get_libdir)/${LIBPERL} "${ED}"${coredir}/libperl$(get_libname) || die
355
	fi
308
356
309
	rm -rf "${D}"/usr/share/man/man3 || die "Unable to remove module man pages"
357
	rm -rf "${ED}"/usr/share/man/man3 || die "Unable to remove module man pages"
310
358
311
#	# A poor fix for the miniperl issues
359
#	# A poor fix for the miniperl issues
312
#	dosed 's:./miniperl:/usr/bin/perl:' /usr/$(get_libdir)/perl5/${MY_PV}/ExtUtils/xsubpp
360
#	dosed 's:./miniperl:/usr/bin/perl:' /usr/$(get_libdir)/perl5/${MY_PV}/ExtUtils/xsubpp
Lines 320-330 Link Here
320
		sed -i -e "s:${D}::" "${i}" || die "Sed failed"
368
		sed -i -e "s:${D}::" "${i}" || die "Sed failed"
321
	done
369
	done
322
370
323
	find "${D}" -type f -name .packlist -delete || die
371
	find "${ED}" -type f -name .packlist -delete || die
324
372
325
	# Note: find out from psm why we would need/want this.
373
	# Note: find out from psm why we would need/want this.
326
	# ( use berkdb && has_version '=sys-libs/db-1*' ) ||
374
	# ( use berkdb && has_version '=sys-libs/db-1*' ) ||
327
	#	find "${D}" -name "*NDBM*" | xargs rm -f
375
	#	find "${ED}" -name "*NDBM*" | xargs rm -f
328
376
329
	dodoc Changes* README AUTHORS
377
	dodoc Changes* README AUTHORS
330
378
Lines 337-343 Link Here
337
			--podroot='.' \
385
			--podroot='.' \
338
			--podpath='lib:ext:pod:vms' \
386
			--podpath='lib:ext:pod:vms' \
339
			--recurse \
387
			--recurse \
340
			--htmldir="${D}/usr/share/doc/${PF}/html" \
388
			--htmldir="${ED}/usr/share/doc/${PF}/html" \
341
			--libpods='perlfunc:perlguts:perlvar:perlrun:perlop'
389
			--libpods='perlfunc:perlguts:perlvar:perlrun:perlop'
342
	fi
390
	fi
343
391
Lines 375-382 Link Here
375
#		fi
423
#		fi
376
424
377
		einfo "Converting C header files to the corresponding Perl format (ignore any error)"
425
		einfo "Converting C header files to the corresponding Perl format (ignore any error)"
426
		# unprefixed as this is all kernel/libc stuff that we never provide
378
		pushd /usr/include >/dev/null
427
		pushd /usr/include >/dev/null
379
			h2ph -Q -a -d ${ARCH_LIB} \
428
			h2ph -Q -a -d "${EPREFIX}${ARCH_LIB}" \
380
				asm/termios.h syscall.h syslimits.h syslog.h sys/ioctl.h \
429
				asm/termios.h syscall.h syslimits.h syslog.h sys/ioctl.h \
381
				sys/socket.h sys/time.h wait.h sysexits.h
430
				sys/socket.h sys/time.h wait.h sysexits.h
382
		popd >/dev/null
431
		popd >/dev/null
Lines 434-440 Link Here
434
			;;
483
			;;
435
		setup)
484
		setup)
436
			for i in "$@" ; do
485
			for i in "$@" ; do
437
				if [[ -f ${ROOT}${i} && ! -h ${ROOT}${i} ]] ; then
486
				if [[ -f ${EROOT}${i} && ! -h ${EROOT}${i} ]] ; then
438
					has_version ${pkg} && ewarn "You must reinstall ${pkg} !"
487
					has_version ${pkg} && ewarn "You must reinstall ${pkg} !"
439
					break
488
					break
440
				fi
489
				fi
Lines 442-452 Link Here
442
			;;
491
			;;
443
		install)
492
		install)
444
			for i in "$@" ; do
493
			for i in "$@" ; do
445
				if ! [[ -f "${D}"${i} ]] ; then
494
				if ! [[ -f "${ED}"${i} ]] ; then
446
					use build || ewarn "${i} does not exist!"
495
					use build || ewarn "${i} does not exist!"
447
					continue
496
					continue
448
				fi
497
				fi
449
				mv "${D}"${i}{,-${ver}-${P}} || die
498
				mv "${ED}"${i}{,-${ver}-${P}} || die
450
			done
499
			done
451
			;;
500
			;;
452
	esac
501
	esac
Lines 460-477 Link Here
460
	case "${EBUILD_PHASE:-none}" in
509
	case "${EBUILD_PHASE:-none}" in
461
		postinst|postrm)
510
		postinst|postrm)
462
			for i in "$@" ; do
511
			for i in "$@" ; do
463
				ff=`echo "${ROOT}${i%.[0-9]}-${ver}-${P}${i#${i%.[0-9]}}"*`
512
				ff=`echo "${EROOT}${i%.[0-9]}-${ver}-${P}${i#${i%.[0-9]}}"*`
464
				ff=${ff##*${i#${i%.[0-9]}}}
513
				ff=${ff##*${i#${i%.[0-9]}}}
465
				alternatives_auto_makesym "${i}${ff}" "${i%.[0-9]}-[0-9]*"
514
				alternatives_auto_makesym "${i}${ff}" "${i%.[0-9]}-[0-9]*"
466
			done
515
			done
467
			;;
516
			;;
468
		install)
517
		install)
469
			for i in "$@" ; do
518
			for i in "$@" ; do
470
				if ! [[ -f "${D}"${i} ]] ; then
519
				if ! [[ -f "${ED}"${i} ]] ; then
471
					use build || ewarn "${i} does not exist!"
520
					use build || ewarn "${i} does not exist!"
472
					continue
521
					continue
473
				fi
522
				fi
474
				mv "${D}"${i} "${D}"${i%.[0-9]}-${ver}-${P}${i#${i%.[0-9]}} || die
523
				mv "${ED}"${i} "${ED}"${i%.[0-9]}-${ver}-${P}${i#${i%.[0-9]}} || die
475
			done
524
			done
476
			;;
525
			;;
477
	esac
526
	esac
Lines 652-658 Link Here
652
	.${ARCH_LIB}/threads.pm
701
	.${ARCH_LIB}/threads.pm
653
"
702
"
654
703
655
	pushd "${D}" > /dev/null
704
	pushd "${ED}" > /dev/null
656
	# Remove cruft
705
	# Remove cruft
657
	einfo "Removing files that are not in the minimal install"
706
	einfo "Removing files that are not in the minimal install"
658
	echo "${MINIMAL_PERL_INSTALL}"
707
	echo "${MINIMAL_PERL_INSTALL}"

Return to bug 395685