diff options
Diffstat (limited to 'security/bitwarden-cli/Makefile')
-rw-r--r-- | security/bitwarden-cli/Makefile | 49 |
1 files changed, 29 insertions, 20 deletions
diff --git a/security/bitwarden-cli/Makefile b/security/bitwarden-cli/Makefile index da1f30c1f2b3..109a0fb2efab 100644 --- a/security/bitwarden-cli/Makefile +++ b/security/bitwarden-cli/Makefile @@ -1,7 +1,6 @@ PORTNAME= bitwarden-cli DISTVERSIONPREFIX= cli-v -DISTVERSION= 2024.12.0 -PORTREVISION= 1 +DISTVERSION= 2025.8.0 CATEGORIES= security MASTER_SITES= https://nodejs.org/dist/v${PKG_NODE_VER}/:node DISTFILES= node-v${PKG_NODE_VER}${EXTRACT_SUFX}:node \ @@ -25,13 +24,16 @@ BUILD_DEPENDS= npm:www/npm${NODEJS_SUFFIX} LIB_DEPENDS= libbrotlidec.so:archivers/brotli \ libicui18n.so:devel/icu \ libuv.so:devel/libuv \ + libsimdjson.so:devel/simdjson \ libcares.so:dns/c-ares \ - libnghttp2.so:www/libnghttp2 + libngtcp2.so:net/libngtcp2 \ + libnghttp2.so:www/libnghttp2 \ + libnghttp3.so:www/libnghttp3 RUN_DEPENDS= xdg-open:devel/xdg-utils \ ca_root_nss>0:security/ca_root_nss TEST_DEPENDS= npm:www/npm${NODEJS_SUFFIX} -USES= gmake localbase:ldflags nodejs:20,build pkgconfig \ +USES= gmake localbase:ldflags nodejs:22,build pkgconfig \ python:build ssl USE_GITHUB= yes @@ -40,6 +42,9 @@ GH_PROJECT= clients MAKE_ENV+= PYTHONDONTWRITEBYTECODE=1 +# don't strip executable upon install since it causes error +STRIP= # empty + BUILD_WRKSRC= ${WRKSRC}/apps/cli PLIST_FILES= bin/bw \ @@ -51,14 +56,17 @@ OPTIONS_DEFINE= DOCS PREFETCH_FILE= ${PORTNAME}-${DISTVERSION}-node-modules${EXTRACT_SUFX} PREFETCH_TIMESTAMP= 61171200 -PKG_NODE_VER= 20.18.0 +PKG_NODE_VER= 22.15.1 PKG_FETCH_VER= 3.5 PKG_NODE_CONFIGURE_ARGS=--openssl-use-def-ca-store \ --shared-brotli \ --shared-cares \ --shared-libuv \ --shared-nghttp2 \ + --shared-nghttp3 \ --shared-openssl \ + --shared-ngtcp2 \ + --shared-simdjson \ --shared-zlib \ --with-intl=system-icu NODE_ARCH= ${ARCH:S/aarch64/arm64/:S/amd64/x64/:S/i386/ia32/} @@ -70,23 +78,26 @@ pre-fetch: cd ${WRKDIR}/node-modules-cache && \ ${SETENV} HOME=${WRKDIR} \ npm ci --ignore-scripts --no-progress --no-audit --no-fund; \ - ${FIND} ${WRKDIR}/node-modules-cache -depth 1 -print | \ - ${GREP} -v node_modules | ${XARGS} ${RM} -r; \ ${FIND} ${WRKDIR}/node-modules-cache -type d -exec ${CHMOD} 755 {} ';'; \ - cd ${WRKDIR}/node-modules-cache && \ - ${MTREE_CMD} -cbnSp node_modules | ${MTREE_CMD} -C | ${SED} \ - -e 's:time=[0-9.]*:time=${PREFETCH_TIMESTAMP}.000000000:' \ - -e 's:\([gu]id\)=[0-9]*:\1=0:g' \ - -e 's:flags=.*:flags=none:' \ - -e 's:^\.:./node_modules:' > node-modules-cache.mtree; \ - ${TAR} -cz --options 'gzip:!timestamp' \ - -f ${DISTDIR}/${PREFETCH_FILE} \ - @node-modules-cache.mtree; \ + for dir in `${FIND} -s ${WRKDIR}/node-modules-cache -type d -name node_modules -print | \ + ${GREP} -ve 'node_modules/.*/node_modules'`; do \ + ${MTREE_CMD} -cbnSp $${dir} | ${MTREE_CMD} -C | ${SED} \ + -e 's:time=[0-9.]*:time=${PREFETCH_TIMESTAMP}.000000000:' \ + -e 's:\([gu]id\)=[0-9]*:\1=0:g' \ + -e 's:flags=.*:flags=none:' \ + -e "s|\.|$${dir}|" \ + -e 's|^${WRKDIR}|.|' >> ${WRKDIR}/node-modules-cache.mtree; \ + done; \ + ${TAR} -cz --options 'gzip:!timestamp' -f ${DISTDIR}/${PREFETCH_FILE} \ + -C ${WRKDIR} @node-modules-cache.mtree; \ ${RM} -r ${WRKDIR}; \ fi post-extract: - ${MV} ${WRKDIR}/node_modules ${WRKSRC} + @for dir in `${FIND} -s ${WRKDIR}/node-modules-cache -type d -name node_modules -print | \ + ${GREP} -ve 'node_modules/.*/node_modules'`; do \ + ${MV} $${dir} `${ECHO_CMD} $${dir} | sed -e 's|${WRKDIR}/node-modules-cache|${WRKSRC}|'`; \ + done post-patch: # apply FreeBSD patches for node @@ -98,7 +109,6 @@ post-patch: ${WRKSRC}/node_modules/@yao-pkg/pkg-fetch/patches/node.v${PKG_NODE_VER}.cpp.patch pre-build: - cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} npm run postinstall # build patched node for pkg cd ${WRKDIR}/node-v${PKG_NODE_VER} && \ ${SETENV} ${CONFIGURE_ENV} CC=${CC} CXX=${CXX} ./configure ${PKG_NODE_CONFIGURE_ARGS} && \ @@ -120,8 +130,7 @@ do-build: ./dist/bw completion --shell zsh > _bw do-install: - # don't strip executable since it causes error - ${INSTALL_KLD} ${BUILD_WRKSRC}/dist/bw ${STAGEDIR}${PREFIX}/bin + ${INSTALL_PROGRAM} ${BUILD_WRKSRC}/dist/bw ${STAGEDIR}${PREFIX}/bin @${MKDIR} ${STAGEDIR}${PREFIX}/share/zsh/site-functions ${INSTALL_DATA} ${BUILD_WRKSRC}/_bw \ ${STAGEDIR}${PREFIX}/share/zsh/site-functions/_bw |