On 2023/06/20 17:19, Robert Bagdan wrote: > I updated megacmd files with your mentions: > > 1) Sorted the variables as per Makefile.template > 2) Renamed the sdk distname > 3) Set DISTFILES once
btw ${GH_DISTFILE} is preferred over ${DISTNAME}${EXTRACT_SUFX}, that way it also does the right thing if you change to test something downloaded by commit hash (GH_COMMIT) rather than tag > 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. I don't have an account to test runtime, but this is looking much better to me now. I see there are quite a lot of implicit conversion warnings from clang, have you looked into that at all? wondering if there are any easy patches possible that would at least knock out the very common ones in sdk/include/mega/setandelement.h which is included all over the place. In file included from src/useralerts.cpp:22: In file included from ./include/mega.h:50: In file included from ./include/mega/pubkeyaction.h:25: In file included from ./include/mega/megaclient.h:43: ./include/mega/setandelement.h:151:63: warning: implicit conversion changes si gnedness: 'int' to 'const unsigned int' [-Wsign-conversion] void setChanged(int changeType) { if (validChangeType(changeType, CH_E L_SIZE)) mChanges[changeType] = 1; } ~~~~~~~~~~~~~~~ ^~~~~~~~~~ ./include/mega/setandelement.h:151:97: warning: implicit conversion changes si gnedness: 'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] void setChanged(int changeType) { if (validChangeType(changeType, CH_E L_SIZE)) mChanges[changeType] = 1; } ~~~~~~~~ ^~~~~~~~~~ ./include/mega/setandelement.h:160:72: warning: implicit conversion changes si gnedness: 'int' to 'const unsigned int' [-Wsign-conversion] bool hasChanged(int changeType) const { return validChangeType(changeT ype, CH_EL_SIZE) ? mChanges[changeType] : false; } ~~~~~~~~~~~~~~~ ^~~~~~~ ~~ ./include/mega/setandelement.h:160:107: warning: implicit conversion changes s ignedness: 'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] bool hasChanged(int changeType) const { return validChangeType(changeT ype, CH_EL_SIZE) ? mChanges[changeType] : false; } ~~~~~~~~ ^~~~~~~~~~ ./include/mega/setandelement.h:213:63: warning: implicit conversion changes si gnedness: 'int' to 'const unsigned int' [-Wsign-conversion] void setChanged(int changeType) { if (validChangeType(changeType, CH_S IZE)) mChanges[changeType] = 1; } ~~~~~~~~~~~~~~~ ^~~~~~~~~~ ./include/mega/setandelement.h:213:94: warning: implicit conversion changes si gnedness: 'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] void setChanged(int changeType) { if (validChangeType(changeType, CH_S IZE)) mChanges[changeType] = 1; } ~~~~~~~~ ^~~~~~~~~~ ./include/mega/setandelement.h:222:72: warning: implicit conversion changes si gnedness: 'int' to 'const unsigned int' [-Wsign-conversion] bool hasChanged(int changeType) const { return validChangeType(changeT ype, CH_SIZE) ? mChanges[changeType] : false; } ~~~~~~~~~~~~~~~ ^~~~~~~ ~~ ./include/mega/setandelement.h:222:104: warning: implicit conversion changes s ignedness: 'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] bool hasChanged(int changeType) const { return validChangeType(changeT ype, CH_SIZE) ? mChanges[changeType] : false; } ~~~~~~~~ ^~~~~~~~~~