commit:     ffaaf7d14314fc3dbfac0be04f8c09c27c9a61f1
Author:     Akinori Hattori <hattya <AT> gentoo <DOT> org>
AuthorDate: Fri Apr  7 12:26:10 2017 +0000
Commit:     Akinori Hattori <hattya <AT> gentoo <DOT> org>
CommitDate: Fri Apr  7 12:26:10 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ffaaf7d1

app-text/hyperestraier: add perl USE flag

Package-Manager: Portage-2.3.3, Repoman-2.3.1

 .../hyperestraier/files/hyperestraier-perl.patch   | 24 ++++++++++++++++++++++
 app-text/hyperestraier/hyperestraier-1.4.13.ebuild | 18 ++++++++++++----
 2 files changed, 38 insertions(+), 4 deletions(-)

diff --git a/app-text/hyperestraier/files/hyperestraier-perl.patch 
b/app-text/hyperestraier/files/hyperestraier-perl.patch
new file mode 100644
index 00000000000..dbafd483d92
--- /dev/null
+++ b/app-text/hyperestraier/files/hyperestraier-perl.patch
@@ -0,0 +1,24 @@
+--- a/perlnative/Makefile.in
++++ b/perlnative/Makefile.in
+@@ -29,10 +29,10 @@
+ # Building binaries
+ PERL = @PERL@
+ POD2HTML = @POD2HTML@
+-CC = gcc
++CC = @CC@
+ INC = -I. -I../.. -I$(MYHEADDIR) -I$(HOME)/include -I/usr/local/include
+ OPTIMIZE = @MYOPTIMIZE@
+-LD = gcc
++LD = @CC@
+ LIBS = -L../.. -L$(MYLIBDIR) -L$(HOME)/lib -L/usr/local/lib @LIBS@
+ RUNENV = 
LD_LIBRARY_PATH=.:..:/lib:/usr/lib:$(MYLIBDIR):$(HOME)/lib:/usr/local/lib:@MYRUNPATH@
+ 
+@@ -46,7 +46,7 @@
+ all :
+       ( cd src && if ! [ -f Makefile ] ; \
+         then $(RUNENV) $(PERL) Makefile.PL CC="$(CC)" INC="$(INC)" 
OPTIMIZE="$(OPTIMIZE)" \
+-        LD="$(LD)" LIBS="$(LIBS)" PREFIX="$(prefix)" ; fi )
++        LD="$(LD)" LIBS="$(LIBS)" PREFIX="$(prefix)" INSTALLDIRS="vendor" ; 
fi )
+       ( cd src && make )
+       @printf '\n'
+       @printf 
'#================================================================\n'

diff --git a/app-text/hyperestraier/hyperestraier-1.4.13.ebuild 
b/app-text/hyperestraier/hyperestraier-1.4.13.ebuild
index c6182f110ad..8d57b0e5812 100644
--- a/app-text/hyperestraier/hyperestraier-1.4.13.ebuild
+++ b/app-text/hyperestraier/hyperestraier-1.4.13.ebuild
@@ -3,9 +3,9 @@
 
 EAPI="6"
 
-inherit autotools java-pkg-opt-2
+inherit autotools java-pkg-opt-2 perl-functions
 
-IUSE="bzip2 debug java lzo mecab ruby +zlib"
+IUSE="bzip2 debug java lzo mecab perl ruby +zlib"
 
 DESCRIPTION="a full-text search system for communities"
 HOMEPAGE="http://fallabs.com/hyperestraier/";
@@ -20,6 +20,7 @@ RDEPEND="dev-db/qdbm
        java? ( >=virtual/jre-1.4:* )
        lzo? ( dev-libs/lzo )
        mecab? ( app-text/mecab )
+       perl? ( dev-lang/perl )
        ruby? ( dev-lang/ruby:= )
        zlib? ( sys-libs/zlib )"
 DEPEND="${RDEPEND}
@@ -28,6 +29,7 @@ DEPEND="${RDEPEND}
 
 PATCHES=(
        "${FILESDIR}"/${PN}-configure.patch
+       "${FILESDIR}"/${PN}-perl.patch
        "${FILESDIR}"/${PN}-ruby19.patch
 )
 HTML_DOCS=( doc/. )
@@ -36,11 +38,14 @@ AT_NOELIBTOOLIZE="yes"
 
 he_foreach_api() {
        local u d
-       for u in java ruby; do
+       for u in java perl ruby; do
                if ! use "${u}"; then
                        continue
                fi
                for d in ${u}native ${u}pure; do
+                       if [[ ! -d "${d}" ]]; then
+                               continue
+                       fi
                        einfo "${EBUILD_PHASE} ${d}"
                        cd "${d}"
                        case "${EBUILD_PHASE}" in
@@ -84,7 +89,7 @@ src_prepare() {
                -e "/^JAVACFLAGS/s|$| ${JAVACFLAGS}|" \
                -e '/^LDENV/d' \
                -e 's/make\( \|$\)/$(MAKE)\1/g' \
-               Makefile.in {java,ruby}*/Makefile.in
+               Makefile.in {java,perl,ruby}*/Makefile.in
 
        mv configure.{in,ac}
        eautoreconf
@@ -116,5 +121,10 @@ src_install() {
        einstalldocs
        he_foreach_api
 
+       if use perl; then
+               perl_delete_module_manpages
+               perl_fix_packlist
+       fi
+
        rm -f "${D}"/usr/bin/*test
 }

Reply via email to