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 interpreter-level threading enabled."
38 ewarn "Threading is not supported by all applications that compile against perl. You"
39 ewarn "use threading at your own discretion."
46 if has_version "<dev-lang/perl-${SHORT_PV}" ; then
48 ewarn "UPDATE THE PERL MODULES:"
49 ewarn "After updating dev-lang/perl the installed Perl modules"
50 ewarn "have to be re-installed. In most cases, this is done automatically"
51 ewarn "by the package manager, but subsequent steps are still recommended"
52 ewarn "to ensure system consistency."
54 ewarn "You should start with a depclean to remove any unused perl dependencies"
55 ewarn "that may confuse portage in future. Regular depcleans are also encouraged"
56 ewarn "as part of your regular update cycle, as that will keep perl upgrades working."
57 ewarn "Recommended: emerge --depclean -va"
59 ewarn "You should then call perl-cleaner to clean up any old files and trigger any"
60 ewarn "remaining rebuilds portage may have missed."
61 ewarn "Use: perl-cleaner --all"
62 elif has_version dev-lang/perl ; then
63 if ( use ithreads && ! has_version dev-lang/perl[ithreads] ) || \
64 ( ! use ithreads && has_version dev-lang/perl[ithreads] ) || \
65 ( use debug && ! has_version dev-lang/perl[debug] ) || \
66 ( ! use debug && has_version dev-lang/perl[debug] ) ; then
68 ewarn "TOGGLED USE-FLAGS WARNING:"
69 ewarn "You changed one of the use-flags ithreads or debug."
70 ewarn "You must rebuild all perl-modules installed."
71 ewarn "Use: perl-cleaner --modules ; perl-cleaner --force --libperl"