From nobody Sun Jun 04 16:21:58 2023 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 4QZ27V64pXz4ZHyy; Sun, 4 Jun 2023 16:21:58 +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 4QZ27V2l4Yz3sZP; Sun, 4 Jun 2023 16:21:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685895718; 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=/Oo/NM7DeMn7y96TXTdKC0Ictbr6ATR0X7ZEExdqBSY=; b=vfmhzlL/WHn6JBUth43YX8Nnl6Upt3b+MpzkE8p3TmLierwU43y6WIHDXpsUL8Ma+XjInZ 3M22QTsJM0ODkNlnH6I5kYpZIVCTYlZgrR3MorxvabhD/RosB/DmXcxVZxob+RIEng4Kue 1Cfp5rJb4rMKsBuoCxZCaKDNvmrC18qF85XiW61UngrLchyhGzLvk7THoowI+2xRvTjpaT CNTpMEdDSCc9MRAc29BK007rUlbkrdLcUtNPhAppmDHOw9gYMzgAwQXOn1LItG/c89Dcti 4+pX7D979S3rAeF0vxhr7b4KM1n2mO3vKFl6cDvh/Ex3llGHGvOGjlh12UkNMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685895718; 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=/Oo/NM7DeMn7y96TXTdKC0Ictbr6ATR0X7ZEExdqBSY=; b=dypvkbYnbs3N7tgMKdcLj2z7i3sahizuehU/HHe8edDlGazHRsr9tDLXHTJ/toZCKLgCaI PSWPAwo9O9ltqVm/4Fi0KaUy5NIMarCzxAsj/ruK//mOPPjHLJDFsmlgYRK/Yjn8jV0kuN WCwLIonTK6MVJLPDkUwb+Y1ceCXtDnBsSungBIGQsIM+56t9BCgjjmAbdMUf2xm5qIYk6Q ri0gc2kDpZpdHKkAqbeVgKr1htRwBAGj2zFoSwWQBHnCGPwA2I7Z/Rvg9vbOgRQ9kOCs5v 2a+iG9PqLgdfWNrXcLEFkxlMpEYRPpE2v6As3ZsnUPMRn6ErFRLArG42iTd0jg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1685895718; a=rsa-sha256; cv=none; b=RUwj0yOvL9B6lt45tkHVjkfduTmS8FXzMguQd5ptIakDSw9kd5xcFywREmwhxWtkJ02/6C 5wtIM3k+XqEfKstrKgedNIN7JgZola0O5vvHGU3quB+yWGXbhx3MxIU09foVeMdNr19T9F pVM5EJ20LRXdQRX4WXBCvV14p78Gujg2RLx08qHkX7nhwg3huvZTuFRuW8xVkhWwCi5f31 vBa9lf0yIGQ5fow8sheOIhFrdnDx4QZjrrUN9y4ixr7aufPtdYizqWLi9C+XJTkOzSykyr OUrfsaovzYOUHe9OAP0zq6QunIubV9LDvJIjYLQKCyHrHqjyf5woCyRQR7snMw== 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 4QZ27V1pztz1Cp1; Sun, 4 Jun 2023 16:21:58 +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 354GLw4i025000; Sun, 4 Jun 2023 16:21:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 354GLwC7024999; Sun, 4 Jun 2023 16:21:58 GMT (envelope-from git) Date: Sun, 4 Jun 2023 16:21:58 GMT Message-Id: <202306041621.354GLwC7024999@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: eff4307ac72a - main - graphics/rubygem-cairo: fix build with clang 16 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: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@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: eff4307ac72a9630c67d030e0565fde34ff82d7d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/ports/commit/?id=eff4307ac72a9630c67d030e0565fde34ff82d7d commit eff4307ac72a9630c67d030e0565fde34ff82d7d Author: Dimitry Andric AuthorDate: 2023-05-29 13:20:55 +0000 Commit: Dimitry Andric CommitDate: 2023-06-04 16:21:24 +0000 graphics/rubygem-cairo: fix build with clang 16 Clang 16 has a new error about incompatible function types, which shows up when building graphics/rubygem-cairo: rb_cairo_surface.c:2354:3: error: incompatible function pointer types passing 'VALUE (int, VALUE *, VALUE)' (aka 'unsigned long (int, unsigned long *, unsigned long)') to parameter of type 'VALUE (*)(VALUE, VALUE)' (aka 'unsigned long (*)(unsigned long, unsigned long)') [-Wincompatible-function-pointer-types] rb_define_method (rb_cCairo_GLSurface, "initialize", ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/local/include/ruby-3.1/ruby/internal/anyargs.h:287:135: note: expanded from macro 'rb_define_method' #define rb_define_method(klass, mid, func, arity) RBIMPL_ANYARGS_DISPATCH_rb_define_method((arity), (func))((klass), (mid), (func), (arity)) ^~~~~~ /usr/local/include/ruby-3.1/ruby/internal/anyargs.h:276:1: note: passing argument to parameter here RBIMPL_ANYARGS_DECL(rb_define_method, VALUE, const char *) ^ /usr/local/include/ruby-3.1/ruby/internal/anyargs.h:255:72: note: expanded from macro 'RBIMPL_ANYARGS_DECL' RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _01(__VA_ARGS__, VALUE(*)(VALUE, VALUE), int); \ ^ rb_cairo_surface.c:2368:3: error: incompatible function pointer types passing 'VALUE (int, VALUE *, VALUE)' (aka 'unsigned long (int, unsigned long *, unsigned long)') to parameter of type 'VALUE (*)(VALUE, VALUE)' (aka 'unsigned long (*)(unsigned long, unsigned long)') [-Wincompatible-function-pointer-types] rb_define_method (rb_cCairo_GLTextureSurface, "initialize", ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/local/include/ruby-3.1/ruby/internal/anyargs.h:287:135: note: expanded from macro 'rb_define_method' #define rb_define_method(klass, mid, func, arity) RBIMPL_ANYARGS_DISPATCH_rb_define_method((arity), (func))((klass), (mid), (func), (arity)) ^~~~~~ /usr/local/include/ruby-3.1/ruby/internal/anyargs.h:276:1: note: passing argument to parameter here RBIMPL_ANYARGS_DECL(rb_define_method, VALUE, const char *) ^ /usr/local/include/ruby-3.1/ruby/internal/anyargs.h:255:72: note: expanded from macro 'RBIMPL_ANYARGS_DECL' RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _01(__VA_ARGS__, VALUE(*)(VALUE, VALUE), int); \ ^ This is because rb_define_method's last argument is the 'arity' of the method, and in case of cr_gl_surface_initialize() and cr_gl_texture_surface_initialize() it should be -1 to indicate a variable number of arguments. PR: 271706 Approved by: portmgr (buildfix blanket) MFH: 2023Q2 --- graphics/rubygem-cairo/Makefile | 1 + .../files/patch-ext_cairo_rb__cairo__surface.c | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/graphics/rubygem-cairo/Makefile b/graphics/rubygem-cairo/Makefile index 22e38a2fb449..38fb76c950a8 100644 --- a/graphics/rubygem-cairo/Makefile +++ b/graphics/rubygem-cairo/Makefile @@ -1,5 +1,6 @@ PORTNAME= cairo PORTVERSION= 1.17.8 +PORTREVISION= 1 CATEGORIES= graphics rubygems MASTER_SITES= RG diff --git a/graphics/rubygem-cairo/files/patch-ext_cairo_rb__cairo__surface.c b/graphics/rubygem-cairo/files/patch-ext_cairo_rb__cairo__surface.c new file mode 100644 index 000000000000..7ef565a13712 --- /dev/null +++ b/graphics/rubygem-cairo/files/patch-ext_cairo_rb__cairo__surface.c @@ -0,0 +1,20 @@ +--- ext/cairo/rb_cairo_surface.c.orig 2023-05-29 13:00:29 UTC ++++ ext/cairo/rb_cairo_surface.c +@@ -2352,7 +2352,7 @@ Init_cairo_surface (void) + rb_define_class_under (rb_mCairo, "GLTextureSurface", rb_cCairo_GLSurface); + #ifdef RB_CAIRO_HAS_GL_SURFACE + rb_define_method (rb_cCairo_GLSurface, "initialize", +- cr_gl_surface_initialize, 1); ++ cr_gl_surface_initialize, -1); + + rb_define_method (rb_cCairo_GLSurface, "set_size", + cr_gl_surface_set_size, 2); +@@ -2366,7 +2366,7 @@ Init_cairo_surface (void) + RB_CAIRO_DEF_SETTERS (rb_cCairo_GLSurface); + + rb_define_method (rb_cCairo_GLTextureSurface, "initialize", +- cr_gl_texture_surface_initialize, 1); ++ cr_gl_texture_surface_initialize, -1); + + RB_CAIRO_DEF_SETTERS (rb_cCairo_GLTextureSurface); + #endif