[MacPorts] #72293: How to save rename distfiles?
MacPorts
noreply at macports.org
Sat Apr 5 16:51:48 UTC 2025
#72293: How to save rename distfiles?
---------------------+--------------------
Reporter: casr | Owner: (none)
Type: request | Status: new
Priority: Normal | Milestone:
Component: ports | Version:
Keywords: | Port:
---------------------+--------------------
I've been experimenting with the neovim port to stop it from downloading
dependencies during the build phase. All the dependencies are using GitHub
and I make use of their archive URLs to download their tarballs. However,
the filename produced is just a version number like `v1.2.3.tar.gz` and
I'm worried about a potential future where two or more of these
dependencies share a version number and thus clash.
So far I'm doing something like:
{{{
set treesitter_c_distfile v0.23.4.tar.gz
set treesitter_lua_distfile v0.3.0.tar.gz
set treesitter_vim_distfile v0.5.0.tar.gz
set treesitter_vimdoc_distfile v3.0.1.tar.gz
set treesitter_query_distfile v0.5.1.tar.gz
set treesitter_markdown_distfile v0.4.1.tar.gz
master_sites-append https://github.com/tree-sitter/tree-
sitter-c/archive/:treesitter_c \
https://github.com/tree-sitter-grammars/tree-
sitter-lua/archive/:treesitter_lua \
https://github.com/neovim/tree-sitter-
vim/archive/:treesitter_vim \
https://github.com/neovim/tree-sitter-
vimdoc/archive/:treesitter_vimdoc \
https://github.com/tree-sitter-grammars/tree-
sitter-query/archive/:treesitter_query \
https://github.com/tree-sitter-grammars/tree-
sitter-markdown/archive/:treesitter_markdown
distfiles ${distname}${extract.suffix} \
${treesitter_c_distfile}:treesitter_c \
${treesitter_lua_distfile}:treesitter_lua \
${treesitter_vim_distfile}:treesitter_vim \
${treesitter_vimdoc_distfile}:treesitter_vimdoc \
${treesitter_query_distfile}:treesitter_query \
${treesitter_markdown_distfile}:treesitter_markdown
github.tarball_from archive
checksums neovim-0.11.0.tar.gz \
rmd160 454f3f3caeb1fa82b5f3396978efc0195c71577d \
sha256
6826c4812e96995d29a98586d44fbee7c9b2045485d50d174becd6d5242b3319 \
size 12901255 \
v0.23.4.tar.gz \
rmd160 23c74c3b947bcda2e05921c06e65259f46a0c360 \
sha256
b66c5043e26d84e5f17a059af71b157bcf202221069ed220aa1696d7d1d28a7a \
size 380057 \
v0.3.0.tar.gz \
rmd160 6d929ed4ee48e71204774ca1bd4cdc06d720193b \
sha256
a34cc70abfd8d2d4b0fabf01403ea05f848e1a4bc37d8a4bfea7164657b35d31 \
size 62157 \
v0.5.0.tar.gz \
rmd160 971bc651fc62c5f18bdabc61da39620e8410eb87 \
sha256
90019d12d2da0751c027124f27f5335babf069a050457adaed53693b5e9cf10a \
size 357652 \
v3.0.1.tar.gz \
rmd160 cd3dd1aa3543b041e3c00dc0885e56c057125233 \
sha256
76b65e5bee9ff78eb21256619b1995aac4d80f252c19e1c710a4839481ded09e \
size 58427 \
v0.5.1.tar.gz \
rmd160 352bd633db597d87ff768dc379168105cd5b527f \
sha256
fe8c712880a529d454347cd4c58336ac2db22243bae5055bdb5844fb3ea56192 \
size 45070 \
v0.4.1.tar.gz \
rmd160 770039a4ed01fd69c102cff7b1717cdce3702a04 \
sha256
e0fdb2dca1eb3063940122e1475c9c2b069062a638c95939e374c5427eddee9f \
size 419261
}}}
Any suggestions for making these more maintainable? Perhaps it is possible
to rename a distfile?
Further context, in case it's useful, is that only the
`neovim-v0.11.0.tar.gz` distfile is extracted and the rest of the files
are moved to where the CMake-based build system expects them. Perhaps the
above and below have a neater solution?
{{{
extract.only ${distname}${extract.suffix}
post-extract {
file mkdir ${workpath}/build/build/downloads/treesitter_c
file copy ${distpath}/${treesitter_c_distfile}
${workpath}/build/build/downloads/treesitter_c
file mkdir ${workpath}/build/build/downloads/treesitter_lua
file copy ${distpath}/${treesitter_lua_distfile}
${workpath}/build/build/downloads/treesitter_lua
file mkdir ${workpath}/build/build/downloads/treesitter_vim
file copy ${distpath}/${treesitter_vim_distfile}
${workpath}/build/build/downloads/treesitter_vim
file mkdir ${workpath}/build/build/downloads/treesitter_vimdoc
file copy ${distpath}/${treesitter_vimdoc_distfile}
${workpath}/build/build/downloads/treesitter_vimdoc
file mkdir ${workpath}/build/build/downloads/treesitter_query
file copy ${distpath}/${treesitter_query_distfile}
${workpath}/build/build/downloads/treesitter_query
file mkdir ${workpath}/build/build/downloads/treesitter_markdown
file copy ${distpath}/${treesitter_markdown_distfile}
${workpath}/build/build/downloads/treesitter_markdown
}
}}}
--
Ticket URL: <https://trac.macports.org/ticket/72293>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list