From nobody Sat Dec 21 20:01:12 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 4YFwCD6Xr1z5X0xK; Sat, 21 Dec 2024 20:01:12 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YFwCD64Shz4ncx; Sat, 21 Dec 2024 20:01:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1734811272; 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=6xEifMhizYmI7oDQrk9uLV7LXdlhQ0v8Ee6+Qr3a6aY=; b=MKyDNOMAbIYYkcNGLlQ3cSYZGnp3404AqI+9r83haN4KaABNtBUZHqnywDH/PARiriIqNW o/abtMP9Sr6jdCzb9uS8PDDmKI7BqVXG71ObrG1/B4i96wk8NWasF4GQs92GBMk8FlfDxr hiRqS/peYJ1AufwxfSDiSFqAqHdD6i1aPXuk/376I6V56uRjc808M8gFiKKU7q/JEc08HO 9MbWEU9U+e1LXoNZUM3yYBQZ/l45ioGaYFCiLUreKHj9c+OBic6BOg58VKE7NiqXG9YMTc d/DJsTi3UU74Fu+0LGXYU01hQPLOdK2/nLhoINIqOGoMfaGxsYvSxV/eo8NKCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1734811272; 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=6xEifMhizYmI7oDQrk9uLV7LXdlhQ0v8Ee6+Qr3a6aY=; b=b0nf6jl5Kfh/tmGi5aDHSQNnA9oj+k7JrSTBj4GmMwzOeARy29BajcyK9VUjmoM256foAO QAvdr6btF4/CpT7q+yot+WDZJkP2+QROBELvmV5wGjcdEF1juaRtrKh2QX69BMYmW7edDJ k6oI0Lfe2LLsHOnjMfe49C0XwmNNTNAwkTUMdJdUmtXqayMsvAOMwwB49VEZIYDrEw1cjO 6tLFSkAhmmUcDdMD3XkHWhSH8MpLkDdvPilwD0NOHSOkf2yD59vO9L3qs9GXivfr6poUXo OfB2nL5FB3DTx6g5d2f/RGOYUNE1uE/tL08IaZTPF3pNMvDOYJth9kRS5RfDPg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1734811272; a=rsa-sha256; cv=none; b=aL/G+/H9vOxdijLvYtC2QdRCf/bA6Uw0drVfz60QVFDmEo37iAQV+vvi2cZjA7oFgrxqAS ZBXMoYnflcbUcxGBLrZx5UXvvZOKpnsdcKWkpEMG8ngnZJ7C604eViXtBk/4y5EmKvR6ni Jwdaja0MGzKW+yRxCY1l7vMPdxcUMBJ5/x4j2NHzAs7HCL8k88YSog1Sg1YdWr7pZHCfQo Rnp3vLxX4ymXPnqstzrrqMGeHFrH8DdMOEZ5yeh4RYu8aNvfG7+lGZUusG/XhdXqiBgOZZ ocaXNs9dLVQ5DJq+n6JcxFsyLmmKRne56702rgyC4WBOvTM6adeRCAgcR9BrOw== 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 4YFwCD5gqCzdRV; Sat, 21 Dec 2024 20:01:12 +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 4BLK1CwW002312; Sat, 21 Dec 2024 20:01:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4BLK1Cn9002309; Sat, 21 Dec 2024 20:01:12 GMT (envelope-from git) Date: Sat, 21 Dec 2024 20:01:12 GMT Message-Id: <202412212001.4BLK1Cn9002309@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: "Sergey A. Osokin" Subject: git: e038a67fc3ca - main - */*njs: fix build on FreeBSD 15 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: osa X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e038a67fc3ca1630ff947d6e61d487f3fd7e8810 Auto-Submitted: auto-generated The branch main has been updated by osa: URL: https://cgit.FreeBSD.org/ports/commit/?id=e038a67fc3ca1630ff947d6e61d487f3fd7e8810 commit e038a67fc3ca1630ff947d6e61d487f3fd7e8810 Author: Sergey A. Osokin AuthorDate: 2024-12-21 20:00:20 +0000 Commit: Sergey A. Osokin CommitDate: 2024-12-21 20:00:20 +0000 */*njs: fix build on FreeBSD 15 /usr/local/include/quickjs/quickjs.h:996:34: error: cast from 'JSCFunctionMagic *' (aka 'struct JSValue (*)(struct JSContext *, struct JSValue, int, struct JSValue *, int)') to 'JSCFunction *' (aka 'struct JSValue (*)(struct JSContext *, struct JSValue, int, struct JSValue *)') converts to incompatible function type [-Werror,-Wcast-function-type-mismatch] 996 | return JS_NewCFunction2(ctx, (JSCFunction *)func, name, length, cproto, magic); | ^~~~~~~~~~~~~~~~~~~ 1 error generated. --- devel/libnjs/Makefile | 11 +++++++++-- lang/njs/Makefile | 11 +++++++++-- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/devel/libnjs/Makefile b/devel/libnjs/Makefile index dddb6970ddaf..998e19ad9381 100644 --- a/devel/libnjs/Makefile +++ b/devel/libnjs/Makefile @@ -13,7 +13,7 @@ LICENSE_FILE= ${WRKSRC}/LICENSE LIB_DEPENDS= libpcre2-8.so:devel/pcre2 \ libquickjs.so:lang/quickjs -USES= cpe ssl +USES= compiler:c11 cpe ssl CPE_VENDOR= f5 @@ -24,6 +24,13 @@ CONFIGURE_ARGS= --cc-opt="-I${LOCALBASE}/include/quickjs" \ --ld-opt="-L${LOCALBASE}/lib" \ --with-quickjs +.include + +# Fixes build failed for Clang 19.1.3+ +.if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1500026 && ${CHOSEN_COMPILER_TYPE} == clang +CFLAGS+= -Wno-error=cast-function-type-mismatch +.endif + post-patch: ${REINPLACE_CMD} 's|%%LOCALBASE%%|${LOCALBASE}|g' \ ${WRKSRC}/src/njs.pc.in @@ -37,4 +44,4 @@ do-install: ${INSTALL_DATA} ${WRKSRC}/build/libnjs.a ${STAGEDIR}${PREFIX}/lib ${INSTALL_DATA} ${WRKSRC}/build/njs.pc ${STAGEDIR}${PREFIX}/libdata/pkgconfig -.include +.include diff --git a/lang/njs/Makefile b/lang/njs/Makefile index 36a0d40d1da8..55586e2d65b5 100644 --- a/lang/njs/Makefile +++ b/lang/njs/Makefile @@ -13,7 +13,7 @@ LICENSE_FILE= ${WRKSRC}/LICENSE LIB_DEPENDS= libpcre2-8.so:devel/pcre2 \ libquickjs.so:lang/quickjs -USES= cpe ssl +USES= compiler:c11 cpe ssl CPE_VENDOR= f5 @@ -27,10 +27,17 @@ CONFIGURE_ARGS= --cc-opt="-I${LOCALBASE}/include/quickjs" \ PLIST_FILES= bin/njs +.include + +# Fixes build failed for Clang 19.1.3+ +.if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1500026 && ${CHOSEN_COMPILER_TYPE} == clang +CFLAGS+= -Wno-error=cast-function-type-mismatch +.endif + do-build: @cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} njs do-install: ${INSTALL_PROGRAM} ${WRKSRC}/build/njs ${STAGEDIR}${PREFIX}/bin -.include +.include