declare -x ABI="amd64" declare -x ABI_MIPS="" declare -x ABI_PPC="" declare -x ABI_S390="" declare -x ABI_X86="64" declare -x ADA_TARGET="" declare -x ALSA_CARDS="" declare -x APACHE2_MODULES="" declare -x APACHE2_MPMS="" declare -x ARCH="amd64" declare -- ARCH_LIB="/usr/lib/perl5/5.34/x86_64-linux" declare -x AUGUSTUS_CONFIG_PATH="/usr/share/augustus/config" declare BDEPEND=" dev-libs/libmaxminddb:= dev-perl/Math-Int128 dev-perl/Math-Int64 dev-perl/MaxMind-DB-Reader >=dev-perl/MaxMind-DB-Common-0.40.1 dev-perl/Moo virtual/perl-XSLoader dev-perl/namespace-autoclean >=dev-perl/Module-Build-0.280.0 test? ( virtual/perl-ExtUtils-MakeMaker virtual/perl-File-Spec dev-perl/Module-Implementation >=dev-perl/Net-Works-0.210.0 >=dev-perl/Path-Class-0.270.0 dev-perl/Test-Fatal dev-perl/Test-Number-Delta dev-perl/Test-Requires >=virtual/perl-Test-Simple-0.960.0 virtual/perl-autodie virtual/perl-version ) dev-lang/perl" declare -x BOOTSTRAP_USE="unicode internal-glib pkg-config split-usr xml python_targets_python3_9 multilib nptl -berkdb -gdbm hardened pic xtpax -jit -orc" declare -x CALLIGRA_FEATURES="" declare -x CAMERAS="" declare -x CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_RUSTFLAGS="-C target-feature=-crt-static" declare -x CARGO_TERM_COLOR="never" declare -x CATKIN_PREFIX_PATH="/usr" declare -x CBUILD="x86_64-gentoo-linux-musl" declare -x CDF_BASE="/usr" declare -x CDF_BIN="\${CDF_BASE}/bin" declare -x CDF_HELP="\${CDF_BASE}/lib/cdf/help" declare -x CDF_INC="\${CDF_BASE}/include" declare -x CDF_LIB="\${CDF_BASE}/lib" declare -x CFLAGS="-pipe -march=native -fno-diagnostics-color -O2" declare -x CFLAGS_amd64="-m64" declare -x CFLAGS_x32="-mx32" declare -x CFLAGS_x86="-m32" declare -x CHOST="x86_64-gentoo-linux-musl" declare -x CHOST_amd64="x86_64-gentoo-linux-musl" declare -x CHOST_x32="x86_64-pc-linux-gnux32" declare -x CHOST_x86="i686-pc-linux-gnu" declare -x COLLECTD_PLUGINS="" declare -x CPU_FLAGS_ARM="" declare -x CPU_FLAGS_PPC="" declare -x CPU_FLAGS_X86="" declare -x CURL_SSL="" declare -x CXXFLAGS="-pipe -march=native -fno-diagnostics-color -O2" declare -x DCC_EMAILLOG_WHOM_TO_BLAME="" declare -x DEFAULT_ABI="amd64" declare -x DEFINED_PHASES=" compile configure install prepare test" declare DEPEND=" >=dev-perl/Module-Build-0.280.0 dev-libs/libmaxminddb:= dev-lang/perl" declare DESCRIPTION="Fast XS implementation of MaxMind DB reader" declare -x DIALIGN2_DIR="/usr/share/dialign2" declare -x DIROPTIONS="-m0755" declare -- DIST_A="MaxMind-DB-Reader-XS-1.000008.tar.gz" declare -- DIST_AUTHOR="MAXMIND" declare -a DIST_MAKE=([0]="OPTIMIZE=-pipe -march=native -fno-diagnostics-color -O2") declare -- DIST_NAME="MaxMind-DB-Reader-XS" declare -- DIST_P="MaxMind-DB-Reader-XS-1.000008" declare -- DIST_VERSION="1.000008" declare -x DSM_CONFIG="/etc/tivoli/dsm.opt" declare -x DSM_DIR="/opt/tivoli/tsm/client/ba/bin" declare -x DSM_LOG="/var/log/tsm" declare -x EAPI="7" declare -x EC2_AMITOOL_HOME="/usr" declare -x EGO_BUILD_FLAGS="-p 4" declare -x ELIBC="musl" declare -x ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR" declare -- EPOCHREALTIME="1640555470.317813" declare -- EPOCHSECONDS="1640555470" declare -x EXEOPTIONS="-m0755" declare -x FCFLAGS="-pipe -march=native -fno-diagnostics-color -O2" declare -x FETCHCOMMAND_SSH="bash -c \"x=\\\${2#ssh://} ; host=\\\${x%%/*} ; port=\\\${host##*:} ; host=\\\${host%:*} ; [[ \\\${host} = \\\${port} ]] && port= ; exec rsync --rsh=\\\"ssh \\\${port:+-p\\\${port}} \\\${3}\\\" -avP \\\"\\\${host}:/\\\${x#*/}\\\" \\\"\\\$1\\\"\" rsync \"\${DISTDIR}/\${FILE}\" \"\${URI}\" \"\${PORTAGE_SSH_OPTS}\"" declare -x FFLAGS="-pipe -march=native -fno-diagnostics-color -O2" declare -x FFTOOLS="" declare -x G4ABLADATA="/usr/share/geant4/data/G4ABLA3.1" declare -x G4ENSDFSTATEDATA="/usr/share/geant4/data/G4ENSDFSTATE2.3" declare -x G4INCLDATA="/usr/share/geant4/data/G4INCL1.0" declare -x G4LEDATA="/usr/share/geant4/data/G4EMLOW8.0" declare -x G4LEVELGAMMADATA="/usr/share/geant4/data/PhotonEvaporation5.7" declare -x G4NEUTRONHPDATA="/usr/share/geant4/data/G4NDL4.6" declare -x G4PARTICLEHPDATA="/usr/share/geant4/data/G4TENDL1.4" declare -x G4PARTICLEXSDATA="/usr/share/geant4/data/G4PARTICLEXS4.0" declare -x G4PIIDATA="/usr/share/geant4/data/G4PII1.3" declare -x G4RADIOACTIVEDATA="/usr/share/geant4/data/RadioactiveDecay5.6" declare -x G4REALSURFACEDATA="/usr/share/geant4/data/RealSurface2.2" declare -x G4SAIDXSDATA="/usr/share/geant4/data/G4SAIDDATA2.0" declare -x GCC_COLORS="" declare -x GCC_SPECS="" declare -x GIT_PAGER="cat" declare -x GO19CONCURRENTCOMPILATION="0" declare -x GPSD_PROTOCOLS="" declare -x GRUB_PLATFORMS="" declare -x GSETTINGS_BACKEND="dconf" declare HOMEPAGE="https://metacpan.org/release/MaxMind-DB-Reader-XS" declare IDEPEND declare -x INHERITED=" multiprocessing perl-functions perl-module" declare -x INPUT_DEVICES="" declare -x INSOPTIONS="-m0644" declare IUSE="test " declare -x IUSE_EFFECTIVE="abi_x86_64 alpha amd64 amd64-fbsd amd64-linux arm arm64 arm64-macos elibc_AIX elibc_Cygwin elibc_Darwin elibc_DragonFly elibc_FreeBSD elibc_HPUX elibc_Interix elibc_NetBSD elibc_OpenBSD elibc_SunOS elibc_Winnt elibc_bionic elibc_glibc elibc_mingw elibc_mintlib elibc_musl elibc_uclibc hppa ia64 kernel_AIX kernel_Darwin kernel_FreeBSD kernel_HPUX kernel_NetBSD kernel_OpenBSD kernel_SunOS kernel_Winnt kernel_freemint kernel_linux m68k mips ppc ppc-macos ppc64 ppc64-linux prefix prefix-guest prefix-stack riscv s390 sparc sparc-solaris sparc64-solaris test userland_BSD userland_GNU x64-cygwin x64-macos x64-solaris x64-winnt x86 x86-fbsd x86-linux x86-solaris x86-winnt" declare -x IUSE_IMPLICIT="abi_x86_64 prefix prefix-guest prefix-stack" declare -x JAVAC="/bin/javac" declare -x JDK_HOME="" declare -x KERNEL="linux" declare -x KEYWORDS="~amd64" declare -x L10N="" declare -x LADSPA_PATH="/usr/lib/ladspa" declare -x LANG="C.UTF8" declare -x LCD_DEVICES="" declare -x LC_COLLATE="C" declare -x LC_MESSAGES="C" declare -x LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0" declare -x LDFLAGS_amd64="-m elf_x86_64" declare -x LDFLAGS_x32="-m elf32_x86_64" declare -x LDFLAGS_x86="-m elf_i386" declare -x LIBDIR_amd64="lib" declare -x LIBDIR_x32="libx32" declare -x LIBDIR_x86="lib32" declare -x LIBGUESTFS_PATH="/usr/share/guestfs/appliance/" declare -x LIBOPTIONS="-m0644" declare -x LIBREOFFICE_EXTENSIONS="" declare -x LICENSE="Artistic-2" declare -x LLVM_TARGETS="" declare -x LMOD_CACHED_LOADS="yes" declare -x LOGTALKHOME="/usr/share/logtalk-3.47.0" declare -x LUA_SINGLE_TARGET="" declare -x LUA_TARGETS="" declare -x MAILTO="tinderbox" declare -x MAKEOPTS="-j4" declare -x MANPAGER="manpager" declare -x MONKEYD_PLUGINS="" declare -x MOZ_GMP_PATH="/usr/lib/nsbrowser/plugins/gmp-gmpopenh264/system-installed" declare -x MULTILIB_ABIS="amd64" declare -x MULTILIB_STRICT_DENY="64-bit.*shared object" declare -x MULTILIB_STRICT_DIRS="/lib32 /lib /usr/lib32 /usr/lib /usr/kde/*/lib32 /usr/kde/*/lib /usr/qt/*/lib32 /usr/qt/*/lib /usr/X11R6/lib32 /usr/X11R6/lib" declare -x MULTILIB_STRICT_EXEMPT="(perl5|gcc|binutils|eclipse-3|debug|portage|udev|systemd|clang|python-exec|llvm)" declare -x NGINX_MODULES_HTTP="" declare -x NGINX_MODULES_MAIL="" declare -x NGINX_MODULES_STREAM="" declare -x NX_SYSTEM="/opt/NX" declare -x OCAML_COLOR="never" declare -x OFED_DRIVERS="" declare -x OFFICE_IMPLEMENTATION="" declare -x OMP_DYNAMIC="FALSE" declare -x OMP_NESTED="FALSE" declare -x OMP_NUM_THREADS="4" declare -x OPENMPI_FABRICS="" declare -x OPENMPI_OFED_FEATURES="" declare -x OPENMPI_RM="" declare -x ORACLE_HOME="/usr/lib/oracle/client" declare -x PATH="/usr/lib/portage/python3.9/ebuild-helpers/xattr:/usr/lib/portage/python3.9/ebuild-helpers:/opt/c3-4:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/lib/llvm/13/bin:/usr/lib/llvm/12/bin:/usr/bin/cdsclient" declare -x PAX_MARKINGS="none" declare PDEPEND="" declare -- PERL_EXPF="src_prepare src_configure src_compile src_test src_install" declare -x PERL_EXTUTILS_AUTOINSTALL="--skipdeps" declare -x PERL_MM_USE_DEFAULT="1" declare -- PERL_VERSION="5.34.0" declare -x PHP_TARGETS="" declare -x PKGSYSTEM_ENABLE_FSYNC="0" declare -x PORTAGE_COMPRESSION_COMMAND="bzip2" declare -a PORTAGE_DOCOMPRESS=([0]="/usr/share/doc" [1]="/usr/share/info" [2]="/usr/share/man") declare -x PORTAGE_DOCOMPRESS_SIZE_LIMIT="128" declare -a PORTAGE_DOCOMPRESS_SKIP=([0]="/usr/share/doc/MaxMind-DB-Reader-XS-1.0.8/html") declare -a PORTAGE_DOSTRIP=([0]="/") declare -a PORTAGE_DOSTRIP_SKIP=() declare -x PORTAGE_LIBC="musl" declare -x PORTAGE_TMPFS="/dev/shm" declare -x PORT_LOGDIR="/var/log/portage" declare -x POSTGRES_TARGETS="" declare -- PREFER_BUILDPL="yes" declare -x PRELINK_PATH_MASK="/usr/bin/bbkeys" declare -x PROFILE_IS_HARDENED="1" declare -x PROFILE_ONLY_VARIABLES="ARCH ELIBC IUSE_IMPLICIT KERNEL USERLAND USE_EXPAND_IMPLICIT USE_EXPAND_UNPREFIXED USE_EXPAND_VALUES_ARCH USE_EXPAND_VALUES_ELIBC USE_EXPAND_VALUES_KERNEL USE_EXPAND_VALUES_USERLAND" declare -- PROPERTIES="" declare -x PYTEST_ADDOPTS="--color=no" declare -x PYTHIA8DATA="/usr/share/pythia8/xmldoc" declare -x PYTHONDOCS_3_9="/usr/share/doc/python-docs-3.9.6/html/library" declare -x PYTHONDONTWRITEBYTECODE="1" declare -x PYTHON_SINGLE_TARGET="" declare -x PYTHON_TARGETS="" declare -x PY_FORCE_COLOR="0" declare -x QEMU_SOFTMMU_TARGETS="" declare -x QEMU_USER_TARGETS="" declare -x QPSMTPD_CONFIG="/etc/qpsmtpd" declare RDEPEND=" dev-libs/libmaxminddb:= dev-perl/Math-Int128 dev-perl/Math-Int64 dev-perl/MaxMind-DB-Reader >=dev-perl/MaxMind-DB-Common-0.40.1 dev-perl/Moo virtual/perl-XSLoader dev-perl/namespace-autoclean dev-lang/perl:=" declare REPOSITORY declare REQUIRED_USE="" declare RESTRICT="test" declare -x RESUMECOMMAND_SSH="bash -c \"x=\\\${2#ssh://} ; host=\\\${x%%/*} ; port=\\\${host##*:} ; host=\\\${host%:*} ; [[ \\\${host} = \\\${port} ]] && port= ; exec rsync --rsh=\\\"ssh \\\${port:+-p\\\${port}} \\\${3}\\\" -avP \\\"\\\${host}:/\\\${x#*/}\\\" \\\"\\\$1\\\"\" rsync \"\${DISTDIR}/\${FILE}\" \"\${URI}\" \"\${PORTAGE_SSH_OPTS}\"" declare -x RNAVIEW="/usr/share/rnaview" declare -x ROS_DISTRO="Gentoo" declare -x ROS_MASTER_URI="http://localhost:11311/" declare -x ROS_MESSAGES="" declare -x ROS_PACKAGE_PATH="/usr/share/ros_packages" declare -x ROS_ROOT="/usr/share/ros" declare -x RUBY_TARGETS="" declare -x RUSTFLAGS=" -C target-feature=-crt-static" declare -x RUST_TEST_TASKS="4" declare -x RUST_TEST_THREADS="4" declare -x S="/var/tmp/portage/dev-perl/MaxMind-DB-Reader-XS-1.0.8/work/MaxMind-DB-Reader-XS-1.000008" declare -x SANDBOX_DEBUG="0" declare -x SANDBOX_DENY="" declare -x SANDBOX_METHOD="any" declare -x SANDBOX_PREDICT="/var/tmp/portage/dev-perl/MaxMind-DB-Reader-XS-1.0.8/homedir:/dev/crypto:/var/cache/man:/dev/random:/proc/self/coredump_filter:/var/cache/fontconfig" declare -x SANDBOX_READ="/:/var/tmp/portage" declare -x SANDBOX_VERBOSE="1" declare -x SANDBOX_WRITE=":/dev/console:/dev/fd:/dev/full:/dev/null:/dev/ptmx:/dev/pts/:/dev/pty:/dev/shm:/dev/tts:/dev/tty:/dev/vc/:/dev/zero:/proc/self/fd:/tmp/:/usr/lib/cf:/usr/lib/conftest:/usr/lib32/cf:/usr/lib32/conftest:/usr/lib64/cf:/usr/lib64/conftest:/usr/tmp/:/usr/tmp/cf:/usr/tmp/conftest:/var/tmp/:/var/tmp/portage:/var/tmp/portage/dev-perl/MaxMind-DB-Reader-XS-1.0.8/homedir/.bash_history" declare -x SANE_BACKENDS="" declare -x SHELL="/bin/bash" declare -- SITE_ARCH="/usr/local/lib/perl5/5.34/x86_64-linux" declare -- SITE_LIB="/usr/local/lib/perl5/5.34" declare -x SLOT="0" declare -i SRANDOM="4120639317" declare -- SRC_PREP="yes" declare SRC_URI="mirror://cpan/authors/id/M/MA/MAXMIND/MaxMind-DB-Reader-XS-1.000008.tar.gz" declare -x SVDIR="/etc/service/" declare -x SYMLINK_LIB="no" declare -x TERMINFO="/etc/terminfo" declare -x TMAKEPATH="/usr/lib/tmake/linux-g++" declare -x TNS_ADMIN="/etc/oracle/" declare -x TWISTED_DISABLE_WRITING_OF_PLUGIN_CACHE="1" declare -x UNCACHED_ERR_FD="" declare -x USE="abi_x86_64 amd64 elibc_musl kernel_linux userland_GNU" declare -x USERLAND="GNU" declare -x USE_EXPAND_IMPLICIT="ARCH ELIBC KERNEL USERLAND" declare -x USE_EXPAND_UNPREFIXED="ARCH" declare -x USE_EXPAND_VALUES_ARCH="alpha amd64 amd64-fbsd amd64-linux arm arm64 arm64-macos hppa ia64 m68k mips ppc ppc64 ppc64-linux ppc-macos riscv s390 sparc sparc64-solaris sparc-solaris x64-cygwin x64-macos x64-solaris x64-winnt x86 x86-fbsd x86-linux x86-solaris x86-winnt" declare -x USE_EXPAND_VALUES_ELIBC="AIX bionic Cygwin Darwin DragonFly FreeBSD glibc HPUX Interix mingw mintlib musl NetBSD OpenBSD SunOS uclibc Winnt" declare -x USE_EXPAND_VALUES_KERNEL="AIX Darwin FreeBSD freemint HPUX linux NetBSD OpenBSD SunOS Winnt" declare -x USE_EXPAND_VALUES_USERLAND="BSD GNU" declare -x UWSGI_PLUGINS="" declare -- VENDOR_ARCH="/usr/lib/perl5/vendor_perl/5.34/x86_64-linux" declare -- VENDOR_LIB="/usr/lib/perl5/vendor_perl/5.34" declare -x VIDEO_CARDS="" declare -x VOICEMAIL_STORAGE="" declare -x WCDHOME="/root/.wcd" declare -x XTABLES_ADDONS="" declare -x _E_DESTTREE_="/usr" declare -x _E_DOCDESTTREE_="" declare -x _E_EXEDESTTREE_="" declare -x _E_INSDESTTREE_="" declare -- _MULTIPROCESSING_ECLASS="1" declare -x gl_cv_type_time_t_bits_macro="no" declare -- i="PERLPREFIX" declare -- perlinfo_done="true" declare -- pm_echovar="" __eapi6_src_install () { if [[ -f Makefile || -f GNUmakefile || -f makefile ]]; then emake DESTDIR="${D}" install; fi; einstalldocs } __eapi6_src_prepare () { if ___is_indexed_array_var PATCHES; then [[ ${#PATCHES[@]} -gt 0 ]] && eapply "${PATCHES[@]}"; else if [[ -n ${PATCHES} ]]; then eapply ${PATCHES}; fi; fi; eapply_user } __eapi7_ver_compare () { local va=${1} vb=${2} a an al as ar b bn bl bs br re LC_ALL=C; re="^([0-9]+(\.[0-9]+)*)([a-z]?)((_(alpha|beta|pre|rc|p)[0-9]*)*)(-r[0-9]+)?$"; [[ ${va} =~ ${re} ]] || die "${FUNCNAME}: invalid version: ${va}"; an=${BASH_REMATCH[1]}; al=${BASH_REMATCH[3]}; as=${BASH_REMATCH[4]}; ar=${BASH_REMATCH[7]}; [[ ${vb} =~ ${re} ]] || die "${FUNCNAME}: invalid version: ${vb}"; bn=${BASH_REMATCH[1]}; bl=${BASH_REMATCH[3]}; bs=${BASH_REMATCH[4]}; br=${BASH_REMATCH[7]}; __eapi7_ver_compare_int "${an%%.*}" "${bn%%.*}" || return; while [[ ${an} == *.* && ${bn} == *.* ]]; do an=${an#*.}; bn=${bn#*.}; a=${an%%.*}; b=${bn%%.*}; if [[ ${a} == 0* || ${b} == 0* ]]; then [[ ${a} =~ 0+$ ]] && a=${a%"${BASH_REMATCH[0]}"}; [[ ${b} =~ 0+$ ]] && b=${b%"${BASH_REMATCH[0]}"}; [[ ${a} > ${b} ]] && return 3; [[ ${a} < ${b} ]] && return 1; else __eapi7_ver_compare_int "${a}" "${b}" || return; fi; done; [[ ${an} == *.* ]] && return 3; [[ ${bn} == *.* ]] && return 1; [[ ${al} > ${bl} ]] && return 3; [[ ${al} < ${bl} ]] && return 1; as=${as#_}${as:+_}; bs=${bs#_}${bs:+_}; while [[ -n ${as} && -n ${bs} ]]; do a=${as%%_*}; b=${bs%%_*}; if [[ ${a%%[0-9]*} == "${b%%[0-9]*}" ]]; then __eapi7_ver_compare_int "${a##*[a-z]}" "${b##*[a-z]}" || return; else [[ ${a%%[0-9]*} == p ]] && return 3; [[ ${b%%[0-9]*} == p ]] && return 1; [[ ${a} > ${b} ]] && return 3 || return 1; fi; as=${as#*_}; bs=${bs#*_}; done; if [[ -n ${as} ]]; then [[ ${as} == p[_0-9]* ]] && return 3 || return 1; else if [[ -n ${bs} ]]; then [[ ${bs} == p[_0-9]* ]] && return 1 || return 3; fi; fi; __eapi7_ver_compare_int "${ar#-r}" "${br#-r}" || return; return 2 } __eapi7_ver_compare_int () { local a=$1 b=$2 d=$(( ${#1}-${#2} )); if [[ ${d} -gt 0 ]]; then printf -v b "%0${d}d%s" 0 "${b}"; else if [[ ${d} -lt 0 ]]; then printf -v a "%0$(( -d ))d%s" 0 "${a}"; fi; fi; [[ ${a} > ${b} ]] && return 3; [[ ${a} == "${b}" ]] } __eapi7_ver_parse_range () { local range=${1}; local max=${2}; [[ ${range} == [0-9]* ]] || die "${FUNCNAME}: range must start with a number"; start=${range%-*}; [[ ${range} == *-* ]] && end=${range#*-} || end=${start}; if [[ -n ${end} ]]; then [[ ${start} -le ${end} ]] || die "${FUNCNAME}: end of range must be >= start"; [[ ${end} -le ${max} ]] || end=${max}; else end=${max}; fi } __eapi7_ver_split () { local v=${1} LC_ALL=C; comp=(); local s c; while [[ -n ${v} ]]; do s=${v%%[a-zA-Z0-9]*}; v=${v:${#s}}; [[ ${v} == [0-9]* ]] && c=${v%%[^0-9]*} || c=${v%%[^a-zA-Z]*}; v=${v:${#c}}; comp+=("${s}" "${c}"); done } __eapi8_src_prepare () { local f; if ___is_indexed_array_var PATCHES; then [[ ${#PATCHES[@]} -gt 0 ]] && eapply -- "${PATCHES[@]}"; else if [[ -n ${PATCHES} ]]; then eapply -- ${PATCHES}; fi; fi; eapply_user } eapply () { local failed patch_cmd=patch; local -x LC_COLLATE=POSIX; type -P gpatch > /dev/null && patch_cmd=gpatch; function _eapply_patch () { local f=${1}; local prefix=${2}; ebegin "${prefix:-Applying }${f##*/}"; local all_opts=(-p1 -f -g0 --no-backup-if-mismatch "${patch_options[@]}"); if ${patch_cmd} "${all_opts[@]}" --dry-run -s -F0 < "${f}" &> /dev/null; then all_opts+=(-s -F0); fi; ${patch_cmd} "${all_opts[@]}" < "${f}"; failed=${?}; if ! eend "${failed}"; then __helpers_die "patch -p1 ${patch_options[*]} failed with ${f}"; fi }; local patch_options=() files=(); local i found_doublehyphen; for ((i = 1; i <= ${#@}; ++i )) do if [[ ${@:i:1} == -- ]]; then patch_options=("${@:1:i-1}"); files=("${@:i+1}"); found_doublehyphen=1; break; fi; done; if [[ -z ${found_doublehyphen} ]]; then for ((i = 1; i <= ${#@}; ++i )) do if [[ ${@:i:1} != -* ]]; then patch_options=("${@:1:i-1}"); files=("${@:i}"); break; fi; done; for i in "${files[@]}"; do if [[ ${i} == -* ]]; then die "eapply: all options must be passed before non-options"; fi; done; fi; if [[ ${#files[@]} -eq 0 ]]; then die "eapply: no files specified"; fi; local f; for f in "${files[@]}"; do if [[ -d ${f} ]]; then function _eapply_get_files () { local LC_ALL=POSIX; local prev_shopt=$(shopt -p nullglob); shopt -s nullglob; local f; for f in "${1}"/*; do if [[ ${f} == *.diff || ${f} == *.patch ]]; then files+=("${f}"); fi; done; ${prev_shopt} }; local files=(); _eapply_get_files "${f}"; [[ ${#files[@]} -eq 0 ]] && die "No *.{patch,diff} files in directory ${f}"; einfo "Applying patches from ${f} ..."; local f2; for f2 in "${files[@]}"; do _eapply_patch "${f2}" ' '; [[ ${failed} -ne 0 ]] && return "${failed}"; done; else _eapply_patch "${f}"; [[ ${failed} -ne 0 ]] && return "${failed}"; fi; done; return 0 } eapply_user () { [[ ${EBUILD_PHASE} == prepare ]] || die "eapply_user() called during invalid phase: ${EBUILD_PHASE}"; local tagfile=${T}/.portage_user_patches_applied; [[ -f ${tagfile} ]] && return; >> "${tagfile}"; local basedir=${PORTAGE_CONFIGROOT%/}/etc/portage/patches; local columns=${COLUMNS:-0}; [[ ${columns} == 0 ]] && columns=$(set -- $( ( stty size /dev/null || echo 24 80 ) ; echo $2); (( columns > 0 )) || (( columns = 80 )); local applied d f; local -A _eapply_user_patches; local prev_shopt=$(shopt -p nullglob); shopt -s nullglob; for d in "${basedir}"/${CATEGORY}/{${P}-${PR},${P},${PN}}{:${SLOT%/*},}; do for f in "${d}"/*; do if [[ ( ${f} == *.diff || ${f} == *.patch ) && -z ${_eapply_user_patches[${f##*/}]} ]]; then _eapply_user_patches[${f##*/}]=${f}; fi; done; done; if [[ ${#_eapply_user_patches[@]} -gt 0 ]]; then while read -r -d '' f; do f=${_eapply_user_patches[${f}]}; if [[ -s ${f} ]]; then if [[ -z ${applied} ]]; then einfo "${PORTAGE_COLOR_INFO}$(for ((column = 0; column < ${columns} - 3; column++)); do echo -n =; done)${PORTAGE_COLOR_NORMAL}"; einfo "Applying user patches from ${basedir} ..."; fi; eapply "${f}"; applied=1; fi; done < <(printf -- '%s\0' "${!_eapply_user_patches[@]}" | LC_ALL=C sort -z); fi; ${prev_shopt}; if [[ -n ${applied} ]]; then einfo "User patches applied."; einfo "${PORTAGE_COLOR_INFO}$(for ((column = 0; column < ${columns} - 3; column++)); do echo -n =; done)${PORTAGE_COLOR_NORMAL}"; fi } einstalldocs () { ( if [[ $(declare -p DOCS 2>/dev/null) != *=* ]]; then local d; for d in README* ChangeLog AUTHORS NEWS TODO CHANGES THANKS BUGS FAQ CREDITS CHANGELOG; do [[ -f ${d} && -s ${d} ]] && docinto / && dodoc "${d}"; done; else if ___is_indexed_array_var DOCS; then [[ ${#DOCS[@]} -gt 0 ]] && docinto / && dodoc -r "${DOCS[@]}"; else [[ -n ${DOCS} ]] && docinto / && dodoc -r ${DOCS}; fi; fi ); ( if ___is_indexed_array_var HTML_DOCS; then [[ ${#HTML_DOCS[@]} -gt 0 ]] && docinto html && dodoc -r "${HTML_DOCS[@]}"; else [[ -n ${HTML_DOCS} ]] && docinto html && dodoc -r ${HTML_DOCS}; fi ) } get_libdir () { local libdir_var="LIBDIR_${ABI}"; local libdir="lib"; [[ -n ${ABI} && -n ${!libdir_var} ]] && libdir=${!libdir_var}; echo "${libdir}" } get_nproc () { local nproc; if type -P nproc &> /dev/null; then nproc=$(nproc); fi; if [[ -z ${nproc} ]] && type -P sysctl &> /dev/null; then nproc=$(sysctl -n hw.ncpu 2>/dev/null); fi; if [[ -z ${nproc} ]] && type -P python &> /dev/null; then nproc=$(python -c 'import multiprocessing; print(multiprocessing.cpu_count());' 2>/dev/null); fi; if [[ -n ${nproc} ]]; then echo "${nproc}"; else echo "${1:-1}"; fi } in_iuse () { local use=${1}; if [[ -z "${use}" ]]; then echo "!!! in_iuse() called without a parameter." 1>&2; echo "!!! in_iuse " 1>&2; die "in_iuse() called without a parameter"; fi; local liuse=(${IUSE_EFFECTIVE}); has "${use}" "${liuse[@]#[+-]}" } makeopts_jobs () { [[ $# -eq 0 ]] && set -- "${MAKEOPTS}"; local jobs=$(echo " $* " | sed -r -n -e 's:.*[[:space:]](-[a-z]*j|--jobs[=[:space:]])[[:space:]]*([0-9]+).*:\2:p' -e "s:.*[[:space:]](-[a-z]*j|--jobs)[[:space:]].*:${2:-999}:p"); echo ${jobs:-1} } makeopts_loadavg () { [[ $# -eq 0 ]] && set -- "${MAKEOPTS}"; local lavg=$(echo " $* " | sed -r -n -e 's:.*[[:space:]](-[a-z]*l|--(load-average|max-load)[=[:space:]])[[:space:]]*([0-9]+(\.[0-9]+)?)[[:space:]].*:\3:p' -e "s:.*[[:space:]](-[a-z]*l|--(load-average|max-load))[[:space:]].*:${2:-999}:p"); echo ${lavg:-${2:-999}} } perl-module_pkg_postinst () { debug-print-function $FUNCNAME "$@"; if [[ ${CATEGORY} != perl-core ]]; then eerror "perl-module.eclass: You are calling perl-module_pkg_postinst outside the perl-core category."; die " This does not do anything; the call can be removed."; fi; perl_link_duallife_scripts } perl-module_pkg_postrm () { debug-print-function $FUNCNAME "$@"; if [[ ${CATEGORY} != perl-core ]]; then eerror "perl-module.eclass: You are calling perl-module_pkg_postrm outside the perl-core category."; die " This does not do anything; the call can be removed."; fi; perl_link_duallife_scripts } perl-module_src_compile () { debug-print-function $FUNCNAME "$@"; perl_set_version; case ${EAPI} in 5 | 6 | 7) if [[ $(declare -p mymake 2>&-) != "declare -a mymake="* ]]; then local mymake_local=(${mymake}); else local mymake_local=("${mymake[@]}"); fi ;; *) local mymake_local=("${DIST_MAKE[@]}") ;; esac; if [[ -f Build ]]; then ./Build build || die "Compilation failed"; else if [[ -f Makefile ]]; then set -- OTHERLDFLAGS="${LDFLAGS}" "${mymake_local[@]}"; einfo "emake" "$@"; emake "$@" || die "Compilation failed"; fi; fi } perl-module_src_configure () { debug-print-function $FUNCNAME "$@"; if [[ ${EAPI:-0} == 5 && ${SRC_PREP} == yes ]]; then return 0; fi; SRC_PREP="yes"; perl_check_env; perl_set_version; [[ -z ${pm_echovar} ]] && export PERL_MM_USE_DEFAULT=1; export PERL_EXTUTILS_AUTOINSTALL="--skipdeps"; if [[ $(declare -p myconf 2>&-) != "declare -a myconf="* ]]; then local myconf_local=(${myconf}); else local myconf_local=("${myconf[@]}"); fi; if [[ ( ${PREFER_BUILDPL} == yes || ! -f Makefile.PL ) && -f Build.PL ]]; then case ${EAPI:-0} in 5 | 6) if grep -q '\(use\|require\)\s*Module::Build::Tiny' Build.PL; then einfo "Using Module::Build::Tiny"; if [[ ${DEPEND} != *dev-perl/Module-Build-Tiny* && ${PN} != Module-Build-Tiny ]]; then eerror "QA Notice: The ebuild uses Module::Build::Tiny but doesn't depend on it."; die " Add dev-perl/Module-Build-Tiny to DEPEND!"; fi; else einfo "Using Module::Build"; if [[ ${DEPEND} != *virtual/perl-Module-Build* && ${DEPEND} != *dev-perl/Module-Build* && ${PN} != Module-Build ]]; then eerror "QA Notice: The ebuild uses Module::Build but doesn't depend on it."; die " Add dev-perl/Module-Build to DEPEND!"; fi; fi ;; *) if grep -q '\(use\|require\)\s*Module::Build::Tiny' Build.PL; then einfo "Using Module::Build::Tiny"; if [[ ${BDEPEND} != *dev-perl/Module-Build-Tiny* && ${PN} != Module-Build-Tiny ]]; then eerror "QA Notice: The ebuild uses Module::Build::Tiny but doesn't depend on it."; eerror " Add dev-perl/Module-Build-Tiny to BDEPEND!"; fi; else einfo "Using Module::Build"; if [[ ${BDEPEND} != *virtual/perl-Module-Build* && ${BDEPEND} != *dev-perl/Module-Build* && ${PN} != Module-Build ]]; then eerror "QA Notice: The ebuild uses Module::Build but doesn't depend on it."; eerror " Add dev-perl/Module-Build to BDEPEND!"; fi; fi ;; esac; set -- --installdirs=vendor --libdoc= --destdir="${D}" --create_packlist=1 "${myconf_local[@]}"; einfo "perl Build.PL" "$@"; perl Build.PL "$@" <<< "${pm_echovar}" || die "Unable to build!"; else if [[ -f Makefile.PL ]]; then einfo "Using ExtUtils::MakeMaker"; set -- PREFIX=${EPREFIX}/usr INSTALLDIRS=vendor INSTALLMAN3DIR='none' DESTDIR="${D}" "${myconf_local[@]}"; einfo "perl Makefile.PL" "$@"; perl Makefile.PL "$@" <<< "${pm_echovar}" || die "Unable to build!"; fi; fi; if [[ ! -f Build.PL && ! -f Makefile.PL ]]; then einfo "No Make or Build file detected..."; return; fi } perl-module_src_install () { debug-print-function $FUNCNAME "$@"; perl_set_version; local f; if [[ -f Build ]]; then mytargets="${mytargets:-install}"; mbparams="${mbparams:---pure}"; einfo "./Build ${mytargets} ${mbparams}"; ./Build ${mytargets} ${mbparams} || die "./Build ${mytargets} ${mbparams} failed"; else if [[ -f Makefile ]]; then case "${CATEGORY}" in dev-perl | perl-core) mytargets="pure_install" ;; *) mytargets="install" ;; esac; if [[ $(declare -p myinst 2>&-) != "declare -a myinst="* ]]; then local myinst_local=(${myinst}); else local myinst_local=("${myinst[@]}"); fi; emake "${myinst_local[@]}" ${mytargets} || die "emake ${myinst_local[@]} ${mytargets} failed"; fi; fi; case ${EAPI} in 5 | 6 | 7) ;; *) perl_fix_permissions ;; esac; perl_delete_module_manpages; perl_delete_localpod; if [[ ${EAPI} == 5 ]]; then perl_delete_packlist; else perl_fix_packlist; perl_delete_emptybsdir; fi; perl_remove_temppath; for f in Change* CHANGES README* TODO FAQ ${mydoc}; do [[ -s ${f} ]] && dodoc ${f}; done; if [[ ${EAPI} != 5 ]]; then if in_iuse examples && use examples; then [[ ${#DIST_EXAMPLES[@]} -eq 0 ]] || perl_doexamples "${DIST_EXAMPLES[@]}"; fi; fi; perl_link_duallife_scripts; case ${EAPI} in 5 | 6 | 7) ;; *) if has 'features' ${DIST_WIKI}; then DISABLE_AUTOFORMATTING=yes; DOC_CONTENTS="This package may require additional dependencies and/or preparation steps for\n"; DOC_CONTENTS+="some optional features. For details, see\n"; DOC_CONTENTS+="$(perl_get_wikiurl_features)"; einfo; readme.gentoo_create_doc; readme.gentoo_print_elog; fi ;; esac } perl-module_src_prepare () { debug-print-function $FUNCNAME "$@"; if [[ ${EAPI:-0} == 5 ]]; then [[ -n ${PATCHES[@]} ]] && epatch "${PATCHES[@]}"; debug-print "$FUNCNAME: applying user patches"; epatch_user; else default; fi; if [[ -n ${PERL_RM_FILES[@]} ]]; then debug-print "$FUNCNAME: stripping unneeded files"; perl_rm_files "${PERL_RM_FILES[@]}"; fi; perl_fix_osx_extra } perl-module_src_test () { debug-print-function $FUNCNAME "$@"; local my_test_control; local my_test_verbose; if [[ ${EAPI} == 5 ]]; then my_test_control=${SRC_TEST}; my_test_verbose=${TEST_VERBOSE:-0}; if has 'do' ${my_test_control} || has 'parallel' ${my_test_control}; then if has "${my_test_verbose}" 0 && has 'parallel' ${my_test_control}; then export HARNESS_OPTIONS=j$(makeopts_jobs); einfo "Test::Harness Jobs=$(makeopts_jobs)"; fi; else einfo Skipping tests due to SRC_TEST=${SRC_TEST}; return 0; fi; else [[ -n "${DIST_TEST_OVERRIDE}" ]] && ewarn DIST_TEST_OVERRIDE is set to ${DIST_TEST_OVERRIDE}; my_test_control=${DIST_TEST_OVERRIDE:-${DIST_TEST:-do parallel}}; if ! has 'do' ${my_test_control} && ! has 'parallel' ${my_test_control}; then einfo Skipping tests due to DIST_TEST=${my_test_control}; return 0; fi; if has verbose ${my_test_control}; then my_test_verbose=1; else my_test_verbose=0; fi; if has parallel ${my_test_control}; then export HARNESS_OPTIONS=j$(makeopts_jobs); einfo "Test::Harness Jobs=$(makeopts_jobs)"; fi; if ! has network ${my_test_control}; then export NO_NETWORK_TESTING=1; fi; fi; case ${EAPI} in 5 | 6 | 7) ;; *) if has 'tests' ${DIST_WIKI}; then ewarn "This package may require additional dependencies and/or preparation steps for"; ewarn "comprehensive testing. For details, see:"; ewarn "$(perl_get_wikiurl_tests)"; fi ;; esac; perl_set_version; if [[ -f Build ]]; then ./Build test verbose=${my_test_verbose} || die "test failed"; else if [[ -f Makefile ]]; then emake test TEST_VERBOSE=${my_test_verbose} || die "test failed"; fi; fi } perl-module_src_unpack () { debug-print-function $FUNCNAME "$@"; [[ ${EAPI:-0} == 5 ]] || die "perl-module_src_unpack is banned in EAPI=6 or later"; unpacker_src_unpack } perl_check_env () { local errored value; for i in PERL_MM_OPT PERL5LIB PERL5OPT PERL_MB_OPT PERL_CORE PERLPREFIX; do [ -v $i ] || continue; if [ ${errored:-0} == 0 ]; then if [ -n "${I_KNOW_WHAT_I_AM_DOING}" ]; then elog "perl-module.eclass: Suspicious environment values found."; else eerror "perl-module.eclass: Suspicious environment values found."; fi; fi; errored=1; value=${!i}; if [ -n "${I_KNOW_WHAT_I_AM_DOING}" ]; then elog " $i=\"$value\""; else eerror " $i=\"$value\""; fi; done; [ ${errored:-0} == 0 ] && return; if [ -n "${I_KNOW_WHAT_I_AM_DOING}" ]; then elog "Continuing anyway, seems you know what you're doing."; return; fi; eerror "Your environment settings may lead to undefined behavior and/or build failures."; die "Please fix your environment ( ~/.bashrc, package.env, ... ), see above for details." } perl_delete_emptybsdir () { debug-print-function $FUNCNAME "$@"; perl_set_version; if [[ -d ${D}/${VENDOR_ARCH} ]]; then find "${D}/${VENDOR_ARCH}" -type f -a -name '*.bs' -a -empty -delete; find "${D}" -depth -mindepth 1 -type d -empty -delete; fi } perl_delete_localpod () { debug-print-function $FUNCNAME "$@"; find "${D}" -type f -name perllocal.pod -delete; find "${D}" -depth -mindepth 1 -type d -empty -delete } perl_delete_module_manpages () { debug-print-function $FUNCNAME "$@"; if [[ -d "${ED}"/usr/share/man ]]; then find "${ED}"/usr/share/man -type f -name "*.3pm" -delete; find "${ED}"/usr/share/man -depth -type d -empty -delete; fi } perl_delete_packlist () { debug-print-function $FUNCNAME "$@"; perl_set_version; if [[ -d ${D}/${VENDOR_ARCH} ]]; then find "${D}/${VENDOR_ARCH}" -type f -a -name .packlist -delete; perl_delete_emptybsdir; fi } perl_doexamples () { debug-print-function $FUNCNAME "$@"; einfo "Installing examples into /usr/share/doc/${PF}/examples"; docompress -x /usr/share/doc/${PF}/examples; docinto examples/; dodoc -r $@ } perl_domodule () { local target_prefix=""; local files=(); local doins_opts=(); local recursive="false"; local target; local file; while [[ $# -gt 0 ]]; do case $1 in -C | --target-prefix) [[ -z "${2}" || "${2:0:1}" == "-" ]] && die "${FUNCNAME}: -C|--target-prefix expects an argument, got \"$2\"!"; target_prefix="${2}"; shift 2 ;; -r) recursive="true"; shift ;; *) [[ -z "${1}" || "${1:0:1}" == "-" ]] && die "${FUNCNAME}: Unknown argument \"${1}\"!"; files+=("${1}"); shift 1 ;; esac; done; if [[ "true" == $recursive ]]; then doins_opts+=("-r"); fi; for file in "${files[@]}"; do [[ -e "${file}" ]] || die "$FUNCNAME: Argument \"${file}\" is not an existing file"; [[ "false" == ${recursive} && -d "${file}" ]] && die "$FUNCNAME: Argument \"${file}\" is a directory ( needs -r parameter )"; done; target="$(perl_get_vendorlib)"; [[ -z "${target_prefix}" ]] || target="${target%/}/${target_prefix#/}"; insinto "/${target#/}"; doins "${doins_opts[@]}" "${files[@]}" } perl_fix_osx_extra () { debug-print-function $FUNCNAME "$@"; local f; find "${S}" -type f -name "._*" -print0 | while read -rd '' f; do einfo "Removing AppleDouble encoded Macintosh file: ${f#${S}/}"; rm -f "${f}"; f=${f#${S}/}; grep -q "${f}" "${S}"/MANIFEST && elog "AppleDouble encoded Macintosh file in MANIFEST: ${f#${S}/}"; done } perl_fix_packlist () { debug-print-function $FUNCNAME "$@"; local packlist_temp="${T}/.gentoo_packlist_temp"; find "${D}" -type f -name '.packlist' -print0 | while read -rd '' f; do if file "${f}" | grep -q -i " text"; then einfo "Fixing packlist file /${f#${D}}"; sed -i -e "s:${D%/}/:/:g" "${f}"; sort -u "${f}" > "${packlist_temp}"; mv "${packlist_temp}" "${f}"; cat "${f}" | while read -r entry; do if [ ! -e "${D}/${entry}" ]; then einfo "Pruning surplus packlist entry ${entry}"; grep -v -x -F "${entry}" "${f}" > "${packlist_temp}"; mv "${packlist_temp}" "${f}"; fi; done; fi; done } perl_fix_permissions () { debug-print-function $FUNCNAME "$@"; perl_set_version; einfo Fixing installed file permissions; fperms -R u+w / } perl_get_module_version () { debug-print-function $FUNCNAME "$@"; [[ $# -gt 0 ]] || die "${FUNCNAME}: No module name provided"; [[ $# -lt 2 ]] || die "${FUNCNAME}: Too many parameters ($#)"; if ! perl_has_module "$@"; then echo "(Not Installed)"; return 1; fi; perl -we 'my $mn = $ARGV[0]; $mn =~ s{(::|\x{27})}{/}g; local $@; eval { require qq[${mn}.pm]; 1 } or do { print q[(Compilation failed in require)]; exit 1; }; my $stash = \%{ $ARGV[0] . q[::] }; if ( not exists $stash->{VERSION} ) { print q[(No VERSION property)]; exit 0; } if ( not defined ${$stash->{VERSION}} ) { print q[(undef)]; exit 0; } print ${$stash->{VERSION}}; exit 0; ' "$@" } perl_get_raw_vendorlib () { debug-print-function $FUNCNAME "$@"; [[ $# -lt 1 ]] || die "${FUNCNAME}: Too many parameters ($#)"; perl -MConfig -e'exists $Config{$ARGV[0]} || die qq{No such Config key "$ARGV[0]"}; print $Config{$ARGV[0]}; exit 0' -- "installvendorlib" || die "Can't extract installvendorlib from Perl Configuration" } perl_get_vendorlib () { debug-print-function $FUNCNAME "$@"; [[ $# -lt 1 ]] || die "${FUNCNAME}: Too many parameters ($#)"; perl -M5.014 -MConfig -e'exists $Config{$ARGV[0]} || die qq{No such Config key "$ARGV[0]"}; print $Config{$ARGV[0]} =~ s{\A\Q$ARGV[1]\E}{}r; exit 0' -- "installvendorlib" "$EPREFIX" || die "Can't extract installvendorlib from Perl Configuration" } perl_get_wikiurl () { debug-print-function $FUNCNAME "$@"; if [[ -z "${1}" ]]; then echo "https://wiki.gentoo.org/wiki/Project:Perl/maint-notes/${CATEGORY}/${PN}"; else echo "https://wiki.gentoo.org/wiki/Project:Perl/maint-notes/${CATEGORY}/${PN}#${1}"; fi } perl_get_wikiurl_features () { perl_get_wikiurl Optional_Features } perl_get_wikiurl_tests () { perl_get_wikiurl Testing } perl_has_module () { debug-print-function $FUNCNAME "$@"; [[ $# -gt 0 ]] || die "${FUNCNAME}: No module name provided"; [[ $# -lt 2 ]] || die "${FUNCNAME}: Too many parameters ($#)"; perl -we 'my $mn = $ARGV[0]; $mn =~ s{(::|\x{27})}{/}g; for(@INC){ next if ref $_; exit 0 if -r $_ . q[/] . $mn . q[.pm] } exit 1' "$@" } perl_has_module_version () { debug-print-function $FUNCNAME "$@"; [[ $# -gt 0 ]] || die "${FUNCNAME}: No module name provided"; [[ $# -gt 1 ]] || die "${FUNCNAME}: No module version provided"; [[ $# -lt 3 ]] || die "${FUNCNAME}: Too many parameters ($#)"; perl -we 'my $mn = $ARGV[0]; $mn =~ s{(::|\x{27})}{/}g; exit ( eval { require qq[${mn}.pm]; $ARGV[0]->VERSION($ARGV[1]); 1 } ? 0 : 1 )' "$@" } perl_link_duallife_scripts () { debug-print-function $FUNCNAME "$@"; if [[ ${CATEGORY} != perl-core ]] || ! has_version ">=dev-lang/perl-5.8.8-r8"; then return 0; fi; local i ff; if has "${EBUILD_PHASE:-none}" "postinst" "postrm"; then for i in "${DUALLIFESCRIPTS[@]}"; do alternatives_auto_makesym "/${i}" "/${i}-[0-9]*"; done; for i in "${DUALLIFEMAN[@]}"; do ff=`echo "${EROOT}"/${i%.1}-${PV}-${P}.1*`; ff=${ff##*.1}; alternatives_auto_makesym "/${i}${ff}" "/${i%.1}-[0-9]*"; done; else pushd "${ED}" > /dev/null; for i in $(find usr/bin -maxdepth 1 -type f 2>/dev/null); do mv ${i}{,-${PV}-${P}} || die; DUALLIFESCRIPTS[${#DUALLIFESCRIPTS[*]}]=${i}; done; for i in $(find usr/share/man/man1 -maxdepth 1 -type f 2>/dev/null); do mv ${i} ${i%.1}-${PV}-${P}.1 || die; DUALLIFEMAN[${#DUALLIFEMAN[*]}]=${i}; done; popd > /dev/null; fi } perl_remove_temppath () { debug-print-function $FUNCNAME "$@"; find "${D}" -type f -not -name '*.so' -print0 | while read -rd '' f; do if file "${f}" | grep -q -i " text"; then grep -q "${D}" "${f}" && ewarn "QA: File contains a temporary path ${f}"; sed -i -e "s:${D%/}/:/:g" "${f}"; fi; done } perl_rm_files () { debug-print-function $FUNCNAME "$@"; local skipfile="${T}/.gentoo_makefile_skip"; local manifile="${S}/MANIFEST"; local manitemp="${T}/.gentoo_manifest_temp"; oldifs="$IFS"; IFS="\n"; for filename in "$@"; do einfo "Removing un-needed ${filename}"; rm -f "${S}/${filename}"; [[ -e "${manifile}" ]] && echo "${filename}" >> "${skipfile}"; done; if [[ -e "${manifile}" && -e "${skipfile}" ]]; then einfo "Fixing Manifest"; grep -v -F -f "${skipfile}" "${manifile}" > "${manitemp}"; mv -f -- "${manitemp}" "${manifile}"; rm -- "${skipfile}"; fi; IFS="$oldifs" } perl_set_version () { debug-print-function $FUNCNAME "$@"; debug-print "$FUNCNAME: perlinfo_done=${perlinfo_done}"; ${perlinfo_done} && return 0; perlinfo_done=true; local f version install{{site,vendor}{arch,lib},archlib}; eval "$(perl -V:{version,install{{site,vendor}{arch,lib},archlib}} )"; PERL_VERSION=${version}; SITE_ARCH=${installsitearch}; SITE_LIB=${installsitelib}; ARCH_LIB=${installarchlib}; VENDOR_LIB=${installvendorlib}; VENDOR_ARCH=${installvendorarch} } pkg_nofetch () { default } src_compile () { perl-module_src_compile "$@" } src_configure () { perl-module_src_configure "$@" } src_install () { perl-module_src_install "$@" } src_prepare () { perl-module_src_prepare "$@" } src_test () { perl-module_src_test "$@" } src_unpack () { default } ver_cut () { local range=${1}; local v=${2:-${PV}}; local start end; local -a comp; __eapi7_ver_split "${v}"; local max=$((${#comp[@]}/2)); __eapi7_ver_parse_range "${range}" "${max}"; local IFS=; if [[ ${start} -gt 0 ]]; then start=$(( start*2 - 1 )); fi; echo "${comp[*]:start:end*2-start}" } ver_rs () { local v; (( ${#} & 1 )) && v=${@: -1} || v=${PV}; local start end i; local -a comp; __eapi7_ver_split "${v}"; local max=$((${#comp[@]}/2 - 1)); while [[ ${#} -ge 2 ]]; do __eapi7_ver_parse_range "${1}" "${max}"; for ((i = start*2; i <= end*2; i+=2 )) do [[ ${i} -eq 0 && -z ${comp[i]} ]] && continue; comp[i]=${2}; done; shift 2; done; local IFS=; echo "${comp[*]}" } ver_test () { local va op vb; if [[ $# -eq 3 ]]; then va=${1}; shift; else va=${PVR}; fi; [[ $# -eq 2 ]] || die "${FUNCNAME}: bad number of arguments"; op=${1}; vb=${2}; case ${op} in -eq | -ne | -lt | -le | -gt | -ge) ;; *) die "${FUNCNAME}: invalid operator: ${op}" ;; esac; __eapi7_ver_compare "${va}" "${vb}"; test $? "${op}" 2 }