xcolor-0.5.1.ebuild 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. # Copyright 2021-2023 Gentoo Authors
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=8
  4. CRATES="
  5. ansi_term@0.11.0
  6. anyhow@1.0.43
  7. atty@0.2.14
  8. autocfg@1.0.1
  9. bitflags@1.2.1
  10. cc@1.0.70
  11. cfg-if@1.0.0
  12. clap@2.33.3
  13. hermit-abi@0.1.19
  14. lazy_static@1.4.0
  15. libc@0.2.101
  16. log@0.4.14
  17. memchr@2.4.1
  18. memoffset@0.6.4
  19. minimal-lexical@0.1.3
  20. nix@0.22.1
  21. nom@7.0.0
  22. pkg-config@0.3.19
  23. strsim@0.8.0
  24. textwrap@0.11.0
  25. unicode-width@0.1.8
  26. vec_map@0.8.2
  27. version_check@0.9.3
  28. winapi@0.3.9
  29. winapi-i686-pc-windows-gnu@0.4.0
  30. winapi-x86_64-pc-windows-gnu@0.4.0
  31. x11@2.18.2
  32. xcb@0.9.0
  33. ${PN}@${PV}
  34. "
  35. inherit cargo desktop xdg-utils
  36. DESCRIPTION="Lightweight color picker for X11"
  37. HOMEPAGE="
  38. https://soft.github.io/xcolor/
  39. https://crates.io/crates/xcolor
  40. https://github.com/Soft/xcolor
  41. "
  42. SRC_URI="${CARGO_CRATE_URIS}"
  43. LICENSE="Apache-2.0 MIT"
  44. SLOT="0"
  45. KEYWORDS="amd64 ~x86"
  46. IUSE="X"
  47. DEPEND="
  48. x11-libs/libX11
  49. x11-libs/libXcursor
  50. x11-libs/libxcb
  51. "
  52. RDEPEND="${DEPEND}"
  53. src_install() {
  54. cargo_src_install
  55. doman man/*
  56. use X && {
  57. local icon='' size=''
  58. for icon in ./extra/icons/*.png; do
  59. size="${icon##*/${PN}-}"
  60. newicon -s "${size%%.*}" "${icon}" "${PN}.png"
  61. done
  62. doicon -s scalable "extra/icons/${PN}.svg"
  63. domenu "extra/${PN}.desktop"
  64. }
  65. }
  66. pkg_postinst() {
  67. use X && xdg_icon_cache_update
  68. }
  69. pkg_postrm() {
  70. use X && xdg_icon_cache_update
  71. }