Wed Aug 16 10:41:36 2023 UTC ()
Substitute PREFIX in NetBSD wrapper

Fix my previous workaround for NetBSD GL issue to correctly
substitute PREFIX rather than hard coded /usr/pkg


(abs)
diff -r1.565 -r1.566 pkgsrc/www/firefox/Makefile
diff -r1.4 -r1.5 pkgsrc/www/firefox/files/firefox.sh

cvs diff -r1.565 -r1.566 pkgsrc/www/firefox/Makefile (expand / switch to context diff)
--- pkgsrc/www/firefox/Makefile 2023/08/14 05:25:29 1.565
+++ pkgsrc/www/firefox/Makefile 2023/08/16 10:41:35 1.566
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.565 2023/08/14 05:25:29 wiz Exp $
+# $NetBSD: Makefile,v 1.566 2023/08/16 10:41:35 abs Exp $
 
 FIREFOX_VER=		${MOZ_BRANCH}${MOZ_BRANCH_MINOR}
 MOZ_BRANCH=		116.0
@@ -88,6 +88,11 @@
 SUBST_SED.dfly_malloc_h=	-e 's,HAVE_MALLOC_H,HAVE_MALLOC_H \&\& !defined(__DragonFly__),g'
 SUBST_FILES.dfly_malloc_h+=	media/ffvpx/libavutil/mem.c
 
+SUBST_CLASSES+=			paths
+SUBST_STAGE.paths=		pre-configure
+SUBST_FILES.paths=		../firefox.sh
+SUBST_VARS.paths=		PREFIX MOZILLA
+
 .include "mozilla-common.mk"
 .include "options.mk"
 
@@ -166,9 +171,12 @@
 
 INSTALLATION_DIRS+=	share/applications
 
+post-extract:
+	${CP} ${FILESDIR}/firefox.sh ${WRKDIR}/firefox.sh
+
 post-install:
 .if ${OPSYS} == "NetBSD" && ${X11_TYPE} == "native"
-	${INSTALL_SCRIPT} ${FILESDIR}/firefox.sh ${DESTDIR}${PREFIX}/bin/${MOZILLA}
+	${INSTALL_SCRIPT} ${WRKDIR}/firefox.sh ${DESTDIR}${PREFIX}/bin/${MOZILLA}
 .else
 	${ECHO} '#! /bin/sh' > ${DESTDIR}${PREFIX}/bin/${MOZILLA}
 	${ECHO} '${PREFIX}/lib/${MOZILLA}/${MOZILLA} "$$@"' >> \

cvs diff -r1.4 -r1.5 pkgsrc/www/firefox/files/firefox.sh (expand / switch to context diff)
--- pkgsrc/www/firefox/files/firefox.sh 2023/08/07 19:37:23 1.4
+++ pkgsrc/www/firefox/files/firefox.sh 2023/08/16 10:41:35 1.5
@@ -11,4 +11,4 @@
     # by default, but it's not even worth looking at that on a system without
     # the fixed libGL
 fi
-exec /usr/pkg/lib/firefox/firefox "$@"
+exec @PREFIX@/lib/@MOZILLA@/@MOZILLA@ "$@"