# Copyright 1999-2016 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Id$ EAPI=6 inherit eutils savedconfig MY_P="perl-${PV/_rc/-RC}" DESCRIPTION="Larry Wall's Practical Extraction and Report Language by Makefile.micro" SRC_URI=" mirror://cpan/src/5.0/${MY_P}.tar.bz2 " HOMEPAGE="http://www.perl.org/" LICENSE="|| ( Artistic GPL-1+ )" KEYWORDS="~amd64" SLOT="0" IUSE+="perlconf" S="${WORKDIR}/${MY_P}" #TOTEST: DEPEND="perlconf? ( dev-lang/perl )" src_prepare() { eapply -p1 "${FILESDIR}"/make_micro.patch eapply -p1 "${FILESDIR}"/fix-headers.patch eapply_user } src_configure() { tc-export CC LD use perlconf && { emake -f Makefile.micro patch_uconfig cat uconfig.sh > uconfig64.sh emake -f Makefile.micro regen_uconfig64 return } restore_config uconfig.h && \ return case "${CHOST}" in x86_64-*-linux-musl) # Default config, tested on x86_64-gentoo-linux-musl-gcc-6.3.0 sed -i \ -e "s|^archname='.*'$|archname='x86_64-linux'|" \ -e "s|^useperlio='undef'$|useperlio='define'|" \ -e "s|^i_unistd='undef'$|i_unistd='define'|" \ -e "s|^i_fcntl='undef'$|i_fcntl='define'|" \ -e "s|^i_syswait='undef'$|i_syswait='define'|" \ uconfig64.sh emake -f Makefile.micro regen_uconfig64 ;; *) eerror "${CHOST} is not yet supported.. But you can fix this!" ;; esac } src_compile() { emake -f Makefile.micro } src_install() { save_config uconfig.h dobin microperl dodoc README.micro }