From 755f053c855dfcc92529994470b1e7c0a81cb2d2 Mon Sep 17 00:00:00 2001 From: Sam James Date: Tue, 30 Mar 2021 20:42:12 +0100 Subject: media-fonts/culmus: port restored 0.120-r5 to EAPI 7 Adjust 0.133* too. Bug: https://bugs.gentoo.org/737406 Bug: https://bugs.gentoo.org/777570 Signed-off-by: Sam James --- media-fonts/culmus/culmus-0.120-r5.ebuild | 133 ++++++++++++++++++------------ media-fonts/culmus/culmus-0.133-r1.ebuild | 84 ++++++++++++------- 2 files changed, 135 insertions(+), 82 deletions(-) (limited to 'media-fonts/culmus') diff --git a/media-fonts/culmus/culmus-0.120-r5.ebuild b/media-fonts/culmus/culmus-0.120-r5.ebuild index 95a55a83564e..572a3bfcc36c 100644 --- a/media-fonts/culmus/culmus-0.120-r5.ebuild +++ b/media-fonts/culmus/culmus-0.120-r5.ebuild @@ -1,7 +1,7 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI="6" +EAPI=7 inherit font @@ -28,6 +28,7 @@ SRC_URI="mirror://sourceforge/culmus/${P}.tar.gz SRC_URI+=" fancy? ( $(printf "http://culmus.sourceforge.net/fancy/%s.tar.gz " ${FANCY_FONTS}) )" SRC_URI+=" fancy? ( $(printf "http://culmus.sourceforge.net/fancy-yg/%s.zip " ${FANCY_YG_FONTS}) )" SRC_URI+=" taamey? ( $(printf "http://culmus.sourceforge.net/taamim/%s.zip " ${TAAMEY_FONTS}) )" +S="${WORKDIR}" # Some fonts are available in otf format too. Do we need them? # http://culmus.sourceforge.net/fancy/anka-otf.zip @@ -39,16 +40,15 @@ SLOT="0" KEYWORDS="~alpha amd64 arm ~hppa ~ia64 ppc ppc64 s390 sparc x86" IUSE="ancient fancy fontforge taamey" -FONT_CONF=( "${T}/65-culmus.conf" ) - RDEPEND="!media-fonts/culmus-ancient" # >=x11-apps/mkfontscale-1.0.9-r1 as Heavy weight support is required -DEPEND="${RDEPEND} +BDEPEND=" app-arch/unzip >=x11-apps/mkfontscale-1.0.9-r1 - fontforge? ( media-gfx/fontforge )" + fontforge? ( media-gfx/fontforge ) +" -S=${WORKDIR} +FONT_CONF=( "${T}/65-culmus.conf" ) # Put all fonts, generated or not here FONT_S=${S}/FONTS @@ -62,15 +62,15 @@ src_unpack() { if use fancy; then unpack $(printf "%s.tar.gz " ${FANCY_FONTS}) unpack $(printf "%s.zip " ${FANCY_YG_FONTS}) - mv TTF/* . + mv TTF/* . || die fi if use taamey; then for font in ${TAAMEY_FONTS}; do - mkdir ${font} - pushd ${font} + mkdir ${font} || die + pushd ${font} || die unpack ${font}.zip - popd >/dev/null + popd >/dev/null || die done fi } @@ -83,65 +83,88 @@ src_prepare() { src_compile() { mkdir -p "${FONT_S}" if use fontforge; then - pushd ${P} - mv *.afm *.pfa "${FONT_S}" - rm *.ttf - popd >/dev/null + pushd ${P} || die + + mv *.afm *.pfa "${FONT_S}" || die + rm *.ttf || die + + popd >/dev/null || die + + pushd ${PN}-type1-${TYPE1_PV} || die + + mv *.afm *.pfa "${FONT_S}" || die + + popd >/dev/null || die - pushd ${PN}-type1-${TYPE1_PV} - mv *.afm *.pfa "${FONT_S}" - popd >/dev/null + pushd ${PN}-src-${PV} || die - pushd ${PN}-src-${PV} for f in *.sfd; do "${WORKDIR}"/${PN}-src-${PV}/GenerateTTF.pe ${f} "${FONT_S}" || die done - popd >/dev/null + + popd >/dev/null || die if use ancient; then - pushd ${MY_A_P}/src + pushd ${MY_A_P}/src || die + export FONTFORGE_LANGUAGE=ff - make clean - make all || die "Failed to build fonts" - mv *.ttf "${FONT_S}" - popd >/dev/null + + emake clean + emake all + + mv *.ttf "${FONT_S}" || die + + popd >/dev/null || die fi if use taamey; then for font in ${TAAMEY_FONTS}; do - rm -rf ${font}/TTF - pushd ${font}/SFD + rm -rf ${font}/TTF || die + + pushd ${font}/SFD || die + for f in *.sfd; do "${WORKDIR}"/${PN}-src-${PV}/GenerateTTF.pe ${f} "${FONT_S}" || die done - popd >/dev/null + + popd >/dev/null || die done fi else - pushd ${P} - mv *.afm *.pfa *.ttf "${FONT_S}" - popd >/dev/null + pushd ${P} || die - pushd ${PN}-type1-${TYPE1_PV} - mv *.afm *.pfa "${FONT_S}" - popd >/dev/null + mv *.afm *.pfa *.ttf "${FONT_S}" || die + + popd >/dev/null || die + + pushd ${PN}-type1-${TYPE1_PV} || die + + mv *.afm *.pfa "${FONT_S}" || die + + popd >/dev/null || die if use ancient; then - pushd ${MY_A_P}$(use fontforge || echo .TTF)/fonts - mv *.ttf "${FONT_S}" - popd >/dev/null + pushd ${MY_A_P}$(use fontforge || echo .TTF)/fonts || die + + mv *.ttf "${FONT_S}" || die + + popd >/dev/null || die fi if use taamey; then for font in ${TAAMEY_FONTS}; do - pushd ${font}/TTF - mv *.ttf "${FONT_S}" - popd >/dev/null + pushd ${font}/TTF || die + + mv *.ttf "${FONT_S}" || die + + popd >/dev/null || die done fi fi - use fancy && mv *.afm *.pfa *.ttf "${FONT_S}" + if use fancy; then + mv *.afm *.pfa *.ttf "${FONT_S}" || die + fi } src_install() { @@ -150,31 +173,37 @@ src_install() { FONT_SUFFIX="pfa afm $((use fancy || use taamey) && echo ttf)" \ font_src_install - rm -rf "${FONT_S}" + rm -rf "${FONT_S}" || die find "${WORKDIR}" -name '*.ttf' -o -name '*.pfa' -o -name '*.pfm' | while read font; do - ewarn "QA: missed font file: ${font}" + eqawarn "Missed font file: ${font}" done - pushd ${PN}$(use fontforge && echo -src)-${PV} + pushd ${PN}$(use fontforge && echo -src)-${PV} || die + dodoc CHANGES - popd >/dev/null + + popd >/dev/null || die if use ancient; then - pushd "${WORKDIR}/${MY_A_P}$(use fontforge || echo .TTF)/" + pushd "${WORKDIR}/${MY_A_P}$(use fontforge || echo .TTF)/" || die + newdoc CHANGES{,.ancient} || die newdoc README{,.ancient} || die - popd >/dev/null + + popd >/dev/null || die fi if use taamey; then for font in ${TAAMEY_FONTS}; do - pushd ${font} - [[ -f ChangeLog ]] && { newdoc ChangeLog{,.${font}} || die; } - newdoc README{,.${font}} || die - insinto /usr/share/doc/${PF}/${font} + pushd ${font} || die + + [[ -f ChangeLog ]] && newdoc ChangeLog{,.${font}} + newdoc README{,.${font}} + docinto ${font} doins -r Samples - popd >/dev/null + + popd >/dev/null || die done fi } diff --git a/media-fonts/culmus/culmus-0.133-r1.ebuild b/media-fonts/culmus/culmus-0.133-r1.ebuild index 1d3fec0e13b8..170ad94a7b61 100644 --- a/media-fonts/culmus/culmus-0.133-r1.ebuild +++ b/media-fonts/culmus/culmus-0.133-r1.ebuild @@ -28,6 +28,7 @@ SRC_URI="mirror://sourceforge/culmus/${P}.tar.gz SRC_URI+=" fancy? ( $(printf "http://culmus.sourceforge.net/fancy/%s.tar.gz " ${FANCY_FONTS}) )" SRC_URI+=" fancy? ( $(printf "http://culmus.sourceforge.net/fancy-yg/%s.zip " ${FANCY_YG_FONTS}) )" SRC_URI+=" taamey? ( $(printf "http://culmus.sourceforge.net/taamim/%s.zip " ${TAAMEY_FONTS}) )" +S="${WORKDIR}" # Some fonts are available in otf format too. Do we need them? # http://culmus.sourceforge.net/fancy/anka-otf.zip @@ -39,8 +40,6 @@ SLOT="0" KEYWORDS="~alpha amd64 arm ~hppa ~ia64 ppc ppc64 s390 sparc x86" IUSE="ancient fancy fontforge taamey" -FONT_CONF=( "${T}"/65-culmus.conf ) - RDEPEND="!media-fonts/culmus-ancient" # >=x11-apps/mkfontscale-1.0.9-r1 as Heavy weight support is required BDEPEND=" @@ -49,7 +48,7 @@ BDEPEND=" fontforge? ( media-gfx/fontforge ) " -S="${WORKDIR}" +FONT_CONF=( "${T}"/65-culmus.conf ) # Put all fonts, generated or not here FONT_S="${S}/FONTS" @@ -58,8 +57,8 @@ PATCHES=( "${FILESDIR}/${P}-fontconfig-test.patch" ) # bug 695708 src_unpack() { unpack ${P}.tar.gz # For type1 fonts... unpack ${PN}-type1-${TYPE1_PV}.tar.gz - use fontforge && unpack ${PN}-src-${PV}.tar.gz + use fontforge && unpack ${PN}-src-${PV}.tar.gz use ancient && unpack ${MY_A_P}$(usex fontforge '' .TTF).tgz if use fancy; then @@ -71,8 +70,11 @@ src_unpack() { if use taamey; then for font in ${TAAMEY_FONTS}; do mkdir ${font} || die + pushd ${font} > /dev/null || die - unpack ${font}.zip + + unpack ${font}.zip + popd > /dev/null || die done fi @@ -85,60 +87,78 @@ src_prepare() { src_compile() { mkdir -p "${FONT_S}" || die + if use fontforge; then pushd ${P} > /dev/null || die - mv *.afm *.pfa "${FONT_S}" || die - rm *.ttf || die + + mv *.afm *.pfa "${FONT_S}" || die + rm *.ttf || die + popd > /dev/null || die pushd ${PN}-type1-${TYPE1_PV} > /dev/null || die - mv *.afm *.pfa "${FONT_S}" || die + + mv *.afm *.pfa "${FONT_S}" || die + popd > /dev/null || die pushd ${PN}-src-${PV} > /dev/null || die - for f in *.sfd; do - "${WORKDIR}"/${PN}-src-${PV}/GenerateTTF.pe ${f} "${FONT_S}" || die - done + + for f in *.sfd; do + "${WORKDIR}"/${PN}-src-${PV}/GenerateTTF.pe ${f} "${FONT_S}" || die + done + popd > /dev/null || die if use ancient; then pushd ${MY_A_P}/src > /dev/null || die - export FONTFORGE_LANGUAGE=ff - make clean || die - make all || die "Failed to build fonts" - mv *.ttf "${FONT_S}" || die + + export FONTFORGE_LANGUAGE=ff + + emake clean + emake all + + mv *.ttf "${FONT_S}" || die + popd > /dev/null || die fi if use taamey; then for font in ${TAAMEY_FONTS}; do rm -rf ${font}/TTF || die + pushd ${font}/SFD > /dev/null || die - for f in *.sfd; do - "${WORKDIR}"/${PN}-src-${PV}/GenerateTTF.pe ${f} "${FONT_S}" || die - done + + for f in *.sfd; do + "${WORKDIR}"/${PN}-src-${PV}/GenerateTTF.pe ${f} "${FONT_S}" || die + done + popd > /dev/null || die done fi else pushd ${P} > /dev/null || die - mv *.afm *.pfa *.ttf "${FONT_S}" || die + mv *.afm *.pfa *.ttf "${FONT_S}" || die popd >/dev/null || die pushd ${PN}-type1-${TYPE1_PV} > /dev/null || die - mv *.afm *.pfa "${FONT_S}" || die + mv *.afm *.pfa "${FONT_S}" || die popd > /dev/null || die if use ancient; then pushd ${MY_A_P}$(usex fontforge '' .TTF)/fonts > /dev/null || die - mv *.ttf "${FONT_S}" || die + + mv *.ttf "${FONT_S}" || die + popd > /dev/null || die fi if use taamey; then for font in ${TAAMEY_FONTS}; do pushd ${font}/TTF > /dev/null || die - mv *.ttf "${FONT_S}" || die + + mv *.ttf "${FONT_S}" || die + popd > /dev/null || die done fi @@ -158,27 +178,31 @@ src_install() { rm -rf "${FONT_S}" || die find "${WORKDIR}" -name '*.ttf' -o -name '*.pfa' -o -name '*.pfm' | while read font; do - ewarn "QA: missed font file: ${font}" + eqawarn "Missed font file: ${font}" done pushd ${PN}$(usex fontforge -src '')-${PV} > /dev/null || die - dodoc CHANGES + dodoc CHANGES popd > /dev/null || die if use ancient; then pushd "${WORKDIR}/${MY_A_P}$(usex fontforge '' .TTF)/" > /dev/null || die - newdoc CHANGES{,.ancient} || die - newdoc README{,.ancient} || die + + newdoc CHANGES{,.ancient} + newdoc README{,.ancient} + popd > /dev/null || die fi if use taamey; then for font in ${TAAMEY_FONTS}; do pushd ${font} > /dev/null || die - docinto ${font} - [[ -f ChangeLog ]] && { newdoc ChangeLog{,.${font}} || die; } - newdoc README{,.${font}} || die - dodoc -r Samples + + docinto ${font} + [[ -f ChangeLog ]] && newdoc ChangeLog{,.${font}} + newdoc README{,.${font}} + dodoc -r Samples + popd > /dev/null || die done fi -- cgit v1.2.3-65-gdbad