Skip to content

Commit

Permalink
sysutils/tracker3: fix build with clang 16
Browse files Browse the repository at this point in the history
Clang 16 has a new error about incompatible function types, which shows
up when building sysutils/tracker3:

  ../src/libtracker-sparql/bus/tracker-bus.vala:20:56: error: incompatible function pointer types assigning to 'void (*)(TrackerSparqlConnection *, GCancellable *, GAsyncReadyCallback, gpointer)' (aka 'void (*)(struct _TrackerSparqlConnection *, struct _GCancellable *, void (*)(struct _GObject *, struct _GAsyncResult *, void *), void *)') from 'void (*)(TrackerSparqlConnection *, GAsyncReadyCallback, gpointer)' (aka 'void (*)(struct _TrackerSparqlConnection *, void (*)(struct _GObject *, struct _GAsyncResult *, void *), void *)') [-Wincompatible-function-pointer-types]
          ((TrackerSparqlConnectionClass *) klass)->close_async = (void (*) (TrackerSparqlConnection*, GAsyncReadyCallback, gpointer)) tracker_bus_connection_real_close_async;
                                                                ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Since the error occurs in vala-generated code, it does not make sense to
patch the .c file. Suppress the warning instead.

PR:		271968
Approved by:	vishwin, fernape
MFH:		2023Q2
  • Loading branch information
DimitryAndric committed Jun 15, 2023
1 parent efb3d9a commit e78dc01
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions sysutils/tracker3/Makefile
@@ -1,6 +1,6 @@
PORTNAME= tracker
PORTVERSION= 3.1.2
PORTREVISION= 7
PORTREVISION= 8
CATEGORIES= sysutils gnome
MASTER_SITES= GNOME
PKGNAMESUFFIX= 3
Expand Down Expand Up @@ -43,8 +43,14 @@ MAN_BUILD_DEPENDS= asciidoc:textproc/asciidoc
MAN_MESON_TRUE= man
MAN_DESC= Install manual pages

.include <bsd.port.pre.mk>

.if ${COMPILER_TYPE} == clang
CFLAGS+= -Wno-incompatible-function-pointer-types
.endif

post-patch:
${REINPLACE_CMD} -e 's|/etc/asciidoc|${PYTHONPREFIX_SITELIBDIR}/asciidoc/resources|' \
${WRKSRC}/docs/manpages/meson.build

.include <bsd.port.mk>
.include <bsd.port.post.mk>

0 comments on commit e78dc01

Please sign in to comment.