From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 47576138334 for ; Tue, 15 Oct 2019 22:00:27 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2F4C1E0870; Tue, 15 Oct 2019 22:00:23 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 629FFE086B for ; Tue, 15 Oct 2019 22:00:22 +0000 (UTC) Received: from tuxbrain.localnet (91-115-217-203.adsl.highway.telekom.at [91.115.217.203]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: asturm) by smtp.gentoo.org (Postfix) with ESMTPSA id 7641234BE44; Tue, 15 Oct 2019 22:00:15 +0000 (UTC) From: Andreas Sturmlechner To: gentoo-dev@lists.gentoo.org Cc: =?utf-8?B?TWljaGHFgiBHw7Nybnk=?= Subject: [gentoo-dev] [PATCH v2] font.eclass: Port to EAPI-7 Date: Tue, 15 Oct 2019 23:58:13 +0200 Message-ID: <2203231.Pmfk29c62c@tuxbrain> In-Reply-To: References: <9898161.uzqcMZjEFU@tuxk10> <4600891.LxcutymfD9@tuxbrain> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" X-Archives-Salt: e3e23ca8-49f1-4f9f-bffc-d4e6074236e5 X-Archives-Hash: 7de536b88ad459b1b1eaea2af7a1d971 On Wednesday, 10 April 2019 15:21:35 CEST Micha=C5=82 G=C3=B3rny wrote: > On Tue, 2019-04-09 at 21:41 +0200, Andreas Sturmlechner wrote: > > On Sonntag, 24. M=C3=A4rz 2019 19:41:24 CEST Micha=C5=82 G=C3=B3rny wro= te: > > > -U9999, please. This is a huge eclass and probably requires more work > > > than you're showing us ;-). > >=20 > > As requested, without any changes to v2 - and if this does not receive > > a reply I'll assume silent ack by fonts proj. One more time - happy testing, and if anyone answers, font proj is invited = as=20 well. =2D-- a/eclass/font.eclass +++ b/eclass/font.eclass @@ -4,16 +4,15 @@ # @ECLASS: font.eclass # @MAINTAINER: # fonts@gentoo.org =2D# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 +# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 7 # @BLURB: Eclass to make font installation uniform =20 case ${EAPI:-0} in =2D 0|1|2|3|4|5|6) ;; =2D *) die "EAPI ${EAPI} is not supported by font.eclass." ;; + 0|1|2|3|4|5|6) inherit eutils ;; + 7) ;; + *) die "EAPI ${EAPI} is not supported by font.eclass." ;; esac =20 =2Dinherit eutils =2D EXPORT_FUNCTIONS pkg_setup src_install pkg_postinst pkg_postrm =20 # @ECLASS-VARIABLE: FONT_SUFFIX @@ -67,18 +66,18 @@ fi # Generate Xorg font files (mkfontscale/mkfontdir). font_xfont_config() { local dir_name =2D if has X ${IUSE//+} && use X ; then + if in_iuse X && use X ; then dir_name=3D"${1:-${FONT_PN}}" =2D ebegin "Creating fonts.scale & fonts.dir in ${dir_name##*/}" =2D rm -f "${ED}${FONTDIR}/${1//${S}/}"/{fonts. {dir,scale},encodings.dir} =2D mkfontscale "${ED}${FONTDIR}/${1//${S}/}" + rm -f "${ED%/}/${FONTDIR}/${1//${S}/}"/{fonts. {dir,scale},encodings.dir} \ + || die "failed to prepare ${FONTDIR}/${1//${S}/}" + einfo "Creating fonts.scale & fonts.dir in ${dir_name##*/}" + mkfontscale "${ED%/}/${FONTDIR}/${1//${S}/}" || eerror "failed to=20 create fonts.scale" mkfontdir \ -e ${EPREFIX}/usr/share/fonts/encodings \ -e ${EPREFIX}/usr/share/fonts/encodings/large \ =2D "${ED}${FONTDIR}/${1//${S}/}" =2D eend $? =2D if [[ -e fonts.alias ]] ; then =2D doins fonts.alias + "${ED%/}/${FONTDIR}/${1//${S}/}" || eerror "failed to create=20 fonts.dir" + if [[ -e fonts.alias ]]; then + doins fonts.alias || die "failed to install fonts.alias" #=20 TODO old EAPI cleanup fi fi } @@ -91,7 +90,9 @@ font_fontconfig() { if [[ -n ${FONT_CONF[@]} ]]; then insinto /etc/fonts/conf.avail/ for conffile in "${FONT_CONF[@]}"; do =2D [[ -e ${conffile} ]] && doins ${conffile} + if [[ -e ${conffile} ]]; then + doins ${conffile} || die "failed to install conf file"=20 # TODO old EAPI cleanup + fi done fi } @@ -105,20 +106,18 @@ font_cleanup_dirs() { local d f g generated candidate otherfile