Hi!
I’ve wrote an ebuild for Tangara Companion (and discovered a Cargo bug in the process), so I can have it ready to go when my Tangara arrives (I’m still waiting for it to be shipped). While it’s not unlikely that I’m the only (future) Tangara owner that also uses Gentoo, maybe this can help other people who would like to package the application for their distributions of choice.P.S. Sorry for puting it in a [code] block, but the forum software didn’t want to attach it the normal way.
I’ve wrote an ebuild for Tangara Companion (and discovered a Cargo bug in the process), so I can have it ready to go when my Tangara arrives (I’m still waiting for it to be shipped). While it’s not unlikely that I’m the only (future) Tangara owner that also uses Gentoo, maybe this can help other people who would like to package the application for their distributions of choice.
Code:
# Copyright 2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# Autogenerated by pycargoebuild 0.13.4
EAPI=8
CRATES='
addr2line@0.21.0
adler@1.0.2
aho-corasick@1.1.2
ansi_term@0.12.1
anstream@0.6.11
anstyle-parse@0.2.3
anstyle-query@1.0.2
anstyle-wincon@3.0.2
anstyle@1.0.6
anyhow@1.0.79
array-init@2.1.0
async-channel@2.2.0
atomic-polyfill@1.0.3
atty@0.2.14
autocfg@1.1.0
backtrace-ext@0.2.1
backtrace@0.3.69
base64@0.21.7
binrw@0.12.0
binrw_derive@0.12.0
bitflags@1.3.2
bitflags@2.4.2
bitvec@1.0.1
block-buffer@0.10.4
bytemuck@1.14.3
bytemuck_derive@1.5.0
byteorder@1.5.0
cairo-rs@0.19.1
cairo-sys-rs@0.19.1
cc@1.0.83
cfg-expr@0.15.6
cfg-if@1.0.0
clap@2.34.0
colorchoice@1.0.0
concurrent-queue@2.4.0
console@0.15.8
convert_case@0.4.0
core-foundation-sys@0.8.6
cpufeatures@0.2.12
crc32fast@1.3.2
critical-section@1.1.2
crossbeam-utils@0.8.19
crypto-common@0.1.6
csv-core@0.1.11
csv@1.3.0
darling@0.14.4
darling_core@0.14.4
darling_macro@0.14.4
deku@0.16.0
deku_derive@0.16.0
derive_more@0.99.17
digest@0.10.7
either@1.10.0
encode_unicode@0.3.6
env_filter@0.1.0
env_logger@0.11.1
equivalent@1.0.1
esp-idf-part@0.4.1
espflash@2.1.0
event-listener-strategy@0.5.0
event-listener@5.0.0
field-offset@0.3.6
flate2@1.0.28
fnv@1.0.7
funty@2.0.0
futures-channel@0.3.30
futures-core@0.3.30
futures-executor@0.3.30
futures-io@0.3.30
futures-macro@0.3.30
futures-sink@0.3.30
futures-task@0.3.30
futures-util@0.3.30
futures@0.3.30
gdk-pixbuf-sys@0.19.0
gdk-pixbuf@0.19.0
gdk4-sys@0.8.0
gdk4@0.8.0
generic-array@0.14.7
gimli@0.28.1
gio-sys@0.19.0
gio@0.19.0
glib-macros@0.19.0
glib-sys@0.19.0
glib@0.19.0
gobject-sys@0.19.0
graphene-rs@0.19.0
graphene-sys@0.19.0
gsk4-sys@0.8.0
gsk4@0.8.0
gtk4-macros@0.8.0
gtk4-sys@0.8.0
gtk4@0.8.0
hash32@0.2.1
hashbrown@0.14.3
heapless@0.7.17
heck@0.3.3
heck@0.4.1
hermit-abi@0.1.19
hermit-abi@0.3.6
humantime@2.1.0
ident_case@1.0.1
indexmap@2.1.0
indicatif@0.17.8
instant@0.1.12
io-kit-sys@0.4.0
is-terminal@0.4.12
is_ci@1.2.0
itoa@1.0.10
lazy_static@1.4.0
libadwaita-sys@0.6.0
libadwaita@0.6.0
libc@0.2.152
libudev-sys@0.1.4
libudev@0.3.0
lock_api@0.4.11
log@0.4.20
mach2@0.4.2
md5@0.7.0
memchr@2.7.1
memoffset@0.9.0
miette-derive@5.10.0
miette@5.10.0
miniz_oxide@0.7.1
nix@0.26.4
num-traits@0.2.18
number_prefix@0.4.0
object@0.32.2
once_cell@1.19.0
owo-colors@3.5.0
pango-sys@0.19.0
pango@0.19.0
parking@2.2.0
parse_int@0.6.0
pin-project-lite@0.2.13
pin-utils@0.1.0
pkg-config@0.3.29
portable-atomic@1.6.0
proc-macro-crate@1.3.1
proc-macro-crate@3.1.0
proc-macro-error-attr@1.0.4
proc-macro-error@1.0.4
proc-macro2@1.0.76
quote@1.0.35
radium@0.7.0
regex-automata@0.4.3
regex-syntax@0.8.2
regex@1.10.2
rustc-demangle@0.1.23
rustc_version@0.4.0
rustversion@1.0.14
ryu@1.0.16
same-file@1.0.6
scopeguard@1.2.0
semver@1.0.21
serde@1.0.195
serde_derive@1.0.195
serde_json@1.0.111
serde_plain@1.0.2
serde_spanned@0.6.5
sha2@0.10.8
slab@0.4.9
slip-codec@0.3.4
smallvec@1.12.0
smawk@0.3.2
spin@0.9.8
stable_deref_trait@1.2.0
static_assertions@1.1.0
strsim@0.10.0
strsim@0.8.0
structopt-derive@0.4.18
structopt@0.3.26
strum@0.24.1
strum@0.25.0
strum_macros@0.24.3
strum_macros@0.25.3
supports-color@2.1.0
supports-hyperlinks@2.1.0
supports-unicode@2.1.0
syn@1.0.109
syn@2.0.48
system-deps@6.2.0
tap@1.0.1
target-lexicon@0.12.13
terminal_size@0.1.17
textwrap@0.11.0
textwrap@0.15.2
thiserror-impl@1.0.56
thiserror@1.0.56
thread-executor@0.1.0
toml@0.8.10
toml_datetime@0.6.5
toml_edit@0.19.15
toml_edit@0.21.1
toml_edit@0.22.4
tree-sitter-lua@0.0.19
tree-sitter@0.20.10
typenum@1.17.0
unescaper@0.1.3
unicode-ident@1.0.12
unicode-linebreak@0.1.5
unicode-segmentation@1.11.0
unicode-width@0.1.11
utf8parse@0.2.1
vec_map@0.8.2
version-compare@0.1.1
version_check@0.9.4
walkdir@2.4.0
winapi-i686-pc-windows-gnu@0.4.0
winapi-util@0.1.6
winapi-x86_64-pc-windows-gnu@0.4.0
winapi@0.3.9
windows-sys@0.52.0
windows-targets@0.52.0
windows_aarch64_gnullvm@0.52.0
windows_aarch64_msvc@0.52.0
windows_i686_gnu@0.52.0
windows_i686_msvc@0.52.0
windows_x86_64_gnu@0.52.0
windows_x86_64_gnullvm@0.52.0
windows_x86_64_msvc@0.52.0
winnow@0.5.34
wyz@0.5.1
xmas-elf@0.9.1
zero@0.1.3
zip@0.6.6
'
declare -A GIT_CRATES=(
[serialport]='https://github.com/haileys/serialport-rs;254368237a0e5185cc6e08a060964d033e01a382;serialport-rs-%commit%'
)
inherit cargo
DESCRIPTION='Tangara music player companion application'
HOMEPAGE='https://cooltech.zone/tangara/'
SRC_URI="
https://github.com/haileys/${PN}/archive/refs/tags/v${PV}.tar.gz
${CARGO_CRATE_URIS}
"
LICENSE='GPL-3'
# Dependent crate licenses
LICENSE+='
Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD ISC MIT MPL-2.0
Unicode-DFS-2016
'
SLOT='0'
KEYWORDS='~amd64'
DEPEND='
>=gui-libs/gtk-4.12
>=gui-libs/libadwaita-1.4
dev-libs/glib
x11-libs/gdk-pixbuf
x11-libs/pango
virtual/udev
'
BDEPEND='
virtual/pkgconfig
sys-apps/sed
app-alternatives/awk
'
RDEPEND="${DEPEND}"
src_prepare() {
default
sed -e 's/git = "https:\/\/github\.com\/haileys\/serialport-rs", branch = "tangara-flasher"/'"path = \"${WORKDIR//\//\\/}\/serialport-rs-$(echo ${GIT_CRATES[serialport]} | awk 'BEGIN{FS=";"}; END{print $2}')\"/" -i Cargo.toml || die
}
src_configure() {
export PKG_CONFIG_ALLOW_CROSS=1
cargo_src_configure
}