Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F149439016
D29265.1790132552.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
7 KB
Referenced Files
None
Subscribers
None
D29265.1790132552.diff
View Options
Index: textproc/node-re2/Makefile
===================================================================
--- /dev/null
+++ textproc/node-re2/Makefile
@@ -0,0 +1,64 @@
+# $FreeBSD$
+
+PORTNAME= re2
+PORTVERSION= 1.15.9
+CATEGORIES= textproc
+PKGNAMEPREFIX= node-
+
+MAINTAINER= otis@FreeBSD.org
+COMMENT= Node.js bindings for devel/re2
+
+LICENSE= BSD3CLAUSE
+
+BUILD_DEPENDS= ${LOCALBASE}/bin/node-gyp:devel/node-gyp \
+ ${LOCALBASE}/bin/npm:www/npm \
+ ${LOCALBASE}/lib/node_modules/nan:devel/node-nan
+LIB_DEPENDS= libre2.so:devel/re2 \
+ libuv.so:devel/libuv
+
+USES= gmake python
+
+USE_GITHUB= yes
+GH_ACCOUNT= uhop
+GH_PROJECT= node-re2
+
+.include <bsd.port.pre.mk>
+
+_RE2DIR= ${STAGEDIR}${PREFIX}/lib/node_modules/re2
+
+# Determine node's version. Particular node version is
+# pulled in via www/npm dependency
+_NODEVER!= ${LOCALBASE}/bin/node --version
+_NODEVER:= ${_NODEVER:C/^v(.*)/\1/1:Q}
+_DEVDIR:= ${WRKDIR}/.devdir
+
+post-patch:
+ ${REINPLACE_CMD} -e "s|%%PREFIX%%|${PREFIX}|g" ${WRKSRC}/binding.gyp
+ ${RM} ${WRKSRC}/package-lock.json
+
+pre-configure:
+ ${MKDIR} ${_DEVDIR}/${_NODEVER}/include
+ ${RLN} ${LOCALBASE}/include/node ${_DEVDIR}/${_NODEVER}/include/node
+ ${ECHO} "9" > ${_DEVDIR}/${_NODEVER}/installVersion
+
+do-configure:
+ (cd ${WRKSRC} && \
+ ${SETENV} HOME=${WRKDIR} \
+ ${LOCALBASE}/bin/node-gyp configure --python=${PYTHON_CMD} \
+ --devdir=${_DEVDIR})
+
+do-build:
+ (cd ${WRKSRC} && \
+ ${SETENV} HOME=${WRKDIR} \
+ ${SETENV} ${LOCALBASE}/bin/node-gyp build \
+ --devdir=${_DEVDIR})
+
+do-install:
+ ${MKDIR} ${_RE2DIR}
+ ${RM} -r ${WRKSRC}/build/Release/obj.target
+ ${STRIP_CMD} ${WRKSRC}/build/Release/re2.node
+ cd ${WRKSRC} && ${COPYTREE_SHARE} . ${_RE2DIR} \
+ "! ( -name \.* -or -name binding\.gyp\.* \
+ -or -path */\.* -or -name vendor )"
+
+.include <bsd.port.post.mk>
Index: textproc/node-re2/distinfo
===================================================================
--- /dev/null
+++ textproc/node-re2/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1615584704
+SHA256 (uhop-node-re2-1.15.9_GH0.tar.gz) = b52f8a3ae6cd8fe0ba25a30c6a140a6ca60659d396cd3134962766c7b35b7c87
+SIZE (uhop-node-re2-1.15.9_GH0.tar.gz) = 38969
Index: textproc/node-re2/files/patch-binding.gyp
===================================================================
--- /dev/null
+++ textproc/node-re2/files/patch-binding.gyp
@@ -0,0 +1,61 @@
+--- binding.gyp.orig 2020-11-13 05:47:17 UTC
++++ binding.gyp
+@@ -14,29 +14,6 @@
+ "lib/to_string.cc",
+ "lib/accessors.cc",
+ "lib/util.cc",
+- "vendor/re2/bitstate.cc",
+- "vendor/re2/compile.cc",
+- "vendor/re2/dfa.cc",
+- "vendor/re2/filtered_re2.cc",
+- "vendor/re2/mimics_pcre.cc",
+- "vendor/re2/nfa.cc",
+- "vendor/re2/onepass.cc",
+- "vendor/re2/parse.cc",
+- "vendor/re2/perl_groups.cc",
+- "vendor/re2/prefilter.cc",
+- "vendor/re2/prefilter_tree.cc",
+- "vendor/re2/prog.cc",
+- "vendor/re2/re2.cc",
+- "vendor/re2/regexp.cc",
+- "vendor/re2/set.cc",
+- "vendor/re2/simplify.cc",
+- "vendor/re2/stringpiece.cc",
+- "vendor/re2/tostring.cc",
+- "vendor/re2/unicode_casefold.cc",
+- "vendor/re2/unicode_groups.cc",
+- "vendor/util/pcre.cc",
+- "vendor/util/rune.cc",
+- "vendor/util/strutil.cc"
+ ],
+ "cflags": [
+ "-std=c++11",
+@@ -45,8 +22,7 @@
+ "-Wno-sign-compare",
+ "-Wno-unused-parameter",
+ "-Wno-missing-field-initializers",
+- "-Wno-cast-function-type",
+- "-O3",
++ "-Wno-bad-function-cast",
+ "-g"
+ ],
+ "defines": [
+@@ -54,7 +30,8 @@
+ "NOMINMAX"
+ ],
+ "include_dirs": [
+- "<!(node -e \"require('nan')\")",
++ "%%PREFIX%%/include",
++ "%%PREFIX%%/lib/node_modules/nan",
+ "vendor"
+ ],
+ "xcode_settings": {
+@@ -73,7 +50,7 @@
+ ]
+ },
+ "conditions": [
+- ["OS==\"linux\"", {
++ ["OS==\"freebsd\"", {
+ "cflags": [
+ "-pthread"
+ ],
Index: textproc/node-re2/files/patch-package.json
===================================================================
--- /dev/null
+++ textproc/node-re2/files/patch-package.json
@@ -0,0 +1,29 @@
+--- package.json.orig 2021-03-14 17:05:17 UTC
++++ package.json
+@@ -6,23 +6,16 @@
+ "bugs": "https://github.com/uhop/node-re2/issues",
+ "main": "re2.js",
+ "types": "re2.d.ts",
++ "private": true,
+ "directories": {
+ "test": "tests"
+ },
+- "dependencies": {
+- "install-artifact-from-github": "^1.2.0",
+- "nan": "^2.14.2",
+- "node-gyp": "^7.1.2"
+- },
+- "devDependencies": {
+- "heya-unit": "^0.3.0"
+- },
+ "scripts": {
+ "test": "node tests/tests.js",
+ "save-to-github": "save-to-github-cache --artifact build/Release/re2.node",
+- "install": "install-from-cache --artifact build/Release/re2.node --host-var RE2_DOWNLOAD_MIRROR || npm run rebuild",
++ "install": "install-from-cache --artifact build/Release/re2.node --host-var RE2_DOWNLOAD_MIRROR || npm run rebuild --offline",
+ "verify-build": "node scripts/verify-build.js",
+- "rebuild": "node-gyp rebuild"
++ "rebuild": "node-gyp rebuild --offline"
+ },
+ "github": "https://github.com/uhop/node-re2",
+ "repository": {
Index: textproc/node-re2/pkg-descr
===================================================================
--- /dev/null
+++ textproc/node-re2/pkg-descr
@@ -0,0 +1,4 @@
+This project provides bindings for RE2: fast, safe alternative to
+backtracking regular expression engines.
+
+WWW: https://github.com/uhop/node-re2
Index: textproc/node-re2/pkg-plist
===================================================================
--- /dev/null
+++ textproc/node-re2/pkg-plist
@@ -0,0 +1,41 @@
+lib/node_modules/re2/LICENSE
+lib/node_modules/re2/README.md
+lib/node_modules/re2/binding.gyp
+lib/node_modules/re2/build/Makefile
+lib/node_modules/re2/build/Release/re2.node
+lib/node_modules/re2/build/binding.Makefile
+lib/node_modules/re2/build/config.gypi
+lib/node_modules/re2/build/re2.target.mk
+lib/node_modules/re2/lib/accessors.cc
+lib/node_modules/re2/lib/addon.cc
+lib/node_modules/re2/lib/exec.cc
+lib/node_modules/re2/lib/match.cc
+lib/node_modules/re2/lib/new.cc
+lib/node_modules/re2/lib/replace.cc
+lib/node_modules/re2/lib/search.cc
+lib/node_modules/re2/lib/split.cc
+lib/node_modules/re2/lib/test.cc
+lib/node_modules/re2/lib/to_string.cc
+lib/node_modules/re2/lib/util.cc
+lib/node_modules/re2/lib/util.h
+lib/node_modules/re2/lib/wrapped_re2.h
+lib/node_modules/re2/package.json
+lib/node_modules/re2/re2.d.ts
+lib/node_modules/re2/re2.js
+lib/node_modules/re2/scripts/verify-build.js
+lib/node_modules/re2/tests/test_exec.js
+lib/node_modules/re2/tests/test_general.js
+lib/node_modules/re2/tests/test_groups.js
+lib/node_modules/re2/tests/test_invalid.js
+lib/node_modules/re2/tests/test_match.js
+lib/node_modules/re2/tests/test_new.js
+lib/node_modules/re2/tests/test_prototype.js
+lib/node_modules/re2/tests/test_replace.js
+lib/node_modules/re2/tests/test_search.js
+lib/node_modules/re2/tests/test_source.js
+lib/node_modules/re2/tests/test_split.js
+lib/node_modules/re2/tests/test_symbols.js
+lib/node_modules/re2/tests/test_test.js
+lib/node_modules/re2/tests/test_toString.js
+lib/node_modules/re2/tests/tests.js
+lib/node_modules/re2/tests/worker.js
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Sep 23, 3:02 AM (6 h, 41 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29869556
Default Alt Text
D29265.1790132552.diff (7 KB)
Attached To
Mode
D29265: textproc/node-re2: Add port
Attached
Detach File
Event Timeline
Log In to Comment