source-han-sans-1.001.ebuild 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit font
  5. # Note to maintainers:
  6. # The upstream tarball is huge (over 780 MB), so we repackage the
  7. # regional subset OTF fonts per region, for the user's convenience.
  8. DESCRIPTION="Pan-CJK OpenType/CFF font family"
  9. HOMEPAGE="https://github.com/adobe-fonts/source-han-sans/"
  10. SRC_URI="l10n_ja? ( https://dev.gentoo.org/~yngwin/distfiles/${PN}-ja-${PV}.tar.xz )
  11. l10n_ko? ( https://dev.gentoo.org/~yngwin/distfiles/${PN}-ko-${PV}.tar.xz )
  12. l10n_zh-CN? ( https://dev.gentoo.org/~yngwin/distfiles/${PN}-zh_CN-${PV}.tar.xz )
  13. l10n_zh-TW? ( https://dev.gentoo.org/~yngwin/distfiles/${PN}-zh_TW-${PV}.tar.xz )"
  14. LICENSE="Apache-2.0"
  15. SLOT="0"
  16. KEYWORDS="alpha amd64 arm ~arm64 ia64 ppc ppc64 ~sh sparc x86 ~x86-fbsd ~x64-macos"
  17. IUSE="l10n_ja l10n_ko +l10n_zh-CN l10n_zh-TW"
  18. REQUIRED_USE="|| ( l10n_ja l10n_ko l10n_zh-CN l10n_zh-TW )"
  19. S=${WORKDIR}
  20. FONT_SUFFIX="otf"
  21. RESTRICT="binchecks strip"
  22. src_install() {
  23. for l in ja ko zh-CN zh-TW; do
  24. use l10n_${l} && FONT_S="${S}/source-han-sans-${l//-/_}-${PV}" font_src_install
  25. done
  26. dodoc source-han-sans-*-${PV}/*md source-han-sans-*-${PV}/*pdf
  27. }