dejavu-2.37.ebuild 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit font versionator
  5. DESCRIPTION="DejaVu fonts, bitstream vera with ISO-8859-2 characters"
  6. HOMEPAGE="http://dejavu.sourceforge.net/"
  7. # If you want to test snapshot from dejavu.sf.net/snapshots/
  8. # just rename ebuild to dejavu-2.22.20071220.2156.ebuild
  9. MY_PV=$(get_version_component_range 1-2)
  10. snapv=$(get_version_component_range 3-4)
  11. snapv=${snapv/./-}
  12. MY_BP=${PN}-fonts-ttf-${MY_PV}
  13. MY_SP=${PN}-fonts-${MY_PV}
  14. if [[ -z ${snapv} ]]; then
  15. SRC_URI="!fontforge? ( mirror://sourceforge/${PN}/${MY_BP}.tar.bz2 )
  16. fontforge? ( mirror://sourceforge/${PN}/${MY_SP}.tar.bz2 )"
  17. else
  18. SRC_URI="!fontforge? ( http://dejavu.sourceforge.net/snapshots/${MY_BP}-${snapv}.tar.bz2 )
  19. fontforge? ( http://dejavu.sourceforge.net/snapshots/${MY_SP}-${snapv}.tar.bz2 )"
  20. fi
  21. LICENSE="BitstreamVera"
  22. SLOT="0"
  23. KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~x64-solaris ~x86-solaris"
  24. IUSE="fontforge"
  25. DEPEND="fontforge? ( x11-apps/mkfontscale
  26. >=media-gfx/fontforge-20080429
  27. x11-apps/mkfontdir
  28. dev-perl/Font-TTF
  29. app-i18n/unicode-data
  30. >media-libs/fontconfig-2.6.0 )"
  31. FONT_CONF=(
  32. fontconfig/20-unhint-small-dejavu-sans-mono.conf
  33. fontconfig/20-unhint-small-dejavu-sans.conf
  34. fontconfig/20-unhint-small-dejavu-serif.conf
  35. fontconfig/57-dejavu-sans-mono.conf
  36. fontconfig/57-dejavu-sans.conf
  37. fontconfig/57-dejavu-serif.conf
  38. )
  39. FONT_S="ttf"
  40. FONT_SUFFIX="ttf"
  41. DOCS="AUTHORS NEWS README.md status.txt langcover.txt unicover.txt"
  42. src_unpack() {
  43. default
  44. if use fontforge; then
  45. mv "${MY_SP}" "${P}" || die
  46. else
  47. mv "${MY_BP}" "${P}" || die
  48. fi
  49. }
  50. src_compile() {
  51. if use fontforge; then
  52. emake \
  53. BUILDDIR=ttf \
  54. BLOCKS=/usr/share/unicode-data/Blocks.txt \
  55. UNICODEDATA=/usr/share/unicode-data/UnicodeData.txt \
  56. FC-LANG=/usr/share/fc-lang \
  57. full sans \
  58. || die "emake failed"
  59. fi
  60. }
  61. src_install() {
  62. font_src_install
  63. if use fontforge; then
  64. dodoc ttf/*.txt
  65. fi
  66. }