I updated megacmd files with your mentions: 1) Sorted the variables as per Makefile.template 2) Renamed the sdk distname 3) Set DISTFILES once 4) I don't add bash as RUN_DEPENDS because it isn't need to use megacmd, works well with other shells, I use with the default ksh 5) gtest to TEST_DEPENDS 6) Splitted and sorted CONFIGURE_ARGS 7) Consistently use of variable declarations 8) Fix PLIST 9) Remove AI_V4MAPPED from http.cpp, and fix http.h patch to not declare that 10) Use shared libs (I forgot why I used the static library…) 11) I don't split the sdk library, as use this only megacmd and not possible to set the sdk libs as external dependency in configure script of megacmd 12) patching megacmd to use the default bash-completion path 13) Change DESCR
I built and tested on -current, works for me. Robert Bagdan <kikadf...@gmail.com> ezt írta (időpont: 2023. jún. 15., Cs, 18:05): > > Thanks to your reviews, I will install -current OpenBSD to a vm in the > next few days, and fix this port with your modifications and > proposals. > I will come back soon. > > Stuart Henderson <s...@spacehopper.org> ezt írta (időpont: 2023. jún. > 15., Cs, 9:24): > > > > On 2023/06/14 13:13, Omar Polo wrote: > > > > > the patches seemed fine for me. I'd wish we could avoid patching for > > > ereadline. > > > > that's normal for our renamed ports version of readline. > > > > > The only odd one is patches/patch-sdk_include_mega_http_h which > > > defines AI_V4MAPPED... > > > > sdk/include/mega/http.h > > 44- > > 45-#if defined(__FreeBSD__) || defined(__OpenBSD__) > > 46-#include <netinet/in.h> > > 47:#define AI_V4MAPPED 0x00000800 > > 48-#endif > > 49- > > 50-namespace mega { > > > > yes, don't set it to some random value > > > > sdk/src/http.cpp > > 270- hints.ai_family = AF_UNSPEC; > > 271- > > 272-#ifndef __MINGW32__ > > 273: hints.ai_flags = AI_V4MAPPED | AI_ADDRCONFIG; > > 274-#endif > > 275- > > 276- if (!getaddrinfo("ns.mega.co.nz", NULL, &hints, &aiList)) > > > > since it's only used in this one place, best bet is to remoce the http.h > > patch and remove AI_V4MAPPED from http.cpp. > > > > (if it was used more often, I'd define it, but to 0). > > > > > > > - the bundled sdk installs also the headers, a static library and a > > > pkgconfig file: > > > > > > 1. we usually prefer dynamic linking > > > 2. would it make sense (maybe in the future) to split the sdk off > > > this port? There are other projects we may want that need > > > this sdk too? Maybe there's already something in ports that > > > optionally looks for this and could statically link to > > > libmega? > > > > I think I would have used a separate port for the sdk, but think this > > way is ok too (especially if nothing else uses the sdk). > > > > > - i'd probably install the bash completions in > > > /usr/local/share/bash-completion and avoid to @sample, but I don't > > > use bash and don't really know the difference (if there is) to > > > install in /etc/bash_completion.d. > > > > yes, please use /usr/local/share/bash-completion like other ports do. > > > > "MEGAcmd provides non UI access to MEGA services" > > > > I see this is just copied from the readme, but "non UI" doesn't make > > much sense. Something like "MEGAcmd provides scriptable command-line > > tools and an interactive shell to access services from mega.nz"? > > > > > -- > kikadf -- kikadf
megacmd.tar.gz
Description: application/gzip