Download raw body.
[NEW]: productivity/tickrs: Graph stock/fund/crypto prices in terminal UI
[NEW]: productivity/tickrs: Graph stock/fund/crypto prices in terminal UI
[NEW]: productivity/tickrs: Graph stock/fund/crypto prices in terminal UI
On Fri, 01 Aug 2025 10:34:58 +0200
Sebastien Marie <semarie@kapouay.eu.org> wrote:
> Rafael Sadowski <rafael@sizeofvoid.org> writes:
>
> > On Mon Jul 28, 2025 at 08:52:23PM +0800, Chris Billington wrote:
> >> Attached is a new proposed port productivity/tickrs, which graphs
> >> stock, fund and crypto prices over various timeframes in a
> >> terminal UI. Data is from Yahoo Finance and Coinbase.
> >
> > Tested on amd64. Works perfectly for me and I would be happy if we
> > could import it.
>
> Below a diff on top of the tarball to simplify the patching to remove
> static linking of curl and ssl.
>
> it only patches src/api/Cargo.toml (and regenerate Cargo.lock).
>
> >> Patched to use base ssl/libz and net/curl rather than the vendored
> >> versions in upstream.
> >>
> >> make lib-depends-check complains about extra WANTLIBS for the
> >> base/system libraries: I don't know why. Can someone more
> >> knowedgeable with Rust ports explain?
> >
> > Yeah maybe a ports rust guru can help here!?
>
> it is 'make port-lib-depends-check' (and not 'make
> lib-depends-check').
>
> I changed WANTLIB (and LIB_DEPENDS) to what is need.
>
> $ make port-lib-depends-check
> $ make show=WANTLIB
> c pthread c++abi m curl
>
> The tarball (updated) is reattached.
>
> I would be ok for import it with these changes.
> --
> Sebastien Marie
>
> Commit ID: a7e651c23fb139a52abaf2119339e80baa0f5635
> Change ID: urzqznqmnqvxoypqnzwszkpkmpmqzyly
> Author : Sebastien Marie <semarie@kapouay.eu.org> (2025-07-31
> 09:00:03) Committer: Sebastien Marie <semarie@kapouay.eu.org>
> (2025-08-01 10:28:01)
>
> (no description set)
>
> diff --git a/productivity/tickrs/Makefile
> b/productivity/tickrs/Makefile index adf8340a29..977be71009 100644
> --- a/productivity/tickrs/Makefile
> +++ b/productivity/tickrs/Makefile
> @@ -13,13 +13,14 @@
> # MIT License
> PERMIT_PACKAGE = Yes
>
> -WANTLIB += ${MODCARGO_WANTLIB} crypto ssl pthread m z curl \
> - nghttp2 ngtcp2 ngtcp2_crypto_quictls
> +WANTLIB += ${MODCARGO_WANTLIB} m curl
>
> -LIB_DEPENDS = net/curl www/nghttp2 net/ngtcp2
> +LIB_DEPENDS = net/curl
>
> MODULES = devel/cargo
>
> +MODCARGO_CRATES_UPDATE += tickrs-api
> +
> CONFIGURE_STYLE = cargo
>
> USE_GMAKE = Yes
> @@ -27,7 +28,7 @@
> post-install:
> ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/tickrs
> @${SUBST_DATA} ${FILESDIR}/config.yml \
> - ${PREFIX}/share/examples/tickrs/config.yml.sample
> + ${PREFIX}/share/examples/tickrs/config.yml.sample
>
> .include "crates.inc"
>
> diff --git a/productivity/tickrs/patches/patch-api_Cargo_toml
> b/productivity/tickrs/patches/patch-api_Cargo_toml index
> 0d385c2793..d737d2c249 100644
> --- a/productivity/tickrs/patches/patch-api_Cargo_toml
> +++ b/productivity/tickrs/patches/patch-api_Cargo_toml
> @@ -1,3 +1,6 @@
> +- avoid "static-curl" feature (in default features)
> +- avoid "static-ssl" feature
> +
> Index: api/Cargo.toml
> --- api/Cargo.toml.orig
> +++ api/Cargo.toml
> @@ -6,7 +9,7 @@
> futures = "0.3"
> http = "0.2"
> -isahc = { version = "1.7", features = ["static-ssl"] }
> -+isahc = "1.7"
> ++isahc = { version = "1.7", default-features = false, features =
> ["http2", "text-decoding"] } serde = { version = "1.0", features =
> ["derive"] } serde_json = "1.0"
> serde_urlencoded = "0.7"
> diff --git
> a/productivity/tickrs/patches/patch-modcargo-crates_curl-0_4_46_Cargo_toml
> b/productivity/tickrs/patches/patch-modcargo-crates_curl-0_4_46_Cargo_toml
> deleted file mode 100644 index 544da8c682..0000000000
> ---
> a/productivity/tickrs/patches/patch-modcargo-crates_curl-0_4_46_Cargo_toml
> +++ /dev/null @@ -1,40 +0,0 @@
> -Index: modcargo-crates/curl-0.4.46/Cargo.toml
> ---- modcargo-crates/curl-0.4.46/Cargo.toml.orig
> -+++ modcargo-crates/curl-0.4.46/Cargo.toml
> -@@ -86,7 +86,7 @@ default = ["ssl"]
> - force-system-lib-on-osx = ["curl-sys/force-system-lib-on-osx"]
> - http2 = ["curl-sys/http2"]
> - mesalink = ["curl-sys/mesalink"]
> --ntlm = ["curl-sys/ntlm"]
> -+#ntlm = ["curl-sys/ntlm"]
> - poll_7_68_0 = ["curl-sys/poll_7_68_0"]
> - protocol-ftp = ["curl-sys/protocol-ftp"]
> - rustls = ["curl-sys/rustls"]
> -@@ -96,17 +96,17 @@ ssl = [
> - "openssl-probe",
> - "curl-sys/ssl",
> - ]
> --static-curl = ["curl-sys/static-curl"]
> --static-ssl = ["curl-sys/static-ssl"]
> -+#static-curl = ["curl-sys/static-curl"]
> -+#static-ssl = ["curl-sys/static-ssl"]
> - upkeep_7_62_0 = ["curl-sys/upkeep_7_62_0"]
> --windows-static-ssl = [
> -- "static-curl",
> -- "curl-sys/windows-static-ssl",
> --]
> --zlib-ng-compat = [
> -- "curl-sys/zlib-ng-compat",
> -- "static-curl",
> --]
> -+#windows-static-ssl = [
> -+# "static-curl",
> -+# "curl-sys/windows-static-ssl",
> -+#]
> -+#zlib-ng-compat = [
> -+# "curl-sys/zlib-ng-compat",
> -+# "static-curl",
> -+#]
> -
> - [target."cfg(all(unix, not(target_os =
> \"macos\")))".dependencies.openssl-probe]
> - version = "0.1.2"
> diff --git
> a/productivity/tickrs/patches/patch-modcargo-crates_curl-sys-0_4_72+curl-8_6_0_Cargo_toml
> b/productivity/tickrs/patches/patch-modcargo-crates_curl-sys-0_4_72+curl-8_6_0_Cargo_toml
> deleted file mode 100644 index f67ac0d171..0000000000
> ---
> a/productivity/tickrs/patches/patch-modcargo-crates_curl-sys-0_4_72+curl-8_6_0_Cargo_toml
> +++ /dev/null @@ -1,31 +0,0 @@
> -Index: modcargo-crates/curl-sys-0.4.72+curl-8.6.0/Cargo.toml
> ---- modcargo-crates/curl-sys-0.4.72+curl-8.6.0/Cargo.toml.orig
> -+++ modcargo-crates/curl-sys-0.4.72+curl-8.6.0/Cargo.toml
> -@@ -54,20 +54,20 @@ default = ["ssl"]
> - force-system-lib-on-osx = []
> - http2 = ["libnghttp2-sys"]
> - mesalink = []
> --ntlm = []
> -+#ntlm = []
> - poll_7_68_0 = []
> - protocol-ftp = []
> - rustls = ["rustls-ffi"]
> - spnego = []
> - ssl = ["openssl-sys"]
> --static-curl = []
> --static-ssl = ["openssl-sys/vendored"]
> -+#static-curl = []
> -+#static-ssl = ["openssl-sys/vendored"]
> - upkeep_7_62_0 = []
> - windows-static-ssl = []
> --zlib-ng-compat = [
> -- "libz-sys/zlib-ng",
> -- "static-curl",
> --]
> -+#zlib-ng-compat = [
> -+# "libz-sys/zlib-ng",
> -+# "static-curl",
> -+#]
> -
> - [target."cfg(all(unix, not(target_os =
> \"macos\")))".dependencies.openssl-sys]
> - version = "0.9.64"
> diff --git
> a/productivity/tickrs/patches/patch-modcargo-crates_isahc-1_7_2_Cargo_toml
> b/productivity/tickrs/patches/patch-modcargo-crates_isahc-1_7_2_Cargo_toml
> deleted file mode 100644 index 3db2ad4d6d..0000000000
> ---
> a/productivity/tickrs/patches/patch-modcargo-crates_isahc-1_7_2_Cargo_toml
> +++ /dev/null @@ -1,23 +0,0 @@
> -Index: modcargo-crates/isahc-1.7.2/Cargo.toml
> ---- modcargo-crates/isahc-1.7.2/Cargo.toml.orig
> -+++ modcargo-crates/isahc-1.7.2/Cargo.toml
> -@@ -172,7 +172,7 @@ version = ">=0.2.12, <0.4.0"
> - cookies = ["httpdate"]
> - default = [
> - "http2",
> -- "static-curl",
> -+# "static-curl",
> - "text-decoding",
> - ]
> - http2 = ["curl/http2"]
> -@@ -187,8 +187,8 @@ psl = [
> - "publicsuffix",
> - ]
> - spnego = ["curl-sys/spnego"]
> --static-curl = ["curl/static-curl"]
> --static-ssl = ["curl/static-ssl"]
> -+#static-curl = ["curl/static-curl"]
> -+#static-ssl = ["curl/static-ssl"]
> - text-decoding = [
> - "encoding_rs",
> - "mime",
Thank you for this fix. I guess I was guilty of
over-configuring/patching what is already handled by MODCARGO_WANTLIB.
Is there any interest in the other proposed port I posted,
productivity/ticker? This displays textual price data and works out the
value of holdings set up in the config file. So ticker and tickrs kind
of go together.
--
Chris Billington <emulti@disroot.org>
[NEW]: productivity/tickrs: Graph stock/fund/crypto prices in terminal UI
[NEW]: productivity/tickrs: Graph stock/fund/crypto prices in terminal UI
[NEW]: productivity/tickrs: Graph stock/fund/crypto prices in terminal UI