pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/www/firefox
Module Name: pkgsrc
Committed By: ryoon
Date: Mon May 3 16:31:37 UTC 2021
Modified Files:
pkgsrc/www/firefox: Makefile distinfo mozilla-common.mk
Added Files:
pkgsrc/www/firefox/files: node-wrapper.sh
Log Message:
firefox: Enable build without nodejs dependency
Patch is from martin@.
For the architecture that is not supported by nodejs, for example sparc64,
lang/nodejs should not be in www/firefox dependency.
To generate a diff of this commit:
cvs rdiff -u -r1.476 -r1.477 pkgsrc/www/firefox/Makefile
cvs rdiff -u -r1.433 -r1.434 pkgsrc/www/firefox/distinfo
cvs rdiff -u -r1.201 -r1.202 pkgsrc/www/firefox/mozilla-common.mk
cvs rdiff -u -r0 -r1.1 pkgsrc/www/firefox/files/node-wrapper.sh
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/www/firefox/Makefile
diff -u pkgsrc/www/firefox/Makefile:1.476 pkgsrc/www/firefox/Makefile:1.477
--- pkgsrc/www/firefox/Makefile:1.476 Wed Apr 21 11:42:53 2021
+++ pkgsrc/www/firefox/Makefile Mon May 3 16:31:37 2021
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.476 2021/04/21 11:42:53 adam Exp $
+# $NetBSD: Makefile,v 1.477 2021/05/03 16:31:37 ryoon Exp $
FIREFOX_VER= ${MOZ_BRANCH}${MOZ_BRANCH_MINOR}
MOZ_BRANCH= 88.0
@@ -11,11 +11,39 @@ CATEGORIES= www
MASTER_SITES+= ${MASTER_SITE_MOZILLA:=firefox/releases/${FIREFOX_VER}/source/}
EXTRACT_SUFX= .tar.xz
+DISTFILES= ${DEFAULT_DISTFILES} nodejs-output-88.0.tgz
+SITES.nodejs-output-88.0.tgz= ${MASTER_SITE_LOCAL}
+
MAINTAINER= ryoon%NetBSD.org@localhost
HOMEPAGE= https://www.mozilla.org/en-US/firefox/
COMMENT= Web browser with support for extensions (version ${FIREFOX_VER:tu:C/\\.[[:digit:]\.]*//})
LICENSE= mpl-1.1
+# -------- BEFORE UPDATING THIS PACKAGE PLEASE READ & UNDERSTAND: -------
+#
+# This package works around a (stupid) build time dependency on nodejs
+# (which is not available for all architectures and unnecessary for the
+# real build). To do this, it places some additional burden on the
+# maintainer.
+#
+# While working on the package, please make sure you have
+#
+# FIREFOX_MAINTAINER=yes
+#
+# set in your build environment.
+# When the package is ready for commit (but before commit), do:
+#
+# make maintainer-files
+#
+# This will do another round (depending on state of your work dir at this
+# moment) of one or two builds and generate a cache of all output that
+# nodejs generates during a build.
+#
+# When this is done, just commit the results (they will be in the files/
+# directory).
+#
+# -----------------------------------------------------------------------
+
UNLIMIT_RESOURCES+= datasize virtualsize
WRKSRC= ${WRKDIR}/firefox-${FIREFOX_VER:C/b.*//}
@@ -106,6 +134,41 @@ pre-configure:
cd ${WRKSRC} && mkdir ${OBJDIR}
cd ${WRKSRC}/${OBJDIR} && touch old-configure.vars
# Do not fetch Rust Cargo file via network during build
+.if !defined(FIREFOX_MAINTAINER)
+ mv ${WRKDIR}/dist ${WRKSRC}/${OBJDIR}
+.endif
+
+.if defined(FIREFOX_MAINTAINER)
+# Create files needed only by the firefox maintainer when updating
+# the package
+# XXX - manually removing the .*_done files is wrong!
+.PHONY: build-list
+build-list:
+ cd ${WRKSRC}/${OBJDIR}/dist/bin/browser/chrome && \
+ find . -type f | sort > ${OUT:Q}
+
+NODE_LIST="${WRKDIR}/node.list"
+NO_NODE_LIST="${WRKDIR}/no-node.list"
+NODE_FILES="${WRKDIR}/node.flist"
+
+.PHONY: maintainer-files
+maintainer-files:
+ rm -f ${FILESDIR}/node-wrapper.sh
+ V=$$( node -v ) && \
+ printf '#! /bin/sh\n\nVERS=%s\n\nif [ "$$1" = "-v" ] || [ "$$1" = "--version" ]; then\n\tprintf "$${VERS}\\n"\nfi\n\nexit 0\n' $$V \
+ > ${FILESDIR}/node-wrapper.sh && \
+ chmod 0755 ${FILESDIR}/node-wrapper.sh
+ rm -f ${WRKDIR}/.build_done ${WRKDIR}/.configure_done
+ $(MAKE) MAINTAINER_INTERNAL=yes build
+ $(MAKE) MAINTAINER_INTERNAL=yes OUT="${NO_NODE_LIST}" build-list
+ $(MAKE) OUT="${NODE_LIST}" build-list
+ ${DIFF} -u "${NO_NODE_LIST}" "${NODE_LIST}" | \
+ ${AWK} \
+ '/^\+\.\//{ printf("dist/bin/browser/chrome/%s\n", gensub(/^\+\.\//, "", "")) }' \
+ > "${NODE_FILES}"
+ cd ${WRKSRC}/${OBJDIR} && tar -c -T "${NODE_FILES}" -z \
+ -f ${FILESDIR}/nodejs-output-${PKGVERSION_NOREV}.tgz
+.endif
post-build:
${SED} -e 's|@MOZILLA@|${MOZILLA}|g' \
Index: pkgsrc/www/firefox/distinfo
diff -u pkgsrc/www/firefox/distinfo:1.433 pkgsrc/www/firefox/distinfo:1.434
--- pkgsrc/www/firefox/distinfo:1.433 Mon Apr 19 13:50:07 2021
+++ pkgsrc/www/firefox/distinfo Mon May 3 16:31:37 2021
@@ -1,9 +1,13 @@
-$NetBSD: distinfo,v 1.433 2021/04/19 13:50:07 ryoon Exp $
+$NetBSD: distinfo,v 1.434 2021/05/03 16:31:37 ryoon Exp $
SHA1 (firefox-88.0.source.tar.xz) = 7a40f520b5a91b9214debf4674acf553a852bd29
RMD160 (firefox-88.0.source.tar.xz) = 2e272a4497231a65c6a0fe9ee3550771d05d55fe
SHA512 (firefox-88.0.source.tar.xz) = f58f44f2f0d0f54eae5ab4fa439205feb8b9209b1bf2ea2ae0c9691e9e583bae2cbd4033edb5bdf4e37eda5b95fca688499bed000fe26ced8ff4bbc49347ce31
Size (firefox-88.0.source.tar.xz) = 373744508 bytes
+SHA1 (nodejs-output-88.0.tgz) = e36945e45df7311113f4cd4c44dc76218444f7f8
+RMD160 (nodejs-output-88.0.tgz) = ebde4f6b207b42d997d6791eaf17ab8f8d9310af
+SHA512 (nodejs-output-88.0.tgz) = bdaad8a9ba4c3ad501018a4da0889194d47c0b9321fb265d4f14cee0588672e4ea113b3b3314b40ba0f54e09d8961e0d0732aede511830073180834ede82a1cf
+Size (nodejs-output-88.0.tgz) = 200656 bytes
SHA1 (patch-aa) = 15b8567cee2af9853f6949c80345ffcb1fd3852a
SHA1 (patch-browser_app_profile_firefox.js) = 89cea0a66457c96ad0b94aaa524aa5942ad781d0
SHA1 (patch-build_moz.configure_rust.configure) = 25ddfacd29cebbc6db005dbe61a2a7446d480678
Index: pkgsrc/www/firefox/mozilla-common.mk
diff -u pkgsrc/www/firefox/mozilla-common.mk:1.201 pkgsrc/www/firefox/mozilla-common.mk:1.202
--- pkgsrc/www/firefox/mozilla-common.mk:1.201 Wed Apr 21 22:21:08 2021
+++ pkgsrc/www/firefox/mozilla-common.mk Mon May 3 16:31:37 2021
@@ -1,4 +1,4 @@
-# $NetBSD: mozilla-common.mk,v 1.201 2021/04/21 22:21:08 gutteridge Exp $
+# $NetBSD: mozilla-common.mk,v 1.202 2021/05/03 16:31:37 ryoon Exp $
#
# common Makefile fragment for mozilla packages based on gecko 2.0.
#
@@ -21,10 +21,11 @@ USE_LANGUAGES+= c c++
GCC_REQD+= 7
TOOL_DEPENDS+= cbindgen>=0.16.0:../../devel/cbindgen
-.if ${MACHINE_ARCH} == "sparc64"
-CONFIGURE_ARGS+= --disable-nodejs
-.else
+
+.if defined(FIREFOX_MAINTAINER) && !defined(MAINTAINER_INTERNAL)
TOOL_DEPENDS+= nodejs-[0-9]*:../../lang/nodejs
+.else
+CONFIGURE_ENV+= NODEJS="${FILESDIR}/node-wrapper.sh"
.endif
TOOL_DEPENDS+= ${PYPKGPREFIX}-sqlite3-[0-9]*:../../databases/py-sqlite3
@@ -114,7 +115,11 @@ ALL_ENV+= SHELL=${CONFIG_SHELL:Q}
# Build outside ${WRKSRC}
# Try to avoid conflict with config/makefiles/xpidl/Makefile.in
+.if ${MAINTAINER_INTERNAL:Uno} == "yes
+OBJDIR= ../no-node-build
+.else
OBJDIR= ../build
+.endif
CONFIGURE_DIRS= ${OBJDIR}
CONFIGURE_SCRIPT= ${WRKSRC}/configure
Added files:
Index: pkgsrc/www/firefox/files/node-wrapper.sh
diff -u /dev/null pkgsrc/www/firefox/files/node-wrapper.sh:1.1
--- /dev/null Mon May 3 16:31:37 2021
+++ pkgsrc/www/firefox/files/node-wrapper.sh Mon May 3 16:31:37 2021
@@ -0,0 +1,9 @@
+#! /bin/sh
+
+VERS=v14.16.1
+
+if [ "$1" = "-v" ] || [ "$1" = "--version" ]; then
+ printf "${VERS}\n"
+fi
+
+exit 0
Home |
Main Index |
Thread Index |
Old Index