From nobody Sun May 07 21:37:28 2023 X-Original-To: dev-commits-ports-all@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 4QDySS71TGz49YYN; Sun, 7 May 2023 21:37:28 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QDySS6Wpnz3Q5S; Sun, 7 May 2023 21:37:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683495448; 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=mOeSifghDAJ/p0Ahdu+v/rDQxemrF3VNDM+f+UnWscE=; b=IFl8aI8ppcfpZYQLCFm3G13TYJ+tezOq30NcSuxd9n4HBsYIo4mx9nARpKUXo4txH9NB+f oNWpKgEruCgXrp5R/1700I3O3t8gbmRkGPmQeI38CI5vIupYjQkecoxQoxCvZ9BKcKsg3v lu1RzDxeUbdiXeVVbe6Umvq0/190pjEfjggh6qwRWfEUUaDLgKkkQSaE1dQeZGXN+0e9sm X8jwNDhMPNpGvTeoEleiJvGRd4krmSOzNbzRhH6KtAF5T3x5WYielpcPqsF13Xx0plWH+S kbg1A1Y7CECAbV2ubvIFh/LdJb2z0RxTZ0k3u34A+tAxUE+tqra4AYS84a9RPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683495448; 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=mOeSifghDAJ/p0Ahdu+v/rDQxemrF3VNDM+f+UnWscE=; b=wvuvehRK3MA6eIa/R53Ik9D0ZDraxOwH/xGApq+1ZMqYvt4amjdBzbAkenb0tmnDUN3ECq CockTZXfdyPIdvZDRq3bsw5Gq2Jth56wTZgebcm2e5ojh3dqgnMedj4oHSEsTQIJbQdDAn NCWMiLDvcpfT9IuCn0V7LPUw2ubmD8oG0efGvU0f4idzTT5PsI25affhaiex27tZuyBYoR sZeKb/oMnku420APkmyUjncZI+xygK/N/4Yz9rbhD7n1h5fXp8ICjqHtUCTA2Gt/L57elE AAPLrWIEsjDYddVDZLIRCpP9M8lkavKnNRsWwCkhpDpdW+vp9AXwErI7HvIlew== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683495448; a=rsa-sha256; cv=none; b=g7Y00vVnyPBBJ+lOJDdcKEBwbJw9PvR11kVEpDrBopks6TMyEeKG04v8JHWLshGhQFDK+s 1BlzfUXEa+Q5jRGRbNbTn+Y49V4eGZWsprblKhUd9e/627bPKVrq63SllnkKDYZsvSqciX sndYKbUaAAGPrzdYXrt9OWXTwG2P75pGz3MZuwXXbmGPZRAfyplaMai/xW7frdFHR48uKs +Q6U67nTtAv3kY48DRabQoAv/FkmFkWAoSHhaZFI09ZkEcc6zgHHHz/7BqPxW8CDaBi5I5 sguvH4iNjJ1+vIAMe5SDYuthfpbCxi63MawlERDT8VjQzh9iggw8or7iUR98xQ== 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 4QDySS5bZZzZdm; Sun, 7 May 2023 21:37:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 347LbS4Q074658; Sun, 7 May 2023 21:37:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 347LbSNI074657; Sun, 7 May 2023 21:37:28 GMT (envelope-from git) Date: Sun, 7 May 2023 21:37:28 GMT Message-Id: <202305072137.347LbSNI074657@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Dimitry Andric Subject: git: 5a61c2c8ba85 - main - www/rubygem-hpricot: fix build with clang 16 List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5a61c2c8ba854fc5131d45f84e9d84f484631989 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/ports/commit/?id=5a61c2c8ba854fc5131d45f84e9d84f484631989 commit 5a61c2c8ba854fc5131d45f84e9d84f484631989 Author: Dimitry Andric AuthorDate: 2023-05-04 18:17:18 +0000 Commit: Dimitry Andric CommitDate: 2023-05-07 21:35:52 +0000 www/rubygem-hpricot: fix build with clang 16 Clang 16 has a new error about incompatible function types, which shows up when building www/rubygem-hpricot: fast_xs.c:165:39: error: incompatible function pointer types passing 'VALUE (VALUE)' (aka 'unsigned long (unsigned long)') to parameter of type 'VALUE (*)(VALUE, VALUE)' (aka 'unsigned long (*)(unsigned long, unsigned long)') [-Wincompatible-function-pointer-types] array = rb_rescue(unpack_utf8, self, unpack_uchar, self); ^~~~~~~~~~~~ /usr/local/include/ruby-3.1/ruby/internal/iterator.h:364:62: note: passing argument to parameter 'r_proc' here VALUE rb_rescue(VALUE (*b_proc)(VALUE), VALUE data1, VALUE (*r_proc)(VALUE, VALUE), VALUE data2); ^ This is because the r_proc parameter of rb_rescue() should be a pointer to a function taking two VALUE parameters, not one (the second parameter can contain an exception to be handled). Another similar error occurs later in hpricot_scan.c, which was generated from hpricot_scan.rl: hpricot_scan.rl:855:3: error: incompatible function pointer types passing 'VALUE (VALUE, VALUE, VALUE, VALUE, VALUE)' (aka 'unsigned long (unsigned long, unsigned long, unsigned long, unsigned long, unsigned long)') to parameter of type 'VALUE (*)(VALUE, VALUE, VALUE, VALUE)' (aka 'unsigned long (*)(unsigned long, unsigned long, unsigned long, unsigned long)') [-Wincompatible-function-pointer-types] rb_define_singleton_method(mHpricot, "css", hpricot_css, 3); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/local/include/ruby-3.1/ruby/internal/anyargs.h:307:143: note: expanded from macro 'rb_define_singleton_method' #define rb_define_singleton_method(obj, mid, func, arity) RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method((arity), (func))((obj), (mid), (func), (arity)) ^~~~~~ /usr/local/include/ruby-3.1/ruby/internal/anyargs.h:270:1: note: passing argument to parameter here RBIMPL_ANYARGS_DECL(rb_define_singleton_method, VALUE, const char *) ^ This is because the func parameter of rb_define_singleton_method() should be a pointer to a function taking four VALUE parameters, not five. PR: 271245 Approved by: sunpoet (maintainer) MFH: 2023Q2 --- www/rubygem-hpricot/Makefile | 1 + www/rubygem-hpricot/files/patch-clang16 | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/www/rubygem-hpricot/Makefile b/www/rubygem-hpricot/Makefile index a917ae964846..9745604fb483 100644 --- a/www/rubygem-hpricot/Makefile +++ b/www/rubygem-hpricot/Makefile @@ -1,5 +1,6 @@ PORTNAME= hpricot PORTVERSION= 0.8.6 +PORTREVISION= 1 CATEGORIES= www rubygems MASTER_SITES= RG diff --git a/www/rubygem-hpricot/files/patch-clang16 b/www/rubygem-hpricot/files/patch-clang16 new file mode 100644 index 000000000000..3d79619449d0 --- /dev/null +++ b/www/rubygem-hpricot/files/patch-clang16 @@ -0,0 +1,22 @@ +--- ext/fast_xs/fast_xs.c.orig 2023-05-04 17:51:30 UTC ++++ ext/fast_xs/fast_xs.c +@@ -144,7 +144,7 @@ static VALUE unpack_utf8(VALUE self) + return rb_funcall(self, unpack_id, 1, U_fmt); + } + +-static VALUE unpack_uchar(VALUE self) ++static VALUE unpack_uchar(VALUE self, VALUE exc) + { + return rb_funcall(self, unpack_id, 1, C_fmt); + } +--- ext/hpricot_scan/hpricot_scan.c.orig 2023-05-04 18:05:46 UTC ++++ ext/hpricot_scan/hpricot_scan.c +@@ -22,7 +22,7 @@ struct hpricot_struct { + #define RSTRING_PTR(str) RSTRING(str)->ptr + #endif + +-VALUE hpricot_css(VALUE, VALUE, VALUE, VALUE, VALUE); ++VALUE hpricot_css(VALUE, VALUE, VALUE, VALUE); + + #define NO_WAY_SERIOUSLY "*** This should not happen, please file a bug report with the HTML you're parsing at http://github.com/hpricot/hpricot/issues. So sorry!" +