On 2023/10/09 21:13, Renato Aguiar wrote: > I attached an updated zls port fixing build with PORTS_PRIVSEP enabled, > though I'm still trying to figure out the best way to shorten some remaining > long lines in the Makefile.
don't worry about that, the only long lines there are ones which really have to be long - fiddling about with variables to shorten them just makes it more painful to work with the port. : COMMENT = Language Server Protocol for Zig normally lowercase here : DIST_SUBDIR = ${GH_PROJECT} setting this is a little annoying, it makes cd /usr/ports/*/zls not work. there's not really any need to do it with these files anyway. : GH_ACCOUNT = zigtools : GH_PROJECT = zls : GH_TAGNAME = 0.11.0 ... : SITES.ziglibs = https://github.com/ziglibs/ : DISTFILES.ziglibs = known_folders-{known-folders/archive/}fa75e1bc672952efa0cf06160bbd942b47f6d59b.tar.gz \ : diffz-{diffz/archive/}90353d401c59e2ca5ed0abe5444c29ad3d7489aa.tar.gz ... : ln -s ../../known-folders-fa75e1bc672952efa0cf06160bbd942b47f6d59b \ : ${WRKSRC}/deps/known-folders : ln -s ../../diffz-90353d401c59e2ca5ed0abe5444c29ad3d7489aa \ : ${WRKSRC}/deps/diffz DIST_TUPLE is made for this. this (+ regen distinfo) does the trick: DIST_TUPLE = github zigtools zls 0.11.0 . \ github ziglibs known-folders fa75e1bc672952efa0cf06160bbd942b47f6d59b deps/known-folders \ github ziglibs diffz 90353d401c59e2ca5ed0abe5444c29ad3d7489aa deps/diffz : SITES.antlilja = https://gist.github.com/antlilja/ : DISTFILES.antlilja = binned_allocator-{8372900fcc09e38d7b0b6bbaddad3904/archive/}6c3321e0969ff2463f8335da5601986cf2108690.tar.gz ... : post-extract: : mkdir ${WRKSRC}/deps : ln -s ../../8372900fcc09e38d7b0b6bbaddad3904-6c3321e0969ff2463f8335da5601986cf2108690 \ : ${WRKSRC}/deps/binned_allocator the syntax isn't exactly lovely but gist is not usually used for software distribution so I don't think there's much point adding support to DIST_TUPLE for it (and it will be awkward to do with the gist id, commit id, _and_ name), so this seems alright to me. I would use 8372900fcc09e38d7b0b6bbaddad3904-* instead of duplicating 6c3321e0... in post-extract. (8372900fcc... is the static part for that gist so should be relatively unlikely to change, whereas the 6c3321e0... will do). and probably mv instead of ln. diff for the above changes below (not including distinfo, so needs "make makesum"). --- Makefile.orig Tue Oct 10 12:16:48 2023 +++ Makefile Tue Oct 10 12:25:07 2023 @@ -1,8 +1,8 @@ -COMMENT = Language Server Protocol for Zig +COMMENT = language server protocol for Zig -GH_ACCOUNT = zigtools -GH_PROJECT = zls -GH_TAGNAME = 0.11.0 +DIST_TUPLE = github zigtools zls 0.11.0 . \ + github ziglibs known-folders fa75e1bc672952efa0cf06160bbd942b47f6d59b deps/known-folders \ + github ziglibs diffz 90353d401c59e2ca5ed0abe5444c29ad3d7489aa deps/diffz CATEGORIES = devel @@ -14,22 +14,12 @@ WANTLIB = c pthread BUILD_DEPENDS = lang/zig RUN_DEPENDS = lang/zig -DIST_SUBDIR = ${GH_PROJECT} - -SITES.ziglibs = https://github.com/ziglibs/ -DISTFILES.ziglibs = known_folders-{known-folders/archive/}fa75e1bc672952efa0cf06160bbd942b47f6d59b.tar.gz \ - diffz-{diffz/archive/}90353d401c59e2ca5ed0abe5444c29ad3d7489aa.tar.gz - SITES.antlilja = https://gist.github.com/antlilja/ DISTFILES.antlilja = binned_allocator-{8372900fcc09e38d7b0b6bbaddad3904/archive/}6c3321e0969ff2463f8335da5601986cf2108690.tar.gz post-extract: mkdir ${WRKSRC}/deps - ln -s ../../known-folders-fa75e1bc672952efa0cf06160bbd942b47f6d59b \ - ${WRKSRC}/deps/known-folders - ln -s ../../diffz-90353d401c59e2ca5ed0abe5444c29ad3d7489aa \ - ${WRKSRC}/deps/diffz - ln -s ../../8372900fcc09e38d7b0b6bbaddad3904-6c3321e0969ff2463f8335da5601986cf2108690 \ + mv ${WRKDIR}/8372900fcc09e38d7b0b6bbaddad3904-* \ ${WRKSRC}/deps/binned_allocator do-build: