gitui-0.16.2.ebuild 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247
  1. # Copyright 2017-2021 Gentoo Authors
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=7
  4. AG_PV=0.16.3
  5. CRATES="
  6. addr2line-0.15.2
  7. adler-1.0.2
  8. ahash-0.6.3
  9. aho-corasick-0.7.18
  10. ansi_term-0.12.1
  11. anyhow-1.0.42
  12. arrayvec-0.4.12
  13. atty-0.2.14
  14. autocfg-1.0.1
  15. backtrace-0.3.60
  16. base64-0.13.0
  17. bincode-1.3.3
  18. bit-set-0.5.2
  19. bit-vec-0.6.3
  20. bitflags-1.2.1
  21. bugreport-0.4.0
  22. bytemuck-1.7.0
  23. bytesize-1.0.1
  24. cassowary-0.3.0
  25. cc-1.0.68
  26. cfg-if-1.0.0
  27. chrono-0.4.19
  28. clap-2.33.3
  29. cpp_demangle-0.3.3
  30. crc32fast-1.2.1
  31. crossbeam-channel-0.5.1
  32. crossbeam-deque-0.8.0
  33. crossbeam-epoch-0.9.5
  34. crossbeam-utils-0.8.5
  35. crossterm-0.19.0
  36. crossterm_winapi-0.7.0
  37. ctor-0.1.20
  38. debugid-0.7.2
  39. diff-0.1.12
  40. dirs-next-2.0.0
  41. dirs-sys-next-0.1.2
  42. easy-cast-0.4.4
  43. either-1.6.1
  44. fancy-regex-0.3.5
  45. filetreelist-0.2.0
  46. flate2-1.0.20
  47. fnv-1.0.7
  48. form_urlencoded-1.0.1
  49. getrandom-0.2.3
  50. gimli-0.24.0
  51. git-version-0.3.4
  52. git-version-macro-0.3.4
  53. git2-0.13.20
  54. hashbrown-0.11.2
  55. hermit-abi-0.1.19
  56. idna-0.2.3
  57. indexmap-1.7.0
  58. inferno-0.10.6
  59. instant-0.1.9
  60. invalidstring-0.1.2
  61. itertools-0.10.1
  62. itoa-0.4.7
  63. jobserver-0.1.22
  64. lazy_static-1.4.0
  65. lazycell-1.3.0
  66. libc-0.2.98
  67. libgit2-sys-0.12.21+1.1.0
  68. libssh2-sys-0.2.21
  69. libz-sys-1.1.3
  70. line-wrap-0.1.1
  71. linked-hash-map-0.5.4
  72. lock_api-0.4.4
  73. log-0.4.14
  74. matches-0.1.8
  75. memchr-2.4.0
  76. memmap-0.7.0
  77. memoffset-0.6.4
  78. miniz_oxide-0.4.4
  79. mio-0.7.13
  80. miow-0.3.7
  81. nix-0.20.0
  82. nodrop-0.1.14
  83. ntapi-0.3.6
  84. num-format-0.4.0
  85. num-integer-0.1.44
  86. num-traits-0.2.14
  87. num_cpus-1.13.0
  88. object-0.25.3
  89. once_cell-1.8.0
  90. openssl-probe-0.1.4
  91. openssl-src-111.15.0+1.1.1k
  92. openssl-sys-0.9.65
  93. output_vt100-0.1.2
  94. parking_lot-0.11.1
  95. parking_lot_core-0.8.3
  96. percent-encoding-2.1.0
  97. pkg-config-0.3.19
  98. plist-1.1.0
  99. pprof-0.4.3
  100. ppv-lite86-0.2.10
  101. pretty_assertions-0.7.2
  102. proc-macro-hack-0.5.19
  103. proc-macro2-1.0.27
  104. quick-xml-0.20.0
  105. quote-1.0.9
  106. rand-0.8.4
  107. rand_chacha-0.3.1
  108. rand_core-0.6.3
  109. rand_hc-0.3.1
  110. rayon-core-1.9.1
  111. redox_syscall-0.2.9
  112. redox_users-0.4.0
  113. regex-1.5.4
  114. regex-syntax-0.6.25
  115. remove_dir_all-0.5.3
  116. rgb-0.8.27
  117. ron-0.6.4
  118. rustc-demangle-0.1.20
  119. ryu-1.0.5
  120. safemem-0.3.3
  121. same-file-1.0.6
  122. scopeguard-1.1.0
  123. scopetime-0.1.1
  124. serde-1.0.126
  125. serde_derive-1.0.126
  126. serde_json-1.0.64
  127. serial_test-0.5.1
  128. serial_test_derive-0.5.1
  129. shell-escape-0.1.5
  130. signal-hook-0.1.17
  131. signal-hook-registry-1.4.0
  132. simplelog-0.10.0
  133. smallvec-1.6.1
  134. smawk-0.3.1
  135. stable_deref_trait-1.2.0
  136. str_stack-0.1.0
  137. symbolic-common-8.3.0
  138. symbolic-demangle-8.3.0
  139. syn-1.0.73
  140. syntect-4.5.0
  141. sys-info-0.9.0
  142. tempfile-3.2.0
  143. textwrap-0.11.0
  144. textwrap-0.14.2
  145. thiserror-1.0.26
  146. thiserror-impl-1.0.26
  147. time-0.1.43
  148. tinyvec-1.2.0
  149. tinyvec_macros-0.1.0
  150. tui-0.15.0
  151. unicode-bidi-0.3.5
  152. unicode-linebreak-0.1.1
  153. unicode-normalization-0.1.19
  154. unicode-segmentation-1.8.0
  155. unicode-truncate-0.2.0
  156. unicode-width-0.1.8
  157. unicode-xid-0.2.2
  158. url-2.2.2
  159. uuid-0.8.2
  160. vcpkg-0.2.15
  161. version_check-0.9.3
  162. walkdir-2.3.2
  163. wasi-0.10.2+wasi-snapshot-preview1
  164. which-4.1.0
  165. winapi-0.3.9
  166. winapi-i686-pc-windows-gnu-0.4.0
  167. winapi-util-0.1.5
  168. winapi-x86_64-pc-windows-gnu-0.4.0
  169. xml-rs-0.8.3
  170. yaml-rust-0.4.5
  171. asyncgit-${AG_PV}
  172. ${P}
  173. "
  174. inherit cargo flag-o-matic
  175. DESCRIPTION="Blazing fast terminal-ui for git"
  176. HOMEPAGE="
  177. https://crates.io/crates/gitui
  178. https://github.com/extrawurst/gitui
  179. "
  180. SRC_URI="$(cargo_crate_uris ${CRATES})"
  181. LICENSE="BSD Apache-2.0 MIT"
  182. SLOT="0"
  183. KEYWORDS="amd64 ~x86"
  184. IUSE="nerd"
  185. RDEPEND="
  186. dev-libs/libgit2
  187. dev-libs/openssl
  188. "
  189. DEPEND="${RDEPEND}"
  190. RESTRICT="mirror"
  191. src_prepare() {
  192. (
  193. # https://github.com/extrawurst/gitui/issues/459
  194. # `vendored-openssl` is for portability and static linking,
  195. # wich we are don't use
  196. set -e
  197. cd "${CARGO_HOME}"
  198. source="$(sed -n '/^replace-with/{s/.*"\(.*\)"$/\1/p;q}' <./config)"
  199. sed -i "./${source}/asyncgit-${AG_PV}/Cargo.toml" \
  200. -e '/"vendored[^"]*"/d'
  201. ) || die 'failed to `sed` asyncgit'
  202. if use nerd; then
  203. sed -i "${S}/src/keys.rs" \
  204. -e 's/\\u{238b}/ESC/' \
  205. -e 's/\\u{2325}/M^/' \
  206. -e 's/23ce/f810/' \
  207. -e 's/232b/f56d/' \
  208. -e 's/2912/f015/' \
  209. -e 's/2913/fb00/' \
  210. -e 's/21de/f077/' \
  211. -e 's/21df/f078/' \
  212. -e 's/2326/fae7/' \
  213. -e 's/2380/0049/'
  214. fi || die
  215. filter-flags -flto* # building fails when compiling with LTO
  216. default
  217. }
  218. src_install() {
  219. local DOCS=( {README,KEY_CONFIG,THEMES}.md )
  220. dobin "target/release/${PN}"
  221. insinto "/usr/share/${P}/examples"
  222. doins vim_style_key_config.ron
  223. einstalldocs
  224. }
  225. pkg_postinst() {
  226. einfo "Example of vim keybindings config stored in '/usr/share/${P}/examples'"
  227. einfo 'to use it put example config in `$XDG_CONFIG_HOME/gitui/key_config.ron`'
  228. }