--- /usr/portage/app-text/highlight/highlight-3.18.ebuild 2014-04-11 01:59:40.000000000 +0000 +++ highlight-3.18.ebuild 2014-09-16 10:12:23.440969954 +0000 @@ -13,7 +13,7 @@ LICENSE="GPL-3" SLOT="0" KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos" -IUSE="examples qt4" +IUSE="examples perl qt4" RDEPEND="dev-lang/lua qt4? ( @@ -25,6 +25,7 @@ virtual/pkgconfig" src_prepare() { + epatch "${FILESDIR}"/${P}-parallel-example-make.patch sed -i "/LSB_DOC_DIR/s:doc/${PN}:doc/${PF}:" \ src/core/datadir.cpp || die @@ -34,6 +35,10 @@ } src_compile() { + if use perl ; then + emake -C ${S}/examples/swig -f makefile perl "CXX=$(tc-getCXX)" "CFLAGS=${CXXFLAGS} -fPIC" + emake -C ${S}/src -f makefile clean + fi myhlopts=( "CXX=$(tc-getCXX)" "AR=$(tc-getAR)" @@ -58,6 +63,13 @@ emake -f makefile "${myhlopts[@]}" install use qt4 && emake -f makefile "${myhlopts[@]}" install-gui + if use perl ; then + eval $(perl -V:{installvendorlib,installvendorarch}) + insinto ${installvendorlib} + doins examples/swig/highlight.pm + insinto ${installvendorarch}/auto/${PN} + doins examples/swig/highlight.so + fi if use examples ; then docompress -x /usr/share/doc/${PF}/examples else