1 # Copyright 1999-2016 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
5 eblit-perl-pkg_setup() {
7 *-freebsd*) osname="freebsd" ;;
8 *-dragonfly*) osname="dragonfly" ;;
9 *-netbsd*) osname="netbsd" ;;
10 *-openbsd*) osname="openbsd" ;;
11 *-darwin*) osname="darwin" ;;
12 *-interix*) osname="interix" ;;
13 *-aix*) osname="aix" ;;
17 myarch="${CHOST%%-*}-${osname}"
21 if use ithreads ; then
26 LIBPERL="libperl$(get_libname ${MY_PV} )"
27 PRIV_LIB="/usr/$(get_libdir)/perl5/${MY_PV}"
28 ARCH_LIB="/usr/$(get_libdir)/perl5/${MY_PV}/${myarch}${mythreading}"
29 SITE_LIB="/usr/local/$(get_libdir)/perl5/${MY_PV}"
30 SITE_ARCH="/usr/local/$(get_libdir)/perl5/${MY_PV}/${myarch}${mythreading}"
31 VENDOR_LIB="/usr/$(get_libdir)/perl5/vendor_perl/${MY_PV}"
32 VENDOR_ARCH="/usr/$(get_libdir)/perl5/vendor_perl/${MY_PV}/${myarch}${mythreading}"
34 if use ithreads ; then
36 ewarn "THREADS WARNING:"
37 ewarn "PLEASE NOTE: You are compiling ${MY_P} with"
38 ewarn "interpreter-level threading enabled."
39 ewarn "Threading is not supported by all applications "
40 ewarn "that compile against perl. You use threading at "
41 ewarn "your own discretion. "
48 if has_version "<dev-lang/perl-${SHORT_PV}" ; then
50 ewarn "UPDATE THE PERL MODULES:"
51 ewarn "After updating dev-lang/perl the installed Perl modules"
52 ewarn "have to be re-installed. In most cases, this is done automatically"
53 ewarn "by the package manager, but subsequent steps are still recommended"
54 ewarn "to ensure system consistency."
56 ewarn "You should start with a depclean to remove any unused perl dependencies"
57 ewarn "that may confuse portage in future. Regular depcleans are also encouraged"
58 ewarn "as part of your regular update cycle, as that will keep perl upgrades working."
59 ewarn "Recommended: emerge --depclean -va"
61 ewarn "You should then call perl-cleaner to clean up any old files and trigger any"
62 ewarn "remaining rebuilds portage may have missed."
63 ewarn "Use: perl-cleaner --all"
64 elif has_version dev-lang/perl ; then
66 #if ! has_version dev-lang/perl[ithreads=,debug=] ; then
67 #if ! has_version dev-lang/perl[ithreads=] || ! has_version dev-lang/perl[debug=] ; then
68 if ( use ithreads && ! has_version dev-lang/perl[ithreads] ) || \
69 ( ! use ithreads && has_version dev-lang/perl[ithreads] ) || \
70 ( use debug && ! has_version dev-lang/perl[debug] ) || \
71 ( ! use debug && has_version dev-lang/perl[debug] ) ; then
73 ewarn "TOGGLED USE-FLAGS WARNING:"
74 ewarn "You changed one of the use-flags ithreads or debug."
75 ewarn "You must rebuild all perl-modules installed."
76 ewarn "Use: perl-cleaner --modules ; perl-cleaner --force --libperl"