From owner-svn-ports-head@freebsd.org Mon Mar 15 21:14:44 2021 Return-Path: Delivered-To: svn-ports-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CDBF25AFF2C; Mon, 15 Mar 2021 21:14:44 +0000 (UTC) (envelope-from otis@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dzq1c4n7lz4SYZ; Mon, 15 Mar 2021 21:14:44 +0000 (UTC) (envelope-from otis@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 92CE11792B; Mon, 15 Mar 2021 21:14:44 +0000 (UTC) (envelope-from otis@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 12FLEiTI075217; Mon, 15 Mar 2021 21:14:44 GMT (envelope-from otis@FreeBSD.org) Received: (from otis@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 12FLEhFE075209; Mon, 15 Mar 2021 21:14:43 GMT (envelope-from otis@FreeBSD.org) Message-Id: <202103152114.12FLEhFE075209@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: otis set sender to otis@FreeBSD.org using -f From: Juraj Lutter Date: Mon, 15 Mar 2021 21:14:43 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r568511 - in head/textproc: . node-re2 node-re2/files X-SVN-Group: ports-head X-SVN-Commit-Author: otis X-SVN-Commit-Paths: in head/textproc: . node-re2 node-re2/files X-SVN-Commit-Revision: 568511 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Mar 2021 21:14:44 -0000 Author: otis Date: Mon Mar 15 21:14:43 2021 New Revision: 568511 URL: https://svnweb.freebsd.org/changeset/ports/568511 Log: Add port: textproc/node-re2: A Node.js bindings to re2 - Add port - Connect to the category Reviewed by: osa (mentor) Approved by: osa (mentor) Differential Revision: https://reviews.freebsd.org/D29265 Added: head/textproc/node-re2/ head/textproc/node-re2/Makefile (contents, props changed) head/textproc/node-re2/distinfo (contents, props changed) head/textproc/node-re2/files/ head/textproc/node-re2/files/patch-binding.gyp (contents, props changed) head/textproc/node-re2/pkg-descr (contents, props changed) head/textproc/node-re2/pkg-plist (contents, props changed) Modified: head/textproc/Makefile Modified: head/textproc/Makefile ============================================================================== --- head/textproc/Makefile Mon Mar 15 21:06:04 2021 (r568510) +++ head/textproc/Makefile Mon Mar 15 21:14:43 2021 (r568511) @@ -472,6 +472,7 @@ SUBDIR += nl-hyphen SUBDIR += nl-mythes SUBDIR += nn-aspell + SUBDIR += node-re2 SUBDIR += nunnimcax SUBDIR += nuspell SUBDIR += nux Added: head/textproc/node-re2/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/textproc/node-re2/Makefile Mon Mar 15 21:14:43 2021 (r568511) @@ -0,0 +1,66 @@ +# $FreeBSD$ + +PORTNAME= re2 +DISTVERSION= 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 +RUN_DEPENDS= ${LOCALBASE}/bin/npm:www/npm + +USES= gmake python + +USE_GITHUB= yes +GH_ACCOUNT= uhop +GH_PROJECT= node-re2 + +.include + +_NODECMD= ${LOCALBASE}/bin/node --version +_NPMCMD= ${LOCALBASE}/bin/npm +_RE2DIR= ${STAGEDIR}${PREFIX}/lib/node_modules/re2 +_DEVDIR:= ${WRKDIR}/.devdir + +pre-configure: + ${RM} ${WRKSRC}/package-lock.json + (_NPMGROOT=$$(${_NPMCMD} root -g) && \ + ${REINPLACE_CMD} -e "s|%%PREFIX%%|${PREFIX}|g" \ + -e "s|%%NODEPATH%%|$${_NPMGROOT}|g" ${WRKSRC}/binding.gyp) +# Determine node's version. Particular node version is +# pulled in via www/npm dependency + (_NODEVER=$$(${_NODECMD} | ${SED} -n 's|^v\(.*\)|\1|p') && \ + ${MKDIR} ${_DEVDIR}/$${_NODEVER}/include && \ + ${RLN} ${LOCALBASE}/include/node ${_DEVDIR}/$${_NODEVER}/include/node && \ + ${ECHO} "9" > ${_DEVDIR}/$${_NODEVER}/installVersion \ + ) + +do-configure: + (cd ${WRKSRC} && \ + ${SETENV} HOME=${WRKDIR} NODE_PATH=${LOCALBASE}/lib/node_modules/npm/node_modules \ + ${LOCALBASE}/bin/node-gyp configure --python=${PYTHON_CMD} \ + --devdir=${_DEVDIR}) + +do-build: + (cd ${WRKSRC} && \ + ${SETENV} HOME=${WRKDIR} NODE_PATH=${LOCALBASE}/lib/node_modules/npm/node_modules \ + ${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 Added: head/textproc/node-re2/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/textproc/node-re2/distinfo Mon Mar 15 21:14:43 2021 (r568511) @@ -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 Added: head/textproc/node-re2/files/patch-binding.gyp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/textproc/node-re2/files/patch-binding.gyp Mon Mar 15 21:14:43 2021 (r568511) @@ -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": [ +- "