From nobody Sun Sep 08 18:43:20 2024 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4X1zPP35vCz5VTJQ; Sun, 08 Sep 2024 18:43:21 +0000 (UTC) (envelope-from git@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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4X1zPP0Dnwz4rWm; Sun, 8 Sep 2024 18:43:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725821001; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JsvEjr1r+m5kVuQN0Aw0tsfC4/WGexOaOwg4YlcQtv8=; b=Mdw2gMywzqihzOw7JWG/qRC6elt7sxKrSCYIP7XCyyrCjks9865lqB3OUi0S6F+Meuobp7 uuTySYdhNAtnQPsQGgSf3Mqn8QQmyqMFuq5FYGGG9wj/Sb+J1Wf3Mnr1B/XiIh5Q9ASkGk Oeh7VNeu6O4bONBWnNf61WkFtPvrXtxugsYqkaqmkCl8SxCdOiLSINrL/x1tWgmFhGhx56 AMsVYbslWZZ2FwT0onl9yQy4+mOq8plt6DufL2m5qosrYqRsGMOgaB3bWj1GVyLXzlOuPR IQHkyC6rLbpei8Uxpb0+mvqeqN0t+E6+XSg9BPRaIz4emrXhgYRLv46+6ZB/Xw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1725821001; a=rsa-sha256; cv=none; b=D/NAXGnuqIG07N8Xe1QW7QlVqyHOC7JUkwEb43IKDYGtMijopTrjwFf1yVJxdDs5Rhq9nr 6x9fSoPBuPrOs/HIDuG6Jp8nE/wnHby7AU/fFVknfcwP9r2CfU1b/UGhaoGrGm5o5Rm/NU gWHcj8Im+KAR035jRoM0bvy+cOB/HPvMgqTL/ZrsZ6+eGNG4Lb9ld9hU2MIEoxBCqNygGb Iuwpy1X8b/Z3PHzfsBRdaZEm4Yf+sdkHSO9gys71EkG/5ExfuAnAt7g3Q4iLeOpLEYRhCh qUzpZESsS/4B06rxEr5FTRITX7xSfCJx+ZR/Y8AQBvwxkpbJBI9NVrJXBvSEZg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725821001; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JsvEjr1r+m5kVuQN0Aw0tsfC4/WGexOaOwg4YlcQtv8=; b=JQ82fAZuPNx6qpXrxotKClQARkhKJqs62FSm/QNtVNay8Q/6QAnW+WGEMs/zI5g+13d5Mn btJcUPjEarJAY7AlLTN4mAsBQdsYceYAmTDirlx1w8XMPadr0VKMvx+k23hM0O5IqTk08F knqo87yPu0CIsYZJ4vWLvIqtf/nwqPXwjU0dgcil/WNvwjHfNtyHii4DjIKKuioR7ivK7E 2gvknPqZ/PgOyWBGgg0GR4aUFU/5z6H15gkDFNx8yMRcZFcchdRZhcPm8x3wBPj+GGAeVM IhgUg9b5zlzAaDHk5oZFoHnCWbQR1fu6DzCVgTivfSffPzVwKISeolVnG0ecuQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4X1zPN6jQPzVrH; Sun, 8 Sep 2024 18:43:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 488IhKWO036235; Sun, 8 Sep 2024 18:43:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 488IhK4r036232; Sun, 8 Sep 2024 18:43:20 GMT (envelope-from git) Date: Sun, 8 Sep 2024 18:43:20 GMT Message-Id: <202409081843.488IhK4r036232@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Po-Chuan Hsieh Subject: git: 107c6a92bfe9 - main - lang/p5-JavaScript-QuickJS: Use lang/quickjs List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-main@freebsd.org Sender: owner-dev-commits-ports-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sunpoet X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 107c6a92bfe92bb68c55e95c32643db6f510dd2c Auto-Submitted: auto-generated The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=107c6a92bfe92bb68c55e95c32643db6f510dd2c commit 107c6a92bfe92bb68c55e95c32643db6f510dd2c Author: Po-Chuan Hsieh AuthorDate: 2024-09-08 18:17:58 +0000 Commit: Po-Chuan Hsieh CommitDate: 2024-09-08 18:37:12 +0000 lang/p5-JavaScript-QuickJS: Use lang/quickjs - Bump PORTREVISION for dependency and package change --- lang/p5-JavaScript-QuickJS/Makefile | 8 +- lang/p5-JavaScript-QuickJS/files/patch-Makefile.PL | 88 ++++++++++++++++++++++ 2 files changed, 95 insertions(+), 1 deletion(-) diff --git a/lang/p5-JavaScript-QuickJS/Makefile b/lang/p5-JavaScript-QuickJS/Makefile index 6e7bb99a21f3..5cc4c39203e9 100644 --- a/lang/p5-JavaScript-QuickJS/Makefile +++ b/lang/p5-JavaScript-QuickJS/Makefile @@ -14,14 +14,20 @@ LICENSE_COMB= dual BUILD_DEPENDS= p5-ExtUtils-MakeMaker-CPANfile>=0:devel/p5-ExtUtils-MakeMaker-CPANfile \ p5-File-Slurper>=0:devel/p5-File-Slurper \ p5-File-Which>=0:sysutils/p5-File-Which +LIB_DEPENDS= libquickjs.so:lang/quickjs TEST_DEPENDS= p5-Test-Deep>=0:devel/p5-Test-Deep \ p5-Test-FailWarnings>=0:devel/p5-Test-FailWarnings \ p5-Test-Fatal>=0:devel/p5-Test-Fatal \ p5-Types-Serialiser>=0:devel/p5-Types-Serialiser -USES= gmake perl5 +USES= perl5 USE_PERL5= configure +post-patch: + @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|' ${WRKSRC}/Makefile.PL +# Clean up bundled libraries + @${RM} -r ${WRKSRC}/quickjs/ + post-install: ${STRIP_CMD} ${STAGEDIR}${PREFIX}/${SITE_ARCH_REL}/auto/JavaScript/QuickJS/QuickJS.so diff --git a/lang/p5-JavaScript-QuickJS/files/patch-Makefile.PL b/lang/p5-JavaScript-QuickJS/files/patch-Makefile.PL new file mode 100644 index 000000000000..99174c1a1b57 --- /dev/null +++ b/lang/p5-JavaScript-QuickJS/files/patch-Makefile.PL @@ -0,0 +1,88 @@ +--- Makefile.PL.orig 2024-02-12 06:16:14 UTC ++++ Makefile.PL +@@ -13,24 +13,11 @@ use Cwd; + use File::Which; + use Cwd; + +-my $GMAKE_PATH = _find_gmake(); +- +-if (!$GMAKE_PATH) { +- die "GNU Make ($Config{'gmake'}) is required.\n"; +-} +-elsif (!-x $GMAKE_PATH) { +- if ($!) { +- die "Failed to detect if GNU Make ($GMAKE_PATH) is executable: $!\n"; +- } +- +- die "GNU Make ($GMAKE_PATH) is not executable.\n"; +-} +- + my $ATOMIC_ENV_KEY = 'JS_QUICKJS_LINK_LIBATOMIC'; + + my $PERL_QJS_MAKEFILE_PATH = File::Spec->catfile( Cwd::getcwd(), 'Makefile.quickjs'); + +-my $libpath = File::Spec->catfile('quickjs', 'libquickjs.a'); ++my $libpath = File::Spec->catfile('%%LOCALBASE%%/lib', 'libquickjs.so'); + + # quickjs needs these; pre-5.20 perls didn’t include libpthread. + # Note that MSWin32, if given these, will try to compile them statically +@@ -42,8 +29,6 @@ if (_need_librt()) { + push @libs, '-lrt'; + } + +-_tweak_for_os(); +- + if (!_stdatomic_h_exists()) { + _avoid_stdatomic_h(); + } +@@ -54,13 +39,6 @@ mkdir( File::Spec->catdir( qw(quickjs .obj) ) ); + # + mkdir( File::Spec->catdir( qw(quickjs .obj) ) ); + +-make_libquickjs_makefile(); +- +-# RaspiOS needs this; others may, too: +-if (_should_link_libatomic()) { +- push @libs, '-latomic'; +-} +- + WriteMakefile( + NAME => 'JavaScript::QuickJS', + VERSION_FROM => 'lib/JavaScript/QuickJS.pm', # finds $VERSION +@@ -71,7 +49,7 @@ WriteMakefile( + ], + ) : () + ), +- INC => '-Wall --std=c99 -I.', ++ INC => '-Wall --std=c99 -I. -I%%LOCALBASE%%/include', + LICENSE => "perl_5", + + PMLIBDIRS => ['lib'], +@@ -224,8 +202,6 @@ sub _should_link_libatomic { + my $needs_libatomic; + + eval { +- system $GMAKE_PATH, '-C', 'quickjs', '-f', $PERL_QJS_MAKEFILE_PATH, $rel_objpath; +- die if $?; + my $objbin = File::Slurper::read_binary($objpath); + + $needs_libatomic = -1 != index($objbin, '__atomic_fetch_sub_'); +@@ -315,18 +291,5 @@ use Config; + package MY; + + use Config; +- +-sub postamble { +- +- # QuickJS requires GNU make. +- my $make = ($^O =~ mi) ? $GMAKE_PATH : '$(MAKE)'; +- +- # The leading “+” is to ensure that parallel builds work properly. +- return <<"MAKE_FRAG" +- +-$libpath: +-\t+$make -C quickjs -f '$PERL_QJS_MAKEFILE_PATH' libquickjs.a +-MAKE_FRAG +-} + + 1;