Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F156501244
D54594.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
4 KB
Referenced Files
None
Subscribers
None
D54594.id.diff
View Options
diff --git a/multimedia/navidrome/Makefile b/multimedia/navidrome/Makefile
--- a/multimedia/navidrome/Makefile
+++ b/multimedia/navidrome/Makefile
@@ -2,7 +2,6 @@
DISTVERSIONPREFIX= v
DISTVERSION= 0.59.0
CATEGORIES= multimedia
-DISTFILES+= ${PREFETCH_FILE}:prefetch
MAINTAINER= kbowling@FreeBSD.org
COMMENT= Modern Music Server and Streamer compatible with Subsonic/Airsonic
@@ -11,7 +10,7 @@
LICENSE= GPLv3
LICENSE_FILE= ${WRKSRC}/LICENSE
-BROKEN_i386= npm esbuild fails: "Unsupported platform: freebsd ia32 LE"
+ONLY_FOR_ARCHS= aarch64 amd64
FETCH_DEPENDS= npm:www/npm${NODEJS_SUFFIX}
FETCH_DEPENDS= npm:www/npm${NODEJS_SUFFIX}
@@ -148,7 +147,6 @@
yaml:go-yaml:v3.0.4:yaml_go_yaml_1/vendor/go.yaml.in/yaml/v3 \
zeebo:xxh3:v1.0.2:zeebo_xxh3/vendor/github.com/zeebo/xxh3
-PREFETCH_FILE= ${PORTNAME}-${DISTVERSION}-node${NODEJS_VERSION}-modules${EXTRACT_SUFX}
PREFETCH_TIMESTAMP= 61171200
USE_RC_SUBR= ${PORTNAME}
@@ -164,6 +162,7 @@
USERS= www
GROUPS= www
+# We need ARCH to be defined, which can only happen after options.mk
.include <bsd.port.options.mk>
# Compiler runs out of memory when compiling the ui on 32-bit platforms:
@@ -172,27 +171,46 @@
MAKE_ENV+= NODE_OPTIONS='--max-old-space-size=1492'
.endif
-pre-fetch:
- if [ ! -f ${DISTDIR}/${PREFETCH_FILE} ]; then \
- ${MKDIR} ${WRKDIR}/ui/node-modules-cache; \
- ${CP} -R ${FILESDIR}/packagejsons/* ${WRKDIR}/ui/node-modules-cache; \
- cd ${WRKDIR}/ui/node-modules-cache && \
- ${SETENV} HOME=${WRKDIR} \
- npm ci --ignore-scripts --no-progress --no-audit --no-fund; \
- ${FIND} ${WRKDIR}/ui/node-modules-cache -depth 1 -print | \
- ${GREP} -v node_modules | ${XARGS} ${RM} -r; \
- ${FIND} ${WRKDIR}/ui/node-modules-cache -type d -exec ${CHMOD} 755 {} ';'; \
- cd ${WRKDIR}//ui/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; \
- ${RM} -r ${WRKDIR}; \
- fi
+.if ${ARCH} == amd64 || make(makesum)
+FILE_AMD64= ${PORTNAME}-${DISTVERSION}-node${NODEJS_VERSION}-amd64-modules.tar.gz
+DISTFILES+= ${FILE_AMD64}:prefetch
+COMBIARCH+= x64 ${FILE_AMD64}
+.endif
+
+.if ${ARCH} == aarch64 || make(makesum)
+FILE_ARM64= ${PORTNAME}-${DISTVERSION}-node${NODEJS_VERSION}-arm64-modules.tar.gz
+DISTFILES+= ${FILE_ARM64}:prefetch
+COMBIARCH+= arm64 ${FILE_ARM64}
+.endif
+
+# We need NODEJS_VERSION to be expanded before assigning it so MAKESUM_DEP and NODEJS_VERSION
+# is only expanded after pre.mk
+.include <bsd.port.pre.mk>
+
+.for c f in ${COMBIARCH}
+${DISTDIR}/$f:
+ ${MKDIR} ${WRKDIR}/ui/node-modules-cache; \
+ ${CP} -R ${FILESDIR}/packagejsons/* ${WRKDIR}/ui/node-modules-cache; \
+ cd ${WRKDIR}/ui/node-modules-cache && \
+ ${SETENV} HOME=${WRKDIR} \
+ npm ci --ignore-scripts --no-progress --no-audit --no-fund --cpu=$c; \
+ ${FIND} ${WRKDIR}/ui/node-modules-cache -depth 1 -print | \
+ ${GREP} -v node_modules | ${XARGS} ${RM} -r; \
+ ${FIND} ${WRKDIR}/ui/node-modules-cache -type d -exec ${CHMOD} 755 {} ';'; \
+ cd ${WRKDIR}//ui/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}/$f \
+ @node-modules-cache.mtree; \
+ ${RM} -r ${WRKDIR}; \
+
+pre-fetch: ${DISTDIR}/$f
+MAKESUM_DEP+= ${DISTDIR}/$f
+.endfor
pre-build:
cd ${WRKSRC}/ui && ${SETENV} ${MAKE_ENV} npm run build
@@ -206,3 +224,5 @@
${STAGEDIR}${ETCDIR}/config.toml.sample
.include <bsd.port.mk>
+
+makesum: ${MAKESUM_DEP}
diff --git a/multimedia/navidrome/distinfo b/multimedia/navidrome/distinfo
--- a/multimedia/navidrome/distinfo
+++ b/multimedia/navidrome/distinfo
@@ -1,6 +1,8 @@
-TIMESTAMP = 1767090628
-SHA256 (navidrome-0.59.0-node24-modules.tar.gz) = 9955267d1928787b3e65a7affb3f37d65da6f3128077e9c33f809081365ff084
-SIZE (navidrome-0.59.0-node24-modules.tar.gz) = 85602594
+TIMESTAMP = 1767858101
+SHA256 (navidrome-0.59.0-node24-amd64-modules.tar.gz) = 9955267d1928787b3e65a7affb3f37d65da6f3128077e9c33f809081365ff084
+SIZE (navidrome-0.59.0-node24-amd64-modules.tar.gz) = 85602594
+SHA256 (navidrome-0.59.0-node24-arm64-modules.tar.gz) = 3bbdf65d4d73afe015850c50039423a3edde2127efb1ec29b24c2f7895093230
+SIZE (navidrome-0.59.0-node24-arm64-modules.tar.gz) = 85216583
SHA256 (navidrome-navidrome-v0.59.0_GH0.tar.gz) = b2a61c975029e59981cc2b443d9382ef92526325dcf26f82c9dd4b004454736d
SIZE (navidrome-navidrome-v0.59.0_GH0.tar.gz) = 7777061
SHA256 (Masterminds-semver-v3.4.0_GH0.tar.gz) = 47f43127587cd7750f2054c9ebab8851a3ea2011aefd7cc5319624dac8810799
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, May 15, 4:32 AM (18 h, 22 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33072901
Default Alt Text
D54594.id.diff (4 KB)
Attached To
Mode
D54594: multimedia/navidrome: mark as only for arch amd64 and arm64
Attached
Detach File
Event Timeline
Log In to Comment