commit:     0a7b0ae182e07e30d40cb4e1178f4710469a0ac6
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Wed Sep 16 11:40:33 2020 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Wed Sep 16 11:40:33 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0a7b0ae1

app-i18n/xcin: Port to EAPI 7

Closes: https://bugs.gentoo.org/742044
Package-Manager: Portage-3.0.7, Repoman-3.0.1
Signed-off-by: David Seifert <soap <AT> gentoo.org>

 app-i18n/xcin/xcin-2.5.3_pre3-r3.ebuild | 70 +++++++++++++++++++--------------
 1 file changed, 40 insertions(+), 30 deletions(-)

diff --git a/app-i18n/xcin/xcin-2.5.3_pre3-r3.ebuild 
b/app-i18n/xcin/xcin-2.5.3_pre3-r3.ebuild
index 3950d850a1c..dcd1696d1c4 100644
--- a/app-i18n/xcin/xcin-2.5.3_pre3-r3.ebuild
+++ b/app-i18n/xcin/xcin-2.5.3_pre3-r3.ebuild
@@ -1,14 +1,16 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI="4"
-inherit multilib eutils autotools libtool
+EAPI=7
+
+inherit autotools
 
 MY_P=${PN}_2.5.2.99.pre2+cvs20030224
 
 DESCRIPTION="Chinese X Input Method"
 HOMEPAGE="http://cle.linux.org.tw/xcin/";
-SRC_URI="mirror://debian/pool/main/x/${PN}/${MY_P}.orig.tar.gz
+SRC_URI="
+       mirror://debian/pool/main/x/${PN}/${MY_P}.orig.tar.gz
        mirror://debian/pool/main/x/${PN}/${MY_P}-1.4.diff.gz"
 
 LICENSE="XCIN GPL-2"
@@ -16,38 +18,42 @@ SLOT="0"
 KEYWORDS="~amd64 ppc x86"
 IUSE="debug nls unicode"
 
-RDEPEND=">=sys-libs/db-4.5
-       >=app-i18n/libtabe-0.2.6
-       unicode? ( media-fonts/hkscs-ming
-               media-fonts/arphicfonts )
+RDEPEND="
        app-i18n/libchewing
-       x11-libs/libX11"
-DEPEND="${RDEPEND}
-       nls? ( sys-devel/gettext )"
+       >=app-i18n/libtabe-0.2.6
+       >=sys-libs/db-4.5
+       x11-libs/libX11
+       unicode? ( media-fonts/arphicfonts )"
+DEPEND="${RDEPEND}"
+BDEPEND="nls? ( sys-devel/gettext )"
 
 S="${WORKDIR}/${MY_P/_/-}"
 
+PATCHES=(
+       "${WORKDIR}"/${MY_P}-1.4.diff
+       "${FILESDIR}"/${P}-glibc-2.10.patch
+       "${FILESDIR}"/${P}-make.patch
+       "${FILESDIR}"/${P}-ldflags.patch
+)
+
 src_prepare() {
-       epatch \
-               "${WORKDIR}"/${MY_P}-1.4.diff \
-               "${FILESDIR}"/${P}-glibc-2.10.patch \
-               "${FILESDIR}"/${P}-make.patch \
-               "${FILESDIR}"/${P}-ldflags.patch
-       rm -f configure
-       cd script
-       elibtoolize
+       default
+
+       rm configure || die
+       cd script || die
+       mv configure.{in,ac} || die
        eautoreconf
-       mv configure ../
+       mv configure .. || die
 }
 
 src_configure() {
        econf \
                --disable-static \
-               --with-xcin-rcdir="${EPREFIX}/etc" \
-               --with-xcin-dir="${EPREFIX}/usr/$(get_libdir)/xcin25" \
-               --with-db-lib="${EPREFIX}/usr/$(get_libdir)" \
-               --with-tabe-inc="${EPREFIX}/usr/include/tabe" \
-               --with-tabe-lib="${EPREFIX}/usr/$(get_libdir)" \
+               --with-xcin-rcdir="${EPREFIX}"/etc \
+               --with-xcin-dir="${EPREFIX}"/usr/$(get_libdir)/xcin25 \
+               --with-db-lib="${EPREFIX}"/usr/$(get_libdir) \
+               --with-tabe-inc="${EPREFIX}"/usr/include/tabe \
+               --with-tabe-lib="${EPREFIX}"/usr/$(get_libdir) \
                $(use_enable debug)
 }
 
@@ -61,16 +67,20 @@ src_install() {
                program_prefix="${D}" \
                install
 
-       find "${ED}" -name "*.la" -type f -delete || die
+       # no static archives
+       find "${ED}" -name '*.la' -delete || die
 
+       local docdir
        for docdir in doc doc/En doc/En/internal doc/history doc/internal 
doc/modules; do
                docinto ${docdir#doc/}
-               for doc in $(find ${docdir} -maxdepth '1' -type 'f'); do
+
+               local doc
+               while IFS="" read -d $'\0' -r doc; do
                        if use unicode; then
-                                       iconv -f BIG5 -t UTF-8 
--output=${doc}.UTF-8 ${doc}
-                                       mv ${doc}.UTF-8 ${doc}
+                                       iconv -f BIG5 -t UTF-8 
--output=${doc}.UTF-8 ${doc} || die
+                                       mv ${doc}.UTF-8 ${doc} || die
                        fi
                        dodoc ${doc}
-               done
+               done < <(find ${docdir} -maxdepth '1' -type f -print0)
        done
 }

Reply via email to